Package org.apache.xml.resolver.readers
Class OASISXMLCatalogReader
java.lang.Object
org.apache.xml.resolver.readers.SAXCatalogReader
org.apache.xml.resolver.readers.OASISXMLCatalogReader
- All Implemented Interfaces:
CatalogReader,SAXCatalogParser,ContentHandler,DocumentHandler
- Direct Known Subclasses:
ExtendedXMLCatalogReader
Parse OASIS Entity Resolution Technical Committee
XML Catalog files.
- Version:
- 1.0
- Author:
- Norman Walsh Norman.Walsh@Sun.COM
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Stackprotected CatalogThe catalog object needs to be stored by the object so that SAX callbacks can use it.static final StringThe namespace name of OASIS ERTC catalogsprotected Stackprotected Stackstatic final StringThe namespace name of OASIS ERTC TR9401 catalog extensionFields inherited from class org.apache.xml.resolver.readers.SAXCatalogReader
debug, namespaceMap, parserClass, parserFactory -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructorOASISXMLCatalogReader(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.booleancheckAttributes(Attributes atts, String attName) booleancheckAttributes(Attributes atts, String attName1, String attName2) voidThe SAXendDocumentmethod does nothing.voidendElement(String namespaceURI, String localName, String qName) The SAXendElementvoidendPrefixMapping(String prefix) The SAXendPrefixMappingmethod does nothing.Get the current catalog.voidignorableWhitespace(char[] ch, int start, int length) The SAXignorableWhitespacemethod does nothing.protected booleanAre we in an extension namespace?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 SAXstartDocumentvoidstartElement(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. -
namespaceName
The namespace name of OASIS ERTC catalogs- See Also:
-
tr9401NamespaceName
The namespace name of OASIS ERTC TR9401 catalog extension- See Also:
-
baseURIStack
-
overrideStack
-
namespaceStack
-
-
Constructor Details
-
OASISXMLCatalogReader
public OASISXMLCatalogReader()Default constructor -
OASISXMLCatalogReader
Constructor allowing for providing custom SAX parser factory
-
-
Method Details
-
setCatalog
Set the current catalog.- Specified by:
setCatalogin interfaceSAXCatalogParser
-
getCatalog
Get the current catalog. -
inExtensionNamespace
protected boolean inExtensionNamespace()Are we in an extension namespace?- Returns:
- true if the current stack of open namespaces includes an extension namespace.
-
setDocumentLocator
The SAXsetDocumentLocatormethod does nothing.- Specified by:
setDocumentLocatorin interfaceContentHandler- Specified by:
setDocumentLocatorin interfaceDocumentHandler- Overrides:
setDocumentLocatorin classSAXCatalogReader
-
startDocument
The SAXstartDocument- 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:
-
checkAttributes
-
checkAttributes
-
endElement
The SAXendElement- 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
-