Overview | Package | Class | Tree | Deprecated | Index | Help
| Qizx/Open v0.3
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## net.xfra.qizxopen.xquery
Class ItemType

    java.lang.Object
      |
      +--net.xfra.qizxopen.xquery.Type
            |
            +--net.xfra.qizxopen.xquery.ItemType

public class ItemType
extends Type

class ItemType: encompasses AtomicType (anyAtomicType) and NodeType.

Field Summary
`net.xfra.qizxopen.xquery.impl.SequenceType` | `opt` The empty or length 1 SequenceType associated with this atomic type.
`net.xfra.qizxopen.xquery.impl.SequenceType` | `plus` The '+' type sequence associated with this atomic type.
`net.xfra.qizxopen.xquery.impl.SequenceType` | `star` The '*' type sequence associated with this atomic type.

Fields inherited from class net.xfra.qizxopen.xquery.Type
`ANY, ANY_ATOMIC_TYPE, anyType, ANYURI, ATOM, ATTRIBUTE, BASE64_BINARY, BINARY, BOOLEAN, BYTE, COMMENT, DATE, DATE_TIME, DAY_TIME_DURATION, DECIMAL, DOCUMENT, DOUBLE, DURATION, ELEMENT, ENTITY, ERR_EMPTY_UNEXPECTED, ERR_TOO_MANY, ERR_TYPE_MISMATCH, FLOAT, G_DAY, G_MONTH, G_MONTH_DAY, G_YEAR, G_YEAR_MONTH, HEX_BINARY, ID, IDREF, INT, INTEGER, ITEM, LANGUAGE, LONG, MOMENT, MULTI_OCC, NAME, NAMESPACE, NCNAME, NEGATIVE_INTEGER, NMTOKEN, NODE, NON_NEGATIVE_INTEGER, NON_POSITIVE_INTEGER, NONE, NORMALIZED_STRING, NOTATION, NUMERIC, OBJECT, ONE_OCC, OPT_OCC, OPTMULTI_OCC, PI, POSITIVE_INTEGER, QNAME, SHORT, STRING, TEXT, TIME, TOKEN, UNSIGNED_BYTE, UNSIGNED_INT, UNSIGNED_LONG, UNSIGNED_SHORT, UNTYPED_ATOMIC, untypedAtomic, WRAPPED_OBJECT, YEAR_MONTH_DURATION`

Constructor Summary
`ItemType()`

Method Summary
`boolean` | `accepts(Type valueType)` Static type checking.
`boolean` | `acceptsItem(Item item)` Dynamic matching of a single item.
`Value` | `cast(Value value, EvalContext context)` Attempts to cast the current item of the value to this type.
`ItemType` | `getItemType()` If this is a sequence type, return the item type, otherwise return the type itself.
`java.lang.String` | `getShortName()`
`ItemType` | `getSuperType()`
`boolean` | `isDerivedFrom(ItemType root)` Derived in the sense of XSD hierarchy.
`boolean` | `isSuperType(ItemType subtype)` SuperType with slight differences wrt XSD: introduces NumericType, MomentType

Methods inherited from class net.xfra.qizxopen.xquery.Type
`check, dump, findItemType, getName, getOccurrence, isOptional, isRepeatable, test, toString, toString, unionWith`

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

Field Detail

### star

    public net.xfra.qizxopen.xquery.impl.SequenceType star

  The '*' type sequence associated with this atomic type.

### plus

    public net.xfra.qizxopen.xquery.impl.SequenceType plus

  The '+' type sequence associated with this atomic type.

### opt

    public net.xfra.qizxopen.xquery.impl.SequenceType opt

  The empty or length 1 SequenceType associated with this atomic type.

Constructor Detail

### ItemType

    public ItemType()

Method Detail

### accepts

    public boolean accepts(Type valueType)

  Description copied from class: `Type`
  Static type checking. Tells whether a static expression type can be accepted by this formal type.

  Overrides:
    `accepts` in class `Type`

### acceptsItem

    public boolean acceptsItem(Item item)

  Description copied from class: `Type`
  Dynamic matching of a single item. For optimization of typeswitch.

  Overrides:
    `acceptsItem` in class `Type`

### getItemType

    public ItemType getItemType()

  Description copied from class: `Type`
  If this is a sequence type, return the item type, otherwise return the type itself.

  Overrides:
    `getItemType` in class `Type`

### getShortName

    public java.lang.String getShortName()

  Overrides:
    `getShortName` in class `Type`

### getSuperType

    public ItemType getSuperType()

### isSuperType

    public boolean isSuperType(ItemType subtype)

  SuperType with slight differences wrt XSD: introduces NumericType, MomentType

### isDerivedFrom

    public boolean isDerivedFrom(ItemType root)

  Derived in the sense of XSD hierarchy.

### cast

    public Value cast(Value value,
                      EvalContext context)
               throws TypeException

  Attempts to cast the current item of the value to this type.

  Returns:
    if successful, the converted value as a single item sequence.
  Throws:
    `xquery.TypeException` - if the item's type or value is incompatible.
    `TypeException`

Overview | Package | Class | Tree | Deprecated | Index | Help
| Copyright Xavier FRANC 2003-2004
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD