Autopsy  4.19.3
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-2021 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 
22 
31 interface ContentNodeVisitor<T> {
32 
33  T visit(ImageNode in);
34 
35  T visit(VirtualDirectoryNode lcn);
36 
37  T visit(LocalDirectoryNode ldn);
38 
39  T visit(VolumeNode vn);
40 
41  T visit(PoolNode pn);
42 
43  T visit(DirectoryNode dn);
44 
45  T visit(FileNode fn);
46 
47  T visit(LayoutFileNode lcn);
48 
49  T visit(LocalFileNode dfn);
50 
51  T visit(SlackFileNode sfn);
52 
53  T visit(BlackboardArtifactNode bban);
54 
55  T visit(UnsupportedContentNode ucn);
56 
57  T visit(OsAccountNode bban);
58 
59  T visit(LocalFilesDataSourceNode lfdsn);
60 
67  static abstract class Default<T> implements ContentNodeVisitor<T> {
68 
76  protected abstract T defaultVisit(ContentNode c);
77 
78  @Override
79  public T visit(DirectoryNode dn) {
80  return defaultVisit(dn);
81  }
82 
83  @Override
84  public T visit(FileNode fn) {
85  return defaultVisit(fn);
86  }
87 
88  @Override
89  public T visit(ImageNode in) {
90  return defaultVisit(in);
91  }
92 
93  @Override
94  public T visit(VolumeNode vn) {
95  return defaultVisit(vn);
96  }
97 
98  @Override
99  public T visit(PoolNode pn) {
100  return defaultVisit(pn);
101  }
102 
103  @Override
104  public T visit(LayoutFileNode lcn) {
105  return defaultVisit(lcn);
106  }
107 
108  @Override
109  public T visit(LocalFileNode dfn) {
110  return defaultVisit(dfn);
111  }
112 
113  @Override
114  public T visit(VirtualDirectoryNode ldn) {
115  return defaultVisit(ldn);
116  }
117 
118  @Override
119  public T visit(LocalDirectoryNode ldn) {
120  return defaultVisit(ldn);
121  }
122 
123  @Override
124  public T visit(SlackFileNode sfn) {
125  return defaultVisit(sfn);
126  }
127 
128  @Override
129  public T visit(BlackboardArtifactNode bban) {
130  return defaultVisit(bban);
131  }
132 
133  @Override
135  return defaultVisit(ucn);
136  }
137 
138  @Override
139  public T visit(OsAccountNode bban) {
140  return defaultVisit(bban);
141  }
142 
143  @Override
144  public T visit(LocalFilesDataSourceNode lfdsn) {
145  return defaultVisit(lfdsn);
146  }
147  }
148 }

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