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, org.xml.sax.ContentHandler, org.xml.sax.DocumentHandler, SAXCatalogParser

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
protected  Catalog 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
XCatalogReader()
          Default constructor
XCatalogReader(javax.xml.parsers.SAXParserFactory parserFactory, Catalog catalog)
          Constructor allowing for providing custom SAX parser factory
 
Method Summary
 void characters(char[] ch, int start, int length)
          The SAX characters method does nothing.
 void endDocument()
          The SAX endDocument method does nothing.
 void endElement(java.lang.String namespaceURI, java.lang.String localName, java.lang.String qName)
          The SAX endElement method does nothing.
 void endPrefixMapping(java.lang.String prefix)
          The SAX endPrefixMapping method does nothing.
 Catalog getCatalog()
          Get the current catalog.
 void ignorableWhitespace(char[] ch, int start, int length)
          The SAX ignorableWhitespace method does nothing.
 void processingInstruction(java.lang.String target, java.lang.String data)
          The SAX processingInstruction method does nothing.
 void setCatalog(Catalog catalog)
          Set the current catalog.
 void setDocumentLocator(org.xml.sax.Locator locator)
          The SAX setDocumentLocator method does nothing.
 void skippedEntity(java.lang.String name)
          The SAX skippedEntity method does nothing.
 void startDocument()
          The SAX startDocument method does nothing.
 void startElement(java.lang.String namespaceURI, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes atts)
          The SAX startElement method recognizes elements from the plain catalog format and instantiates CatalogEntry objects for them.
 void startPrefixMapping(java.lang.String prefix, java.lang.String uri)
          The SAX startPrefixMapping 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.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()
Default constructor

XCatalogReader

public XCatalogReader(javax.xml.parsers.SAXParserFactory parserFactory,
                      Catalog catalog)
Constructor allowing for providing custom SAX parser factory
Method Detail

setCatalog

public void setCatalog(Catalog catalog)
Set the current catalog.
Specified by:
setCatalog in interface SAXCatalogParser

getCatalog

public Catalog getCatalog()
Get the current catalog.

setDocumentLocator

public void setDocumentLocator(org.xml.sax.Locator locator)
The SAX setDocumentLocator method does nothing.
Specified by:
setDocumentLocator in interface org.xml.sax.ContentHandler
Overrides:
setDocumentLocator in class SAXCatalogReader

startDocument

public void startDocument()
                   throws org.xml.sax.SAXException
The SAX startDocument method does nothing.
Specified by:
startDocument in interface org.xml.sax.ContentHandler
Overrides:
startDocument in class SAXCatalogReader

endDocument

public void endDocument()
                 throws org.xml.sax.SAXException
The SAX endDocument method does nothing.
Specified by:
endDocument in interface org.xml.sax.ContentHandler
Overrides:
endDocument in class SAXCatalogReader

startElement

public void startElement(java.lang.String namespaceURI,
                         java.lang.String localName,
                         java.lang.String qName,
                         org.xml.sax.Attributes atts)
                  throws org.xml.sax.SAXException
The SAX startElement method recognizes elements from the plain catalog format and instantiates CatalogEntry objects for them.
Specified by:
startElement in interface org.xml.sax.ContentHandler
Overrides:
startElement in class SAXCatalogReader
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.
See Also:
CatalogEntry

endElement

public void endElement(java.lang.String namespaceURI,
                       java.lang.String localName,
                       java.lang.String qName)
                throws org.xml.sax.SAXException
The SAX endElement method does nothing.
Specified by:
endElement in interface org.xml.sax.ContentHandler
Overrides:
endElement in class SAXCatalogReader

characters

public void characters(char[] ch,
                       int start,
                       int length)
                throws org.xml.sax.SAXException
The SAX characters method does nothing.
Specified by:
characters in interface org.xml.sax.ContentHandler
Overrides:
characters in class SAXCatalogReader

ignorableWhitespace

public void ignorableWhitespace(char[] ch,
                                int start,
                                int length)
                         throws org.xml.sax.SAXException
The SAX ignorableWhitespace method does nothing.
Specified by:
ignorableWhitespace in interface org.xml.sax.ContentHandler
Overrides:
ignorableWhitespace in class SAXCatalogReader

processingInstruction

public void processingInstruction(java.lang.String target,
                                  java.lang.String data)
                           throws org.xml.sax.SAXException
The SAX processingInstruction method does nothing.
Specified by:
processingInstruction in interface org.xml.sax.ContentHandler
Overrides:
processingInstruction in class SAXCatalogReader

skippedEntity

public void skippedEntity(java.lang.String name)
                   throws org.xml.sax.SAXException
The SAX skippedEntity method does nothing.
Specified by:
skippedEntity in interface org.xml.sax.ContentHandler
Overrides:
skippedEntity in class SAXCatalogReader

startPrefixMapping

public void startPrefixMapping(java.lang.String prefix,
                               java.lang.String uri)
                        throws org.xml.sax.SAXException
The SAX startPrefixMapping method does nothing.
Specified by:
startPrefixMapping in interface org.xml.sax.ContentHandler
Overrides:
startPrefixMapping in class SAXCatalogReader

endPrefixMapping

public void endPrefixMapping(java.lang.String prefix)
                      throws org.xml.sax.SAXException
The SAX endPrefixMapping method does nothing.
Specified by:
endPrefixMapping in interface org.xml.sax.ContentHandler
Overrides:
endPrefixMapping in class SAXCatalogReader


Copyright © 2001-2006 Apache Software Foundation. All Rights Reserved.