Autopsy  4.17.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(PoolNode pn);
40 
41  T visit(DirectoryNode dn);
42 
43  T visit(FileNode fn);
44 
45  T visit(LayoutFileNode lcn);
46 
47  T visit(LocalFileNode dfn);
48 
49  T visit(SlackFileNode sfn);
50 
51  T visit(BlackboardArtifactNode bban);
52 
53 
60  static abstract class Default<T> implements ContentNodeVisitor<T> {
61 
69  protected abstract T defaultVisit(ContentNode c);
70 
71  @Override
72  public T visit(DirectoryNode dn) {
73  return defaultVisit(dn);
74  }
75 
76  @Override
77  public T visit(FileNode fn) {
78  return defaultVisit(fn);
79  }
80 
81  @Override
82  public T visit(ImageNode in) {
83  return defaultVisit(in);
84  }
85 
86  @Override
87  public T visit(VolumeNode vn) {
88  return defaultVisit(vn);
89  }
90 
91  @Override
92  public T visit(PoolNode pn) {
93  return defaultVisit(pn);
94  }
95 
96  @Override
97  public T visit(LayoutFileNode lcn) {
98  return defaultVisit(lcn);
99  }
100 
101  @Override
102  public T visit(LocalFileNode dfn) {
103  return defaultVisit(dfn);
104  }
105 
106  @Override
107  public T visit(VirtualDirectoryNode ldn) {
108  return defaultVisit(ldn);
109  }
110 
111  @Override
112  public T visit(LocalDirectoryNode ldn) {
113  return defaultVisit(ldn);
114  }
115 
116  @Override
117  public T visit(SlackFileNode sfn) {
118  return defaultVisit(sfn);
119  }
120 
121  @Override
122  public T visit(BlackboardArtifactNode bban) {
123  return defaultVisit(bban);
124  }
125  }
126 }

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