Sleuth Kit Java Bindings (JNI)  4.12.1
Java bindings for using The Sleuth Kit
ContentVisitor.java
Go to the documentation of this file.
1 /*
2  * Sleuth Kit Data Model
3  *
4  * Copyright 2011-2018 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.datamodel;
20 
32 public interface ContentVisitor<T> {
33 
41  T visit(Directory d);
42 
50  T visit(File f);
51 
59  T visit(FileSystem fs);
60 
68  T visit(Image i);
69 
77  T visit(Pool p);
78 
86  T visit(Volume v);
87 
95  T visit(VolumeSystem vs);
96 
104  T visit(LayoutFile lf);
105 
113  T visit(VirtualDirectory vd);
114 
122  T visit(LocalDirectory ld);
123 
131  T visit(DerivedFile lf);
132 
140  T visit(LocalFile df);
141 
149  T visit(SlackFile sf);
150 
158  T visit(BlackboardArtifact ba);
159 
167  T visit(Report r);
168 
176  T visit(OsAccount act);
177 
186 
197  static abstract public class Default<T> implements ContentVisitor<T> {
198 
199  protected abstract T defaultVisit(Content c);
200 
201  @Override
202  public T visit(Directory d) {
203  return defaultVisit(d);
204  }
205 
206  @Override
207  public T visit(File f) {
208  return defaultVisit(f);
209  }
210 
211  @Override
212  public T visit(FileSystem fs) {
213  return defaultVisit(fs);
214  }
215 
216  @Override
217  public T visit(Image i) {
218  return defaultVisit(i);
219  }
220 
221  @Override
222  public T visit(Volume v) {
223  return defaultVisit(v);
224  }
225 
226  @Override
227  public T visit(Pool p) {
228  return defaultVisit(p);
229  }
230 
231  @Override
232  public T visit(VolumeSystem vs) {
233  return defaultVisit(vs);
234  }
235 
236  @Override
237  public T visit(LayoutFile lf) {
238  return defaultVisit(lf);
239  }
240 
241  @Override
242  public T visit(VirtualDirectory ld) {
243  return defaultVisit(ld);
244  }
245 
246  @Override
247  public T visit(LocalDirectory ld) {
248  return defaultVisit(ld);
249  }
250 
251  @Override
252  public T visit(DerivedFile df) {
253  return defaultVisit(df);
254  }
255 
256  @Override
257  public T visit(LocalFile lf) {
258  return defaultVisit(lf);
259  }
260 
261  @Override
262  public T visit(SlackFile sf) {
263  return defaultVisit(sf);
264  }
265 
266  @Override
267  public T visit(BlackboardArtifact ba) {
268  return defaultVisit(ba);
269  }
270 
271  @Override
272  public T visit(Report r) {
273  return defaultVisit(r);
274  }
275 
276  @Override
277  public T visit(OsAccount act) {
278  return defaultVisit(act);
279  }
280 
281  @Override
282  public T visit(UnsupportedContent uc) {
283  return defaultVisit(uc);
284  }
285  }
286 }

Copyright © 2011-2021 Brian Carrier. (carrier -at- sleuthkit -dot- org)
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.