APIdia Launch Partner
Top Description Fields Constructors Methods
javax.xml.catalog

pack-priv Class CatalogReader

extends DefaultHandler
implements EntityResolver, URIResolver
Class Inheritance
All Implemented Interfaces
javax.xml.transform.URIResolver, org.xml.sax.EntityResolver
Imports
java.io.StringReader, javax.xml.catalog.BaseEntry.CatalogEntryType, javax.xml.parsers.SAXParser, javax.xml.transform.Source, .TransformerException, .URIResolver, javax.xml.transform.sax.SAXSource, org.xml.sax.Attributes, .EntityResolver, .InputSource, .SAXException, org.xml.sax.helpers.DefaultHandler

CatalogReader handles SAX events while parsing through a catalog file to create a catalog object.
Since
9

Field Summary

Modifier and TypeField and Description
pack-priv CatalogImpl
pack-priv CatalogEntry
pack-priv BaseEntry
pack-priv GroupEntry
pack-priv boolean
pack-priv boolean
public static final String
NAMESPACE_OASIS

The namespace name defined by the OASIS Standard

pack-priv SAXParser
pack-priv boolean
public static final String
xmlCatalogPubId

Public identifier for OASIS XML Catalog files.

public static final String
xmlCatalogXSD

URI of the W3C XML Schema for OASIS XML Catalog files.

Constructor Summary

AccessConstructor and Description
public
CatalogReader(Catalog
The Catalog object that represents a catalog
catalog
,
SAXParser parser)

Constructs an instance with a Catalog object and parser.

Method Summary

Modifier and TypeMethod and Description
public void
endElement(String namespaceURI, String localName, String qName)

Overrides org.xml.sax.helpers.DefaultHandler.endElement.

Implements org.xml.sax.ContentHandler.endElement.

Handles endElement event

public Source
resolve(String href, String base)

Implements javax.xml.transform.URIResolver.resolve.

Skips external references since resolution is not required by the specification.

public InputSource
resolveEntity(String publicId, String systemId)

Overrides org.xml.sax.helpers.DefaultHandler.resolveEntity.

Implements org.xml.sax.EntityResolver.resolveEntity.

Skips external DTD since resolving external DTD is not required by the specification.

public void
startElement(String namespaceURI, String localName, String qName, Attributes atts)

Overrides org.xml.sax.helpers.DefaultHandler.startElement.

Implements org.xml.sax.ContentHandler.startElement.

Receive notification of the start of an element.

Inherited from org.xml.sax.helpers.DefaultHandler:
charactersendDocumentendPrefixMappingerrorfatalErrorignorableWhitespacenotationDeclprocessingInstructionsetDocumentLocatorskippedEntitystartDocumentstartPrefixMappingunparsedEntityDeclwarning

Field Detail

catalogback to summary
pack-priv CatalogImpl catalog
catalogEntryback to summary
pack-priv CatalogEntry catalogEntry
entryback to summary
pack-priv BaseEntry entry
groupback to summary
pack-priv GroupEntry group
ignoreTheCatalogback to summary
pack-priv boolean ignoreTheCatalog
inGroupback to summary
pack-priv boolean inGroup
NAMESPACE_OASISback to summary
public static final String NAMESPACE_OASIS

The namespace name defined by the OASIS Standard

parserback to summary
pack-priv SAXParser parser
seenRootback to summary
pack-priv boolean seenRoot
xmlCatalogPubIdback to summary
public static final String xmlCatalogPubId

Public identifier for OASIS XML Catalog files.

xmlCatalogXSDback to summary
public static final String xmlCatalogXSD

URI of the W3C XML Schema for OASIS XML Catalog files.

Constructor Detail

CatalogReaderback to summary
public CatalogReader(Catalog catalog, SAXParser parser)

Constructs an instance with a Catalog object and parser.

Parameters
catalog:Catalog

The Catalog object that represents a catalog

Method Detail

endElementback to summary
public void endElement(String namespaceURI, String localName, String qName) throws SAXException

Overrides org.xml.sax.helpers.DefaultHandler.endElement.

Implements org.xml.sax.ContentHandler.endElement.

Handles endElement event

Annotations
@Override
Exceptions
SAXException:

Doc from org.xml.sax.helpers.DefaultHandler.endElement.

Any SAX exception, possibly wrapping another exception.

resolveback to summary
public Source resolve(String href, String base) throws TransformerException

Implements javax.xml.transform.URIResolver.resolve.

Skips external references since resolution is not required by the specification.

Annotations
@Override
Exceptions
TransformerException:

Doc from javax.xml.transform.URIResolver.resolve.

if an error occurs when trying to resolve the URI.

resolveEntityback to summary
public InputSource resolveEntity(String publicId, String systemId)

Overrides org.xml.sax.helpers.DefaultHandler.resolveEntity.

Implements org.xml.sax.EntityResolver.resolveEntity.

Skips external DTD since resolving external DTD is not required by the specification.

Annotations
@Override
startElementback to summary
public void startElement(String namespaceURI, String localName, String qName, Attributes atts) throws SAXException

Overrides org.xml.sax.helpers.DefaultHandler.startElement.

Implements org.xml.sax.ContentHandler.startElement.

Doc from org.xml.sax.helpers.DefaultHandler.startElement.

Receive notification of the start of an element.

By default, do nothing. Application writers may override this method in a subclass to take specific actions at the start of each element (such as allocating a new tree node or writing output to a file).

Annotations
@Override
Exceptions
SAXException:
Any SAX exception, possibly wrapping another exception.