19 package org.sleuthkit.autopsy.datamodel;
21 import java.util.Collection;
22 import java.util.Collections;
23 import org.openide.nodes.AbstractNode;
24 import org.openide.nodes.Children;
25 import org.openide.nodes.Node;
26 import org.openide.util.NbBundle;
55 setKeys(Collections.<Object>emptySet());
65 contentKeys.forEach(this::refreshKey);
71 return new Node[]{((AutopsyVisitableItem) key).accept(createAutopsyNodeVisitor)};
73 return new Node[]{((SleuthkitVisitableItem) key).accept(createSleuthkitNodeVisitor)};
84 static class CreateAutopsyNodeVisitor
extends AutopsyItemVisitor.Default<AbstractNode> {
92 public AbstractNode visit(RecentFiles rf) {
93 return new RecentFilesNode(rf.getSleuthkitCase());
97 public AbstractNode visit(DeletedContent dc) {
98 return new DeletedContent.DeletedContentsNode(dc.getSleuthkitCase(), dc.filteringDataSourceObjId());
102 public AbstractNode visit(FileSize dc) {
103 return new FileSize.FileSizeRootNode(dc.getSleuthkitCase(), dc.filteringDataSourceObjId());
107 public AbstractNode visit(KeywordHits kh) {
108 return kh.new RootNode();
112 public AbstractNode
visit(HashsetHits hh) {
113 return hh.new RootNode();
117 public AbstractNode
visit(InterestingHits ih) {
118 return ih.new RootNode();
122 public AbstractNode
visit(EmailExtracted ee) {
123 return ee.new RootNode();
127 public AbstractNode
visit(Tags tagsNodeKey) {
128 return tagsNodeKey.new RootNode(tagsNodeKey.filteringDataSourceObjId());
132 public AbstractNode
visit(DataSources i) {
133 return new DataSourceFilesNode(i.filteringDataSourceObjId());
137 public AbstractNode
visit(DataSourceGrouping datasourceGrouping) {
138 return new DataSourceGroupingNode(datasourceGrouping.getDataSource());
142 public AbstractNode
visit(Views v) {
143 return new ViewsNode(v.getSleuthkitCase(), v.filteringDataSourceObjId());
147 public AbstractNode
visit(FileTypes ft) {
148 return ft.new FileTypesNode();
152 public AbstractNode
visit(Reports reportsItem) {
153 return new Reports.ReportsListNode();
157 public AbstractNode
visit(Accounts accountsItem) {
158 return accountsItem.new AccountsRootNode();
162 public AbstractNode
visit(OsAccounts osAccountsItem) {
163 return osAccountsItem.new OsAccountListNode();
167 protected AbstractNode defaultVisit(AutopsyVisitableItem di) {
168 throw new UnsupportedOperationException(
169 NbBundle.getMessage(
this.getClass(),
170 "AbstractContentChildren.createAutopsyNodeVisitor.exception.noNodeMsg"));
174 public AbstractNode
visit(FileTypesByMimeType ftByMimeTypeItem) {
175 return ftByMimeTypeItem.new ByMimeTypeNode();
179 public AbstractNode
visit(PersonGrouping personGrouping) {
180 return new PersonNode(personGrouping.getPerson());
184 public AbstractNode
visit(HostDataSources hosts) {
185 return new HostNode(hosts);
189 public AbstractNode
visit(HostGrouping hostGrouping) {
190 return new HostNode(hostGrouping);
194 public AbstractNode
visit(DataSourcesByType dataSourceHosts) {
195 return new DataSourcesNode();
199 public AbstractNode
visit(AnalysisResults analysisResults) {
200 return new AnalysisResults.RootNode(
201 analysisResults.getFilteringDataSourceObjId());
205 public AbstractNode
visit(DataArtifacts dataArtifacts) {
206 return new DataArtifacts.RootNode(
207 dataArtifacts.getFilteringDataSourceObjId());
final Collection<?extends Object > contentKeys
T visit(FileTypesByExtension.RootFilter fsf)
void refreshContentKeys()
RootContentChildren(Collection<?extends Object > contentKeys)
final CreateAutopsyNodeVisitor createAutopsyNodeVisitor
Node[] createNodes(Object key)
SleuthkitCase getSleuthkitCase()
final CreateSleuthkitNodeVisitor createSleuthkitNodeVisitor