|
|||||||||
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
net.sf.saxon.value.QNameValue
public final class QNameValue
A QName value
Constructor Summary | |
---|---|
QNameValue(String uri,
String localName)
Constructor |
Method Summary | |
---|---|
int |
conversionPreference(Class required)
Get conversion preference for this value to a Java class. |
AtomicValue |
convert(int requiredType)
Convert to target data type |
Object |
convertToJava(Class target)
Convert to Java object (for passing to external functions) |
void |
display(int level,
NamePool pool)
Diagnostic print of expression structure |
boolean |
equals(Object other)
Determine if two anyURI values are equal |
AtomicValue |
getComponent(int part)
Get a component. |
ItemType |
getItemType()
Return the type of the expression |
String |
getLocalName()
Get the local part |
String |
getNamespaceURI()
Get the namespace part (null means no namespace) |
String |
getStringValue()
Get the string value as a String. |
int |
hashCode()
|
static String |
makeTriple(String prefix,
String uri,
String localName)
Internally we sometimes hold QNames in the form "{uri}[prefix]:local-name". |
static String[] |
parseTriple(CharSequence triple)
This method extracts the three components of a QNameTriple. |
String |
toString()
|
Methods inherited from class net.sf.saxon.value.AtomicValue |
---|
convert, convert, effectiveBooleanValue, evaluateAsString, evaluateItem, getCardinality, getPrimitiveValue, getTypedValue, iterate |
Methods inherited from class net.sf.saxon.value.Value |
---|
analyze, asItem, asValue, collapseWhitespace, getDependencies, getSpecialProperties, getSubExpressions, inverse, normalizeWhitespace, promote, simplify, stringToInteger, stringToNumber, trimWhitespace |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public QNameValue(String uri, String localName) throws XPathException
uri
- The namespace part of the QNamelocalName
- The local part of the QName.
XPathException
Method Detail |
---|
public String getStringValue() throws XPathException
XPathException
- if the string value cannot be obtained. Some
items have no string value, e.g. a QNamepublic String getLocalName()
public String getNamespaceURI()
public AtomicValue getComponent(int part)
getComponent
in class AtomicValue
part
- either Component.LOCALNAME or Componenet.NAMESPACE indicating which
component of the value is required
public AtomicValue convert(int requiredType) throws XPathException
convert
in class AtomicValue
requiredType
- an integer identifying the required atomic type
XPathException
- if the conversion is not possiblepublic ItemType getItemType()
public boolean equals(Object other)
equals
in class Object
ClassCastException
- if they are not comparablepublic int hashCode()
hashCode
in class Object
public int conversionPreference(Class required)
conversionPreference
in class AtomicValue
public Object convertToJava(Class target) throws XPathException
convertToJava
in class AtomicValue
target
- The class required by the external function
XPathException
public void display(int level, NamePool pool)
level
- indentation level for this expressionpublic String toString()
toString
in class Object
public static String makeTriple(String prefix, String uri, String localName)
public static String[] parseTriple(CharSequence triple)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |