Class Driver
- java.lang.Object
-
- 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
Fields Modifier and Type Field Description 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
EXTERNAL_GENERAL_ENTITIES_PROPERTY
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
Constructors Constructor Description Driver()
-
Method Summary
-
-
-
Field Detail
-
EXTERNAL_GENERAL_ENTITIES_PROPERTY
protected static final String EXTERNAL_GENERAL_ENTITIES_PROPERTY
- See Also:
- Constant Field Values
-
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
-
-
Method Detail
-
getLength
public int getLength()
- Specified by:
getLength
in interfaceAttributes
-
getURI
public String getURI(int index)
- Specified by:
getURI
in interfaceAttributes
-
getLocalName
public String getLocalName(int index)
- Specified by:
getLocalName
in interfaceAttributes
-
getQName
public String getQName(int index)
- Specified by:
getQName
in interfaceAttributes
-
getType
public String getType(int index)
- Specified by:
getType
in interfaceAttributes
-
getValue
public String getValue(int index)
- Specified by:
getValue
in interfaceAttributes
-
getIndex
public int getIndex(String uri, String localName)
- Specified by:
getIndex
in interfaceAttributes
-
getIndex
public int getIndex(String qName)
- Specified by:
getIndex
in interfaceAttributes
-
getType
public String getType(String uri, String localName)
- Specified by:
getType
in interfaceAttributes
-
getType
public String getType(String qName)
- Specified by:
getType
in interfaceAttributes
-
getValue
public String getValue(String uri, String localName)
- Specified by:
getValue
in interfaceAttributes
-
getValue
public String getValue(String qName)
- Specified by:
getValue
in interfaceAttributes
-
getPublicId
public String getPublicId()
- Specified by:
getPublicId
in interfaceLocator
-
getSystemId
public String getSystemId()
- Specified by:
getSystemId
in interfaceLocator
-
getLineNumber
public int getLineNumber()
- Specified by:
getLineNumber
in interfaceLocator
-
getColumnNumber
public int getColumnNumber()
- Specified by:
getColumnNumber
in interfaceLocator
-
getFeature
public boolean getFeature(String name) throws SAXNotRecognizedException, SAXNotSupportedException
- Specified by:
getFeature
in interfaceXMLReader
- Throws:
SAXNotRecognizedException
SAXNotSupportedException
-
setFeature
public void setFeature(String name, boolean value) throws SAXNotRecognizedException, SAXNotSupportedException
- Specified by:
setFeature
in interfaceXMLReader
- Throws:
SAXNotRecognizedException
SAXNotSupportedException
-
getProperty
public Object getProperty(String name) throws SAXNotRecognizedException, SAXNotSupportedException
- Specified by:
getProperty
in interfaceXMLReader
- Throws:
SAXNotRecognizedException
SAXNotSupportedException
-
setProperty
public void setProperty(String name, Object value) throws SAXNotRecognizedException, SAXNotSupportedException
- Specified by:
setProperty
in interfaceXMLReader
- Throws:
SAXNotRecognizedException
SAXNotSupportedException
-
setEntityResolver
public void setEntityResolver(EntityResolver resolver)
- Specified by:
setEntityResolver
in interfaceXMLReader
-
getEntityResolver
public EntityResolver getEntityResolver()
- Specified by:
getEntityResolver
in interfaceXMLReader
-
setDTDHandler
public void setDTDHandler(DTDHandler handler)
- Specified by:
setDTDHandler
in interfaceXMLReader
-
getDTDHandler
public DTDHandler getDTDHandler()
- Specified by:
getDTDHandler
in interfaceXMLReader
-
setContentHandler
public void setContentHandler(ContentHandler handler)
- Specified by:
setContentHandler
in interfaceXMLReader
-
getContentHandler
public ContentHandler getContentHandler()
- Specified by:
getContentHandler
in interfaceXMLReader
-
setErrorHandler
public void setErrorHandler(ErrorHandler handler)
- Specified by:
setErrorHandler
in interfaceXMLReader
-
getErrorHandler
public ErrorHandler getErrorHandler()
- Specified by:
getErrorHandler
in interfaceXMLReader
-
parse
public void parse(InputSource source) throws SAXException, IOException
- Specified by:
parse
in interfaceXMLReader
- Throws:
SAXException
IOException
-
parse
public void parse(String systemId) throws SAXException, IOException
- Specified by:
parse
in interfaceXMLReader
- 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
CallsContentHandler.startElement
on theContentHandler
withthis
driver object as theAttributes
implementation. In default implementationAttributes
object is valid only during this method call and may not be stored. Sub-classes can overwrite this method to cache attributes.- Parameters:
namespace
- The namespace.localName
- The localname.qName
- The qName.- Throws:
SAXException
- in case of an error.
-
-