org.codehaus.plexus.metadata.merge
Class Driver

java.lang.Object
  extended by org.codehaus.plexus.metadata.merge.Driver
All Implemented Interfaces:
Attributes, Locator, XMLReader

public class Driver
extends Object
implements Locator, XMLReader, Attributes

SAX2 Driver that pulls events from XmlPullParser and comverts them into SAX2 callbacks.

Author:
Aleksander Slominski

Field Summary
protected static String APACHE_DYNAMIC_VALIDATION_FEATURE
           
protected static String APACHE_SCHEMA_VALIDATION_FEATURE
           
protected  ContentHandler contentHandler
           
protected static String DECLARATION_HANDLER_PROPERTY
           
protected  ErrorHandler errorHandler
           
protected static String LEXICAL_HANDLER_PROPERTY
           
protected static String NAMESPACE_PREFIXES_FEATURE
           
protected static String NAMESPACES_FEATURE
           
protected  org.codehaus.plexus.util.xml.pull.XmlPullParser pp
           
protected  String systemId
           
protected static String VALIDATION_FEATURE
           
 
Constructor Summary
Driver()
           
 
Method Summary
 int getColumnNumber()
           
 ContentHandler getContentHandler()
           
 DTDHandler getDTDHandler()
           
 EntityResolver getEntityResolver()
           
 ErrorHandler getErrorHandler()
           
 boolean getFeature(String name)
           
 int getIndex(String qName)
           
 int getIndex(String uri, String localName)
           
 int getLength()
           
 int getLineNumber()
           
 String getLocalName(int index)
           
 Object getProperty(String name)
           
 String getPublicId()
           
 String getQName(int index)
           
 String getSystemId()
           
 String getType(int index)
           
 String getType(String qName)
           
 String getType(String uri, String localName)
           
 String getURI(int index)
           
 String getValue(int index)
           
 String getValue(String qName)
           
 String getValue(String uri, String localName)
           
 void parse(InputSource source)
           
 void parse(String systemId)
           
 void parseSubTree(org.codehaus.plexus.util.xml.pull.XmlPullParser pp)
           
 void setContentHandler(ContentHandler handler)
           
 void setDTDHandler(DTDHandler handler)
           
 void setEntityResolver(EntityResolver resolver)
           
 void setErrorHandler(ErrorHandler handler)
           
 void setFeature(String name, boolean value)
           
 void setProperty(String name, Object value)
           
protected  void startElement(String namespace, String localName, String qName)
          Calls startElement on the ContentHandler with this driver object as the Attributes implementation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DECLARATION_HANDLER_PROPERTY

protected static final String DECLARATION_HANDLER_PROPERTY
See Also:
Constant Field Values

LEXICAL_HANDLER_PROPERTY

protected static final String LEXICAL_HANDLER_PROPERTY
See Also:
Constant Field Values

NAMESPACES_FEATURE

protected static final String NAMESPACES_FEATURE
See Also:
Constant Field Values

NAMESPACE_PREFIXES_FEATURE

protected static final String NAMESPACE_PREFIXES_FEATURE
See Also:
Constant Field Values

VALIDATION_FEATURE

protected static final String VALIDATION_FEATURE
See Also:
Constant Field Values

APACHE_SCHEMA_VALIDATION_FEATURE

protected static final String APACHE_SCHEMA_VALIDATION_FEATURE
See Also:
Constant Field Values

APACHE_DYNAMIC_VALIDATION_FEATURE

protected static final String APACHE_DYNAMIC_VALIDATION_FEATURE
See Also:
Constant Field Values

contentHandler

protected ContentHandler contentHandler

errorHandler

protected ErrorHandler errorHandler

systemId

protected String systemId

pp

protected org.codehaus.plexus.util.xml.pull.XmlPullParser pp
Constructor Detail

Driver

public Driver()
       throws org.codehaus.plexus.util.xml.pull.XmlPullParserException
Throws:
org.codehaus.plexus.util.xml.pull.XmlPullParserException
Method Detail

getLength

public int getLength()
Specified by:
getLength in interface Attributes

getURI

