|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.xml_project.morganaxdm.XdmSequence
public class XdmSequence
A sequence of items from XDM.
Constructor Summary | |
---|---|
protected |
XdmSequence()
|
Method Summary | |
---|---|
AtomizingIterator |
atomize()
Returns an AtomizingIterator which gives access to the atomized value of the elements in this sequence. |
XdmSequence |
concat(XdmSequence second)
Creates a new sequence by concatenating this sequence with another. |
XdmItem |
first()
Returns the first item of this XdmSequence or throws a RuntimeException if sequence is empty. |
XdmItem |
get(long nr)
Returns the n-th element of the sequence, counting by 1. |
java.lang.String |
getStringValue()
Return the string value of this sequence. |
boolean |
hasCommonType()
Checks whether all elements have a common type such as xs:integer or node(). |
boolean |
hasValues()
Checks whether the sequences contains XdmValues as opposed to nodes. |
boolean |
isEmpty()
Checks whether the sequence is empty. |
XdmItemIterator |
iterator()
Returns an iterator over this XdmSequence. |
XdmSequence |
normalize(java.lang.String itemSeparator)
Returns a normalized sequence as defined in https://www.w3.org/TR/xslt-xquery-serialization-30/#serdm |
java.lang.String |
serialize()
|
java.lang.String |
serialize(Map options)
|
java.lang.String |
serialize(com.xml_project.morganaxpath.nodes.serializer.SerializerOptions options)
|
long |
size()
Returns the number of elements in this sequence. |
XdmSequence |
subSequence(long first,
java.lang.Double length)
Creates a new sequence which contains the element (first..length) of this sequence. |
static XdmSequence |
wrap(Sequence items)
Wraps the given Sequence into a new (simplified version) XdmSequence. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected XdmSequence()
Method Detail |
---|
public static final XdmSequence wrap(Sequence items)
items
- the sequence to wrap.
public XdmItemIterator iterator()
iterator
in interface java.lang.Iterable<XdmItem>
public XdmItem first() throws java.lang.RuntimeException
java.lang.RuntimeException
- if the sequence is empty.public XdmItem get(long nr) throws XPathException, java.lang.RuntimeException
nr
- the number of the element, based by 1!
java.lang.RuntimeException
- thrown, if nr < 1 or nr > size().
XPathException
- thrown, if the underlying sequence is not convertible.public long size() throws XPathException
XPathException
- thrown, if the underlying sequence is not convertible.public boolean hasCommonType()
public boolean isEmpty()
public XdmSequence concat(XdmSequence second) throws XPathException
second
- the sequence to concatenate.
XPathException
- if the two XdmSequences cannot be concatenated, (i.e. not enough memory).public boolean hasValues()
public AtomizingIterator atomize() throws XPathException
XPathException
- thrown, if the sequence contains elements which cannot be atomized.public java.lang.String getStringValue()
public XdmSequence subSequence(long first, java.lang.Double length) throws XPathException
first
- the first element (counting by 1) to include.length
- the number of elements to include.
XPathException
- thrown the sequence cannot be created.public java.lang.String serialize(Map options) throws XPathException
XPathException
public java.lang.String serialize() throws XPathException
XPathException
public java.lang.String serialize(com.xml_project.morganaxpath.nodes.serializer.SerializerOptions options) throws XPathException
XPathException
public XdmSequence normalize(java.lang.String itemSeparator) throws XPathException
itemSeparator
-
XPathException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |