org.codehaus.plexus.metadata.merge

## Class Driver

- java.lang.Object
- - org.codehaus.plexus.metadata.merge.Driver

All Implemented Interfaces:
  org.xml.sax.Attributes, org.xml.sax.Locator, org.xml.sax.XMLReader

    public class Driver
    extends java.lang.Object
    implements org.xml.sax.Locator, org.xml.sax.XMLReader, org.xml.sax.Attributes

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

Author:
  Aleksander Slominski

### Field Summary

Fields
`protected static java.lang.String` `APACHE_DYNAMIC_VALIDATION_FEATURE`
`protected static java.lang.String` `APACHE_SCHEMA_VALIDATION_FEATURE`
`protected org.xml.sax.ContentHandler` `contentHandler`
`protected static java.lang.String` `DECLARATION_HANDLER_PROPERTY`
`protected org.xml.sax.ErrorHandler` `errorHandler`
`protected static java.lang.String` `LEXICAL_HANDLER_PROPERTY`
`protected static java.lang.String` `NAMESPACE_PREFIXES_FEATURE`
`protected static java.lang.String` `NAMESPACES_FEATURE`
`protected org.codehaus.plexus.util.xml.pull.XmlPullParser` `pp`
`protected java.lang.String` `systemId`
`protected static java.lang.String` `VALIDATION_FEATURE`

### Constructor Summary

Constructors
Constructor and Description
`Driver()`

### Method Summary

Methods
`int` `getColumnNumber()`
`org.xml.sax.ContentHandler` `getContentHandler()`
`org.xml.sax.DTDHandler` `getDTDHandler()`
`org.xml.sax.EntityResolver` `getEntityResolver()`
`org.xml.sax.ErrorHandler` `getErrorHandler()`
`boolean` `getFeature(java.lang.String name)`
`int` `getIndex(java.lang.String qName)`
`int` `getIndex(java.lang.String uri, java.lang.String localName)`
`int` `getLength()`
`int` `getLineNumber()`
`java.lang.String` `getLocalName(int index)`
`java.lang.Object` `getProperty(java.lang.String name)`
`java.lang.String` `getPublicId()`
`java.lang.String` `getQName(int index)`
`java.lang.String` `getSystemId()`
`java.lang.String` `getType(int index)`
`java.lang.String` `getType(java.lang.String qName)`
`java.lang.String` `getType(java.lang.String uri, java.lang.String localName)`
`java.lang.String` `getURI(int index)`
`java.lang.String` `getValue(int index)`
`java.lang.String` `getValue(java.lang.String qName)`
`java.lang.String` `getValue(java.lang.String uri, java.lang.String localName)`
`void` `parse(org.xml.sax.InputSource source)`
`void` `parse(java.lang.String systemId)`
`void` `parseSubTree(org.codehaus.plexus.util.xml.pull.XmlPullParser pp)`
`void` `setContentHandler(org.xml.sax.ContentHandler handler)`
`void` `setDTDHandler(org.xml.sax.DTDHandler handler)`
`void` `setEntityResolver(org.xml.sax.EntityResolver resolver)`
`void` `setErrorHandler(org.xml.sax.ErrorHandler handler)`
`void` `setFeature(java.lang.String name, boolean value)`
`void` `setProperty(java.lang.String name, java.lang.Object value)`
`protected void` `startElement(java.lang.String namespace, java.lang.String localName, java.lang.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 java.lang.String DECLARATION_HANDLER_PROPERTY

See Also:
  Constant Field Values

#### LEXICAL_HANDLER_PROPERTY

    protected static final java.lang.String LEXICAL_HANDLER_PROPERTY

See Also:
  Constant Field Values

#### NAMESPACES_FEATURE

    protected static final java.lang.String NAMESPACES_FEATURE

See Also:
  Constant Field Values

#### NAMESPACE_PREFIXES_FEATURE

    protected static final java.lang.String NAMESPACE_PREFIXES_FEATURE

See Also:
  Constant Field Values

#### VALIDATION_FEATURE

    protected static final java.lang.String VALIDATION_FEATURE

See Also:
  Constant Field Values

#### APACHE_SCHEMA_VALIDATION_FEATURE

    protected static final java.lang.String APACHE_SCHEMA_VALIDATION_FEATURE

See Also:
  Constant Field Values

#### APACHE_DYNAMIC_VALIDATION_FEATURE

    protected static final java.lang.String APACHE_DYNAMIC_VALIDATION_FEATURE

See Also:
  Constant Field Values

#### contentHandler

    protected org.xml.sax.ContentHandler contentHandler

#### errorHandler

    protected org.xml.sax.ErrorHandler errorHandler

#### systemId

    protected java.lang.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 `org.xml.sax.Attributes`

#### getURI

    public java.lang.String getURI(int index)

Specified by:
  `getURI` in interface `org.xml.sax.Attributes`

#### getLocalName

    public java.lang.String getLocalName(int index)

Specified by:
  `getLocalName` in interface `org.xml.sax.Attributes`

#### getQName

    public java.lang.String getQName(int index)

Specified by:
  `getQName` in interface `org.xml.sax.Attributes`

#### getType

    public java.lang.String getType(int index)

Specified by:
  `getType` in interface `org.xml.sax.Attributes`

#### getValue

    public java.lang.String getValue(int index)

Specified by:
  `getValue` in interface `org.xml.sax.Attributes`

#### getIndex

    public int getIndex(java.lang.String uri,
               java.lang.String localName)

Specified by:
  `getIndex` in interface `org.xml.sax.Attributes`

#### getIndex

    public int getIndex(java.lang.String qName)

Specified by:
  `getIndex` in interface `org.xml.sax.Attributes`

#### getType

    public java.lang.String getType(java.lang.String uri,
                           java.lang.String localName)

Specified by:
  `getType` in interface `org.xml.sax.Attributes`

#### getType

    public java.lang.String getType(java.lang.String qName)

Specified by:
  `getType` in interface `org.xml.sax.Attributes`

#### getValue

    public java.lang.String getValue(java.lang.String uri,
                            java.lang.String localName)

Specified by:
  `getValue` in interface `org.xml.sax.Attributes`

#### getValue

    public java.lang.String getValue(java.lang.String qName)

Specified by:
  `getValue` in interface `org.xml.sax.Attributes`

#### getPublicId

    public java.lang.String getPublicId()

Specified by:
  `getPublicId` in interface `org.xml.sax.Locator`

#### getSystemId

    public java.lang.String getSystemId()

Specified by:
  `getSystemId` in interface `org.xml.sax.Locator`

#### getLineNumber

    public int getLineNumber()

Specified by:
  `getLineNumber` in interface `org.xml.sax.Locator`

#### getColumnNumber

    public int getColumnNumber()

Specified by:
  `getColumnNumber` in interface `org.xml.sax.Locator`

#### getFeature

    public boolean getFeature(java.lang.String name)
                       throws org.xml.sax.SAXNotRecognizedException,
                              org.xml.sax.SAXNotSupportedException

Specified by:
  `getFeature` in interface `org.xml.sax.XMLReader`
Throws:
  `org.xml.sax.SAXNotRecognizedException`
  `org.xml.sax.SAXNotSupportedException`

#### setFeature

    public void setFeature(java.lang.String name,
                  boolean value)
                    throws org.xml.sax.SAXNotRecognizedException,
                           org.xml.sax.SAXNotSupportedException

Specified by:
  `setFeature` in interface `org.xml.sax.XMLReader`
Throws:
  `org.xml.sax.SAXNotRecognizedException`
  `org.xml.sax.SAXNotSupportedException`

#### getProperty

    public java.lang.Object getProperty(java.lang.String name)
                                 throws org.xml.sax.SAXNotRecognizedException,
                                        org.xml.sax.SAXNotSupportedException

Specified by:
  `getProperty` in interface `org.xml.sax.XMLReader`
Throws:
  `org.xml.sax.SAXNotRecognizedException`
  `org.xml.sax.SAXNotSupportedException`

#### setProperty

    public void setProperty(java.lang.String name,
                   java.lang.Object value)
                     throws org.xml.sax.SAXNotRecognizedException,
                            org.xml.sax.SAXNotSupportedException

Specified by:
  `setProperty` in interface `org.xml.sax.XMLReader`
Throws:
  `org.xml.sax.SAXNotRecognizedException`
  `org.xml.sax.SAXNotSupportedException`

#### setEntityResolver

    public void setEntityResolver(org.xml.sax.EntityResolver resolver)

Specified by:
  `setEntityResolver` in interface `org.xml.sax.XMLReader`

#### getEntityResolver

    public org.xml.sax.EntityResolver getEntityResolver()

Specified by:
  `getEntityResolver` in interface `org.xml.sax.XMLReader`

#### setDTDHandler

    public void setDTDHandler(org.xml.sax.DTDHandler handler)

Specified by:
  `setDTDHandler` in interface `org.xml.sax.XMLReader`

#### getDTDHandler

    public org.xml.sax.DTDHandler getDTDHandler()

Specified by:
  `getDTDHandler` in interface `org.xml.sax.XMLReader`

#### setContentHandler

    public void setContentHandler(org.xml.sax.ContentHandler handler)

Specified by:
  `setContentHandler` in interface `org.xml.sax.XMLReader`

#### getContentHandler

    public org.xml.sax.ContentHandler getContentHandler()

Specified by:
  `getContentHandler` in interface `org.xml.sax.XMLReader`

#### setErrorHandler

    public void setErrorHandler(org.xml.sax.ErrorHandler handler)

Specified by:
  `setErrorHandler` in interface `org.xml.sax.XMLReader`

#### getErrorHandler

    public org.xml.sax.ErrorHandler getErrorHandler()

Specified by:
  `getErrorHandler` in interface `org.xml.sax.XMLReader`

#### parse

    public void parse(org.xml.sax.InputSource source)
               throws org.xml.sax.SAXException,
                      java.io.IOException

Specified by:
  `parse` in interface `org.xml.sax.XMLReader`
Throws:
  `org.xml.sax.SAXException`
  `java.io.IOException`

#### parse

    public void parse(java.lang.String systemId)
               throws org.xml.sax.SAXException,
                      java.io.IOException

Specified by:
  `parse` in interface `org.xml.sax.XMLReader`
Throws:
  `org.xml.sax.SAXException`
  `java.io.IOException`

#### parseSubTree

    public void parseSubTree(org.codehaus.plexus.util.xml.pull.XmlPullParser pp)
                      throws org.xml.sax.SAXException,
                             java.io.IOException

Throws:
  `org.xml.sax.SAXException`
  `java.io.IOException`

#### startElement

    protected void startElement(java.lang.String namespace,
                    java.lang.String localName,
                    java.lang.String qName)
                         throws org.xml.sax.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:
  `org.xml.sax.SAXException`