|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.xml_project.morganaxdm.ValueFactory
public class ValueFactory
Static methods to create Xdm values.
Method Summary | |
---|---|
static XdmSequence |
cast(XdmSequence seq,
java.lang.Class<? extends XS_AnyType> targetClass,
SequenceType.OccurrenceIndicator occurence,
StaticXQueryContext context)
Creates a new XdmSequence by casting the element in the original sequence. |
static XS_AnySimpleType |
castSingleValue(XdmValue value,
java.lang.Class<? extends XS_AnyType> targetClass)
Creates a new XdmValue by casting the given value to another type. |
static XdmSequence |
convertSequence(XdmSequence sequence,
SequenceType sequenceType,
com.xml_project.morganaxquery.configuration.NamespaceResolver namespaceResolver,
StaticXQueryContext context)
Converts a sequence to a sequence conforming to sequenceType with atomization (if possible). |
static XdmValue |
makeNumericValue(java.lang.String resp)
Creates a numeric value (xs:double, xs:decimal or xs:integer) from a string representation |
static XS_AnyAtomicType |
makeValue(javax.xml.namespace.QName typeName,
java.lang.String value)
Creates a new instance of an XDM value with the given type and the given value. |
static XS_AnyAtomicType |
newInstance(java.lang.Class<? extends XS_AnyType> targetClass,
XdmValue theValue)
Creates a new instance of an XDM value with the given type and the given value. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static XdmValue makeNumericValue(java.lang.String resp) throws XPathException
resp
- a string representation
XPathException
- throws, if no value can be created.public static XdmSequence convertSequence(XdmSequence sequence, SequenceType sequenceType, com.xml_project.morganaxquery.configuration.NamespaceResolver namespaceResolver, StaticXQueryContext context) throws XPathException
sequence
- sequenceType
- namespaceResolver
- context
-
XPathException
public static XdmSequence cast(XdmSequence seq, java.lang.Class<? extends XS_AnyType> targetClass, SequenceType.OccurrenceIndicator occurence, StaticXQueryContext context) throws XPathException
seq
- the sequence to cast.targetClass
- the target class for the cast.occurence
- the occurrence indicator for the cast.context
- a static XQuery context for this cast.
XPathException
- thrown, if the sequence cannot be casted.public static XS_AnySimpleType castSingleValue(XdmValue value, java.lang.Class<? extends XS_AnyType> targetClass) throws XPathException
value
- the value to cast.targetClass
- the class to cast to.
XPathException
- if the value cannot be casted.public static XS_AnyAtomicType makeValue(javax.xml.namespace.QName typeName, java.lang.String value) throws XPathException
typeName
- the type name (xs:....)value
- a string representation of the value.
XPathException
- thrown, if no class with the given type name is found.public static XS_AnyAtomicType newInstance(java.lang.Class<? extends XS_AnyType> targetClass, XdmValue theValue) throws XPathException
targetClass
- the class for the new value.theValue
- the value for the new value.
XPathException
- thrown, if the value can not be created.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |