public class MYOSGSiteCatalogParser extends Parser
Modifier and Type | Field and Description |
---|---|
(package private) Stack<AbstractSiteCatalogResource> |
elementStack |
static String |
ENV_TAG |
private int |
mDepth |
private boolean |
mLoadAll
A boolean indicating whether to load all sites.
|
private LogManager |
mLogger
The handle to the log manager.
|
private Set<String> |
mSites
The set of sites that need to be parsed.
|
static String |
RESOURCE_GROUP_TAG |
static String |
RESOURCE_TAG |
static String |
SERVICE_TAG |
(package private) List<AbstractSiteCatalogResource> |
siteList |
static String |
VO_OWNERSHIP_TAG |
DEFAULT_PARSER_NAME, mAdjFName, mLocator, mLogMsg, mParser, mProps, mTextContent, mTextString
Constructor and Description |
---|
MYOSGSiteCatalogParser()
The default Constructor.
|
MYOSGSiteCatalogParser(List<String> sites) |
MYOSGSiteCatalogParser(PegasusProperties properties,
List<String> sites) |
Modifier and Type | Method and Description |
---|---|
void |
endDocument()
This is called automatically when the end of the XML file is reached.
|
void |
endElement(String uri,
String localName,
String name)
The parser is at the end of an element.
|
int |
getNumberOfSites()
Returns the number of sites parsed
|
String |
getSchemaLocation()
Helps the load database to locate the XML schema, if available.
|
String |
getSchemaNamespace()
Returns the XML schema namespace that a document being parsed conforms
to.
|
List |
getSites()
Returns the site's list
|
private boolean |
isStackedElement(String name) |
private boolean |
loadSite(AbstractSiteCatalogResource site)
Whether to laod a site or not in the
SiteStore |
void |
startElement(String uri,
String local,
String name,
Attributes attrs)
This method defines the action to take when the parser begins to parse
an element.
|
void |
startParser(String file)
The main method that starts the parsing.
|
characters, ignoreWhitespace, ignoreWhitespace, setDocumentLocator, setParserFeature, setSchemaLocations, testForFile
endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning
public static final String RESOURCE_GROUP_TAG
public static final String SERVICE_TAG
public static final String RESOURCE_TAG
public static final String ENV_TAG
public static final String VO_OWNERSHIP_TAG
private int mDepth
Stack<AbstractSiteCatalogResource> elementStack
List<AbstractSiteCatalogResource> siteList
private LogManager mLogger
private boolean mLoadAll
public MYOSGSiteCatalogParser()
public MYOSGSiteCatalogParser(PegasusProperties properties, List<String> sites)
public void endDocument()
Parser
endDocument
in interface ContentHandler
endDocument
in class Parser
public void endElement(String uri, String localName, String name) throws SAXException
endElement
in interface ContentHandler
endElement
in class Parser
uri
- is the URI of the namespace for the elementlocalName
- is the element name without namespacename
- is the element name as it appears in the docmentSAXException
private boolean isStackedElement(String name)
private boolean loadSite(AbstractSiteCatalogResource site)
SiteStore
site
- the SiteCatalogEntry
object.public String getSchemaNamespace()
getSchemaNamespace
in class Parser
public String getSchemaLocation()
Parser
getSchemaLocation
in class Parser
public void startElement(String uri, String local, String name, Attributes attrs) throws SAXException
startElement
in interface ContentHandler
startElement
in class Parser
uri
- is the URI of the namespace for the elementlocal
- is the element name without namespacename
- is the element name as it appears in the docmentattrs
- has the names and values of all the attributesSAXException
public void startParser(String file)
startParser
in class Parser
file
- the XML file to be parsed.public List getSites()
public int getNumberOfSites()
Copyright © 2011 The University of Southern California. All Rights Reserved.