org.jboss.util.xml.catalog.readers
Class OASISXMLCatalogReader

java.lang.Object
  extended by org.jboss.util.xml.catalog.readers.SAXCatalogReader
      extended by org.jboss.util.xml.catalog.readers.OASISXMLCatalogReader
All Implemented Interfaces:
CatalogReader, SAXCatalogParser, ContentHandler, DocumentHandler
Direct Known Subclasses:
ExtendedXMLCatalogReader

public class OASISXMLCatalogReader
extends SAXCatalogReader
implements SAXCatalogParser

Parse OASIS Entity Resolution Technical Committee XML Catalog files.

Version:
1.0
Author:
Norman Walsh Norman.Walsh@Sun.COM
See Also:
Catalog

Field Summary
protected  Stack baseURIStack
           
protected  Catalog catalog
          The catalog object needs to be stored by the object so that SAX callbacks can use it.
static String namespaceName
          The namespace name of OASIS ERTC catalogs
protected  Stack namespaceStack
           
protected  Stack overrideStack
           
static String tr9401NamespaceName
          The namespace name of OASIS ERTC TR9401 catalog extension
 
Fields inherited from class org.jboss.util.xml.catalog.readers.SAXCatalogReader
debug, namespaceMap, parserClass, parserFactory
 
Constructor Summary
OASISXMLCatalogReader()
           
 
Method Summary
 void characters(char[] ch, int start, int length)
          The SAX characters method does nothing.
 boolean checkAttributes(Attributes atts, String attName)
           
 boolean checkAttributes(Attributes atts, String attName1, String attName2)
           
 void endDocument()
          The SAX endDocument method does nothing.
 void endElement(String namespaceURI, String localName, String qName)
          The SAX endElement method does nothing.
 void endPrefixMapping(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.
protected  boolean inExtensionNamespace()
          Are we in an extension namespace?
 void processingInstruction(String target, String data)
          The SAX processingInstruction method does nothing.
 void setCatalog(Catalog catalog)
          Set the current catalog.
 void setDocumentLocator(Locator locator)
          The SAX setDocumentLocator method does nothing.
 void skippedEntity(String name)
          The SAX skippedEntity method does nothing.
 void startDocument()
          The SAX startDocument method does nothing.
 void startElement(String namespaceURI, String localName, String qName, Attributes atts)
          The SAX startElement method recognizes elements from the plain catalog format and instantiates CatalogEntry objects for them.
 void startPrefixMapping(String prefix, String uri)
          The SAX startPrefixMapping method does nothing.
 
Methods inherited from class org.jboss.util.xml.catalog.readers.SAXCatalogReader
endElement, getCatalogParser, getParserClass, getParserFactory, readCatalog, readCatalog, setCatalogParser, 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.


namespaceName

public static final String namespaceName
The namespace name of OASIS ERTC catalogs

See Also:
Constant Field Values

tr9401NamespaceName

public static final String tr9401NamespaceName
The namespace name of OASIS ERTC TR9401 catalog extension

See Also:
Constant Field Values

baseURIStack

protected Stack baseURIStack

overrideStack

protected Stack overrideStack

namespaceStack

protected Stack namespaceStack
Constructor Detail

OASISXMLCatalogReader

public OASISXMLCatalogReader()
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.


inExtensionNamespace

protected boolean inExtensionNamespace()
Are we in an extension namespace?

Returns:
true if the current stack of open namespaces includes an extension namespace.

setDocumentLocator

public void setDocumentLocator(Locator locator)
The SAX setDocumentLocator method does nothing.

Specified by:
setDocumentLocator in interface ContentHandler
Specified by:
setDocumentLocator in interface DocumentHandler
Overrides:
setDocumentLocator in class SAXCatalogReader

startDocument

public void startDocument()
                   throws SAXException
The SAX startDocument method does nothing.

Specified by:
startDocument in interface ContentHandler
Specified by:
startDocument in interface DocumentHandler
Overrides:
startDocument in class SAXCatalogReader
Throws:
SAXException

endDocument

public void endDocument()
                 throws SAXException
The SAX endDocument method does nothing.

Specified by:
endDocument in interface ContentHandler
Specified by:
endDocument in interface DocumentHandler
Overrides:
endDocument in class SAXCatalogReader
Throws:
SAXException

startElement

public void startElement(String namespaceURI,
                         String localName,
                         String qName,
                         Attributes atts)
                  throws SAXException
The SAX startElement method recognizes elements from the plain catalog format and instantiates CatalogEntry objects for them.

Specified by:
startElement in interface 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.
Throws:
SAXException
See Also:
CatalogEntry

checkAttributes

public boolean checkAttributes(Attributes atts,
                               String attName)

checkAttributes

public boolean checkAttributes(Attributes atts,
                               String attName1,
                               String attName2)

endElement

public void endElement(String namespaceURI,
                       String localName,
                       String qName)
                throws SAXException
The SAX endElement method does nothing.

Specified by:
endElement in interface ContentHandler
Overrides:
endElement in class SAXCatalogReader
Throws:
SAXException

characters

public void characters(char[] ch,
                       int start,
                       int length)
                throws SAXException
The SAX characters method does nothing.

Specified by:
characters in interface ContentHandler
Specified by:
characters in interface DocumentHandler
Overrides:
characters in class SAXCatalogReader
Throws:
SAXException

ignorableWhitespace

public void ignorableWhitespace(char[] ch,
                                int start,
                                int length)
                         throws SAXException
The SAX ignorableWhitespace method does nothing.

Specified by:
ignorableWhitespace in interface ContentHandler
Specified by:
ignorableWhitespace in interface DocumentHandler
Overrides:
ignorableWhitespace in class SAXCatalogReader
Throws:
SAXException

processingInstruction

public void processingInstruction(String target,
                                  String data)
                           throws SAXException
The SAX processingInstruction method does nothing.

Specified by:
processingInstruction in interface ContentHandler
Specified by:
processingInstruction in interface DocumentHandler
Overrides:
processingInstruction in class SAXCatalogReader
Throws:
SAXException

skippedEntity

public void skippedEntity(String name)
                   throws SAXException
The SAX skippedEntity method does nothing.

Specified by:
skippedEntity in interface ContentHandler
Overrides:
skippedEntity in class SAXCatalogReader
Throws:
SAXException

startPrefixMapping

public void startPrefixMapping(String prefix,
                               String uri)
                        throws SAXException
The SAX startPrefixMapping method does nothing.

Specified by:
startPrefixMapping in interface ContentHandler
Overrides:
startPrefixMapping in class SAXCatalogReader
Throws:
SAXException

endPrefixMapping

public void endPrefixMapping(String prefix)
                      throws SAXException
The SAX endPrefixMapping method does nothing.

Specified by:
endPrefixMapping in interface ContentHandler
Overrides:
endPrefixMapping in class SAXCatalogReader
Throws:
SAXException


Copyright © 2002 JBoss Group, LLC. All Rights Reserved.