|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.xml.resolver.readers.SAXCatalogReader org.apache.xml.resolver.readers.XCatalogReader
public class XCatalogReader
Parse "XCatalog" XML Catalog files, this is the XML Catalog format developed by John Cowan and supported by Apache.
Catalog
Constructor Summary | |
---|---|
XCatalogReader()
Default constructor |
|
XCatalogReader(SAXParserFactory parserFactory,
Catalog catalog)
Constructor allowing for providing custom SAX parser factory |
Method Summary | |
---|---|
void |
characters(char[] ch,
int start,
int length)
The SAX characters method does nothing. |
void |
endDocument()
The SAX endDocument method does nothing. |
void |
endElement(java.lang.String namespaceURI,
java.lang.String localName,
java.lang.String qName)
The SAX endElement method does nothing. |
void |
endPrefixMapping(java.lang.String prefix)
The SAX endPrefixMapping method does nothing. |
Catalog |
getCatalog()
Get the current catalog. |
void |
ignorableWhitespace(char[] ch,
int start,
int length)
The SAX ignorableWhitespace method does nothing. |
void |
processingInstruction(java.lang.String target,
java.lang.String data)
The SAX processingInstruction method does nothing. |
void |
setCatalog(Catalog catalog)
Set the current catalog. |
void |
setDocumentLocator(Locator locator)
The SAX setDocumentLocator method does nothing. |
void |
skippedEntity(java.lang.String name)
The SAX skippedEntity method does nothing. |
void |
startDocument()
The SAX startDocument method does nothing. |
void |
startElement(java.lang.String namespaceURI,
java.lang.String localName,
java.lang.String qName,
Attributes atts)
The SAX startElement method recognizes elements
from the plain catalog format and instantiates CatalogEntry
objects for them. |
void |
startPrefixMapping(java.lang.String prefix,
java.lang.String uri)
The SAX startPrefixMapping method does nothing. |
Methods inherited from class org.apache.xml.resolver.readers.SAXCatalogReader |
---|
endElement, getCatalogParser, getParserClass, getParserFactory, readCatalog, readCatalog, setCatalogParser, setClassLoader, setParserClass, setParserFactory, startElement |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.xml.sax.DocumentHandler |
---|
endElement, startElement |
Constructor Detail |
---|
public XCatalogReader()
public XCatalogReader(SAXParserFactory parserFactory, Catalog catalog)
Method Detail |
---|
public void setCatalog(Catalog catalog)
setCatalog
in interface SAXCatalogParser
public Catalog getCatalog()
public void setDocumentLocator(Locator locator)
setDocumentLocator
method does nothing.
setDocumentLocator
in interface ContentHandler
setDocumentLocator
in interface DocumentHandler
setDocumentLocator
in class SAXCatalogReader
locator
- an object that can return the location of
any SAX document eventLocator
public void startDocument() throws SAXException
startDocument
method does nothing.
startDocument
in interface ContentHandler
startDocument
in interface DocumentHandler
startDocument
in class SAXCatalogReader
SAXException
- Any SAX exception, possibly
wrapping another exception.ContentHandler.endDocument()
public void endDocument() throws SAXException
endDocument
method does nothing.
endDocument
in interface ContentHandler
endDocument
in interface DocumentHandler
endDocument
in class SAXCatalogReader
SAXException
- Any SAX exception, possibly
wrapping another exception.ContentHandler.startDocument()
public void startElement(java.lang.String namespaceURI, java.lang.String localName, java.lang.String qName, Attributes atts) throws SAXException
startElement
method recognizes elements
from the plain catalog format and instantiates CatalogEntry
objects for them.
startElement
in interface ContentHandler
startElement
in class SAXCatalogReader
namespaceURI
- The namespace name of the element.localName
- The local name of the element.qName
- The QName of the element.atts
- The list of attributes on the element.
SAXException
- any SAX exception, possibly
wrapping another exceptionCatalogEntry
public void endElement(java.lang.String namespaceURI, java.lang.String localName, java.lang.String qName) throws SAXException
endElement
method does nothing.
endElement
in interface ContentHandler
endElement
in class SAXCatalogReader
namespaceURI
- the Namespace URI, or the empty string if the
element has no Namespace URI or if Namespace
processing is not being performedlocalName
- the local name (without prefix), or the
empty string if Namespace processing is not being
performedqName
- the qualified XML name (with prefix), or the
empty string if qualified names are not available
SAXException
- any SAX exception, possibly
wrapping another exceptionpublic void characters(char[] ch, int start, int length) throws SAXException
characters
method does nothing.
characters
in interface ContentHandler
characters
in interface DocumentHandler
characters
in class SAXCatalogReader
ch
- the characters from the XML documentstart
- the start position in the arraylength
- the number of characters to read from the array
SAXException
- Any SAX exception, possibly
wrapping another exception.ContentHandler.ignorableWhitespace(char[], int, int)
,
Locator
public void ignorableWhitespace(char[] ch, int start, int length) throws SAXException
ignorableWhitespace
method does nothing.
ignorableWhitespace
in interface ContentHandler
ignorableWhitespace
in interface DocumentHandler
ignorableWhitespace
in class SAXCatalogReader
ch
- the characters from the XML documentstart
- the start position in the arraylength
- the number of characters to read from the array
SAXException
- Any SAX exception, possibly
wrapping another exception.ContentHandler.characters(char[], int, int)
public void processingInstruction(java.lang.String target, java.lang.String data) throws SAXException
processingInstruction
method does nothing.
processingInstruction
in interface ContentHandler
processingInstruction
in interface DocumentHandler
processingInstruction
in class SAXCatalogReader
target
- the processing instruction targetdata
- the processing instruction data, or null if
none was supplied. The data does not include any
whitespace separating it from the target
SAXException
- Any SAX exception, possibly
wrapping another exception.public void skippedEntity(java.lang.String name) throws SAXException
skippedEntity
method does nothing.
skippedEntity
in interface ContentHandler
skippedEntity
in class SAXCatalogReader
name
- the name of the skipped entity. If it is a
parameter entity, the name will begin with '%', and if
it is the external DTD subset, it will be the string
"[dtd]"
SAXException
- any SAX exception, possibly
wrapping another exceptionpublic void startPrefixMapping(java.lang.String prefix, java.lang.String uri) throws SAXException
startPrefixMapping
method does nothing.
startPrefixMapping
in interface ContentHandler
startPrefixMapping
in class SAXCatalogReader
prefix
- the Namespace prefix being declared.
An empty string is used for the default element namespace,
which has no prefix.uri
- the Namespace URI the prefix is mapped to
SAXException
- the client may throw
an exception during processingContentHandler.endPrefixMapping(java.lang.String)
,
ContentHandler.startElement(java.lang.String, java.lang.String, java.lang.String, org.xml.sax.Attributes)
public void endPrefixMapping(java.lang.String prefix) throws SAXException
endPrefixMapping
method does nothing.
endPrefixMapping
in interface ContentHandler
endPrefixMapping
in class SAXCatalogReader
prefix
- the prefix that was being mapped.
This is the empty string when a default mapping scope ends.
SAXException
- the client may throw
an exception during processingContentHandler.startPrefixMapping(java.lang.String, java.lang.String)
,
ContentHandler.endElement(java.lang.String, java.lang.String, java.lang.String)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |