19 package org.sleuthkit.autopsy.ingest;
 
   21 import java.util.ArrayList;
 
   22 import java.util.Collection;
 
   23 import java.util.logging.Level;
 
   38 abstract class GetFilesContentVisitor 
implements ContentVisitor<Collection<AbstractFile>> {
 
   40     private static final Logger logger = Logger.getLogger(GetFilesContentVisitor.class.getName());
 
   43     public Collection<AbstractFile> visit(VirtualDirectory ld) {
 
   44         return getAllFromChildren(ld);
 
   48     public Collection<AbstractFile> visit(Directory drctr) {
 
   49         return getAllFromChildren(drctr);
 
   53     public Collection<AbstractFile> visit(Image image) {
 
   54         return getAllFromChildren(image);
 
   58     public Collection<AbstractFile> visit(Volume volume) {
 
   59         return getAllFromChildren(volume);
 
   63     public Collection<AbstractFile> visit(VolumeSystem vs) {
 
   64         return getAllFromChildren(vs);
 
   75     protected Collection<AbstractFile> getAllFromChildren(Content parent) {
 
   76         Collection<AbstractFile> all = 
new ArrayList<>();
 
   79             for (Content child : parent.getChildren()) {
 
   80                 all.addAll(child.accept(
this));
 
   82         } 
catch (TskException ex) {
 
   83             logger.log(Level.SEVERE, 
"Error getting Content children", ex);