Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Qizx/open 4.1 API
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.qizx.api
Interface ItemType

All Superinterfaces:
  SequenceType

    public interface ItemType

extends SequenceType

The type of an Item as defined in the XML Query language.

A predefined type can be obtained from an `ItemFactory` - i.e. a Library or an Expression - by the method getType(name).

Note: in the current version, custom types are not supported.

Field Summary
`static int` | `ATOMIC_TYPE` Value returned by getNodeKind() when this type is not a node type (i.e atomic type or xs:anyType or xs:anySimpleType).
`static int` | `NODE_TYPE` Value returned by getNodeKind() when this type is `node()` (any node).

Fields inherited from interface com.qizx.api.SequenceType
`OCC_EXACTLY_ONE, OCC_ONE_OR_MORE, OCC_ZERO_OR_MORE, OCC_ZERO_OR_ONE`

Method Summary
`QName` | `getName()` Returns the fully qualified name of the type.
`int` | `getNodeKind()` Returns a code describing the node kind, when this type is a node type (element(), attribute(name) etc.).
`QName` | `getNodeName()` Returns the name associated with a Node Type.
`SequenceType` | `getSequenceType(int occurrence)` Returns the sequence type corresponding to this item type and the occurrence specified as argument.
`String` | `getShortName()` Short name as a string.
`ItemType` | `getSuperType()` Returns the type from which this type is derived immediately.
`boolean` | `isSubTypeOf(ItemType type)` Tests is this type is derived from another type.

Methods inherited from interface com.qizx.api.SequenceType
`getItemType, getOccurrence`

Field Detail

### NODE_TYPE

    static final int NODE_TYPE

  Value returned by getNodeKind() when this type is `node()` (any node).

  Since:
    3.1
  See Also:
    Constant Field Values

### ATOMIC_TYPE

    static final int ATOMIC_TYPE

  Value returned by getNodeKind() when this type is not a node type (i.e atomic type or xs:anyType or xs:anySimpleType).

  Since:
    3.1
  See Also:
    Constant Field Values

Method Detail

### getName

    QName getName()

  Returns the fully qualified name of the type.

  Returns:
    a qualified name, for example "xs:integer"

### getShortName

    String getShortName()

  Short name as a string. For example "decimal". Such a name can also be used for obtaining a predefined type from an ItemFactory.

  Returns:
    a string which is the the short name of a predefined type, for example "decimal".

### getSuperType

    ItemType getSuperType()

  Returns the type from which this type is derived immediately.

  Returns:
    the parent type

### isSubTypeOf

    boolean isSubTypeOf(ItemType type)

  Tests is this type is derived from another type.

  Parameters:
    `type` - another Item type
  Returns:
    true if this type is derived from argument type.

### getNodeKind

    int getNodeKind()

  Returns a code describing the node kind, when this type is a node type (element(), attribute(name) etc.).

  If this type is not a node type, the value ATOMIC_TYPE is returned.

  If this type is a node type, the code returned corresponds with the node kinds defined in `Node`, unless this is the generic type `node()` in which case the value NODE_TYPE is returned.

  Returns:
    a Node kind (ELEMENT, COMMENT etc) or NODE_TYPE or ATOMIC_TYPE.
  Since:
    3.1

### getNodeName

    QName getNodeName()

  Returns the name associated with a Node Type.

  Returns:
    a QName or null
  Since:
    3.1

### getSequenceType

    SequenceType getSequenceType(int occurrence)

  Returns the sequence type corresponding to this item type and the occurrence specified as argument.

  For example if applied to the Item Type xs:string with argument OCC_ONE_OR_MORE, the result is the SequenceType xs:string+.

  Parameters:
    `occurrence` - OCC_ZERO_OR_ONE, OCC_EXACTLY_ONE etc defined in SequenceType
  Returns:
    a SequenceType
  Since:
    3.1

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| © 2010 Axyana Software
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD