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(FileTypesByExtension sf) {
93 return sf.new FileTypesByExtNode(sf.getSleuthkitCase(), null);
97 public AbstractNode visit(RecentFiles rf) {
98 return new RecentFilesNode(rf.getSleuthkitCase());
102 public AbstractNode visit(DeletedContent dc) {
103 return new DeletedContent.DeletedContentsNode(dc.getSleuthkitCase(), dc.filteringDataSourceObjId());
107 public AbstractNode visit(FileSize dc) {
108 return new FileSize.FileSizeRootNode(dc.getSleuthkitCase(), dc.filteringDataSourceObjId());
112 public AbstractNode
visit(KeywordHits kh) {
113 return kh.new RootNode();
117 public AbstractNode
visit(HashsetHits hh) {
118 return hh.new RootNode();
122 public AbstractNode
visit(InterestingHits ih) {
123 return ih.new RootNode();
127 public AbstractNode
visit(EmailExtracted ee) {
128 return ee.new RootNode();
132 public AbstractNode
visit(Tags tagsNodeKey) {
133 return tagsNodeKey.new RootNode(tagsNodeKey.filteringDataSourceObjId());
137 public AbstractNode
visit(DataSources i) {
138 return new DataSourcesNode(i.filteringDataSourceObjId());
142 public AbstractNode
visit(DataSourceGrouping datasourceGrouping) {
143 return new DataSourceGroupingNode(datasourceGrouping.getDataSource());
147 public AbstractNode
visit(Views v) {
148 return new ViewsNode(v.getSleuthkitCase(), v.filteringDataSourceObjId());
152 public AbstractNode
visit(Results results) {
153 return new ResultsNode(results.getSleuthkitCase(), results.filteringDataSourceObjId() );
157 public AbstractNode
visit(FileTypes ft) {
158 return ft.new FileTypesNode();
162 public AbstractNode
visit(Reports reportsItem) {
163 return new Reports.ReportsListNode();
167 public AbstractNode
visit(Accounts accountsItem) {
168 return accountsItem.new AccountsRootNode();
172 protected AbstractNode defaultVisit(AutopsyVisitableItem di) {
173 throw new UnsupportedOperationException(
174 NbBundle.getMessage(
this.getClass(),
175 "AbstractContentChildren.createAutopsyNodeVisitor.exception.noNodeMsg"));
179 public AbstractNode
visit(FileTypesByMimeType ftByMimeTypeItem) {
180 return ftByMimeTypeItem.new ByMimeTypeNode();
final Collection<?extends Object > contentKeys
T visit(FileTypesByExtension.RootFilter fsf)
void refreshContentKeys()
RootContentChildren(Collection<?extends Object > contentKeys)
final CreateAutopsyNodeVisitor createAutopsyNodeVisitor
Node[] createNodes(Object key)
final CreateSleuthkitNodeVisitor createSleuthkitNodeVisitor