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 CatalogThe 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 TypeMethodDescriptionvoidcharacters(char[] ch, int start, int length) The SAXcharactersmethod does nothing.voidThe SAXendDocumentmethod does nothing.voidendElement(String namespaceURI, String localName, String qName) The SAXendElementmethod does nothing.voidendPrefixMapping(String prefix) The SAXendPrefixMappingmethod does nothing.Get the current catalog.voidignorableWhitespace(char[] ch, int start, int length) The SAXignorableWhitespacemethod does nothing.voidprocessingInstruction(String target, String data) The SAXprocessingInstructionmethod does nothing.voidsetCatalog(Catalog catalog) Set the current catalog.voidsetDocumentLocator(Locator locator) The SAXsetDocumentLocatormethod does nothing.voidskippedEntity(String name) The SAXskippedEntitymethod does nothing.voidThe SAXstartDocumentmethod does nothing.voidstartElement(String namespaceURI, String localName, String qName, Attributes atts) The SAXstartElementmethod recognizes elements from the plain catalog format and instantiates CatalogEntry objects for them.voidstartPrefixMapping(String prefix, String uri) The SAXstartPrefixMappingmethod does nothing.Methods inherited from class org.apache.xml.resolver.readers.SAXCatalogReader
endElement, getCatalogParser, getParserClass, getParserFactory, readCatalog, readCatalog, setCatalogParser, setClassLoader, setParserClass, setParserFactory, startElementMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.xml.sax.ContentHandler
declarationMethods 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:
setCatalogin interfaceSAXCatalogParser
-
getCatalog
Get the current catalog. -
setDocumentLocator
The SAXsetDocumentLocatormethod does nothing.- Specified by:
setDocumentLocatorin interfaceContentHandler- Specified by:
setDocumentLocatorin interfaceDocumentHandler- Overrides:
setDocumentLocatorin classSAXCatalogReader
-
startDocument
The SAXstartDocumentmethod does nothing.- Specified by:
startDocumentin interfaceContentHandler- Specified by:
startDocumentin interfaceDocumentHandler- Overrides:
startDocumentin classSAXCatalogReader- Throws:
SAXException
-
endDocument
The SAXendDocumentmethod does nothing.- Specified by:
endDocumentin interfaceContentHandler- Specified by:
endDocumentin interfaceDocumentHandler- Overrides:
endDocumentin classSAXCatalogReader- Throws:
SAXException
-
startElement
public void startElement(String namespaceURI, String localName, String qName, Attributes atts) throws SAXException The SAXstartElementmethod recognizes elements from the plain catalog format and instantiates CatalogEntry objects for them.- Specified by:
startElementin interfaceContentHandler- Overrides:
startElementin 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 SAXendElementmethod does nothing.- Specified by:
endElementin interfaceContentHandler- Overrides:
endElementin classSAXCatalogReader- Throws:
SAXException
-
characters
The SAXcharactersmethod does nothing.- Specified by:
charactersin interfaceContentHandler- Specified by:
charactersin interfaceDocumentHandler- Overrides:
charactersin classSAXCatalogReader- Throws:
SAXException
-
ignorableWhitespace
The SAXignorableWhitespacemethod does nothing.- Specified by:
ignorableWhitespacein interfaceContentHandler- Specified by:
ignorableWhitespacein interfaceDocumentHandler- Overrides:
ignorableWhitespacein classSAXCatalogReader- Throws:
SAXException
-
processingInstruction
The SAXprocessingInstructionmethod does nothing.- Specified by:
processingInstructionin interfaceContentHandler- Specified by:
processingInstructionin interfaceDocumentHandler- Overrides:
processingInstructionin classSAXCatalogReader- Throws:
SAXException
-
skippedEntity
The SAXskippedEntitymethod does nothing.- Specified by:
skippedEntityin interfaceContentHandler- Overrides:
skippedEntityin classSAXCatalogReader- Throws:
SAXException
-
startPrefixMapping
The SAXstartPrefixMappingmethod does nothing.- Specified by:
startPrefixMappingin interfaceContentHandler- Overrides:
startPrefixMappingin classSAXCatalogReader- Throws:
SAXException
-
endPrefixMapping
The SAXendPrefixMappingmethod does nothing.- Specified by:
endPrefixMappingin interfaceContentHandler- Overrides:
endPrefixMappingin classSAXCatalogReader- Throws:
SAXException
-