org.apache.felix.bundlerepository.metadataparser
Class XmlCommonHandler
java.lang.Object
org.apache.felix.bundlerepository.metadataparser.XmlCommonHandler
- All Implemented Interfaces:
- KXml2SAXHandler
public class XmlCommonHandler
- extends Object
- implements KXml2SAXHandler
SAX handler for the XML file
Method Summary |
void |
addPI(String piname,
Class clazz)
|
void |
addType(String qname,
Object instanceFactory,
Class castClass,
Method defaultAddMethod)
|
void |
characters(char[] ch,
int offset,
int length)
Method called when parsing text |
void |
endElement(String uri,
String localName,
String qName)
Method called when a tag closes |
Map |
getContext()
|
Object |
getRoot()
|
void |
processingInstruction(String target,
String data)
|
void |
processingInstructionForMapping(String target,
String data)
|
void |
setColumnNumber(int columnNumber)
|
void |
setContext(Map context)
|
void |
setDefaultType(Object instanceFactory,
Class castClass,
Method defaultAddMethod)
|
void |
setLineNumber(int lineNumber)
|
void |
setMissingPIExceptionFlag(boolean flag)
set the missing PI exception flag. |
void |
setTrace(boolean trace)
|
void |
startElement(String uri,
String localName,
String qName,
Properties attrib)
Method called when a tag opens |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
METADATAPARSER_PIS
public static final String METADATAPARSER_PIS
- See Also:
- Constant Field Values
METADATAPARSER_TYPES
public static final String METADATAPARSER_TYPES
- See Also:
- Constant Field Values
XmlCommonHandler
public XmlCommonHandler(Logger logger)
addPI
public void addPI(String piname,
Class clazz)
setMissingPIExceptionFlag
public void setMissingPIExceptionFlag(boolean flag)
- set the missing PI exception flag. If during parsing, the flag is true
and the processing instruction is unknown, then the parser throws a
exception
- Parameters:
flag
-
addType
public void addType(String qname,
Object instanceFactory,
Class castClass,
Method defaultAddMethod)
throws Exception
- Throws:
Exception
setDefaultType
public void setDefaultType(Object instanceFactory,
Class castClass,
Method defaultAddMethod)
throws Exception
- Throws:
Exception
setContext
public void setContext(Map context)
getContext
public Map getContext()
getRoot
public Object getRoot()
characters
public void characters(char[] ch,
int offset,
int length)
throws Exception
- Description copied from interface:
KXml2SAXHandler
- Method called when parsing text
- Specified by:
characters
in interface KXml2SAXHandler
- Throws:
Exception
startElement
public void startElement(String uri,
String localName,
String qName,
Properties attrib)
throws Exception
- Method called when a tag opens
- Specified by:
startElement
in interface KXml2SAXHandler
- Parameters:
uri
- localName
- qName
- attrib
-
- Throws:
org.xml.sax.SAXException
Exception
endElement
public void endElement(String uri,
String localName,
String qName)
throws Exception
- Method called when a tag closes
- Specified by:
endElement
in interface KXml2SAXHandler
- Parameters:
uri
- localName
- qName
-
- Throws:
org.xml.sax.SAXException
Exception
setTrace
public void setTrace(boolean trace)
setLineNumber
public void setLineNumber(int lineNumber)
- Specified by:
setLineNumber
in interface KXml2SAXHandler
- See Also:
kxml.sax.KXmlSAXHandler#setLineNumber(int)
setColumnNumber
public void setColumnNumber(int columnNumber)
- Specified by:
setColumnNumber
in interface KXml2SAXHandler
- See Also:
kxml.sax.KXmlSAXHandler#setColumnNumber(int)
processingInstruction
public void processingInstruction(String target,
String data)
throws Exception
- Specified by:
processingInstruction
in interface KXml2SAXHandler
- Throws:
Exception
- See Also:
kxml.sax.KXmlSAXHandler#processingInstruction(java.lang.String,
java.lang.String)
processingInstructionForMapping
public void processingInstructionForMapping(String target,
String data)
throws Exception
- Throws:
Exception
Copyright © 2006-2011 Apache Software Foundation. All Rights Reserved.