Top Description Fields Constructors Methods
com.sun.tools.xjc.reader.internalizer

public abstract Class AbstractReferenceFinderImpl

extends XMLFilterImpl
Class Inheritance
Known Direct Subclasses
com.sun.tools.xjc.reader.relaxng.RELAXNGInternalizationLogic.ReferenceFinder, com.sun.tools.xjc.reader.xmlschema.parser.XMLSchemaInternalizationLogic.ReferenceFinder
Imports
com.sun.istack.SAXParseException2, org.xml.sax.Attributes, .Locator, .SAXException, .SAXParseException, org.xml.sax.helpers.XMLFilterImpl, java.io.File, .IOException, java.net.URI, .URISyntaxException

XMLFilter that finds references to other schema files from SAX events.

This implementation is a base implementation for typical case where we just need to look for a particular attribute which contains an URL to another schema file.

Author
Kohsuke Kawaguchi ([email protected])

Field Summary

Modifier and TypeField and Description
private Locator
protected final DOMForest

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
protected abstract String

Returns:

It's OK to return a relative URL.
findExternalResource
(String
Namespace URI of the current element
nsURI
,
String
Local name of the current element
localName
,
Attributes atts)

IF the given element contains a reference to an external resource, return its URL.

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

Overrides org.xml.sax.helpers.XMLFilterImpl.startElement.

Implements org.xml.sax.ContentHandler.startElement.

Filter a start element event.

Inherited from org.xml.sax.helpers.XMLFilterImpl:
charactersendDocumentendElementendPrefixMappingerrorfatalErrorgetContentHandlergetDTDHandlergetEntityResolvergetErrorHandlergetFeaturegetParentgetPropertyignorableWhitespacenotationDeclparseparseprocessingInstructionresolveEntitysetContentHandlersetDTDHandlersetEntityResolversetErrorHandlersetFeaturesetParentsetPropertyskippedEntitystartDocumentstartPrefixMappingunparsedEntityDeclwarning

Field Detail

locatorback to summary
private Locator locator

Hides org.xml.sax.helpers.XMLFilterImpl.locator.

parentback to summary
protected final DOMForest parent

Hides org.xml.sax.helpers.XMLFilterImpl.parent.

Constructor Detail

AbstractReferenceFinderImplback to summary
protected AbstractReferenceFinderImpl(DOMForest _parent)

Method Detail

findExternalResourceback to summary
protected abstract String findExternalResource(String nsURI, String localName, Attributes atts)

IF the given element contains a reference to an external resource, return its URL.

Parameters
nsURI:String

Namespace URI of the current element

localName:String

Local name of the current element

Returns:String

It's OK to return a relative URL.

setDocumentLocatorback to summary
public void setDocumentLocator(Locator locator)

Overrides org.xml.sax.helpers.XMLFilterImpl.setDocumentLocator.

Implements org.xml.sax.ContentHandler.setDocumentLocator.

Doc from org.xml.sax.helpers.XMLFilterImpl.setDocumentLocator.

Filter a new document locator event.

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

Overrides org.xml.sax.helpers.XMLFilterImpl.startElement.

Implements org.xml.sax.ContentHandler.startElement.

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

Filter a start element event.

Annotations
@Override
Exceptions
SAXException:
The client may throw an exception during processing.