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

## org.exist.xquery.value
Class AbstractDateTimeValue

    java.lang.Object
      org.exist.xquery.value.AtomicValue
          org.exist.xquery.value.ComputableValue
              org.exist.xquery.value.AbstractDateTimeValue

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

Direct Known Subclasses:
  DateTimeValue, DateValue, GDayValue, GMonthDayValue, GMonthValue, GYearMonthValue, GYearValue, TimeValue

public abstract class AbstractDateTimeValue
extends ComputableValue

Author:
  wolf, Piotr Kaminski

Field Summary
`javax.xml.datatype.XMLGregorianCalendar` | `calendar`
`static int` | `DAY`
`static int` | `HOUR`
`static int` | `MILLISECOND`
`static int` | `MINUTE`
`static int` | `MONTH`
`static int` | `SECOND`
`static int` | `YEAR`

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

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

Method Summary
`AbstractDateTimeValue` | `adjustedToTimezone(DayTimeDurationValue offset)`
`int` | `compareTo(java.text.Collator collator, AtomicValue other)`
`boolean` | `compareTo(java.text.Collator collator, int operator, AtomicValue other)`
`int` | `compareTo(java.lang.Object o)`
`int` | `conversionPreference(java.lang.Class javaClass)` Returns a preference indicator, indicating the preference of a value to be converted into the given Java class.
`abstract AtomicValue` | `convertTo(int requiredType)` Convert this item into an atomic value, whose type corresponds to the specified target type.
`ComputableValue` | `div(ComputableValue other)`
`boolean` | `effectiveBooleanValue()` Get the effective boolean value of this sequence.
`int` | `getPart(int part)`
`java.lang.String` | `getStringValue()` Return the string value of this item (see the definition of string value in XPath).
`Sequence` | `getTimezone()`
`AtomicValue` | `max(java.text.Collator collator, AtomicValue other)`
`AtomicValue` | `min(java.text.Collator collator, AtomicValue other)`
`ComputableValue` | `mult(ComputableValue other)`
`ComputableValue` | `plus(ComputableValue other)`
`java.lang.Object` | `toJavaObject(java.lang.Class target)` Convert the value into an instance of the specified Java class.
`AbstractDateTimeValue` | `withoutTimezone()`

Methods inherited from class org.exist.xquery.value.ComputableValue
`minus`

Methods inherited from class org.exist.xquery.value.AtomicValue
`add, addAll, atomize, clearContext, contains, copyTo, deserialize, dump, endsWith, getCardinality, getDocumentSet, getItemType, getLength, getType, 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

### calendar

    public final javax.xml.datatype.XMLGregorianCalendar calendar

### YEAR

    public static final int YEAR

See Also:
  Constant Field Values

### MONTH

    public static final int MONTH

See Also:
  Constant Field Values

### DAY

    public static final int DAY

See Also:
  Constant Field Values

### HOUR

    public static final int HOUR

See Also:
  Constant Field Values

### MINUTE

    public static final int MINUTE

See Also:
  Constant Field Values

### SECOND

    public static final int SECOND

See Also:
  Constant Field Values

### MILLISECOND

    public static final int MILLISECOND

See Also:
  Constant Field Values

Method Detail

### 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 `ComputableValue`
  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 abstract 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 `ComputableValue`
  Throws:
    `XPathException`

### getPart

    public int getPart(int part)

### adjustedToTimezone

    public AbstractDateTimeValue adjustedToTimezone(DayTimeDurationValue offset)
                                             throws XPathException

  Throws:
    `XPathException`

### withoutTimezone

    public AbstractDateTimeValue withoutTimezone()
                                          throws XPathException

  Throws:
    `XPathException`

### getTimezone

    public Sequence getTimezone()
                         throws XPathException

  Throws:
    `XPathException`

### compareTo

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

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

### compareTo

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

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

### max

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

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

### min

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

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

### plus

    public ComputableValue plus(ComputableValue other)
                         throws XPathException

  Specified by:
    `plus` in class `ComputableValue`
  Throws:
    `XPathException`

### mult

    public ComputableValue mult(ComputableValue other)
                         throws XPathException

  Specified by:
    `mult` in class `ComputableValue`
  Throws:
    `XPathException`

### div

    public ComputableValue div(ComputableValue other)
                        throws XPathException

  Specified by:
    `div` in class `ComputableValue`
  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`

### compareTo

    public int compareTo(java.lang.Object o)

  Specified by:
    `compareTo` in interface `java.lang.Comparable`
  Overrides:
    `compareTo` in class `AtomicValue`

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

Copyright (C) Wolfgang Meier. All rights reserved.