public String getURI(int index)
Specified by:
getURI in interface Attributes

getLocalName

public String getLocalName(int index)
Specified by:
getLocalName in interface Attributes

getQName

public String getQName(int index)
Specified by:
getQName in interface Attributes

getType

public String getType(int index)
Specified by:
getType in interface Attributes

getValue

public String getValue(int index)
Specified by:
getValue in interface Attributes

getIndex

public int getIndex(String uri,
                    String localName)
Specified by:
getIndex in interface Attributes

getIndex

public int getIndex(String qName)
Specified by:
getIndex in interface Attributes

getType

public String getType(String uri,
                      String localName)
Specified by:
getType in interface Attributes

getType

public String getType(String qName)
Specified by:
getType in interface Attributes

getValue

public String getValue(String uri,
                       String localName)
Specified by:
getValue in interface Attributes

getValue

public String getValue(String qName)
Specified by:
getValue in interface Attributes

getPublicId

public String getPublicId()
Specified by:
getPublicId in interface Locator

getSystemId

public String getSystemId()
Specified by:
getSystemId in interface Locator

getLineNumber

public int getLineNumber()
Specified by:
getLineNumber in interface Locator

getColumnNumber

public int getColumnNumber()
Specified by:
getColumnNumber in interface Locator

getFeature

public boolean getFeature(String name)
                   throws SAXNotRecognizedException,
                          SAXNotSupportedException
Specified by:
getFeature in interface XMLReader
Throws:
SAXNotRecognizedException
SAXNotSupportedException

setFeature

public void setFeature(String name,
                       boolean value)
                throws SAXNotRecognizedException,
                       SAXNotSupportedException
Specified by:
setFeature in interface XMLReader
Throws:
SAXNotRecognizedException
SAXNotSupportedException

getProperty

public Object getProperty(String name)
                   throws SAXNotRecognizedException,
                          SAXNotSupportedException
Specified by:
getProperty in interface XMLReader
Throws:
SAXNotRecognizedException
SAXNotSupportedException

setProperty

public void setProperty(String name,
                        Object value)
                 throws SAXNotRecognizedException,
                        SAXNotSupportedException
Specified by:
setProperty in interface XMLReader
Throws:
SAXNotRecognizedException
SAXNotSupportedException

setEntityResolver

public void setEntityResolver(EntityResolver resolver)
Specified by:
setEntityResolver in interface XMLReader

getEntityResolver

public EntityResolver getEntityResolver()
Specified by:
getEntityResolver in interface XMLReader

setDTDHandler

public void setDTDHandler(DTDHandler handler)
Specified by:
setDTDHandler in interface XMLReader

getDTDHandler

public DTDHandler getDTDHandler()
Specified by:
getDTDHandler in interface XMLReader

setContentHandler

public void setContentHandler(ContentHandler handler)
Specified by:
setContentHandler in interface XMLReader

getContentHandler

public ContentHandler getContentHandler()
Specified by:
getContentHandler in interface XMLReader

setErrorHandler

public void setErrorHandler(ErrorHandler handler)
Specified by:
setErrorHandler in interface XMLReader

getErrorHandler

public ErrorHandler getErrorHandler()
Specified by:
getErrorHandler in interface XMLReader

parse

public void parse(InputSource source)
           throws SAXException,
                  IOException
Specified by:
parse in interface XMLReader
Throws:
SAXException
IOException

parse

public void parse(String systemId)
           throws SAXException,
                  IOException
Specified by:
parse in interface XMLReader
Throws:
SAXException
IOException

parseSubTree

public void parseSubTree(org.codehaus.plexus.util.xml.pull.XmlPullParser pp)
                  throws SAXException,
                         IOException
Throws:
SAXException
IOException

startElement

protected void startElement(String namespace,
                            String localName,
                            String qName)
                     throws SAXException
Calls startElement on the ContentHandler with this driver object as the Attributes implementation. In default implementation Attributes object is valid only during this method call and may not be stored. Sub-classes can overwrite this method to cache attributes.

Throws:
SAXException


Copyright © 2001-2011 Codehaus. All Rights Reserved.