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;
57 setKeys(Collections.<Object>emptySet());
67 contentKeys.forEach(this::refreshKey);
73 return new Node[]{((AutopsyVisitableItem) key).accept(createAutopsyNodeVisitor)};
75 return new Node[]{((SleuthkitVisitableItem) key).accept(createSleuthkitNodeVisitor)};
86 static class CreateAutopsyNodeVisitor
extends AutopsyItemVisitor.Default<AbstractNode> {
94 public AbstractNode visit(RecentFiles rf) {
95 return new RecentFilesNode(rf.getSleuthkitCase());
99 public AbstractNode visit(DeletedContent dc) {
100 return new DeletedContent.DeletedContentsNode(dc.getSleuthkitCase(), dc.filteringDataSourceObjId());
104 public AbstractNode visit(ScoreContent sc) {
105 return new ScoreContent.ScoreContentsNode(sc.getSleuthkitCase(), sc.filteringDataSourceObjId());
109 public AbstractNode visit(FileSize dc) {
110 return new FileSize.FileSizeRootNode(dc.getSleuthkitCase(), dc.filteringDataSourceObjId());
114 public AbstractNode
visit(KeywordHits kh) {
115 return kh.new RootNode();
119 public AbstractNode
visit(HashsetHits hh) {
120 return hh.new RootNode();
124 public AbstractNode
visit(InterestingHits ih) {
125 return ih.new RootNode();
129 public AbstractNode
visit(EmailExtracted ee) {
130 return ee.new RootNode();
134 public AbstractNode
visit(Tags tagsNodeKey) {
135 return tagsNodeKey.new RootNode(tagsNodeKey.filteringDataSourceObjId());
139 public AbstractNode
visit(DataSources i) {
140 return new DataSourceFilesNode(i.filteringDataSourceObjId());
144 public AbstractNode
visit(DataSourceGrouping datasourceGrouping) {
145 return new DataSourceGroupingNode(datasourceGrouping.getDataSource());
149 public AbstractNode
visit(Views v) {
150 return new ViewsNode(v.getSleuthkitCase(), v.filteringDataSourceObjId());
154 public AbstractNode
visit(FileTypes ft) {
155 return ft.new FileTypesNode();
159 public AbstractNode
visit(Reports reportsItem) {
160 return new Reports.ReportsListNode();
164 public AbstractNode
visit(Accounts accountsItem) {
165 return accountsItem.new AccountsRootNode();
169 public AbstractNode
visit(OsAccounts osAccountsItem) {
170 return osAccountsItem.new OsAccountListNode();
174 protected AbstractNode defaultVisit(AutopsyVisitableItem di) {
175 throw new UnsupportedOperationException(
176 NbBundle.getMessage(
this.getClass(),
177 "AbstractContentChildren.createAutopsyNodeVisitor.exception.noNodeMsg"));
181 public AbstractNode
visit(FileTypesByMimeType ftByMimeTypeItem) {
182 return ftByMimeTypeItem.new ByMimeTypeNode();
186 public AbstractNode
visit(PersonGrouping personGrouping) {
187 return new PersonNode(personGrouping.getPerson());
191 public AbstractNode
visit(HostDataSources hosts) {
192 return new HostNode(hosts);
196 public AbstractNode
visit(HostGrouping hostGrouping) {
197 return new HostNode(hostGrouping);
201 public AbstractNode
visit(DataSourcesByType dataSourceHosts) {
202 return new DataSourcesNode();
206 public AbstractNode
visit(AnalysisResults analysisResults) {
207 return new AnalysisResults.RootNode(
208 analysisResults.getFilteringDataSourceObjId());
212 public AbstractNode
visit(DataArtifacts dataArtifacts) {
213 return new DataArtifacts.RootNode(
214 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