Overview | Package | Class | Deprecated | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## net.sf.saxon.value
Class QualifiedNameValue

    java.lang.Object
      net.sf.saxon.value.Value
          net.sf.saxon.value.AtomicValue
              net.sf.saxon.value.QualifiedNameValue

All Implemented Interfaces:
  java.io.Serializable, PullEvent, SequenceIterable, GroundedValue, Item, ValueRepresentation, ConversionResult

Direct Known Subclasses:
  NotationValue, QNameValue

    public abstract class QualifiedNameValue

extends AtomicValue

A qualified name: this is an abstract superclass for QNameValue and NotationValue, representing the XPath primitive types xs:QName and xs:NOTATION respectively

See Also:
  Serialized Form

Field Summary
`protected StructuredQName` | `qName`

Fields inherited from class net.sf.saxon.value.AtomicValue
`typeLabel`

Fields inherited from class net.sf.saxon.value.Value
`EMPTY_CLASS_ARRAY, INDETERMINATE_ORDERING`

Fields inherited from interface net.sf.saxon.om.ValueRepresentation
`EMPTY_VALUE_ARRAY`

Fields inherited from interface net.sf.saxon.om.ValueRepresentation
`EMPTY_VALUE_ARRAY`

Constructor Summary
`QualifiedNameValue()`

Method Summary
`int` | `allocateNameCode(NamePool pool)` Allocate a nameCode for this QName in the NamePool
`java.lang.String` | `getClarkName()` Get the name in Clark notation, that is "{uri}local" if in a namespace, or "local" otherwise
`java.lang.String` | `getLocalName()` Get the local part
`java.lang.String` | `getNamespaceURI()` Get the namespace part.
`java.lang.String` | `getPrefix()` Get the prefix.
`java.lang.String` | `getStringValue()` Get the string value as a String.
`java.lang.Object` | `getXPathComparable(boolean ordered, StringCollator collator, XPathContext context)` Get an object value that implements the XPath equality and ordering comparison semantics for this value.
`int` | `hashCode()`
`java.lang.Object` | `makeQName(Configuration config)` Temporary method to construct a javax.xml.namespace.QName without actually mentioning it by name (because the class is not available in JDK 1.4)
`static AtomicValue` | `makeQName(java.lang.String prefix, java.lang.String uri, java.lang.String local, AtomicType targetType, java.lang.CharSequence lexicalForm, Configuration config)` Factory method to construct either a QName or a NOTATION value, or a subtype of either of these.
`java.lang.String` | `toString()` The toString() method returns the name in the form QName("uri", "local")

Methods inherited from class net.sf.saxon.value.AtomicValue
`asAtomic, checkPermittedContents, convert, convert, convertPrimitive, copyAsSubType, effectiveBooleanValue, equals, getCardinality, getComponent, getItemType, getLength, getPrimitiveType, getSchemaComparable, getStringValueCS, getTypedValue, getTypeLabel, isNaN, itemAt, iterate, process, setTypeLabel, subsequence`

Methods inherited from class net.sf.saxon.value.Value
`asItem, asItem, asIterator, asValue, convertToJava, fromItem, getCanonicalLexicalRepresentation, getIterator, iterate, makeQNameValue, reduce, stringToNumber`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

Field Detail

### qName

    protected StructuredQName qName

Constructor Detail

### QualifiedNameValue

    public QualifiedNameValue()

Method Detail

### makeQName

    public static AtomicValue makeQName(java.lang.String prefix,
                                        java.lang.String uri,
                                        java.lang.String local,
                                        AtomicType targetType,
                                        java.lang.CharSequence lexicalForm,
                                        Configuration config)
                                 throws XPathException

  Factory method to construct either a QName or a NOTATION value, or a subtype of either of these. Note that it is the caller's responsibility to resolve the QName prefix into a URI

  Parameters:
    `prefix` - the prefix part of the value. Use "" or null for the empty prefix.
    `uri` - the namespace URI part of the value. Use "" or null for the non-namespace
    `local` - the local part of the value
    `targetType` - the target type, which must be xs:QName or a subtype of xs:NOTATION or xs:QName
    `lexicalForm` - the original lexical form of the value. This is needed in case there are facets such as pattern that check the lexical form
    `config` - the Saxon configuration
  Returns:
    the converted value
  Throws:
    `XPathException` - if the value cannot be converted.

### getStringValue

    public final java.lang.String getStringValue()

  Get the string value as a String. Returns the QName as a lexical QName, retaining the original prefix if available.

  Specified by:
    `getStringValue` in interface `Item`
  Specified by:
    `getStringValue` in interface `ValueRepresentation`
  Specified by:
    `getStringValue` in class `AtomicValue`
  Returns:
    the string value of the item
  See Also:
    `Item.getStringValueCS()`

### getClarkName

    public final java.lang.String getClarkName()

  Get the name in Clark notation, that is "{uri}local" if in a namespace, or "local" otherwise

### getLocalName

    public final java.lang.String getLocalName()

  Get the local part

### getNamespaceURI

    public final java.lang.String getNamespaceURI()

  Get the namespace part. Returns the empty string for a name in no namespace.

### getPrefix

    public final java.lang.String getPrefix()

  Get the prefix. Returns the empty string if the name is unprefixed.

### allocateNameCode

    public int allocateNameCode(NamePool pool)

  Allocate a nameCode for this QName in the NamePool

  Parameters:
    `pool` - the NamePool to be used
  Returns:
    the allocated nameCode

### getXPathComparable

    public java.lang.Object getXPathComparable(boolean ordered,
                                               StringCollator collator,
                                               XPathContext context)

  Get an object value that implements the XPath equality and ordering comparison semantics for this value. If the ordered parameter is set to true, the result will be a Comparable and will support a compareTo() method with the semantics of the XPath lt/gt operator, provided that the other operand is also obtained using the getXPathComparable() method. In all cases the result will support equals() and hashCode() methods that support the semantics of the XPath eq operator, again provided that the other operand is also obtained using the getXPathComparable() method. A context argument is supplied for use in cases where the comparison semantics are context-sensitive, for example where they depend on the implicit timezone or the default collation.

  Specified by:
    `getXPathComparable` in class `AtomicValue`
  Parameters:
    `ordered` - true if an ordered comparison is required. In this case the result is null if the type is unordered; in other cases the returned value will be a Comparable.
    `collator` -
    `context` - the XPath dynamic evaluation context, used in cases where the comparison is context sensitive @return an Object whose equals() and hashCode() methods implement the XPath comparison semantics with respect to this atomic value. If ordered is specified, the result will either be null if no ordering is defined, or will be a Comparable
  Returns:
    an Object whose equals() and hashCode() methods implement the XPath comparison semantics with respect to this atomic value. If ordered is specified, the result will either be null if no ordering is defined, or will be a Comparable

### hashCode

    public int hashCode()

  Overrides:
    `hashCode` in class `java.lang.Object`

### toString

    public java.lang.String toString()

  The toString() method returns the name in the form QName("uri", "local")

  Overrides:
    `toString` in class `AtomicValue`
  Returns:
    the name in in the form QName("uri", "local")

### makeQName

    public java.lang.Object makeQName(Configuration config)

  Temporary method to construct a javax.xml.namespace.QName without actually mentioning it by name (because the class is not available in JDK 1.4)

Overview | Package | Class | Deprecated | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright (c) Saxonica Limited. All rights reserved.