|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.xml_project.morganaxproc.xdm.ValueFactory
public class ValueFactory
Static methods to create Xdm values.
| Method Summary | |
|---|---|
static XdmSequence |
cast(XdmSequence seq,
Class<? extends XS_AnyType> targetClass,
SequenceType.OccurrenceIndicator occurence,
StaticXQueryContext context)
Creates a new XdmSequence by casting the elements in the original sequence. |
static XS_AnySimpleType |
castSingleValue(XdmValue value,
Class<? extends XS_AnyType> targetClass)
Creates a new XdmValue by casting the given value to another type. |
static XdmValue |
makeNumericValue(String resp)
Creates a numeric value (xs:double, xs:decimal or xs:integer) from a string representation |
static XS_AnyAtomicType |
makeValue(QName typeName,
String value)
Creates a new instance of an XDM value with the given type and the given value. |
static XS_AnyAtomicType |
newInstance(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(String resp)
throws XPathException
resp - a string representation
XPathException - throws, if no value can be created.
public static XdmSequence cast(XdmSequence seq,
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,
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(QName typeName,
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(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 | ||||||||