net.sf.saxon.value
Class RestrictedStringValue
java.lang.Object
|
+--net.sf.saxon.value.Value
|
+--net.sf.saxon.value.AtomicValue
|
+--net.sf.saxon.value.StringValue
|
+--net.sf.saxon.value.RestrictedStringValue
- All Implemented Interfaces:
- Expression, Item, java.io.Serializable
- public final class RestrictedStringValue
- extends StringValue
A value conforming to one of the built-in subtypes of String, specifically
normalizedString, token, language, Name, NCName, ID, IDREF, ENTITY, NMTOKEN.
This class doesnt' handle the types derived by list: IDREFS, NMTOKENS, ENTITIES.
- See Also:
- Serialized Form
Methods inherited from class net.sf.saxon.value.Value |
analyze, asItem, asValue, collapseWhitespace, getDependencies, getSpecialProperties, getSubExpressions, inverse, normalizeWhitespace, promote, simplify, stringToNumber, trimWhitespace |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
RestrictedStringValue
public RestrictedStringValue(java.lang.CharSequence value,
int type)
throws XPathException
- Constructor
- Parameters:
value
- the String value. Null is taken as equivalent to "".
getItemType
public ItemType getItemType()
- Return the type of the expression
- Specified by:
getItemType
in interface Expression
- Overrides:
getItemType
in class StringValue
- Returns:
- Type.STRING (always)
convert
public AtomicValue convert(int requiredType)
throws XPathException
- Convert to target data type
- Overrides:
convert
in class StringValue
- Parameters:
requiredType
- an integer identifying the required atomic type
- Returns:
- an AtomicValue, a value of the required type
- Throws:
XPathException
- if the conversion is not possible
display
public void display(int level,
NamePool pool)
- Diagnostic print of expression structure
- Specified by:
display
in interface Expression
- Overrides:
display
in class StringValue
- Parameters:
level
- indentation level for this expression
toString
public java.lang.String toString()
- Overrides:
toString
in class StringValue