Autopsy  4.7.0
Graphical digital forensics platform for The Sleuth Kit and other tools.
ContentNodeVisitor.java
Go to the documentation of this file.
1 /*
2  * Autopsy Forensic Browser
3  *
4  * Copyright 2011 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 
29 interface ContentNodeVisitor<T> {
30 
31  T visit(ImageNode in);
32 
33  T visit(VirtualDirectoryNode lcn);
34 
35  T visit(LocalDirectoryNode ldn);
36 
37  T visit(VolumeNode vn);
38 
39  T visit(DirectoryNode dn);
40 
41  T visit(FileNode fn);
42 
43  T visit(LayoutFileNode lcn);
44 
45  T visit(LocalFileNode dfn);
46 
47  T visit(SlackFileNode sfn);
48 
49  T visit(BlackboardArtifactNode bban);
50 
51 
58  static abstract class Default<T> implements ContentNodeVisitor<T> {
59 
67  protected abstract T defaultVisit(ContentNode c);
68 
69  @Override
70  public T visit(DirectoryNode dn) {
71  return defaultVisit(dn);
72  }
73 
74  @Override
75  public T visit(FileNode fn) {
76  return defaultVisit(fn);
77  }
78 
79  @Override
80  public T visit(ImageNode in) {
81  return defaultVisit(in);
82  }
83 
84  @Override
85  public T visit(VolumeNode vn) {
86  return defaultVisit(vn);
87  }
88 
89  @Override
90  public T visit(LayoutFileNode lcn) {
91  return defaultVisit(lcn);
92  }
93 
94  @Override
95  public T visit(LocalFileNode dfn) {
96  return defaultVisit(dfn);
97  }
98 
99  @Override
100  public T visit(VirtualDirectoryNode ldn) {
101  return defaultVisit(ldn);
102  }
103 
104  @Override
105  public T visit(LocalDirectoryNode ldn) {
106  return defaultVisit(ldn);
107  }
108 
109  @Override
110  public T visit(SlackFileNode sfn) {
111  return defaultVisit(sfn);
112  }
113 
114  @Override
115  public T visit(BlackboardArtifactNode bban) {
116  return defaultVisit(bban);
117  }
118  }
119 }

Copyright © 2012-2016 Basis Technology. Generated on: Mon Jun 18 2018
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.