Class XCatalogReader
- java.lang.Object
-
- com.sun.org.apache.xml.internal.resolver.readers.SAXCatalogReader
-
- com.sun.org.apache.xml.internal.resolver.readers.XCatalogReader
-
- All Implemented Interfaces:
CatalogReader,SAXCatalogParser,ContentHandler,DocumentHandler
public class XCatalogReader extends SAXCatalogReader implements SAXCatalogParser
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:
Catalog
-
-
Field Summary
Fields Modifier and Type Field Description protected CatalogcatalogThe catalog object needs to be stored by the object so that SAX callbacks can use it.-
Fields inherited from class com.sun.org.apache.xml.internal.resolver.readers.SAXCatalogReader
debug, namespaceMap, parserClass, parserFactory
-
-
Constructor Summary
Constructors Constructor Description XCatalogReader(SAXParserFactory parserFactory)The constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcharacters(char[] ch, int start, int length)The SAXcharactersmethod does nothing.voidendDocument()The SAXendDocumentmethod does nothing.voidendElement(String namespaceURI, String localName, String qName)The SAXendElementmethod does nothing.CataloggetCatalog()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.voidstartDocument()The 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.-
Methods inherited from class com.sun.org.apache.xml.internal.resolver.readers.SAXCatalogReader
endElement, endPrefixMapping, getCatalogParser, getParserClass, getParserFactory, readCatalog, readCatalog, setCatalogParser, setParserClass, setParserFactory, skippedEntity, startElement, startPrefixMapping
-
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
endPrefixMapping, skippedEntity, startPrefixMapping
-
Methods inherited from interface org.xml.sax.DocumentHandler
endElement, startElement
-
-
-
-
Field Detail
-
catalog
protected Catalog catalog
The catalog object needs to be stored by the object so that SAX callbacks can use it.
-
-
Constructor Detail
-
XCatalogReader
public XCatalogReader(SAXParserFactory parserFactory)
The constructor
-
-
Method Detail
-
setCatalog
public void setCatalog(Catalog catalog)
Set the current catalog.- Specified by:
setCatalogin interfaceSAXCatalogParser
-
getCatalog
public Catalog getCatalog()
Get the current catalog.
-
setDocumentLocator
public void setDocumentLocator(Locator locator)
The SAXsetDocumentLocatormethod does nothing.- Specified by:
setDocumentLocatorin interfaceContentHandler- Specified by:
setDocumentLocatorin interfaceDocumentHandler- Overrides:
setDocumentLocatorin classSAXCatalogReader
-
startDocument
public void startDocument() throws SAXExceptionThe SAXstartDocumentmethod does nothing.- Specified by:
startDocumentin interfaceContentHandler- Specified by:
startDocumentin interfaceDocumentHandler- Overrides:
startDocumentin classSAXCatalogReader- Throws:
SAXException
-
endDocument
public void endDocument() throws SAXExceptionThe 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:
CatalogEntry
-
endElement
public void endElement(String namespaceURI, String localName, String qName) throws SAXException
The SAXendElementmethod does nothing.- Specified by:
endElementin interfaceContentHandler- Overrides:
endElementin classSAXCatalogReader- Throws:
SAXException
-
characters
public void characters(char[] ch, int start, int length) throws SAXExceptionThe SAXcharactersmethod does nothing.- Specified by:
charactersin interfaceContentHandler- Specified by:
charactersin interfaceDocumentHandler- Overrides:
charactersin classSAXCatalogReader- Throws:
SAXException
-
ignorableWhitespace
public void ignorableWhitespace(char[] ch, int start, int length) throws SAXExceptionThe SAXignorableWhitespacemethod does nothing.- Specified by:
ignorableWhitespacein interfaceContentHandler- Specified by:
ignorableWhitespacein interfaceDocumentHandler- Overrides:
ignorableWhitespacein classSAXCatalogReader- Throws:
SAXException
-
processingInstruction
public void processingInstruction(String target, String data) throws SAXException
The SAXprocessingInstructionmethod does nothing.- Specified by:
processingInstructionin interfaceContentHandler- Specified by:
processingInstructionin interfaceDocumentHandler- Overrides:
processingInstructionin classSAXCatalogReader- Throws:
SAXException
-
-