org.gcube.portlets.user.homelibrary.util
Class WorkspaceTreeVisitor

java.lang.Object
  extended by org.gcube.portlets.user.homelibrary.util.IndentedVisitor
      extended by org.gcube.portlets.user.homelibrary.util.WorkspaceTreeVisitor

public class WorkspaceTreeVisitor
extends IndentedVisitor

An utility to visit a workspace tree.

Author:
Federico De Faveri defaveri@isti.cnr.it

Field Summary
 
Fields inherited from class org.gcube.portlets.user.homelibrary.util.IndentedVisitor
DEFAULT_INDENTATION_STRING, indentationChar, indentationLevel, logger, os, sdf
 
Constructor Summary
WorkspaceTreeVisitor()
           
WorkspaceTreeVisitor(String indentationLevel, String indentationChar, PrintStream os, org.apache.log4j.Logger logger)
           
 
Method Summary
protected  void printFolderItem(FolderItem item)
           
protected  void printInfoObject(InfoObject infoObject)
          Visits a info object.
protected  void printWorkspaceItem(WorkspaceItem item)
          Visits a Workspace item.
protected  void visitAlternativeLink(DocumentAlternativeLink alternative)
           
protected  void visitAlternativeLinks(List<DocumentAlternativeLink> alternatives)
           
protected  void visitAquaMapsItem(AquaMapsItem aquamapsitem)
           
protected  void visitDocument(Document document)
          Visits a document.
protected  void visitExternalFile(ExternalFile file)
           
protected  void visitExternalImage(ExternalImage img)
          Visits an image.
protected  void visitExternalPDFFile(ExternalPDFFile pdf)
           
protected  void visitExternalURL(ExternalUrl url)
           
 void visitFolderItem(FolderItem item)
          Visits a folder item.
protected  void visitImage(Image img)
           
protected  void visitImageDocument(ImageDocument document)
           
protected  void visitImageH(Image img)
           
protected  void visitItem(WorkspaceItem item)
          Visit an item tree without verbose information.
protected  void visitMetadata(Metadata metadata)
           
protected  void visitPartLink(DocumentPartLink part)
           
protected  void visitPartLinks(List<DocumentPartLink> parts)
           
protected  void visitPDF(PDF pdf)
           
protected  void visitPDFDocument(PDFDocument document)
          Visits a PDF document.
protected  void visitQuery(Query query)
           
protected  void visitReport(Report report)
           
protected  void visitReportTemplate(ReportTemplate reportTemplate)
           
 void visitSimple(WorkspaceItem item)
          Visit an item tree without verbose information.
protected  void visitTimeSeries(TimeSeries timeseries)
           
protected  void visitUrlDocument(UrlDocument document)
           
protected  void visitUser(User user)
          Visits an user.
 void visitVerbose(WorkspaceFolder folder)
          Visit the tree in verbose mode.
protected  void visitWorkflowReport(WorkflowReport report)
           
protected  void visitWorkflowTemplate(WorkflowTemplate template)
           
protected  void visitWorkspaceFolder(WorkspaceFolder folder)
          Visits a workspace folder.
protected  void visitWorkspaceItem(WorkspaceItem item)
          Visit a workspace item.
 
Methods inherited from class org.gcube.portlets.user.homelibrary.util.IndentedVisitor
indent, outdent, println, println, reset
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WorkspaceTreeVisitor

public WorkspaceTreeVisitor()

WorkspaceTreeVisitor

public WorkspaceTreeVisitor(String indentationLevel,
                            String indentationChar,
                            PrintStream os,
                            org.apache.log4j.Logger logger)
Parameters:
indentationLevel - the indentation level.
indentationChar - the indentation char.
os - the output stream.
logger - the visitor logger.
Method Detail

visitVerbose

public void visitVerbose(WorkspaceFolder folder)
                  throws InternalErrorException
Visit the tree in verbose mode.

Parameters:
folder - the tree root.
Throws:
InternalErrorException - if an error occurs.

visitWorkspaceItem

protected void visitWorkspaceItem(WorkspaceItem item)
                           throws InternalErrorException
Visit a workspace item.

Parameters:
item - the item to visit.
Throws:
InternalErrorException - if an error occurs.

visitWorkspaceFolder

protected void visitWorkspaceFolder(WorkspaceFolder folder)
                             throws InternalErrorException
Visits a workspace folder.

Parameters:
folder - the workspace folder to visit.
Throws:
InternalErrorException - if an error occurs.

visitFolderItem

public void visitFolderItem(FolderItem item)
                     throws InternalErrorException
Visits a folder item.

Parameters:
item - the item to visit.
Throws:
InternalErrorException - if an error occurs.

visitImage

protected void visitImage(Image img)
                   throws InternalErrorException
Throws:
InternalErrorException

visitPDF

protected void visitPDF(PDF pdf)
                 throws InternalErrorException
Throws:
InternalErrorException

visitExternalImage

protected void visitExternalImage(ExternalImage img)
                           throws InternalErrorException
Visits an image.

Parameters:
img - the image to visit.
Throws:
InternalErrorException - if an error occurs.

visitExternalFile

protected void visitExternalFile(ExternalFile file)
                          throws InternalErrorException
Throws:
InternalErrorException

visitAquaMapsItem

protected void visitAquaMapsItem(AquaMapsItem aquamapsitem)
                          throws InternalErrorException
Throws:
InternalErrorException

visitImageH

protected void visitImageH(Image img)
                    throws InternalErrorException
Throws:
InternalErrorException

visitTimeSeries

protected void visitTimeSeries(TimeSeries timeseries)
                        throws InternalErrorException
Throws:
InternalErrorException

visitExternalPDFFile

protected void visitExternalPDFFile(ExternalPDFFile pdf)
                             throws InternalErrorException
Throws:
InternalErrorException

visitExternalURL

protected void visitExternalURL(ExternalUrl url)
                         throws InternalErrorException
Throws:
InternalErrorException

visitQuery

protected void visitQuery(Query query)
                   throws InternalErrorException
Throws:
InternalErrorException

visitReport

protected void visitReport(Report report)
                    throws InternalErrorException
Throws:
InternalErrorException

visitReportTemplate

protected void visitReportTemplate(ReportTemplate reportTemplate)
                            throws InternalErrorException
Throws:
InternalErrorException

visitWorkflowReport

protected void visitWorkflowReport(WorkflowReport report)
                            throws InternalErrorException
Throws:
InternalErrorException

visitWorkflowTemplate

protected void visitWorkflowTemplate(WorkflowTemplate template)
                              throws InternalErrorException
Throws:
InternalErrorException

printInfoObject

protected void printInfoObject(InfoObject infoObject)
                        throws InternalErrorException
Visits a info object.

Parameters:
infoObject - the info to visit.
Throws:
InternalErrorException - if an error occurs.

visitDocument

protected void visitDocument(Document document)
                      throws InternalErrorException
Visits a document.

Parameters:
document - the document to visit.
Throws:
InternalErrorException - if an error occurs.

visitPDFDocument

protected void visitPDFDocument(PDFDocument document)
                         throws InternalErrorException
Visits a PDF document.

Parameters:
document - the document to visit.
Throws:
InternalErrorException - if an error occurs.

visitImageDocument

protected void visitImageDocument(ImageDocument document)
                           throws InternalErrorException
Throws:
InternalErrorException

visitUrlDocument

protected void visitUrlDocument(UrlDocument document)
                         throws InternalErrorException
Throws:
InternalErrorException

visitAlternativeLinks

protected void visitAlternativeLinks(List<DocumentAlternativeLink> alternatives)
                              throws InternalErrorException
Throws:
InternalErrorException

visitAlternativeLink

protected void visitAlternativeLink(DocumentAlternativeLink alternative)
                             throws InternalErrorException
Throws:
InternalErrorException

visitPartLinks

protected void visitPartLinks(List<DocumentPartLink> parts)
                       throws InternalErrorException
Throws:
InternalErrorException

visitPartLink

protected void visitPartLink(DocumentPartLink part)
                      throws InternalErrorException
Throws:
InternalErrorException

visitMetadata

protected void visitMetadata(Metadata metadata)
                      throws InternalErrorException
Throws:
InternalErrorException

printWorkspaceItem

protected void printWorkspaceItem(WorkspaceItem item)
                           throws InternalErrorException
Visits a Workspace item.

Parameters:
item - the item to visit.
Throws:
InternalErrorException - if an error occurs.

printFolderItem

protected void printFolderItem(FolderItem item)
                        throws InternalErrorException
Throws:
InternalErrorException

visitUser

protected void visitUser(User user)
                  throws InternalErrorException
Visits an user.

Parameters:
user - the user to visit.
Throws:
InternalErrorException - if an error occurs.

visitSimple

public void visitSimple(WorkspaceItem item)
                 throws InternalErrorException
Visit an item tree without verbose information.

Parameters:
item - the tree root.
Throws:
InternalErrorException - if an error occurs.

visitItem

protected void visitItem(WorkspaceItem item)
                  throws InternalErrorException
Visit an item tree without verbose information.

Parameters:
item - the item to visit
Throws:
InternalErrorException - if an error occurs.


Copyright © 2013. All Rights Reserved.