19 package org.sleuthkit.autopsy.datamodel;
21 import org.openide.nodes.AbstractNode;
22 import org.openide.nodes.Children.Keys;
23 import org.openide.nodes.Node;
24 import org.openide.util.NbBundle;
41 abstract class AbstractContentChildren<T>
extends Keys<T> {
43 private final CreateSleuthkitNodeVisitor createSleuthkitNodeVisitor =
new CreateSleuthkitNodeVisitor();
44 private final CreateAutopsyNodeVisitor createAutopsyNodeVisitor =
new CreateAutopsyNodeVisitor();
49 AbstractContentChildren() {
54 protected Node[] createNodes(T key) {
55 if (key instanceof SleuthkitVisitableItem) {
56 return new Node[]{((SleuthkitVisitableItem) key).accept(createSleuthkitNodeVisitor)};
58 return new Node[]{((AutopsyVisitableItem) key).accept(createAutopsyNodeVisitor)};
109 throw new UnsupportedOperationException(NbBundle.getMessage(
this.getClass(),
110 "AbstractContentChildren.CreateTSKNodeVisitor.exception.noNodeMsg"));
121 static class CreateAutopsyNodeVisitor
extends AutopsyItemVisitor.Default<AbstractNode> {
129 public AbstractNode visit(FileTypeExtensionFilters sf) {
130 return new FileTypesNode(sf.getSleuthkitCase(), null);
134 public AbstractNode visit(RecentFiles rf) {
135 return new RecentFilesNode(rf.getSleuthkitCase());
139 public AbstractNode visit(DeletedContent dc) {
140 return new DeletedContent.DeletedContentsNode(dc.getSleuthkitCase());
144 public AbstractNode visit(FileSize dc) {
145 return new FileSize.FileSizeRootNode(dc.getSleuthkitCase());
149 public AbstractNode
visit(KeywordHits kh) {
150 return kh.new RootNode();
154 public AbstractNode
visit(HashsetHits hh) {
155 return hh.new RootNode();
159 public AbstractNode
visit(InterestingHits ih) {
160 return ih.new RootNode();
164 public AbstractNode
visit(EmailExtracted ee) {
165 return ee.new RootNode();
169 public AbstractNode
visit(Tags tagsNodeKey) {
170 return tagsNodeKey.new RootNode();
174 public AbstractNode
visit(DataSources i) {
175 return new DataSourcesNode();
179 public AbstractNode
visit(Views v) {
180 return new ViewsNode(v.getSleuthkitCase());
184 public AbstractNode
visit(Results r) {
185 return new ResultsNode(r.getSleuthkitCase());
189 public AbstractNode
visit(Reports reportsItem) {
190 return new Reports.ReportsListNode();
194 protected AbstractNode defaultVisit(AutopsyVisitableItem di) {
195 throw new UnsupportedOperationException(
196 NbBundle.getMessage(
this.getClass(),
197 "AbstractContentChildren.createAutopsyNodeVisitor.exception.noNodeMsg"));
AbstractContentNode<?extends Content > visit(VirtualDirectory ld)
AbstractContentNode<?extends Content > visit(LocalFile lf)
AbstractContentNode<?extends Content > visit(Volume volume)
AbstractContentNode<?extends Content > visit(LayoutFile lf)
AbstractContentNode<?extends Content > defaultVisit(SleuthkitVisitableItem di)
AbstractContentNode<?extends Content > visit(Image image)
AbstractContentNode<?extends Content > visit(Directory drctr)
T visit(FileTypeExtensionFilters.RootFilter fsf)
AbstractContentNode<?extends Content > visit(File file)
AbstractContentNode<?extends Content > visit(DerivedFile df)