org.obe.xpdl.model.data
Interface Type

All Known Implementing Classes:
BasicType, ComplexType, DeclaredType, EnumerationType, ExternalReference, MultiValuedType, SchemaType

public interface Type

Standard interface implemented by any data type.

Author:
Adrian Price

Field Summary
static int ARRAY_TYPE
          Deprecated. Use EXTERNAL_REFERENCE_TYPE or SCHEMA_TYPE.
static int BOOLEAN_TYPE
          Basic boolean type.
static int DATETIME_TYPE
          Basic date/time type.
static int DECLARED_TYPE
          A reference to a Package-level TypeDeclaration.
static int DEFAULT_TYPE
          Preserves the existing type - use only when the type has already been assigned.
static int ENUMERATION_TYPE
          Deprecated. Use EXTERNAL_REFERENCE_TYPE or SCHEMA_TYPE.
static int EXTERNAL_REFERENCE_TYPE
          An object whose definition is external (e.g., as a Java class).
static int FLOAT_TYPE
          Basic 64-bit signed double-precision type.
static int INTEGER_TYPE
          Basic 32-bit integer type.
static int LIST_TYPE
          Deprecated. Use EXTERNAL_REFERENCE_TYPE or SCHEMA_TYPE.
static int PERFORMER_TYPE
          Basic performer name type (basically a string).
static int RECORD_TYPE
          Deprecated. Use EXTERNAL_REFERENCE_TYPE or SCHEMA_TYPE.
static int REFERENCE_TYPE
          Deprecated. Use EXTERNAL_REFERENCE_TYPE or SCHEMA_TYPE.
static int SCHEMA_TYPE
          An XML document whose structure is defined by an XML Schema.
static int STRING_TYPE
          Basic string type.
static int UNDEFINED_TYPE
          Indicates that the type is currently undefined.
static int UNION_TYPE
          Deprecated. Use EXTERNAL_REFERENCE_TYPE or SCHEMA_TYPE.
 
Method Summary
 Type getImpliedType()
          Returns the actual type implied by this type.
 boolean isAssignableFrom(Type fromType)
          Checks type compatibility in an assignment.
 int value()
          The data type's ordinal value.
 

Field Detail

UNDEFINED_TYPE

public static final int UNDEFINED_TYPE
Indicates that the type is currently undefined. This value is only returned by DeclaredType.value().

See Also:
Constant Field Values

DEFAULT_TYPE

public static final int DEFAULT_TYPE
Preserves the existing type - use only when the type has already been assigned.

See Also:
Constant Field Values

STRING_TYPE

public static final int STRING_TYPE
Basic string type.

See Also:
Constant Field Values

FLOAT_TYPE

public static final int FLOAT_TYPE
Basic 64-bit signed double-precision type.

See Also:
Constant Field Values

INTEGER_TYPE

public static final int INTEGER_TYPE
Basic 32-bit integer type.

See Also:
Constant Field Values

REFERENCE_TYPE

public static final int REFERENCE_TYPE
Deprecated. Use EXTERNAL_REFERENCE_TYPE or SCHEMA_TYPE.

See Also:
Constant Field Values

DATETIME_TYPE

public static final int DATETIME_TYPE
Basic date/time type.

See Also:
Constant Field Values

BOOLEAN_TYPE

public static final int BOOLEAN_TYPE
Basic boolean type.

See Also:
Constant Field Values

PERFORMER_TYPE

public static final int PERFORMER_TYPE
Basic performer name type (basically a string).

See Also:
Constant Field Values

DECLARED_TYPE

public static final int DECLARED_TYPE
A reference to a Package-level TypeDeclaration. N.B. DECLARED_TYPE must not be used directly when setting attributes. It is always a reference to another type.

See Also:
Constant Field Values

SCHEMA_TYPE

public static final int SCHEMA_TYPE
An XML document whose structure is defined by an XML Schema.

See Also:
Constant Field Values

EXTERNAL_REFERENCE_TYPE

public static final int EXTERNAL_REFERENCE_TYPE
An object whose definition is external (e.g., as a Java class).

See Also:
Constant Field Values

RECORD_TYPE

public static final int RECORD_TYPE
Deprecated. Use EXTERNAL_REFERENCE_TYPE or SCHEMA_TYPE.

See Also:
Constant Field Values

UNION_TYPE

public static final int UNION_TYPE
Deprecated. Use EXTERNAL_REFERENCE_TYPE or SCHEMA_TYPE.

See Also:
Constant Field Values

ENUMERATION_TYPE

public static final int ENUMERATION_TYPE
Deprecated. Use EXTERNAL_REFERENCE_TYPE or SCHEMA_TYPE.

See Also:
Constant Field Values

ARRAY_TYPE

public static final int ARRAY_TYPE
Deprecated. Use EXTERNAL_REFERENCE_TYPE or SCHEMA_TYPE.

See Also:
Constant Field Values

LIST_TYPE

public static final int LIST_TYPE
Deprecated. Use EXTERNAL_REFERENCE_TYPE or SCHEMA_TYPE.

See Also:
Constant Field Values
Method Detail

value

public int value()
The data type's ordinal value.

Returns:
Ordinal value: STRING_TYPE, FLOAT_TYPE, INTEGER_TYPE, REFERENCE_TYPE, DATETIME_TYPE, BOOLEAN_TYPE, PERFORMER_TYPE, DECLARED_TYPE, SCHEMA_TYPE, EXTERNAL_REFERENCE_TYPE, RECORD_TYPE, UNION_TYPE, ENUMERATION_TYPE, ARRAY_TYPE, LIST_TYPE

isAssignableFrom

public boolean isAssignableFrom(Type fromType)
Checks type compatibility in an assignment.

Parameters:
fromType - The type of the 'rvalue'.
Returns:
true if a value of type fromType can be assigned or converted to a value of type toType.

getImpliedType

public Type getImpliedType()
Returns the actual type implied by this type. Some types behave as references to other types.

Returns:
The implied type.


SourceForge.net Logo OBE-1.0 Copyright (C) 2002-2006 Adrian Price. All Rights Reserved.