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 StringAPACHE_DYNAMIC_VALIDATION_FEATUREprotected static StringAPACHE_SCHEMA_VALIDATION_FEATUREprotected ContentHandlercontentHandlerprotected static StringDECLARATION_HANDLER_PROPERTYprotected ErrorHandlererrorHandlerprotected static StringEXTERNAL_GENERAL_ENTITIES_PROPERTYprotected static StringLEXICAL_HANDLER_PROPERTYprotected static StringNAMESPACE_PREFIXES_FEATUREprotected static StringNAMESPACES_FEATUREprotected org.codehaus.plexus.util.xml.pull.XmlPullParserppprotected StringsystemIdprotected static StringVALIDATION_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:
getLengthin interfaceAttributes
-
getURI
public String getURI(int index)
- Specified by:
getURIin interfaceAttributes
-
getLocalName
public String getLocalName(int index)
- Specified by:
getLocalNamein interfaceAttributes
-
getQName
public String getQName(int index)
- Specified by:
getQNamein interfaceAttributes
-
getType
public String getType(int index)
- Specified by:
getTypein interfaceAttributes
-
getValue
public String getValue(int index)
- Specified by:
getValuein interfaceAttributes
-
getIndex
public int getIndex(String uri, String localName)
- Specified by:
getIndexin interfaceAttributes
-
getIndex
public int getIndex(String qName)
- Specified by:
getIndexin interfaceAttributes
-
getType
public String getType(String uri, String localName)
- Specified by:
getTypein interfaceAttributes
-
getType
public String getType(String qName)
- Specified by:
getTypein interfaceAttributes
-
getValue
public String getValue(String uri, String localName)
- Specified by:
getValuein interfaceAttributes
-
getValue
public String getValue(String qName)
- Specified by:
getValuein interfaceAttributes
-
getPublicId
public String getPublicId()
- Specified by:
getPublicIdin interfaceLocator
-
getSystemId
public String getSystemId()
- Specified by:
getSystemIdin interfaceLocator
-
getLineNumber
public int getLineNumber()
- Specified by:
getLineNumberin interfaceLocator
-
getColumnNumber
public int getColumnNumber()
- Specified by:
getColumnNumberin interfaceLocator
-
getFeature
public boolean getFeature(String name) throws SAXNotRecognizedException, SAXNotSupportedException
- Specified by:
getFeaturein interfaceXMLReader- Throws:
SAXNotRecognizedExceptionSAXNotSupportedException
-
setFeature
public void setFeature(String name, boolean value) throws SAXNotRecognizedException, SAXNotSupportedException
- Specified by:
setFeaturein interfaceXMLReader- Throws:
SAXNotRecognizedExceptionSAXNotSupportedException
-
getProperty
public Object getProperty(String name) throws SAXNotRecognizedException, SAXNotSupportedException
- Specified by:
getPropertyin interfaceXMLReader- Throws:
SAXNotRecognizedExceptionSAXNotSupportedException
-
setProperty
public void setProperty(String name, Object value) throws SAXNotRecognizedException, SAXNotSupportedException
- Specified by:
setPropertyin interfaceXMLReader- Throws:
SAXNotRecognizedExceptionSAXNotSupportedException
-
setEntityResolver
public void setEntityResolver(EntityResolver resolver)
- Specified by:
setEntityResolverin interfaceXMLReader
-
getEntityResolver
public EntityResolver getEntityResolver()
- Specified by:
getEntityResolverin interfaceXMLReader
-
setDTDHandler
public void setDTDHandler(DTDHandler handler)
- Specified by:
setDTDHandlerin interfaceXMLReader
-
getDTDHandler
public DTDHandler getDTDHandler()
- Specified by:
getDTDHandlerin interfaceXMLReader
-
setContentHandler
public void setContentHandler(ContentHandler handler)
- Specified by:
setContentHandlerin interfaceXMLReader
-
getContentHandler
public ContentHandler getContentHandler()
- Specified by:
getContentHandlerin interfaceXMLReader
-
setErrorHandler
public void setErrorHandler(ErrorHandler handler)
- Specified by:
setErrorHandlerin interfaceXMLReader
-
getErrorHandler
public ErrorHandler getErrorHandler()
- Specified by:
getErrorHandlerin interfaceXMLReader
-
parse
public void parse(InputSource source) throws SAXException, IOException
- Specified by:
parsein interfaceXMLReader- Throws:
SAXExceptionIOException
-
parse
public void parse(String systemId) throws SAXException, IOException
- Specified by:
parsein interfaceXMLReader- Throws:
SAXExceptionIOException
-
parseSubTree
public void parseSubTree(org.codehaus.plexus.util.xml.pull.XmlPullParser pp) throws SAXException, IOException- Throws:
SAXExceptionIOException
-
startElement
protected void startElement(String namespace, String localName, String qName) throws SAXException
CallsContentHandler.startElementon theContentHandlerwiththisdriver object as theAttributesimplementation. In default implementationAttributesobject 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.
-
-