com.sun.tools.ws.wsdl.parser
Class AbstractReferenceFinderImpl

java.lang.Object
  extended by org.xml.sax.helpers.XMLFilterImpl
      extended by com.sun.tools.ws.wsdl.parser.AbstractReferenceFinderImpl
All Implemented Interfaces:
org.xml.sax.ContentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler, org.xml.sax.XMLFilter, org.xml.sax.XMLReader

public abstract class AbstractReferenceFinderImpl
extends org.xml.sax.helpers.XMLFilterImpl

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.


Field Summary
protected  DOMForest parent
           
 
Constructor Summary
protected AbstractReferenceFinderImpl(DOMForest _parent)
           
 
Method Summary
protected abstract  java.lang.String findExternalResource(java.lang.String nsURI, java.lang.String localName, org.xml.sax.Attributes atts)
          IF the given element contains a reference to an external resource, return its URL.
 void setDocumentLocator(org.xml.sax.Locator locator)
           
 void startElement(java.lang.String namespaceURI, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes atts)
           
 
Methods inherited from class org.xml.sax.helpers.XMLFilterImpl
characters, endDocument, endElement, endPrefixMapping, error, fatalError, getContentHandler, getDTDHandler, getEntityResolver, getErrorHandler, getFeature, getParent, getProperty, ignorableWhitespace, notationDecl, parse, parse, processingInstruction, resolveEntity, setContentHandler, setDTDHandler, setEntityResolver, setErrorHandler, setFeature, setParent, setProperty, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

parent

protected final DOMForest parent
Constructor Detail

AbstractReferenceFinderImpl

protected AbstractReferenceFinderImpl(DOMForest _parent)
Method Detail

findExternalResource

protected abstract java.lang.String findExternalResource(java.lang.String nsURI,
                                                         java.lang.String localName,
                                                         org.xml.sax.Attributes atts)
IF the given element contains a reference to an external resource, return its URL.

Parameters:
nsURI - Namespace URI of the current element
localName - Local name of the current element
Returns:
It's OK to return a relative URL.

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
Specified by:
startElement in interface org.xml.sax.ContentHandler
Overrides:
startElement in class org.xml.sax.helpers.XMLFilterImpl
Throws:
org.xml.sax.SAXException

setDocumentLocator

public void setDocumentLocator(org.xml.sax.Locator locator)
Specified by:
setDocumentLocator in interface org.xml.sax.ContentHandler
Overrides:
setDocumentLocator in class org.xml.sax.helpers.XMLFilterImpl


Copyright (c) 1997-2012 Oracle and/or its affiliates. All rights reserved.