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 Stack
protected Catalog
The catalog object needs to be stored by the object so that SAX callbacks can use it.static final String
The namespace name of OASIS ERTC catalogsprotected Stack
protected Stack
static final String
The 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 TypeMethodDescriptionvoid
characters
(char[] ch, int start, int length) The SAXcharacters
method does nothing.boolean
checkAttributes
(Attributes atts, String attName) boolean
checkAttributes
(Attributes atts, String attName1, String attName2) void
The SAXendDocument
method does nothing.void
endElement
(String namespaceURI, String localName, String qName) The SAXendElement
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.protected boolean
Are we in an extension namespace?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
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. -
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:
setCatalog
in 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 SAXsetDocumentLocator
method does nothing.- Specified by:
setDocumentLocator
in interfaceContentHandler
- Specified by:
setDocumentLocator
in interfaceDocumentHandler
- Overrides:
setDocumentLocator
in classSAXCatalogReader
-
startDocument
The SAXstartDocument
- 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:
-
checkAttributes
-
checkAttributes
-
endElement
The SAXendElement
- 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
-