## org.exist.xquery.value
Class AnyURIValue

    java.lang.Object
      org.exist.xquery.value.AtomicValue
          org.exist.xquery.value.AnyURIValue

All Implemented Interfaces:
  java.lang.Comparable, Indexable, Item, Sequence

public class AnyURIValue
extends AtomicValue

Author:
  Wolfgang Meier (wolfgang@exist-db.org)

Field Summary
`static AnyURIValue` `EMPTY_URI`

Fields inherited from class org.exist.xquery.value.AtomicValue
`EMPTY_VALUE`

Fields inherited from interface org.exist.xquery.value.Sequence
`EMPTY_SEQUENCE`

Constructor Summary
`AnyURIValue(java.lang.String s)`
`AnyURIValue(java.net.URI uri)`
`AnyURIValue(XmldbURI uri)`

Method Summary
`int` `compareTo(java.text.Collator collator, AtomicValue other)`
`boolean` `compareTo(java.text.Collator collator, int operator, AtomicValue other)`
`int` `conversionPreference(java.lang.Class javaClass)` Returns a preference indicator, indicating the preference of a value to be converted into the given Java class.
`AtomicValue` `convertTo(int requiredType)` Convert this item into an atomic value, whose type corresponds to the specified target type.
`boolean` `effectiveBooleanValue()` Get the effective boolean value of this sequence.
`static java.lang.String` `escape(java.lang.String uri)` This function accepts a String representation of an xs:anyURI and applies the escaping method described in Section 5.4 of XML Linking (http://www.w3.org/TR/2000/PR-xlink-20001220/#link-locators) to turn it into a valid URI
`java.lang.String` `getStringValue()` Return the string value of this item (see the definition of string value in XPath).
`int` `getType()` Return the type of this item according to the type constants defined in class `Type`.
`AtomicValue` `max(java.text.Collator collator, AtomicValue other)`
`AtomicValue` `min(java.text.Collator collator, AtomicValue other)`
`java.lang.Object` `toJavaObject(java.lang.Class target)` Convert the value into an instance of the specified Java class.
`java.net.URI` `toURI()`
`XmldbURI` `toXmldbURI()`

Methods inherited from class org.exist.xquery.value.AtomicValue
`add, addAll, atomize, clearContext, compareTo, contains, copyTo, deserialize, dump, endsWith, getCardinality, getDocumentSet, getItemType, getLength, hasMany, hasOne, isCached, isEmpty, isPersistentSet, itemAt, iterate, promote, removeDuplicates, serialize, serializeValue, setIsCached, setSelfAsContext, startsWith, toNodeSet, toSAX, toSequence, toString, unorderedIterator`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### EMPTY_URI

    public static final AnyURIValue EMPTY_URI

Constructor Detail

### AnyURIValue

    public AnyURIValue(java.net.URI uri)

### AnyURIValue

    public AnyURIValue(XmldbURI uri)

### AnyURIValue

    public AnyURIValue(java.lang.String s)
                throws XPathException

Method Detail

### escape

    public static java.lang.String escape(java.lang.String uri)

  This function accepts a String representation of an xs:anyURI and applies the escaping method described in Section 5.4 of XML Linking (http://www.w3.org/TR/2000/PR-xlink-20001220/#link-locators) to turn it into a valid URI

  Parameters:
    `uri` - The xs:anyURI to escape into a valid URI
  Returns:
    An escaped string representation of the provided xs:anyURI
  See Also:
    http://www.w3.org/TR/2000/PR-xlink-20001220/#link-locators

### getType

    public int getType()

  Description copied from interface: `Item`
  Return the type of this item according to the type constants defined in class `Type`.

  Specified by:
    `getType` in interface `Item`
  Overrides:
    `getType` in class `AtomicValue`

### getStringValue

    public java.lang.String getStringValue()
                                    throws XPathException

  Description copied from interface: `Item`
  Return the string value of this item (see the definition of string value in XPath).

  Specified by:
    `getStringValue` in interface `Item`
  Specified by:
    `getStringValue` in class `AtomicValue`
  Throws:
    `XPathException`

### effectiveBooleanValue

    public boolean effectiveBooleanValue()
                                  throws XPathException

  Description copied from interface: `Sequence`
  Get the effective boolean value of this sequence. Will be false if the sequence is empty, true otherwise.

  Specified by:
    `effectiveBooleanValue` in interface `Sequence`
  Overrides:
    `effectiveBooleanValue` in class `AtomicValue`
  Throws:
    `XPathException`

### convertTo

    public AtomicValue convertTo(int requiredType)
                          throws XPathException

  Description copied from interface: `Item`
  Convert this item into an atomic value, whose type corresponds to the specified target type. requiredType should be one of the type constants defined in `Type`. An `XPathException` is thrown if the conversion is impossible.

  Specified by:
    `convertTo` in interface `Item`
  Specified by:
    `convertTo` in class `AtomicValue`
  Throws:
    `XPathException`

### compareTo

    public boolean compareTo(java.text.Collator collator,
                             int operator,
                             AtomicValue other)
                      throws XPathException

  Specified by:
    `compareTo` in class `AtomicValue`
  Throws:
    `XPathException`

### compareTo

    public int compareTo(java.text.Collator collator,
                         AtomicValue other)
                  throws XPathException

  Specified by:
    `compareTo` in class `AtomicValue`
  Throws:
    `XPathException`

### max

    public AtomicValue max(java.text.Collator collator,
                           AtomicValue other)
                    throws XPathException

  Specified by:
    `max` in class `AtomicValue`
  Throws:
    `XPathException`

### min

    public AtomicValue min(java.text.Collator collator,
                           AtomicValue other)
                    throws XPathException

  Specified by:
    `min` in class `AtomicValue`
  Throws:
    `XPathException`

### conversionPreference

    public int conversionPreference(java.lang.Class javaClass)

  Description copied from interface: `Sequence`
  Returns a preference indicator, indicating the preference of a value to be converted into the given Java class. Low numbers mean that the value can be easily converted into the given class.

  Specified by:
    `conversionPreference` in interface `Item`
  Overrides:
    `conversionPreference` in class `AtomicValue`

### toJavaObject

    public java.lang.Object toJavaObject(java.lang.Class target)
                                  throws XPathException

  Description copied from interface: `Sequence`
  Convert the value into an instance of the specified Java class.

  Specified by:
    `toJavaObject` in interface `Item`
  Overrides:
    `toJavaObject` in class `AtomicValue`
  Throws:
    `XPathException`

### toXmldbURI

    public XmldbURI toXmldbURI()
                        throws XPathException

  Throws:
    `XPathException`

### toURI

    public java.net.URI toURI()
                       throws XPathException

  Throws:
    `XPathException`

Copyright (C) Wolfgang Meier. All rights reserved.