class SiteCatalogXMLMetadataParser extends Parser
Modifier and Type | Class and Description |
---|---|
private static class |
SiteCatalogXMLMetadataParser.StopParserException
Private RuntimeException to stop the SAX Parser
|
Modifier and Type | Field and Description |
---|---|
private String |
mElement
The root element name to look for.
|
private Map<String,String> |
mMetadata
The Metadata object that has to be returned.
|
protected boolean |
mParsingDone
A boolean indicating that parsing is done.
|
DEFAULT_PARSER_NAME, mAdjFName, mLocator, mLogger, mLogMsg, mParser, mProps, mTextContent, mTextString
Constructor and Description |
---|
SiteCatalogXMLMetadataParser(PegasusBag bag,
String element)
The overloaded constructor
|
Modifier and Type | Method and Description |
---|---|
void |
endDocument()
Sets the boolean indicating parsing is done
|
void |
endElement(String uri,
String localName,
String qName)
An empty implementation
|
Map<String,String> |
getMetadata()
Returns the metadata/attributes assoicated with the element that
was parsed for.
|
String |
getSchemaLocation()
Not implemented as yet
|
String |
getSchemaNamespace()
Not implemented as yet
|
void |
startElement(String uri,
String local,
String raw,
Attributes attrs)
Start Element.
|
void |
startParser(String file)
The function that starts the parser
|
characters, ignoreWhitespace, ignoreWhitespace, setDocumentLocator, setParserFeature, setSchemaLocations, testForFile
endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning
private String mElement
protected boolean mParsingDone
public SiteCatalogXMLMetadataParser(PegasusBag bag, String element)
bag
- the bag of intiialization documentselement
- the root elementpublic Map<String,String> getMetadata()
public void startElement(String uri, String local, String raw, Attributes attrs) throws SAXException
startElement
in interface ContentHandler
startElement
in class Parser
uri
- local
- raw
- attrs
- SAXException
public void endElement(String uri, String localName, String qName) throws SAXException
endElement
in interface ContentHandler
endElement
in class Parser
uri
- localName
- qName
- SAXException
public void endDocument()
endDocument
in interface ContentHandler
endDocument
in class Parser
public void startParser(String file)
startParser
in class Parser
file
- the file to be parsedpublic String getSchemaLocation()
getSchemaLocation
in class Parser
public String getSchemaNamespace()
getSchemaNamespace
in class Parser