public abstract class TextNodeImpl extends CharacterImpl implements Text, OMText
Modifier and Type | Field and Description |
---|---|
protected char[] |
charArray |
protected OMNamespace |
textNS |
textValue
nextSibling, parentNode, previousSibling
builder, done, factory, FIRSTCHILD, flags, NORMALIZED, OWNED, ownerNode, READONLY, SPECIFIED
ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_POSITION_CONTAINED_BY, DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_PRECEDING, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE
CDATA_SECTION_NODE, COMMENT_NODE, DTD_NODE, ELEMENT_NODE, ENTITY_REFERENCE_NODE, PI_NODE, SPACE_NODE, TEXT_NODE
Constructor and Description |
---|
TextNodeImpl(DocumentImpl ownerNode,
char[] value,
OMFactory factory) |
TextNodeImpl(DocumentImpl ownerNode,
Object dataHandler,
boolean optimize,
OMFactory factory) |
TextNodeImpl(DocumentImpl ownerNode,
OMFactory factory) |
TextNodeImpl(DocumentImpl ownerNode,
String contentID,
DataHandlerProvider dataHandlerProvider,
boolean optimize,
OMFactory factory)
Constructor.
|
TextNodeImpl(DocumentImpl ownerNode,
String value,
OMFactory factory) |
TextNodeImpl(DocumentImpl ownerNode,
String value,
String mimeType,
boolean optimize,
OMFactory factory) |
TextNodeImpl(OMContainer parent,
QName text,
int nodeType,
OMFactory factory) |
TextNodeImpl(OMContainer parent,
QName text,
OMFactory factory) |
TextNodeImpl(OMContainer parent,
TextNodeImpl source,
OMFactory factory)
Construct TextImpl that is a copy of the source OMTextImpl
|
TextNodeImpl(String contentID,
OMContainer parent,
OMXMLParserWrapper builder,
OMFactory factory) |
TextNodeImpl(String text,
OMFactory factory)
Creates a text node with the given text required by the OMDOMFactory.
|
TextNodeImpl(String text,
String mimeType,
boolean optimize,
boolean isBinary,
OMFactory factory) |
TextNodeImpl(String text,
String mimeType,
boolean optimize,
OMFactory factory) |
Modifier and Type | Method and Description |
---|---|
void |
buildWithAttachments()
Parses this node and builds the object structure in memory.
|
void |
discard()
Discards a node.
|
String |
getContentID()
Gets the content id.
|
String |
getData()
Returns the value of the data.
|
Object |
getDataHandler()
Gets the datahandler.
|
InputStream |
getInputStream() |
OMNamespace |
getNamespace()
Returns the Namespace if this contains a QName Return null otherwise
|
String |
getNodeName() |
short |
getNodeType() |
String |
getNodeValue() |
String |
getText()
Returns the text value of this node.
|
QName |
getTextAsQName() |
char[] |
getTextCharacters() |
String |
getWholeText() |
void |
internalSerialize(javax.xml.stream.XMLStreamWriter writer,
boolean cache)
Serializes the node.
|
boolean |
isBinary() |
boolean |
isCharacters() |
boolean |
isElementContentWhitespace() |
boolean |
isOptimized() |
Text |
replaceWholeText(String arg0) |
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(String cid)
Set a specific content id
|
void |
setOptimize(boolean value)
Sets the optimize flag.
|
Text |
splitText(int offset)
Breaks this node into two nodes at the specified offset, keeping both in the tree as
siblings.
|
String |
toString() |
appendData, deleteData, getLength, insertData, replaceData, setData, substringData
cloneNode, detach, getNextOMSibling, getNextOMSiblingIfAvailable, getNextSibling, getParent, getParentNode, getPreviousOMSibling, getPreviousSibling, insertSiblingAfter, insertSiblingBefore, setNextOMSibling, setParent, setPreviousOMSibling
appendChild, build, close, compareDocumentPosition, getAttributes, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getOMFactory, getOwnerDocument, getPrefix, getTextContent, getUserData, hasAttributes, hasChildNodes, insertBefore, internalSerialize, internalSerializeAndConsume, isComplete, isDefaultNamespace, isEqualNode, isSameNode, isSupported, item, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, serialize, serialize, serialize, serialize, serialize, serialize, serializeAndConsume, serializeAndConsume, serializeAndConsume, serializeAndConsume, serializeAndConsume, setComplete, setNodeValue, setOwnerDocument, setPrefix, setTextContent, setUserData
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
appendData, deleteData, getLength, insertData, replaceData, setData, substringData
appendChild, cloneNode, compareDocumentPosition, getAttributes, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getTextContent, getUserData, hasAttributes, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setNodeValue, setPrefix, setTextContent, setUserData
detach, getNextOMSibling, getParent, getPreviousOMSibling, getType, insertSiblingAfter, insertSiblingBefore, serialize, serialize, serialize, serialize, serializeAndConsume, serializeAndConsume, serializeAndConsume, serializeAndConsume
build, close, getOMFactory, isComplete, serialize, serialize, serializeAndConsume
protected OMNamespace textNS
protected char[] charArray
public TextNodeImpl(String text, OMFactory factory)
text
- public TextNodeImpl(String contentID, OMContainer parent, OMXMLParserWrapper builder, OMFactory factory)
contentID
- parent
- builder
- Used when the builder is encountered with a XOP:Include tag Stores a
reference to the builder and the content-id. Supports deffered parsing of
MIME messagespublic TextNodeImpl(OMContainer parent, TextNodeImpl source, OMFactory factory)
parent
- source
- TextImplfactory
- public TextNodeImpl(String text, String mimeType, boolean optimize, boolean isBinary, OMFactory factory)
public TextNodeImpl(DocumentImpl ownerNode, Object dataHandler, boolean optimize, OMFactory factory)
dataHandler
- optimize
- To send binary content. Created progrmatically.public TextNodeImpl(DocumentImpl ownerNode, String contentID, DataHandlerProvider dataHandlerProvider, boolean optimize, OMFactory factory)
contentID
- dataHandlerProvider
- optimize
- factory
- public TextNodeImpl(DocumentImpl ownerNode, OMFactory factory)
ownerNode
- public TextNodeImpl(DocumentImpl ownerNode, String value, OMFactory factory)
ownerNode
- value
- public TextNodeImpl(DocumentImpl ownerNode, char[] value, OMFactory factory)
public TextNodeImpl(DocumentImpl ownerNode, String value, String mimeType, boolean optimize, OMFactory factory)
ownerNode
- value
- public TextNodeImpl(OMContainer parent, QName text, OMFactory factory)
public TextNodeImpl(OMContainer parent, QName text, int nodeType, OMFactory factory)
public Text splitText(int offset) throws DOMException
splitText
in interface Text
DOMException
public String getNodeName()
getNodeName
in interface Node
public short getNodeType()
getNodeType
in interface Node
public boolean isOptimized()
isOptimized
in interface OMText
public void setOptimize(boolean value)
OMText
setOptimize
in interface OMText
value
- true to optimize binary content (usually w/MTOM)public void discard() throws OMException
OMNode
discard
in interface OMNode
discard
in class ChildNode
OMException
public String getText()
OMText
public String getData() throws DOMException
CharacterImpl
getData
in interface CharacterData
getData
in class CharacterImpl
DOMException
public char[] getTextCharacters()
getTextCharacters
in interface OMText
public boolean isCharacters()
isCharacters
in interface OMText
public QName getTextAsQName()
getTextAsQName
in interface OMText
public String getNodeValue() throws DOMException
getNodeValue
in interface Node
getNodeValue
in class NodeImpl
DOMException
public String getContentID()
OMText
getContentID
in interface OMText
public Object getDataHandler()
OMText
getDataHandler
in interface OMText
public InputStream getInputStream() throws OMException
OMException
public void internalSerialize(javax.xml.stream.XMLStreamWriter writer, boolean cache) throws javax.xml.stream.XMLStreamException
OMNodeEx
OMSerializable.serialize(XMLStreamWriter, boolean)
instead.internalSerialize
in interface OMNodeEx
cache
- indicates if caching should be enabledjavax.xml.stream.XMLStreamException
public String getWholeText()
getWholeText
in interface Text
public boolean isElementContentWhitespace()
isElementContentWhitespace
in interface Text
public Text replaceWholeText(String arg0) throws DOMException
replaceWholeText
in interface Text
DOMException
public void buildWithAttachments()
NodeImpl
buildWithAttachments
in interface OMNode
buildWithAttachments
in class NodeImpl
public boolean isBinary()
public void setBinary(boolean value)
public OMNamespace getNamespace()
OMText
getNamespace
in interface OMText
public void setContentID(String cid)
OMText
setContentID
in interface OMText
Copyright © 2004-2013 The Apache Software Foundation. All Rights Reserved.