Class XML3PrintVisitor
- java.lang.Object
-
- edu.isi.pegasus.planner.catalog.site.classes.AbstractXMLPrintVisitor
-
- edu.isi.pegasus.planner.catalog.site.classes.XML3PrintVisitor
-
- All Implemented Interfaces:
SiteDataVisitor
public class XML3PrintVisitor extends AbstractXMLPrintVisitor
Prints the Site Catalog compatible with Site Catalog schema version 3 https://pegasus.isi.edu/wms/docs/schemas/sc-4.0/sc-3.0.html- Version:
- $Revision: 5858 $
- Author:
- Rajiv Mayani
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static classXML3PrintVisitor.DirectoryTypes
-
Field Summary
Fields Modifier and Type Field Description private booleanisFSWrittenEnsure that Directory information is written only once.private Directory[]mDirectoryKeep track of which directories are found in the site.private java.util.List<FileServer>[]mFileServerKeep track of which file servers are listed in the specified directories.private Directory.TYPEmLastDirectoryTraversedTrack which type of directory was traversed last.static java.lang.StringSCHEMA_LOCATIONThe "not-so-official" location URL of the DAX schema definition.static java.lang.StringSCHEMA_NAMESPACEThe "official" namespace URI of the site catalog schema.static java.lang.StringSCHEMA_VERSIONThe version to report.-
Fields inherited from class edu.isi.pegasus.planner.catalog.site.classes.AbstractXMLPrintVisitor
mCurrentIndentIndex, mNewLine, mWriter
-
-
Constructor Summary
Constructors Constructor Description XML3PrintVisitor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddepart(Connection c)Depart the connection objectvoiddepart(Directory directory)Depart the shared directoryvoiddepart(FileServer server)Depart the Directory objectvoiddepart(GridGateway entry)Depart the GridGateway objectvoiddepart(ReplicaCatalog catalog)Depart the ReplicaCatalog objectvoiddepart(SiteCatalogEntry entry)Depart the Site Catalog Entry object.voiddepart(SiteStore store)Depart the Site Store object.voidvisit(Connection c)Visit the connection objectvoidvisit(Directory directory)Visit the directory objectvoidvisit(FileServer server)Visit FileServer site data objectvoidvisit(GridGateway gateway)Visit the GridGateway objectvoidvisit(ReplicaCatalog catalog)Visit the ReplicaCatalog objectvoidvisit(SiteCatalogEntry entry)Visit the Site CatalogEntry objectvoidvisit(SiteStore store)Visit the SiteStore objectprivate voidwriteFileServer(Directory directory, XML3PrintVisitor.DirectoryTypes type)private voidwriteFS()private voidwriteHeadFS()private voidwriteHeadFSScratch()private voidwriteHeadFSStorage()private voidwriteWorkerFS()private voidwriteWorkerFSScratch()-
Methods inherited from class edu.isi.pegasus.planner.catalog.site.classes.AbstractXMLPrintVisitor
closeElement, decrementIndentIndex, depart, getCurrentIndent, getNextIndent, incrementIndentIndex, initialize, visit, writeAttribute, writeAttribute
-
-
-
-
Field Detail
-
SCHEMA_NAMESPACE
public static final java.lang.String SCHEMA_NAMESPACE
The "official" namespace URI of the site catalog schema.- See Also:
- Constant Field Values
-
SCHEMA_LOCATION
public static final java.lang.String SCHEMA_LOCATION
The "not-so-official" location URL of the DAX schema definition.- See Also:
- Constant Field Values
-
SCHEMA_VERSION
public static final java.lang.String SCHEMA_VERSION
The version to report.- See Also:
- Constant Field Values
-
mDirectory
private Directory[] mDirectory
Keep track of which directories are found in the site.
-
mFileServer
private java.util.List<FileServer>[] mFileServer
Keep track of which file servers are listed in the specified directories.
-
mLastDirectoryTraversed
private Directory.TYPE mLastDirectoryTraversed
Track which type of directory was traversed last.
-
isFSWritten
private boolean isFSWritten
Ensure that Directory information is written only once.
-
-
Method Detail
-
visit
public void visit(SiteStore store) throws java.io.IOException
Visit the SiteStore object- Parameters:
store- the site store- Throws:
java.io.IOException- in case of error while writing to underlying stream
-
depart
public void depart(SiteStore store) throws java.io.IOException
Depart the Site Store object.- Parameters:
store- the SiteStore- Throws:
java.io.IOException- in case of error while writing to underlying stream
-
visit
public void visit(SiteCatalogEntry entry) throws java.io.IOException
Visit the Site CatalogEntry object- Parameters:
entry- the site catalog entry- Throws:
java.io.IOException- in case of problem of writing
-
depart
public void depart(SiteCatalogEntry entry) throws java.io.IOException
Depart the Site Catalog Entry object.- Parameters:
entry- the site catalog entry- Throws:
java.io.IOException- in case of error while writing to underlying stream
-
writeFS
private void writeFS() throws java.io.IOException- Throws:
java.io.IOException
-
writeHeadFS
private void writeHeadFS() throws java.io.IOException- Throws:
java.io.IOException
-
writeHeadFSScratch
private void writeHeadFSScratch() throws java.io.IOException- Throws:
java.io.IOException
-
writeFileServer
private void writeFileServer(Directory directory, XML3PrintVisitor.DirectoryTypes type) throws java.io.IOException
- Throws:
java.io.IOException
-
writeHeadFSStorage
private void writeHeadFSStorage() throws java.io.IOException- Throws:
java.io.IOException
-
writeWorkerFS
private void writeWorkerFS() throws java.io.IOException- Throws:
java.io.IOException
-
writeWorkerFSScratch
private void writeWorkerFSScratch() throws java.io.IOException- Throws:
java.io.IOException
-
visit
public void visit(GridGateway gateway) throws java.io.IOException
Visit the GridGateway object- Parameters:
gateway- the grid gateway- Throws:
java.io.IOException- in case of error while writing to underlying stream
-
depart
public void depart(GridGateway entry) throws java.io.IOException
Depart the GridGateway object- Parameters:
entry- GridGateway object- Throws:
java.io.IOException- in case of error while writing to underlying stream
-
visit
public void visit(Directory directory) throws java.io.IOException
Visit the directory object- Parameters:
directory- the directory- Throws:
java.io.IOException- in case of error while writing to underlying stream
-
depart
public void depart(Directory directory) throws java.io.IOException
Depart the shared directory- Parameters:
directory- the directory- Throws:
java.io.IOException- in case of error while writing to underlying stream
-
visit
public void visit(FileServer server) throws java.io.IOException
Visit FileServer site data object- Parameters:
server- the object corresponding to the FileServer- Throws:
java.io.IOException- in case of error while writing to underlying stream
-
depart
public void depart(FileServer server) throws java.io.IOException
Depart the Directory object- Parameters:
server- the object corresponding to the FileServer- Throws:
java.io.IOException- in case of error while writing to underlying stream
-
visit
public void visit(ReplicaCatalog catalog) throws java.io.IOException
Visit the ReplicaCatalog object- Parameters:
catalog- the object describing the catalog- Throws:
java.io.IOException- in case of error while writing to underlying stream
-
depart
public void depart(ReplicaCatalog catalog) throws java.io.IOException
Depart the ReplicaCatalog object- Parameters:
catalog- the object describing the catalog- Throws:
java.io.IOException- in case of error while writing to underlying stream
-
visit
public void visit(Connection c) throws java.io.IOException
Visit the connection object- Parameters:
c- the connection.- Throws:
java.io.IOException- in case of error while writing to underlying stream
-
depart
public void depart(Connection c) throws java.io.IOException
Depart the connection object- Parameters:
c- the connection.- Throws:
java.io.IOException- in case of error while writing to underlying stream
-
-