com.infoengine.schema
Class Type

java.lang.Object
  extended by com.infoengine.schema.Type
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
ComplexType, SimpleType

public class Type
extends java.lang.Object
implements java.io.Serializable

Base class for other type objects (Simple or Complex)

See Also:
Serialized Form

Constructor Summary
Type()
          Create an emtpy Type
Type(java.lang.String id)
          Create a Type with typId id
 
Method Summary
 void addSuperType(java.lang.String type)
          Add a superType to the end of the type hierarchy.
 java.lang.String getResourceBundle()
          Get the resourceBundle property value.
 java.lang.String getSuperType()
          Get the direct superType of this Type.
 java.lang.String[] getSuperTypes()
          Get the entire type hierarchy.
 java.lang.String getSuperTypes(int index)
          Get a type identifier from this Type's hierarchy.
 java.lang.String getTypeId()
          Get the typeId property value
 void setResourceBundle(java.lang.String rb)
          Set the resourceBundle property value.
 void setSuperTypes(int index, java.lang.String type)
          Set a type into the hierarchy of this type.
 void setSuperTypes(java.lang.String[] types)
          Set the entire type hierarchy.
 void setTypeId(java.lang.String id)
          Set the typeId property
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Type

public Type()
Create an emtpy Type


Type

public Type(java.lang.String id)
Create a Type with typId id

Parameters:
id - the typeId
Method Detail

setTypeId

public void setTypeId(java.lang.String id)
Set the typeId property

Parameters:
id - the new property value

getTypeId

public java.lang.String getTypeId()
Get the typeId property value

Returns:
the property value

setResourceBundle

public void setResourceBundle(java.lang.String rb)
Set the resourceBundle property value. This property is used by SchemaGenerators to determine where localizable strings come from. It can be ignored by clients.

Parameters:
rb - the new property value

getResourceBundle

public java.lang.String getResourceBundle()
Get the resourceBundle property value. This property is used by SchemaGenerators to determine where localizable strings come from. It can be ignored by clients.

Returns:
the property value

setSuperTypes

public void setSuperTypes(int index,
                          java.lang.String type)
Set a type into the hierarchy of this type. If index is greater than the size of the hierarchy type will be appended. The superType at index 0 will be the direct superType of this Type.

Parameters:
index - the index to set type the type identifier

addSuperType

public void addSuperType(java.lang.String type)
Add a superType to the end of the type hierarchy.

Parameters:
type - the type to add

getSuperTypes

public java.lang.String getSuperTypes(int index)
Get a type identifier from this Type's hierarchy. The superType at index 0 will be the direct superType of this Type.

Parameters:
index - the index to retrieve
Returns:
a type identifier or null if invalid index

setSuperTypes

public void setSuperTypes(java.lang.String[] types)
Set the entire type hierarchy. The superType at index 0 must be the direct superType of this Type.

Parameters:
types - the new hierarchy

getSuperTypes

public java.lang.String[] getSuperTypes()
Get the entire type hierarchy. The superType at index 0 will be the direct superType of this Type.

Returns:
the type hierarchy or null

getSuperType

public java.lang.String getSuperType()
Get the direct superType of this Type. Simply a convenience method for getSuperTypes ( 0 )

Returns:
direct superType or null