public class OMTextImpl extends OMLeafNode implements OMText, OMConstants
| Modifier and Type | Field and Description |
|---|---|
private boolean |
calcNS |
protected char[] |
charArray |
private java.lang.String |
contentID
Field contentID for the mime part used when serializing Binary stuff as MTOM optimized.
|
private java.lang.Object |
dataHandlerObject
Field dataHandler contains the DataHandler Declaring as Object to remove the dependency on
Javax.activation.DataHandler
|
private static java.lang.String |
EMTPY_STRING |
protected boolean |
isBinary |
protected java.lang.String |
mimeType |
private int |
nodeType |
protected boolean |
optimize |
protected OMNamespace |
textNS |
protected java.lang.String |
value |
static OMNamespace |
XOP_NS
Field nameSpace used when serializing Binary stuff as MTOM optimized.
|
nextSibling, parent, previousSiblingfactoryCDATA_SECTION_NODE, COMMENT_NODE, DTD_NODE, ELEMENT_NODE, ENTITY_REFERENCE_NODE, PI_NODE, SPACE_NODE, TEXT_NODEARRAY_ITEM_LOCALNAME, ARRAY_ITEM_NS_PREFIX, ARRAY_ITEM_NSURI, ARRAY_ITEM_QNAME, DATA_HANDLER, DEFAULT_CHAR_SET_ENCODING, DEFAULT_DEFAULT_NAMESPACE, DEFAULT_XML_VERSION, IS_BINARY, IS_DATA_HANDLERS_AWARE, PULL_TYPE_BUILDER, PUSH_TYPE_BUILDER, XMLATTRTYPE_CDATA, XMLATTRTYPE_ENTITIES, XMLATTRTYPE_ENTITY, XMLATTRTYPE_ID, XMLATTRTYPE_IDREF, XMLATTRTYPE_IDREFS, XMLATTRTYPE_NMTOKEN, XMLATTRTYPE_NMTOKENS, XMLATTRTYPE_NOTATION, XMLNS_NS_PREFIX, XMLNS_NS_URI, XMLNS_PREFIX, XMLNS_URI| Constructor and Description |
|---|
OMTextImpl(java.lang.Object dataHandler,
OMFactory factory) |
OMTextImpl(OMContainer parent,
char[] charArray,
int nodeType,
OMFactory factory) |
OMTextImpl(OMContainer parent,
java.lang.Object dataHandler,
boolean optimize,
OMFactory factory,
boolean fromBuilder) |
OMTextImpl(OMContainer parent,
OMTextImpl source,
OMFactory factory)
Construct OMTextImpl that is a copy of the source OMTextImpl
|
OMTextImpl(OMContainer parent,
javax.xml.namespace.QName text,
int nodeType,
OMFactory factory) |
OMTextImpl(OMContainer parent,
javax.xml.namespace.QName text,
OMFactory factory) |
OMTextImpl(OMContainer parent,
java.lang.String text,
int nodeType,
OMFactory factory,
boolean fromBuilder) |
OMTextImpl(OMContainer parent,
java.lang.String text,
OMFactory factory)
Constructor OMTextImpl.
|
OMTextImpl(OMContainer parent,
java.lang.String s,
java.lang.String mimeType,
boolean optimize,
OMFactory factory) |
OMTextImpl(java.lang.String contentID,
DataHandlerProvider dataHandlerProvider,
boolean optimize,
OMFactory factory)
Constructor.
|
OMTextImpl(java.lang.String s,
int nodeType,
OMFactory factory) |
OMTextImpl(java.lang.String s,
OMFactory factory)
Constructor OMTextImpl.
|
OMTextImpl(java.lang.String s,
java.lang.String mimeType,
boolean optimize,
OMFactory factory) |
| Modifier and Type | Method and Description |
|---|---|
void |
buildWithAttachments()
Parses this node and builds the object structure in memory.
|
(package private) OMNode |
clone(OMCloneOptions options,
OMContainer targetParent) |
java.lang.String |
getContentID()
Gets the content id.
|
java.lang.Object |
getDataHandler()
Gets the datahandler.
|
OMNamespace |
getNamespace()
Returns the Namespace if this contains a QName Return null otherwise
|
java.lang.String |
getText()
Returns the value.
|
javax.xml.namespace.QName |
getTextAsQName()
Returns the value.
|
char[] |
getTextCharacters() |
private java.lang.String |
getTextFromProperPlace()
This OMText contains two data source:value and charArray.
|
int |
getType()
Returns the type of node.
|
void |
internalSerialize(javax.xml.stream.XMLStreamWriter writer,
boolean cache)
Serializes the node.
|
boolean |
isBinary() |
boolean |
isCharacters() |
boolean |
isOptimized() |
void |
setBinary(boolean value)
Receiving binary can happen as either MTOM attachments or as Base64 Text In the case of
Base64 user has to explicitly specify that the content is binary, before calling
getDataHandler(), getInputStream()....
|
void |
setContentID(java.lang.String cid)
Set a specific content id
|
void |
setOptimize(boolean value)
Sets the optimize flag.
|
private void |
writeOutput(javax.xml.stream.XMLStreamWriter writer)
Writes the relevant output.
|
build, discard, getBuilder, isComplete, setCompleteclone, detach, getIParentNode, getNextOMSibling, getNextOMSiblingIfAvailable, getParent, getPreviousOMSibling, insertSiblingAfter, insertSiblingBefore, internalSerialize, internalSerializeAndConsume, setNextOMSibling, setParent, setPreviousOMSiblingclose, getOMFactory, serialize, serialize, serialize, serialize, serialize, serialize, serializeAndConsume, serializeAndConsume, serializeAndConsume, serializeAndConsume, serializeAndConsumeclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdetach, discard, getNextOMSibling, getParent, getPreviousOMSibling, insertSiblingAfter, insertSiblingBefore, serialize, serialize, serialize, serialize, serializeAndConsume, serializeAndConsume, serializeAndConsume, serializeAndConsumebuild, close, isComplete, serialize, serialize, serializeAndConsumeclone, getOMFactorypublic static final OMNamespace XOP_NS
private int nodeType
protected java.lang.String value
protected char[] charArray
private boolean calcNS
protected OMNamespace textNS
protected java.lang.String mimeType
protected boolean optimize
protected boolean isBinary
private java.lang.String contentID
private java.lang.Object dataHandlerObject
private static final java.lang.String EMTPY_STRING
public OMTextImpl(java.lang.String s,
OMFactory factory)
s - public OMTextImpl(java.lang.String s,
int nodeType,
OMFactory factory)
s - nodeType - - OMText can handle CHARACTERS, SPACES, CDATA and ENTITY REFERENCES.
Constants for this can be found in OMNode.public OMTextImpl(OMContainer parent, java.lang.String text, OMFactory factory)
parent - text - public OMTextImpl(OMContainer parent, OMTextImpl source, OMFactory factory)
parent - source - OMTextImplfactory - public OMTextImpl(OMContainer parent, java.lang.String text, int nodeType, OMFactory factory, boolean fromBuilder)
public OMTextImpl(OMContainer parent, char[] charArray, int nodeType, OMFactory factory)
public OMTextImpl(OMContainer parent, javax.xml.namespace.QName text, OMFactory factory)
public OMTextImpl(OMContainer parent, javax.xml.namespace.QName text, int nodeType, OMFactory factory)
public OMTextImpl(java.lang.String s,
java.lang.String mimeType,
boolean optimize,
OMFactory factory)
s - - base64 encoded String representation of BinarymimeType - of the Binarypublic OMTextImpl(OMContainer parent, java.lang.String s, java.lang.String mimeType, boolean optimize, OMFactory factory)
parent - s - - base64 encoded String representation of BinarymimeType - of the Binarypublic OMTextImpl(java.lang.Object dataHandler,
OMFactory factory)
dataHandler - To send binary optimised content Created programatically.public OMTextImpl(OMContainer parent, java.lang.Object dataHandler, boolean optimize, OMFactory factory, boolean fromBuilder)
dataHandler - optimize - To send binary content. Created progrmatically.public OMTextImpl(java.lang.String contentID,
DataHandlerProvider dataHandlerProvider,
boolean optimize,
OMFactory factory)
dataHandlerProvider - optimize - factory - public final int getType()
OMNodegetType in interface OMNodeOMNode.ELEMENT_NODE, OMNode.TEXT_NODE, OMNode.CDATA_SECTION_NODE,
OMNode.COMMENT_NODE, OMNode.DTD_NODE, OMNode.PI_NODE, OMNode.ENTITY_REFERENCE_NODE or OMNode.SPACE_NODE.private void writeOutput(javax.xml.stream.XMLStreamWriter writer)
throws javax.xml.stream.XMLStreamException
writer - javax.xml.stream.XMLStreamExceptionpublic java.lang.String getText()
throws OMException
getText in interface OMTextOMExceptionpublic char[] getTextCharacters()
getTextCharacters in interface OMTextpublic boolean isCharacters()
isCharacters in interface OMTextprivate java.lang.String getTextFromProperPlace()
public javax.xml.namespace.QName getTextAsQName()
throws OMException
getTextAsQName in interface OMTextOMExceptionpublic OMNamespace getNamespace()
OMTextgetNamespace in interface OMTextpublic boolean isOptimized()
isOptimized in interface OMTextpublic void setOptimize(boolean value)
OMTextsetOptimize in interface OMTextvalue - true to optimize binary content (usually w/MTOM)public void setBinary(boolean value)
public boolean isBinary()
public java.lang.Object getDataHandler()
getDataHandler in interface OMTextpublic java.lang.String getContentID()
OMTextgetContentID in interface OMTextpublic void internalSerialize(javax.xml.stream.XMLStreamWriter writer,
boolean cache)
throws javax.xml.stream.XMLStreamException
OMSerializableImplinternalSerialize in interface OMNodeExinternalSerialize in class OMSerializableImplcache - indicates if caching should be enabledjavax.xml.stream.XMLStreamExceptionpublic void buildWithAttachments()
OMNodeImplbuildWithAttachments in interface OMNodebuildWithAttachments in class OMNodeImplpublic void setContentID(java.lang.String cid)
OMTextsetContentID in interface OMTextOMNode clone(OMCloneOptions options, OMContainer targetParent)
clone in class OMNodeImpl