com.infoengine.schema
Class Attribute

java.lang.Object
  extended bycom.infoengine.schema.DisplayContainer
      extended bycom.infoengine.schema.Attribute
All Implemented Interfaces:
Serializable

public class Attribute
extends DisplayContainer
implements Serializable

Represents attribute schema

See Also:
Serialized Form

Field Summary
private  boolean isEditable
           
private  boolean isUnbounded
           
private  int maxOccurs
           
private  int minOccurs
           
private  String name
           
private  SchemaObject schema
           
 
Fields inherited from class com.infoengine.schema.DisplayContainer
 
Constructor Summary
Attribute()
           
 
Method Summary
 boolean getIsEditable()
          Get the isEditable property value
 boolean getIsUnbounded()
          Get the isUnbounded property value
 int getMaxOccurs()
          Get the maximum number of times this attribute may occur.
 int getMinOccurs()
          Get the minimum number of times this attribute must occur.
 String getName()
          Get this attribute's name.
 SchemaObject getSchema()
          Get the schema object associated with this attribute.
 Type getType()
          Get the underlying type definition contained within the schema object
 boolean isEditable()
          Get the isEditable property value
 boolean isMultivalued()
          maxOccurs > 1
 boolean isRequired()
          minOccurs > 0
 boolean isUnbounded()
          Get the isUnbounded property value
 void setIsEditable(boolean b)
          Set the property value determining if this attribute should be allowed to be edited or not.
 void setIsUnbounded(boolean b)
          Set the boolean property determining if the maximum number of times this attribute may occur is infinite.
 void setMaxOccurs(int max)
          Set the maximum number of times this attribute may occur.
 void setMinOccurs(int min)
          Set the minimum number of times this attribute must occur.
 void setName(String name)
          Set this attribute's name.
 void setSchema(SchemaObject so)
          Set the schema object associated with this attribute.
 
Methods inherited from class com.infoengine.schema.DisplayContainer
addDisplayValue, getDisplays, getDisplays, getDisplayString, getDisplayValue, getIds, removeDisplayValue, setDisplays, setDisplays, setDisplayString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

name

private String name

minOccurs

private int minOccurs

maxOccurs

private int maxOccurs

isUnbounded

private boolean isUnbounded

isEditable

private boolean isEditable

schema

private SchemaObject schema
Constructor Detail

Attribute

public Attribute()
Method Detail

setName

public void setName(String name)
Set this attribute's name.

Parameters:
name - new attribute name

getName

public String getName()
Get this attribute's name.

Returns:
name property value

setMinOccurs

public void setMinOccurs(int min)
Set the minimum number of times this attribute must occur. A value greater than 0 implies that this attribute is required.

Parameters:
min - minimum occurance value
See Also:
isRequired()

getMinOccurs

public int getMinOccurs()
Get the minimum number of times this attribute must occur.

Returns:
minOccurs property value
See Also:
isRequired()

setMaxOccurs

public void setMaxOccurs(int max)
Set the maximum number of times this attribute may occur. If the unbounded property is set then the maxOccurs property should be ignored.

Parameters:
max - maximum occurance value
See Also:
setIsUnbounded(boolean), getIsUnbounded(), isUnbounded(), isMultivalued()

getMaxOccurs

public int getMaxOccurs()
Get the maximum number of times this attribute may occur. If the unbounded property is set then the maxOccurs property should be ignored.

Returns:
maxOccurs property value
See Also:
setIsUnbounded(boolean), getIsUnbounded(), isUnbounded(), isMultivalued()

setIsUnbounded

public void setIsUnbounded(boolean b)
Set the boolean property determining if the maximum number of times this attribute may occur is infinite.

Parameters:
b - new isUnbounded property value

getIsUnbounded

public boolean getIsUnbounded()
Get the isUnbounded property value

Returns:
isUnbounded property value

isUnbounded

public boolean isUnbounded()
Get the isUnbounded property value

Returns:
isUnbounded property value

setIsEditable

public void setIsEditable(boolean b)
Set the property value determining if this attribute should be allowed to be edited or not.

Parameters:
b - new isEditable property value

getIsEditable

public boolean getIsEditable()
Get the isEditable property value

Returns:
isEditable property value

isEditable

public boolean isEditable()
Get the isEditable property value

Returns:
isEditable property value

isRequired

public boolean isRequired()
minOccurs > 0

Returns:
true if required else false
See Also:
setMinOccurs(int), getMinOccurs()

isMultivalued

public boolean isMultivalued()
maxOccurs > 1

Returns:
true if multivalued else false
See Also:
setMaxOccurs(int), getMaxOccurs()

setSchema

public void setSchema(SchemaObject so)
Set the schema object associated with this attribute.

Parameters:
so - the schema object
See Also:
SchemaObject

getSchema

public SchemaObject getSchema()
Get the schema object associated with this attribute.

Returns:
the schema object
See Also:
SchemaObject

getType

public Type getType()
Get the underlying type definition contained within the schema object

Returns:
the type object
See Also:
getSchema(), Type