|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.xml.sax.helpers.DefaultHandler
edu.isi.pegasus.planner.parser.Parser
edu.isi.pegasus.planner.catalog.site.impl.myosg.util.MYOSGSiteCatalogParser
public class MYOSGSiteCatalogParser
This class uses the Xerces SAX2 parser to validate and parse an XML.
| Field Summary | |
|---|---|
(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
|
| Fields inherited from class edu.isi.pegasus.planner.parser.Parser |
|---|
DEFAULT_PARSER_NAME, mAdjFName, mLocator, mLogMsg, mParser, mProps, mTextContent, mTextString |
| Constructor Summary | |
|---|---|
MYOSGSiteCatalogParser()
The default Constructor. |
|
MYOSGSiteCatalogParser(List<String> sites)
|
|
MYOSGSiteCatalogParser(PegasusProperties properties,
List<String> sites)
|
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class edu.isi.pegasus.planner.parser.Parser |
|---|
characters, ignoreWhitespace, ignoreWhitespace, setDocumentLocator, setParserFeature, setSchemaLocations, testForFile |
| Methods inherited from class org.xml.sax.helpers.DefaultHandler |
|---|
endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
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 Set<String> mSites
private boolean mLoadAll
| Constructor Detail |
|---|
public MYOSGSiteCatalogParser()
public MYOSGSiteCatalogParser(List<String> sites)
public MYOSGSiteCatalogParser(PegasusProperties properties,
List<String> sites)
| Method Detail |
|---|
public void endDocument()
Parser
endDocument in interface ContentHandlerendDocument in class Parser
public void endElement(String uri,
String localName,
String name)
throws SAXException
endElement in interface ContentHandlerendElement in class Parseruri - is the URI of the namespace for the elementlocalName - is the element name without namespacename - is the element name as it appears in the docment
SAXExceptionprivate boolean isStackedElement(String name)
private boolean loadSite(AbstractSiteCatalogResource site)
SiteStore
site - the SiteCatalogEntry object.
public String getSchemaNamespace()
getSchemaNamespace in class Parserpublic String getSchemaLocation()
Parser
getSchemaLocation in class Parser
public void startElement(String uri,
String local,
String name,
Attributes attrs)
throws SAXException
startElement in interface ContentHandlerstartElement in class Parseruri - 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 attributes
SAXExceptionpublic void startParser(String file)
startParser in class Parserfile - the XML file to be parsed.public List getSites()
public int getNumberOfSites()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||