Package org.apache.xml.resolver.readers
Class XCatalogReader
java.lang.Object
org.apache.xml.resolver.readers.SAXCatalogReader
org.apache.xml.resolver.readers.XCatalogReader
- All Implemented Interfaces:
CatalogReader
,SAXCatalogParser
,ContentHandler
,DocumentHandler
Parse "XCatalog" XML Catalog files, this is the XML Catalog format
developed by John Cowan and supported by Apache.
- Version:
- 1.0
- Author:
- Norman Walsh Norman.Walsh@Sun.COM
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Catalog
The catalog object needs to be stored by the object so that SAX callbacks can use it.Fields inherited from class org.apache.xml.resolver.readers.SAXCatalogReader
debug, namespaceMap, parserClass, parserFactory
-
Constructor Summary
ConstructorsConstructorDescriptionDefault constructorXCatalogReader
(SAXParserFactory parserFactory, Catalog catalog) Constructor allowing for providing custom SAX parser factory -
Method Summary
Modifier and TypeMethodDescriptionvoid
characters
(char[] ch, int start, int length) The SAXcharacters
method does nothing.void
The SAXendDocument
method does nothing.void
endElement
(String namespaceURI, String localName, String qName) The SAXendElement
method does nothing.void
endPrefixMapping
(String prefix) The SAXendPrefixMapping
method does nothing.Get the current catalog.void
ignorableWhitespace
(char[] ch, int start, int length) The SAXignorableWhitespace
method does nothing.void
processingInstruction
(String target, String data) The SAXprocessingInstruction
method does nothing.void
setCatalog
(Catalog catalog) Set the current catalog.void
setDocumentLocator
(Locator locator) The SAXsetDocumentLocator
method does nothing.void
skippedEntity
(String name) The SAXskippedEntity
method does nothing.void
The SAXstartDocument
method does nothing.void
startElement
(String namespaceURI, String localName, String qName, Attributes atts) The SAXstartElement
method recognizes elements from the plain catalog format and instantiates CatalogEntry objects for them.void
startPrefixMapping
(String prefix, String uri) The SAXstartPrefixMapping
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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.xml.sax.ContentHandler
declaration
Methods inherited from interface org.xml.sax.DocumentHandler
endElement, startElement
-
Field Details
-
catalog
The catalog object needs to be stored by the object so that SAX callbacks can use it.
-
-
Constructor Details
-
XCatalogReader
public XCatalogReader()Default constructor -
XCatalogReader
Constructor allowing for providing custom SAX parser factory
-
-
Method Details
-
setCatalog
Set the current catalog.- Specified by:
setCatalog
in interfaceSAXCatalogParser
-
getCatalog
Get the current catalog. -
setDocumentLocator
The SAXsetDocumentLocator
method does nothing.- Specified by:
setDocumentLocator
in interfaceContentHandler
- Specified by:
setDocumentLocator
in interfaceDocumentHandler
- Overrides:
setDocumentLocator
in classSAXCatalogReader
-
startDocument
The SAXstartDocument
method does nothing.- Specified by:
startDocument
in interfaceContentHandler
- Specified by:
startDocument
in interfaceDocumentHandler
- Overrides:
startDocument
in classSAXCatalogReader
- Throws:
SAXException
-
endDocument
The SAXendDocument
method does nothing.- Specified by:
endDocument
in interfaceContentHandler
- Specified by:
endDocument
in interfaceDocumentHandler
- Overrides:
endDocument
in classSAXCatalogReader
- Throws:
SAXException
-
startElement
public void startElement(String namespaceURI, String localName, String qName, Attributes atts) throws SAXException The SAXstartElement
method recognizes elements from the plain catalog format and instantiates CatalogEntry objects for them.- Specified by:
startElement
in interfaceContentHandler
- Overrides:
startElement
in classSAXCatalogReader
- Parameters:
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.- Throws:
SAXException
- See Also:
-
endElement
The SAXendElement
method does nothing.- Specified by:
endElement
in interfaceContentHandler
- Overrides:
endElement
in classSAXCatalogReader
- Throws:
SAXException
-
characters
The SAXcharacters
method does nothing.- Specified by:
characters
in interfaceContentHandler
- Specified by:
characters
in interfaceDocumentHandler
- Overrides:
characters
in classSAXCatalogReader
- Throws:
SAXException
-
ignorableWhitespace
The SAXignorableWhitespace
method does nothing.- Specified by:
ignorableWhitespace
in interfaceContentHandler
- Specified by:
ignorableWhitespace
in interfaceDocumentHandler
- Overrides:
ignorableWhitespace
in classSAXCatalogReader
- Throws:
SAXException
-
processingInstruction
The SAXprocessingInstruction
method does nothing.- Specified by:
processingInstruction
in interfaceContentHandler
- Specified by:
processingInstruction
in interfaceDocumentHandler
- Overrides:
processingInstruction
in classSAXCatalogReader
- Throws:
SAXException
-
skippedEntity
The SAXskippedEntity
method does nothing.- Specified by:
skippedEntity
in interfaceContentHandler
- Overrides:
skippedEntity
in classSAXCatalogReader
- Throws:
SAXException
-
startPrefixMapping
The SAXstartPrefixMapping
method does nothing.- Specified by:
startPrefixMapping
in interfaceContentHandler
- Overrides:
startPrefixMapping
in classSAXCatalogReader
- Throws:
SAXException
-
endPrefixMapping
The SAXendPrefixMapping
method does nothing.- Specified by:
endPrefixMapping
in interfaceContentHandler
- Overrides:
endPrefixMapping
in classSAXCatalogReader
- Throws:
SAXException
-