|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.axiom.om.impl.builder.StAXBuilder
OM should be able to be built from any data source. And the model it builds may be a SOAP specific one or just an XML model. This class will give some common functionality of OM Building from StAX.
Field Summary | |
protected boolean |
_isClosed
|
protected boolean |
_releaseParserOnClose
|
protected boolean |
cache
Field cache |
protected java.lang.String |
charEncoding
|
protected OMDocument |
document
|
protected boolean |
done
Field done |
protected OMNode |
lastNode
Field lastNode |
protected OMFactory |
omfactory
Field omfactory |
protected javax.xml.stream.XMLStreamReader |
parser
Field parser |
protected boolean |
parserAccessed
Field parserAccessed |
Constructor Summary | |
protected |
StAXBuilder()
Init() *must* be called after creating the builder using this constructor. |
protected |
StAXBuilder(OMFactory ombuilderFactory,
javax.xml.stream.XMLStreamReader parser)
Constructor StAXBuilder. |
protected |
StAXBuilder(OMFactory ombuilderFactory,
javax.xml.stream.XMLStreamReader parser,
java.lang.String characterEncoding)
Constructor StAXBuilder. |
protected |
StAXBuilder(javax.xml.stream.XMLStreamReader parser)
Constructor StAXBuilder. |
Method Summary | |
void |
close()
|
protected abstract OMNode |
createOMElement()
This method is called with the XMLStreamConstants.START_ELEMENT event. |
protected OMNode |
createOMText(int textType)
Method createOMText. |
void |
discard(OMElement el)
Method discard. |
int |
getAttributeCount()
Method getAttributeCount. |
java.lang.String |
getAttributeName(int arg)
Method getAttributeName. |
java.lang.String |
getAttributeNamespace(int arg)
Method getAttributeNamespace. |
java.lang.String |
getAttributePrefix(int arg)
Method getAttributePrefix. |
short |
getBuilderType()
Returns the type of the builder. |
java.lang.String |
getCharacterEncoding()
Returns the encoding style of the XML data |
java.lang.String |
getCharsetEncoding()
|
OMDocument |
getDocument()
|
OMNode |
getLastNode()
|
java.lang.String |
getName()
Method getName. |
java.lang.String |
getNamespace()
Method getNamespace. |
int |
getNamespaceCount()
Method getNamespaceCount. |
java.lang.String |
getNamespacePrefix(int index)
Method getNamespacePrefix. |
java.lang.String |
getNamespaceUri(int index)
Method getNamespaceUri. |
java.lang.Object |
getParser()
Method getParser. |
java.lang.String |
getPrefix()
Method getPrefix. |
java.lang.Object |
getReaderProperty(java.lang.String name)
Get the value of a feature/property from the underlying XMLStreamReader implementation without accessing the XMLStreamReader. https://issues.apache.org/jira/browse/WSCOMMONS-155 |
java.lang.Object |
getRegisteredContentHandler()
Method getRegisteredContentHandler. |
java.lang.String |
getText()
Method getText. |
void |
init(java.io.InputStream inputStream,
java.lang.String charSetEncoding,
java.lang.String url,
java.lang.String contentType)
Deprecated. Not used anywhere |
boolean |
isClosed()
|
boolean |
isCompleted()
Method isCompleted. |
abstract int |
next()
Forwards the parser one step further, if parser is not completed yet. |
protected void |
processAttributes(OMElement node)
Method processAttributes. |
protected abstract void |
processNamespaceData(OMElement node)
Method processNamespaceData. |
void |
registerExternalContentHandler(java.lang.Object obj)
Method registerExternalContentHandler. |
void |
releaseParserOnClose(boolean value)
Indicate if the parser resource should be release when closed. |
void |
reset(OMNode node)
Method reset. |
void |
setCache(boolean b)
Method setCache. |
void |
setOMBuilderFactory(OMFactory ombuilderFactory)
Method setOMBuilderFactory. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.axiom.om.OMXMLParserWrapper |
getDocumentElement |
Field Detail |
protected javax.xml.stream.XMLStreamReader parser
protected OMFactory omfactory
protected OMNode lastNode
protected boolean done
protected boolean cache
protected boolean parserAccessed
protected OMDocument document
protected java.lang.String charEncoding
protected boolean _isClosed
protected boolean _releaseParserOnClose
Constructor Detail |
protected StAXBuilder(OMFactory ombuilderFactory, javax.xml.stream.XMLStreamReader parser)
ombuilderFactory
- parser
- protected StAXBuilder(OMFactory ombuilderFactory, javax.xml.stream.XMLStreamReader parser, java.lang.String characterEncoding)
ombuilderFactory
- parser
- characterEncoding
- protected StAXBuilder(javax.xml.stream.XMLStreamReader parser)
parser
- protected StAXBuilder()
Method Detail |
public void init(java.io.InputStream inputStream, java.lang.String charSetEncoding, java.lang.String url, java.lang.String contentType) throws OMException
OMException
public void setOMBuilderFactory(OMFactory ombuilderFactory)
ombuilderFactory
- protected abstract void processNamespaceData(OMElement node)
node
- protected void processAttributes(OMElement node)
node
- protected OMNode createOMText(int textType) throws OMException
OMException
public void reset(OMNode node) throws OMException
node
-
OMException
public void discard(OMElement el) throws OMException
discard
in interface OMXMLParserWrapper
el
-
OMException
public java.lang.String getText() throws OMException
OMException
public java.lang.String getNamespace() throws OMException
OMException
public int getNamespaceCount() throws OMException
OMException
public java.lang.String getNamespacePrefix(int index) throws OMException
index
-
OMException
public java.lang.String getNamespaceUri(int index) throws OMException
index
-
OMException
public void setCache(boolean b)
setCache
in interface OMXMLParserWrapper
b
- public java.lang.String getName() throws OMException
OMException
public java.lang.String getPrefix() throws OMException
OMException
public int getAttributeCount() throws OMException
OMException
public java.lang.String getAttributeNamespace(int arg) throws OMException
arg
-
OMException
public java.lang.String getAttributeName(int arg) throws OMException
arg
-
OMException
public java.lang.String getAttributePrefix(int arg) throws OMException
arg
-
OMException
public java.lang.Object getParser()
getParser
in interface OMXMLParserWrapper
public boolean isCompleted()
isCompleted
in interface OMXMLParserWrapper
protected abstract OMNode createOMElement() throws OMException
OMException
public abstract int next() throws OMException
next
in interface OMXMLParserWrapper
OMException
public short getBuilderType()
OMXMLParserWrapper
getBuilderType
in interface OMXMLParserWrapper
public void registerExternalContentHandler(java.lang.Object obj)
registerExternalContentHandler
in interface OMXMLParserWrapper
obj
- public java.lang.Object getRegisteredContentHandler()
getRegisteredContentHandler
in interface OMXMLParserWrapper
public OMDocument getDocument()
public java.lang.String getCharsetEncoding()
public OMNode getLastNode()
public void close()
public java.lang.Object getReaderProperty(java.lang.String name) throws java.lang.IllegalArgumentException
name
-
java.lang.IllegalArgumentException
public java.lang.String getCharacterEncoding()
getCharacterEncoding
in interface OMXMLParserWrapper
public boolean isClosed()
public void releaseParserOnClose(boolean value)
value
- boolean
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |