com.softwareag.centrasite.appl.framework.types
Interface AttributeDescription

All Known Subinterfaces:
ClassificationAttributeDescription, FileAttributeDescription, RelationshipAttributeDescription, SlotAttributeDescription
All Known Implementing Classes:
AttributeDescriptionImpl, ClassificationAttributeDescriptionImpl, FileAttributeDescriptionImpl, RelationshipAttributeDescriptionImpl, SlotAttributeDescriptionImpl

public interface AttributeDescription

Description of a type attribute.

See Also:
TypeManager, TypeDescription

Field Summary
static java.lang.String MAXOCCURS_1
          The maxOccurs setting if the attribute is not an array.
static java.lang.String MAXOCCURS_UNBOUNDED
          The maxOccurs setting if the attribute is an array.
static java.lang.String MINOCCURS_0
          The minOccurs setting if the attribute is not required.
static java.lang.String MINOCCURS_1
          The minOccurs setting if the attribute is required.
static java.lang.String TYPE_ANY_SIMPLE_TYPE
          Slot attribute data type - xs:anySimpleType.
static java.lang.String TYPE_BOOLEAN
          Slot attribute data type - xs:boolean.
static java.lang.String TYPE_DATE
          Slot attribute data type - xs:date.
static java.lang.String TYPE_DATE_TIME
          Slot attribute data type - xs:dateTime.
static java.lang.String TYPE_DECIMAL
          Slot attribute data type - xs:decimal.
static java.lang.String TYPE_DOUBLE
          Slot attribute data type - xs:double.
static java.lang.String TYPE_DURATION
          Slot attribute data type - xs:duration.
static java.lang.String TYPE_NUMBER
          Slot attribute data type - xs:integer.
static java.lang.String TYPE_STRING
          Slot attribute data type - xs:string.
static java.lang.String TYPE_TIME
          Slot attribute data type - xs:time.
static java.lang.String TYPE_URL
          Slot attribute data type - xs:anyURI.
 
Method Summary
 java.lang.String getDataType()
          Get the data type of the attribute.
 java.lang.Object getDefaultValue()
          The default value for this attribute.
 java.lang.String getDescription()
          Get the attribute description.
 java.lang.String getDisplayName()
          Get the attribute's display name.
 java.lang.String[] getEnumValues()
          Retrieves the enumeration values for string attribute.
 java.lang.String getLocalName()
          Derive local part from complete name.
 java.lang.String getMaxOccurs()
           
 java.lang.String getMinOccurs()
           
 java.lang.String getName()
          Get the attribute name.
 int getPrecision()
          Get the precision for a "number" attribute.
 AttributeType getType()
          Get the attribute type.
 java.lang.String getUnitLabel()
          Return this slot's unit label.
 boolean isIndexed()
          Checks whether a database index is defined for this attribute.
 boolean isPrefix()
          Return whether this slot's unit label is a prefix or suffix value.
 boolean isReadOnly()
          Checks whether the attribute value can be edited in an object.
 boolean isSystemDefined()
          Tells whether the attribute is system defined or not
 boolean isUsed()
          Checks if this attribute is being used in object instance.
 void setDefaultValue(java.lang.Object value)
          Default value for object properties represented by this attribute.
 void setDescription(java.lang.String description)
          Set the attribute description.
 void setEnumValues(java.lang.String[] enumValues)
          Set the enumeration values for this attribute, in case it is of type string.
 void setIndexed(boolean indexed)
          Sets whether a database index should be defined for this attribute.
 void setMaxOccurs(java.lang.String maxOccurs)
           
 void setMinOccurs(java.lang.String minOccurs)
           
 void setName(java.lang.String name)
          Set the attribute name.
 void setPrecision(int precision)
          Set the precision for a "number" attribute.
 void setPrefix(boolean prefix)
          Specify whether this slot's unit label is to be a prefix or suffix value.
 void setReadOnly(boolean readOnly)
          Sets whether the attribute value can be edited in an object
 void setUnitLabel(java.lang.String unitLabel)
          Set this slot's unit label.
 java.lang.String toXML()
          Return the XML representation of this attribute.
 

Field Detail

MAXOCCURS_1

static final java.lang.String MAXOCCURS_1
The maxOccurs setting if the attribute is not an array.

See Also:
Constant Field Values

MAXOCCURS_UNBOUNDED

static final java.lang.String MAXOCCURS_UNBOUNDED
The maxOccurs setting if the attribute is an array.

See Also:
Constant Field Values

MINOCCURS_0

static final java.lang.String MINOCCURS_0
The minOccurs setting if the attribute is not required.

See Also:
Constant Field Values

MINOCCURS_1

static final java.lang.String MINOCCURS_1
The minOccurs setting if the attribute is required.

See Also:
Constant Field Values

TYPE_BOOLEAN

static final java.lang.String TYPE_BOOLEAN
Slot attribute data type - xs:boolean.

See Also:
Constant Field Values

TYPE_DATE_TIME

static final java.lang.String TYPE_DATE_TIME
Slot attribute data type - xs:dateTime.

See Also:
Constant Field Values

TYPE_DATE

static final java.lang.String TYPE_DATE
Slot attribute data type - xs:date.

See Also:
Constant Field Values

TYPE_TIME

static final java.lang.String TYPE_TIME
Slot attribute data type - xs:time.

See Also:
Constant Field Values

TYPE_DURATION

static final java.lang.String TYPE_DURATION
Slot attribute data type - xs:duration.

See Also:
Constant Field Values

TYPE_ANY_SIMPLE_TYPE

static final java.lang.String TYPE_ANY_SIMPLE_TYPE
Slot attribute data type - xs:anySimpleType.

See Also:
Constant Field Values

TYPE_NUMBER

static final java.lang.String TYPE_NUMBER
Slot attribute data type - xs:integer.

See Also:
Constant Field Values

TYPE_STRING

static final java.lang.String TYPE_STRING
Slot attribute data type - xs:string.

See Also:
Constant Field Values

TYPE_URL

static final java.lang.String TYPE_URL
Slot attribute data type - xs:anyURI.

See Also:
Constant Field Values

TYPE_DOUBLE

static final java.lang.String TYPE_DOUBLE
Slot attribute data type - xs:double.

See Also:
Constant Field Values

TYPE_DECIMAL

static final java.lang.String TYPE_DECIMAL
Slot attribute data type - xs:decimal.

See Also:
Constant Field Values
Method Detail

getType

AttributeType getType()
Get the attribute type.

Returns:
type.

setName

void setName(java.lang.String name)
             throws CSAppFrameworkException
Set the attribute name.

Parameters:
name - name in the form "{uri}local-name".
Throws:
CSAppFrameworkException

getName

java.lang.String getName()
                         throws CSAppFrameworkException
Get the attribute name.

Returns:
name name in the form "{uri}local-name".
Throws:
CSAppFrameworkException

getLocalName

java.lang.String getLocalName()
                              throws CSAppFrameworkException
Derive local part from complete name.

Returns:
local part
Throws:
CSAppFrameworkException

getDisplayName

java.lang.String getDisplayName()
                                throws CSAppFrameworkException
Get the attribute's display name. If there is no explicit display name return the name.

Returns:
the attribute's display name
Throws:
CSAppFrameworkException

setDescription

void setDescription(java.lang.String description)
                    throws CSAppFrameworkException
Set the attribute description.

Parameters:
description -
Throws:
CSAppFrameworkException

getDescription

java.lang.String getDescription()
                                throws CSAppFrameworkException
Get the attribute description.

Returns:
description
Throws:
CSAppFrameworkException

getDataType

java.lang.String getDataType()
Get the data type of the attribute.

Returns:
data type

setMinOccurs

void setMinOccurs(java.lang.String minOccurs)
                  throws CSAppFrameworkException
Parameters:
minOccurs -
Throws:
CSAppFrameworkException

getMinOccurs

java.lang.String getMinOccurs()
                              throws CSAppFrameworkException
Returns:
min occurs
Throws:
CSAppFrameworkException

setMaxOccurs

void setMaxOccurs(java.lang.String maxOccurs)
                  throws CSAppFrameworkException
Parameters:
maxOccurs -
Throws:
CSAppFrameworkException

getMaxOccurs

java.lang.String getMaxOccurs()
                              throws CSAppFrameworkException
Returns:
max occurs
Throws:
CSAppFrameworkException

isReadOnly

boolean isReadOnly()
                   throws CSAppFrameworkException
Checks whether the attribute value can be edited in an object.

Returns:
true if the attribute value is editable, false otherwise.
Throws:
CSAppFrameworkException

setReadOnly

void setReadOnly(boolean readOnly)
                 throws CSAppFrameworkException
Sets whether the attribute value can be edited in an object

Parameters:
readOnly -
Throws:
CSAppFrameworkException

setDefaultValue

void setDefaultValue(java.lang.Object value)
                     throws java.lang.Exception
Default value for object properties represented by this attribute. This value must from the attribute type.

Parameters:
value -
Throws:
java.lang.Exception

getDefaultValue

java.lang.Object getDefaultValue()
                                 throws CSAppFrameworkException
The default value for this attribute.

Returns:
default value
Throws:
CSAppFrameworkException

setEnumValues

void setEnumValues(java.lang.String[] enumValues)
                   throws CSAppFrameworkException
Set the enumeration values for this attribute, in case it is of type string.

Parameters:
enumValues -
Throws:
CSAppFrameworkException

getEnumValues

java.lang.String[] getEnumValues()
                                 throws CSAppFrameworkException
Retrieves the enumeration values for string attribute.

Returns:
enumeration values
Throws:
CSAppFrameworkException

isUsed

boolean isUsed()
               throws CSAppFrameworkException
Checks if this attribute is being used in object instance.

Returns:
whether the attribute is being used
Throws:
CSAppFrameworkException

isIndexed

boolean isIndexed()
Checks whether a database index is defined for this attribute. Only attributes of type AttributeType.SLOT can be indexed.

Returns:
true if the attribute is of type AttributeType.SLOT and a database index is defined for it

setIndexed

void setIndexed(boolean indexed)
Sets whether a database index should be defined for this attribute. Only attributes of type AttributeType.SLOT can be indexed.

Parameters:
indexed -

isSystemDefined

boolean isSystemDefined()
                        throws CSAppFrameworkException
Tells whether the attribute is system defined or not

Returns:
boolean
Throws:
CSAppFrameworkException

setUnitLabel

void setUnitLabel(java.lang.String unitLabel)
Set this slot's unit label. By default this is a prefix value.

Parameters:
unitLabel - the unit label

getUnitLabel

java.lang.String getUnitLabel()
Return this slot's unit label.

Returns:
the unit label. May be null.

setPrefix

void setPrefix(boolean prefix)
Specify whether this slot's unit label is to be a prefix or suffix value.

Parameters:
prefix - true if the unit label is a prefix, false for suffix.

isPrefix

boolean isPrefix()
Return whether this slot's unit label is a prefix or suffix value.

Returns:
true if the unit label is a prefix, false for suffix.

setPrecision

void setPrecision(int precision)
                  throws CSAppFrameworkException
Set the precision for a "number" attribute.

Parameters:
precision - the precision
Throws:
CSApFrameworkException
CSAppFrameworkException

getPrecision

int getPrecision()
                 throws CSAppFrameworkException
Get the precision for a "number" attribute.

Returns:
the precision
Throws:
CSApFrameworkException
CSAppFrameworkException

toXML

java.lang.String toXML()
                       throws CSAppFrameworkException
Return the XML representation of this attribute.

Returns:
the XML representation of this attribute
Throws:
CSApFrameworkException
CSAppFrameworkException