|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.saxon.value.Value
net.sf.saxon.value.AtomicValue
com.saxonica.schema.DerivedAtomicValue
A DerivedAtomicValue is an atomic value of a user-defined type
Field Summary |
Fields inherited from class net.sf.saxon.value.Value |
EMPTY_CLASS_ARRAY |
Fields inherited from interface net.sf.saxon.om.ValueRepresentation |
EMPTY_VALUE_ARRAY |
Fields inherited from interface net.sf.saxon.expr.Expression |
EVALUATE_METHOD, ITERATE_METHOD, PROCESS_METHOD |
Method Summary | |
AtomicValue |
convertPrimitive(BuiltInAtomicType requiredType,
boolean validate,
XPathContext context)
Convert a value to another primitive data type, with control over how validation is handled. |
java.lang.Object |
convertToJava(java.lang.Class target,
XPathContext context)
Convert to Java object (for passing to external functions) |
boolean |
effectiveBooleanValue(XPathContext context)
Get the effective boolean value of the value |
boolean |
equals(java.lang.Object obj)
Determine if this value is equal to another value |
Item |
evaluateItem(XPathContext context)
Evaluate the value (this simply returns the value unchanged) |
ItemType |
getItemType(TypeHierarchy th)
Get the item type of this atomic value |
AtomicValue |
getPrimitiveValue()
Get the primitive value (the value in the value space) |
java.lang.String |
getStringValue()
Evaluate as a string |
java.lang.CharSequence |
getStringValueCS()
Get the value of the item as a CharSequence. |
boolean |
hasBuiltInType()
Test whether the type of this atomic value is a built-in type. |
int |
hashCode()
Generate a hash code to support equality testing |
static AtomicValue |
makeValue(AtomicValue primValue,
java.lang.CharSequence lexicalValue,
UserAtomicType type,
boolean validate)
Create a value of a user-defined atomic type |
boolean |
schemaEquals(Value obj)
Compare two values for equality. |
java.lang.String |
toString()
Generate a string representation suitable for error messages |
Methods inherited from class net.sf.saxon.value.AtomicValue |
checkPermittedContents, convert, convert, display, evaluateAsString, getCardinality, getComponent, getImplementationMethod, getLength, getTypedValue, iterate, process |
Methods inherited from class net.sf.saxon.value.Value |
asItem, asIterator, asValue, collapseWhitespace, convert, convertJavaObjectToXPath, getDependencies, getIterator, getParentExpression, getSpecialProperties, itemAt, iterateSubExpressions, makeQNameValue, normalizeWhitespace, optimize, promote, reduce, simplify, stringToNumber, trimWhitespace, typeCheck |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Method Detail |
public static AtomicValue makeValue(AtomicValue primValue, java.lang.CharSequence lexicalValue, UserAtomicType type, boolean validate)
primValue
- the value in the value space of the primitive typelexicalValue
- the value in the lexical space. If null, the string value of primValue
is used. This value is checked against the pattern facet (if any)type
- the required atomic typevalidate
- true if validation is required. If this is set to false, the caller is responsible
for ensuring that the value has previously been checked to be valid.
public boolean hasBuiltInType()
hasBuiltInType
in class AtomicValue
public AtomicValue getPrimitiveValue()
getPrimitiveValue
in class AtomicValue
public AtomicValue convertPrimitive(BuiltInAtomicType requiredType, boolean validate, XPathContext context)
convertPrimitive
in class AtomicValue
requiredType
- type code of the required atomic typevalidate
- true if validation is required. If set to false, the caller guarantees that
the value is valid for the target data type, and that further validation is therefore not required.
Note that a validation failure may be reported even if validation was not requested.context
-
ValidationErrorValue
. The caller must check for this condition. No exception is thrown, instead
the exception will be encapsulated within the ErrorValue.public Item evaluateItem(XPathContext context) throws XPathException
evaluateItem
in interface Expression
evaluateItem
in class AtomicValue
context
- the evaluation context (not used in this implementation)
XPathException
public java.lang.String getStringValue()
getStringValue
in interface Item
getStringValue
in class AtomicValue
public java.lang.CharSequence getStringValueCS()
getStringValueCS
in interface Item
getStringValueCS
in class AtomicValue
public boolean effectiveBooleanValue(XPathContext context) throws XPathException
effectiveBooleanValue
in interface Expression
effectiveBooleanValue
in class AtomicValue
context
- the evaluation context (not used in this implementation)
XPathException
public java.lang.Object convertToJava(java.lang.Class target, XPathContext context) throws XPathException
Value
convertToJava
in class Value
XPathException
public ItemType getItemType(TypeHierarchy th)
getItemType
in interface Expression
getItemType
in class Value
th
-
public int hashCode()
hashCode
in class Value
public boolean equals(java.lang.Object obj)
equals
in class Value
obj
- the other value to be compared
public boolean schemaEquals(Value obj)
schemaEquals
in class AtomicValue
public java.lang.String toString()
toString
in class AtomicValue
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |