Autopsy  4.19.3
Graphical digital forensics platform for The Sleuth Kit and other tools.
CreateSleuthkitNodeVisitor.java
Go to the documentation of this file.
1 /*
2  * Autopsy Forensic Browser
3  *
4  * Copyright 2011-2019 Basis Technology Corp.
5  * Contact: carrier <at> sleuthkit <dot> org
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  */
19 package org.sleuthkit.autopsy.datamodel;
20 
21 import org.openide.util.NbBundle;
22 import org.sleuthkit.datamodel.BlackboardArtifact;
23 import org.sleuthkit.datamodel.Content;
24 import org.sleuthkit.datamodel.DerivedFile;
25 import org.sleuthkit.datamodel.Directory;
26 import org.sleuthkit.datamodel.File;
27 import org.sleuthkit.datamodel.Image;
28 import org.sleuthkit.datamodel.LayoutFile;
29 import org.sleuthkit.datamodel.LocalDirectory;
30 import org.sleuthkit.datamodel.LocalFile;
31 import org.sleuthkit.datamodel.LocalFilesDataSource;
32 import org.sleuthkit.datamodel.Pool;
33 import org.sleuthkit.datamodel.SlackFile;
34 import org.sleuthkit.datamodel.SleuthkitItemVisitor;
35 import org.sleuthkit.datamodel.SleuthkitVisitableItem;
36 import org.sleuthkit.datamodel.UnsupportedContent;
37 import org.sleuthkit.datamodel.VirtualDirectory;
38 import org.sleuthkit.datamodel.Volume;
39 
43 public class CreateSleuthkitNodeVisitor extends SleuthkitItemVisitor.Default<AbstractContentNode<? extends Content>> {
44 
45  @Override
47  return new DirectoryNode(drctr);
48  }
49 
50  @Override
52  return new FileNode(file);
53  }
54 
55  @Override
57  return new ImageNode(image);
58  }
59 
60  @Override
62  return new VolumeNode(volume);
63  }
64 
65  @Override
67  return new PoolNode(pool);
68  }
69 
70  @Override
72  return new LayoutFileNode(lf);
73  }
74 
75  @Override
77  return new LocalFileNode(df);
78  }
79 
80  @Override
82  return new LocalFileNode(lf);
83  }
84 
85  @Override
86  public AbstractContentNode<? extends Content> visit(VirtualDirectory ld) {
87  return new VirtualDirectoryNode(ld);
88  }
89 
90  @Override
91  public AbstractContentNode<? extends Content> visit(LocalDirectory ld) {
92  return new LocalDirectoryNode(ld);
93  }
94 
95  @Override
97  return new SlackFileNode(sf);
98  }
99 
100  @Override
101  public AbstractContentNode<? extends Content> visit(BlackboardArtifact art) {
102  return new BlackboardArtifactNode(art);
103  }
104 
105  @Override
106  public AbstractContentNode<? extends Content> visit(UnsupportedContent uc) {
107  return new UnsupportedContentNode(uc);
108  }
109 
110  @Override
111  protected AbstractContentNode<? extends Content> defaultVisit(SleuthkitVisitableItem di) {
112  throw new UnsupportedOperationException(NbBundle.getMessage(this.getClass(),
113  "AbstractContentChildren.CreateTSKNodeVisitor.exception.noNodeMsg"));
114  }
115 
116  @Override
117  public AbstractContentNode<? extends Content> visit(LocalFilesDataSource ld) {
118  return new LocalFilesDataSourceNode(ld);
119  }
120 }
AbstractContentNode<?extends Content > visit(Pool pool)
AbstractContentNode<?extends Content > visit(LocalDirectory ld)
AbstractContentNode<?extends Content > visit(File file)
AbstractContentNode<?extends Content > visit(LayoutFile lf)
AbstractContentNode<?extends Content > visit(LocalFile lf)
AbstractContentNode<?extends Content > visit(DerivedFile df)
AbstractContentNode<?extends Content > visit(BlackboardArtifact art)
AbstractContentNode<?extends Content > visit(VirtualDirectory ld)
AbstractContentNode<?extends Content > visit(SlackFile sf)
AbstractContentNode<?extends Content > visit(Directory drctr)
AbstractContentNode<?extends Content > visit(Volume volume)
AbstractContentNode<?extends Content > defaultVisit(SleuthkitVisitableItem di)
AbstractContentNode<?extends Content > visit(LocalFilesDataSource ld)
AbstractContentNode<?extends Content > visit(Image image)
AbstractContentNode<?extends Content > visit(UnsupportedContent uc)

Copyright © 2012-2022 Basis Technology. Generated on: Tue Oct 4 2022
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.