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;
45 abstract class AbstractContentChildren<T>
extends Keys<T> {
47 private final CreateSleuthkitNodeVisitor createSleuthkitNodeVisitor =
new CreateSleuthkitNodeVisitor();
48 private final CreateAutopsyNodeVisitor createAutopsyNodeVisitor =
new CreateAutopsyNodeVisitor();
53 AbstractContentChildren() {
58 protected Node[] createNodes(T key) {
59 if (key instanceof SleuthkitVisitableItem) {
60 return new Node[]{((SleuthkitVisitableItem) key).accept(createSleuthkitNodeVisitor)};
62 return new Node[]{((AutopsyVisitableItem) key).accept(createAutopsyNodeVisitor)};
113 throw new UnsupportedOperationException(NbBundle.getMessage(
this.getClass(),
114 "AbstractContentChildren.CreateTSKNodeVisitor.exception.noNodeMsg"));
125 static class CreateAutopsyNodeVisitor
extends AutopsyItemVisitor.Default<AbstractNode> {
133 public AbstractNode visit(FileTypeExtensionFilters sf) {
134 return new FileTypesNode(sf.getSleuthkitCase(), null);
138 public AbstractNode visit(RecentFiles rf) {
139 return new RecentFilesNode(rf.getSleuthkitCase());
143 public AbstractNode visit(DeletedContent dc) {
144 return new DeletedContent.DeletedContentsNode(dc.getSleuthkitCase());
148 public AbstractNode visit(FileSize dc) {
149 return new FileSize.FileSizeRootNode(dc.getSleuthkitCase());
153 public AbstractNode
visit(KeywordHits kh) {
154 return kh.new RootNode();
158 public AbstractNode
visit(HashsetHits hh) {
159 return hh.new RootNode();
163 public AbstractNode
visit(InterestingHits ih) {
164 return ih.new RootNode();
168 public AbstractNode
visit(EmailExtracted ee) {
169 return ee.new RootNode();
173 public AbstractNode
visit(Tags tagsNodeKey) {
174 return tagsNodeKey.new RootNode();
178 public AbstractNode
visit(DataSources i) {
179 return new DataSourcesNode();
183 public AbstractNode
visit(Views v) {
184 return new ViewsNode(v.getSleuthkitCase());
188 public AbstractNode
visit(Results r) {
189 return new ResultsNode(r.getSleuthkitCase());
193 public AbstractNode
visit(Reports reportsItem) {
194 return new Reports.ReportsListNode();
198 public AbstractNode
visit(Accounts accountsItem) {
199 return accountsItem.new AccountsRootNode();
203 protected AbstractNode defaultVisit(AutopsyVisitableItem di) {
204 throw new UnsupportedOperationException(
205 NbBundle.getMessage(
this.getClass(),
206 "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)