com.infoengine.schema
Class ComplexType

java.lang.Object
  extended by com.infoengine.schema.Type
      extended by com.infoengine.schema.ComplexType
All Implemented Interfaces:
java.io.Serializable

public class ComplexType
extends Type
implements java.io.Serializable

Represents Complex schema. Complex schema contains a list of attributes.

See Also:
Attribute, Serialized Form

Constructor Summary
ComplexType()
           
 
Method Summary
 void addAttribute(Attribute a)
          Append an attribute to the end of the array of attributes
 Attribute getAttribute(java.lang.String name)
          Get an attribute by name
 Attribute[] getAttributes()
          Get the entire array of attributes
 Attribute getAttributes(int index)
          Get an attribute by index
 void removeAttribute(Attribute a)
          Remove an attribute from the array of attributes
 void setAttributes(Attribute[] attrs)
          Set the entire array of attributes
 void setAttributes(int index, Attribute a)
          Set the attribute at a specific index.
 
Methods inherited from class com.infoengine.schema.Type
addSuperType, getResourceBundle, getSuperType, getSuperTypes, getSuperTypes, getTypeId, setResourceBundle, setSuperTypes, setSuperTypes, setTypeId
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ComplexType

public ComplexType()
Method Detail

setAttributes

public void setAttributes(int index,
                          Attribute a)
Set the attribute at a specific index. If index is greater than the size of the current list of attributes then a will simply be appended to the list.

Parameters:
index - the index of the attribute to set a the attribute to set

getAttributes

public Attribute getAttributes(int index)
Get an attribute by index

Parameters:
index - the index of the attribute to get

setAttributes

public void setAttributes(Attribute[] attrs)
Set the entire array of attributes

Parameters:
attrs - the new array of attributes

getAttributes

public Attribute[] getAttributes()
Get the entire array of attributes

Returns:
an array of Attribute objects, may be of zero length

addAttribute

public void addAttribute(Attribute a)
Append an attribute to the end of the array of attributes

Parameters:
a - the new attribute

removeAttribute

public void removeAttribute(Attribute a)
Remove an attribute from the array of attributes

Parameters:
a - the attribute to remove

getAttribute

public Attribute getAttribute(java.lang.String name)
Get an attribute by name

Parameters:
name - the name of the attribute to get
Returns:
an Attribute object or null if not found