|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.sf.saxon.value.TextFragmentValue
public final class TextFragmentValue
This class represents a temporary tree whose root document node owns a single text node.
| Field Summary |
|---|
| Fields inherited from interface net.sf.saxon.om.NodeInfo |
|---|
ALL_NAMESPACES, IS_DTD_TYPE, IS_NILLED, LOCAL_NAMESPACES, NO_NAMESPACES |
| Fields inherited from interface net.sf.saxon.om.ValueRepresentation |
|---|
EMPTY_VALUE_ARRAY |
| Constructor Summary | |
|---|---|
TextFragmentValue(CharSequence value,
String baseURI)
Constructor: create a result tree fragment containing a single text node |
|
| Method Summary | |
|---|---|
Value |
atomize()
Get the typed value. |
int |
compareOrder(NodeInfo other)
Determine the relative position of this node and another node, in document order. |
void |
copy(Receiver out,
int copyOptions,
int locationId)
Copy the result tree fragment value to a given Outputter |
void |
generateId(FastStringBuffer buffer)
Get a character string that uniquely identifies this node |
String |
getAttributeValue(int fingerprint)
Get the value of a given attribute of this node |
String |
getAttributeValue(String uri,
String local)
Get the string value of a given attribute of this node |
String |
getBaseURI()
Get the base URI for the document node. |
int |
getColumnNumber()
Return the character position where the current document event ends. |
Configuration |
getConfiguration()
Get the configuration previously set using setConfiguration (or the default configuraton allocated automatically) |
NamespaceBinding[] |
getDeclaredNamespaces(NamespaceBinding[] buffer)
Get all namespace undeclarations and undeclarations defined on this element. |
String |
getDisplayName()
Get the display name of this node. |
long |
getDocumentNumber()
Get the unique document number |
DocumentInfo |
getDocumentRoot()
Get the root (document) node |
int |
getFingerprint()
Get the fingerprint of the node, used for matching names |
int |
getLineNumber()
Get line number |
String |
getLocalPart()
Get the local name of this node. |
int |
getNameCode()
Get the name code of the node, used for displaying names |
NamePool |
getNamePool()
Get the name pool used for the names in this document |
int |
getNodeKind()
Return the type of node. |
NodeInfo |
getParent()
Find the parent node of this node. |
String |
getPrefix()
Get the prefix part of the name of this node. |
String |
getPublicId()
Return the public identifier for the current document event. |
NodeInfo |
getRoot()
Get the root node |
SchemaType |
getSchemaType()
Get the type annotation of this node, if any. |
String |
getStringValue()
Get the String Value |
CharSequence |
getStringValueCS()
Get the value of the item as a CharSequence. |
String |
getSystemId()
Get the system ID (the document URI) of the document node. |
int |
getTypeAnnotation()
Get the type annotation of this node, if any. |
SequenceIterator |
getTypedValue()
Get the typed value of the item |
String[] |
getUnparsedEntity(String name)
Get the unparsed entity with a given name |
Iterator<String> |
getUnparsedEntityNames()
Get the list of unparsed entities defined in this document |
String |
getURI()
Get the URI part of the name of this node. |
Object |
getUserData(String key)
Get user data held in the document node. |
boolean |
hasChildNodes()
Determine whether the node has any children. |
boolean |
isId()
Determine whether this node has the is-id property |
boolean |
isIdref()
Determine whether this node has the is-idref property |
boolean |
isNilled()
Determine whether the node has the is-nilled property |
boolean |
isSameNodeInfo(NodeInfo other)
Determine whether this is the same node as another node |
boolean |
isTyped()
Ask whether the document contains any nodes whose type annotation is anything other than UNTYPED |
AxisIterator |
iterateAxis(byte axisNumber)
Return an iteration over the nodes reached by the given axis from this node |
AxisIterator |
iterateAxis(byte axisNumber,
NodeTest nodeTest)
Return an enumeration over the nodes reached by the given axis from this node |
NodeInfo |
selectID(String id,
boolean getParent)
Get the element with a given ID. |
void |
setConfiguration(Configuration config)
Set the configuration (containing the name pool used for all names in this document) |
void |
setSystemId(String systemId)
Set the system ID (that is, the document URI property) for the document node. |
void |
setUserData(String key,
Object value)
Set user data on the document node. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface net.sf.saxon.om.NodeInfo |
|---|
equals, hashCode |
| Constructor Detail |
|---|
public TextFragmentValue(CharSequence value,
String baseURI)
value - a String containing the valuebaseURI - the base URI of the document node| Method Detail |
|---|
public void setConfiguration(Configuration config)
public Configuration getConfiguration()
getConfiguration in interface NodeInfopublic NamePool getNamePool()
getNamePool in interface NodeInfopublic boolean isTyped()
isTyped in interface DocumentInfopublic long getDocumentNumber()
getDocumentNumber in interface NodeInfopublic final int getNodeKind()
getNodeKind in interface NodeInfoTypepublic String getStringValue()
getStringValue in interface Item<NodeInfo>getStringValue in interface NodeInfogetStringValue in interface ValueRepresentation<NodeInfo>Item.getStringValueCS()public CharSequence getStringValueCS()
getStringValueCS in interface Item<NodeInfo>getStringValueCS in interface ValueRepresentation<NodeInfo>Item.getStringValue()public boolean isSameNodeInfo(NodeInfo other)
isSameNodeInfo in interface NodeInfoother - the node to be compared with this node
public void generateId(FastStringBuffer buffer)
generateId in interface NodeInfobuffer - the buffer to contain the generated IDpublic void setSystemId(String systemId)
setSystemId in interface SourceUnsupportedOperationException - (always). This kind of tree does not have a document URI.public String getSystemId()
getSystemId in interface SourcegetSystemId in interface SourceLocatorgetSystemId in interface NodeInfopublic String getBaseURI()
getBaseURI in interface NodeInfopublic int compareOrder(NodeInfo other)
compareOrder in interface NodeInfoother - The other node, whose position is to be compared with this node
public int getNameCode()
getNameCode in interface NodeInfoallocate,
getFingerprintpublic int getFingerprint()
getFingerprint in interface NodeInfopublic String getPrefix()
getPrefix in interface NodeInfopublic String getURI()
getURI in interface NodeInfopublic String getDisplayName()
getDisplayName in interface NodeInfopublic String getLocalPart()
getLocalPart in interface NodeInfopublic boolean hasChildNodes()
hasChildNodes in interface NodeInfotrue if this node has any attributes,
false otherwise.public int getLineNumber()
getLineNumber in interface SourceLocatorgetLineNumber in interface NodeInfopublic int getTypeAnnotation()
getTypeAnnotation in interface NodeInfoTypepublic SchemaType getSchemaType()
Types derived from a DTD are not reflected in the result of this method.
getSchemaType in interface NodeInfopublic NamespaceBinding[] getDeclaredNamespaces(NamespaceBinding[] buffer)
getDeclaredNamespaces in interface NodeInfobuffer - If this is non-null, and the result array fits in this buffer, then the result
may overwrite the contents of this array, to avoid the cost of allocating a new array on the heap.
For a node other than an element, the method returns null.
public SequenceIterator getTypedValue()
getTypedValue in interface Item<NodeInfo>public Value atomize()
Item.getTypedValue(). However, this method is often more convenient and may be
more efficient, especially in the common case where the value is expected to be a singleton.
atomize in interface NodeInfopublic String getPublicId()
The return value is the public identifier of the document entity or of the external parsed entity in which the markup that triggered the event appears.
getPublicId in interface SourceLocatorgetSystemId()public int getColumnNumber()
Warning: The return value from the method is intended only as an approximation for the sake of error reporting; it is not intended to provide sufficient information to edit the character content of the original XML document.
The return value is an approximation of the column number in the document entity or external parsed entity where the markup that triggered the event appears.
getColumnNumber in interface SourceLocatorgetColumnNumber in interface NodeInfogetLineNumber()public String getAttributeValue(int fingerprint)
getAttributeValue in interface NodeInfofingerprint - The fingerprint of the attribute name
public String getAttributeValue(String uri,
String local)
getAttributeValue in interface NodeInfouri - the namespace URI of the attribute name. Supply the empty string for an attribute
that is in no namespacelocal - the local part of the attribute name.
public AxisIterator iterateAxis(byte axisNumber)
iterateAxis in interface NodeInfoaxisNumber - The axis to be iterated over
Axis
public AxisIterator iterateAxis(byte axisNumber,
NodeTest nodeTest)
iterateAxis in interface NodeInfoaxisNumber - The axis to be iterated overnodeTest - A pattern to be matched by the returned nodes
Axispublic NodeInfo getParent()
getParent in interface NodeInfopublic NodeInfo getRoot()
getRoot in interface NodeInfopublic DocumentInfo getDocumentRoot()
getDocumentRoot in interface NodeInfo
public void copy(Receiver out,
int copyOptions,
int locationId)
throws XPathException
copy in interface NodeInfoout - the Receiver to which the node should be copied. It is the caller's
responsibility to ensure that this Receiver is open before the method is called
(or that it is self-opening), and that it is closed after use.copyOptions - a selection of the options defined in CopyOptionslocationId - If non-zero, identifies the location of the instruction
that requested this copy. If zero, indicates that the location information
XPathException - if any downstream error occurs
public NodeInfo selectID(String id,
boolean getParent)
selectID in interface DocumentInfoid - The unique ID of the required elementgetParent -
public Iterator<String> getUnparsedEntityNames()
getUnparsedEntityNames in interface DocumentInfopublic String[] getUnparsedEntity(String name)
getUnparsedEntity in interface DocumentInfoname - the name of the entity
public boolean isId()
isId in interface NodeInfopublic boolean isIdref()
isIdref in interface NodeInfopublic boolean isNilled()
isNilled in interface NodeInfo
public void setUserData(String key,
Object value)
getUserData(java.lang.String)
setUserData in interface DocumentInfokey - A string giving the name of the property to be set. Clients are responsible
for choosing a key that is likely to be unique. Must not be null. Keys used internally
by Saxon are prefixed "saxon:".value - The value to be set for the property. May be null, which effectively
removes the existing value for the property.public Object getUserData(String key)
setUserData(java.lang.String, java.lang.Object)
getUserData in interface DocumentInfokey - A string giving the name of the property to be retrieved.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||