com.dbmain.jidbm
Class DBMAttribute

java.lang.Object
  extended by com.dbmain.jidbm.DBMGenericObject
      extended by com.dbmain.jidbm.DBMConcreteObject
          extended by com.dbmain.jidbm.DBMDataObject
              extended by com.dbmain.jidbm.DBMAttribute
Direct Known Subclasses:
DBMCompoundAttribute, DBMSimpleAttribute

public class DBMAttribute
extends DBMDataObject

The DBMAttribute class represents attribute objects of the DB-MAIN repository.

A attribute can have several groups.


Field Summary
static char ARRAY_ATT
          Constant of field setType: Array type (indexed sequence of cells that can each contain an element).
static char BAG_ATT
          Constant of field setType: Bag type (unstructured collection of elements).
static char LIST_ATT
          Constant of field setType: List type (sequenced collection of elements).
static int N_CARD
          Constant of field maximumCardinality: Infinity value (N).
static char SET_ATT
          Constant of field setType: Set type (unstructured collection of distinct elements).
static char UARRAY_ATT
          Constant of field setType: Unique array type (indexed sequence of cells that can each contain a distinct element).
static char ULIST_ATT
          Constant of field setType: Unique list type (sequenced collection of distinct elements).
 
Fields inherited from class com.dbmain.jidbm.DBMGenericObject
ALLPARENTS, CLUSTER, CO_ATTRIBUTE, COLLECTION, CONNECTION, CONS_PU, CONS_RES, CONSTRAINT, CONSUMPTION, ELEMENT, ENTITY_TYPE, ENVIRONMENT, ETROUND, ETSHADOW, ETSQUARE, GRAPHCOUPLE, GROUP, HAVESEL, HIDEASSOCIATION, HIDEATT, HIDECTRLFLOW, HIDEEXTEND, HIDEGENACT, HIDEGENUC, HIDEGR, HIDEINCLUDE, HIDENEWADD, HIDENOTE, HIDEOBJFLOW, HIDEPRIMID, HIDEPROD, HIDEPU, HIDESTEREOTYPE, ISASTRAIGHT, LOCK_USED, MARK1, MARK2, MARK3, MARK4, MARK5, MEMBER_CST, META_OBJECT, META_PROPERTY, METH_USED, NN_NOTE, NOTE, PROC_UNIT, PROCESS_TITLE, PROD_SET, RE_ISA, REJECTED, REL_ELEMENT, REL_TYPE, RESOURCE, ROLE, RTROUND, RTSHADOW, RTSQUARE, SCHEMA, SELECT, SHOWTYPEATT, SI_ATTRIBUTE, STATE, SUB_TYPE, SYSTEM, TEXT, TEXT_LINE, UMLCENTER, UMLCENTERDOWN, UMLCENTERUP, UMLLEFTCENTER, UMLLEFTDOWN, UMLLEFTUP, UMLRIGHTCENTER, UMLRIGHTDOWN, UMLRIGHTUP, USER_OBJECT, USER_VIEW, WITHOUT_SELECT
 
Constructor Summary
DBMAttribute(int id)
          Creates a new instance of the DBMAttribute class representing the attribute identified by id and the current project in DB-MAIN.
DBMAttribute(int id, long sysid)
          Creates a new instance of the DBMAttribute class representing the attribute identified by id and sysid in the DB-MAIN repository.
 
Method Summary
 DBMAttribute convertAttribute(boolean show)
          Convert the collection type of current multivalued attribute.
 DBMAttribute convertAttribute(char coltype, boolean loss, boolean show)
          Convert the collection type of current multivalued attribute into coltype with or without semantic loss.
 void deleteAttribute()
          Deletes the attribute of the DB-MAIN repository represented by the current DBMAttribute instance.
 DBMGenericObject getAttributeOwner()
          Returns the generic object of the current attribute.
 DBMGroup getFirstMemberOfGroup()
          Returns the first group of the current attribute in the DB-MAIN repository.
 DBMGroup getLastMemberOfGroup()
          Returns the last group of the current attribute in the DB-MAIN repository.
 int getMaximumCardinality()
          Returns the maximum cardinality of the current attribute.
 int getMinimumCardinality()
          Returns the minimum cardinality of the current attribute.
 DBMGroup getNextMemberOfGroup(DBMGroup cur)
          Returns the group (of the current attribute) that follows the group cur in the DB-MAIN repository.
 DBMGroup getPreviousMemberOfGroup(DBMGroup cur)
          Returns the group (of the current attribute) that precedes the group cur in the DB-MAIN repository.
 char getSetType()
          Returns the set type of the current attribute.
 java.lang.String getSetTypeName()
          Returns the set type constant name of the current attribute.
 boolean isBoolean()
          Verifies if the current attribute has the boolean type.
 boolean isCharacter()
          Verifies if the current attribute has the character type.
 boolean isCompound()
          Verifies if the current attribute has the compound type.
 boolean isDate()
          Verifies if the current attribute has the date type.
 boolean isFloat()
          Verifies if the current attribute has the float type.
 boolean isIndex()
          Verifies if the current attribute has the index type.
 boolean isNumeric()
          Verifies if the current attribute has the numeric type.
 boolean isObject()
          Verifies if the current attribute has the object type.
 boolean isSequence()
          Verifies if the current attribute has the sequence type.
 boolean isUserDefined()
          Verifies if the current attribute has the user-defined type.
 boolean isVariableCharacter()
          Verifies if the current attribute has the variable character type.
 DBMAttribute materializeAttribute(boolean show)
          Materialize the current user-defined attribute.
 void removeAttributeOwner()
          Removes the generic object attached to the current attribute in the DB-MAIN repository.
 void removeMemberOfGroup()
          Removes the list of group attached to the current attribute in the DB-MAIN repository.
 void removeMemberOfGroup(DBMGroup cur)
          Removes a group attached to the current attribute in the DB-MAIN repository.
 void setMaximumCardinality(int val)
          Updates the value of maximum cardinality in the current attribute in the DB-MAIN repository.
 void setMinimumCardinality(int val)
          Updates the value of minimum cardinality in the current attribute in the DB-MAIN repository.
 void setSetType(char val)
          Updates the value of set type in the current attribute in the DB-MAIN repository.
 DBMEntityType transformIntoEntityType(boolean show)
          Transform the current attribute into an entity type.
 DBMRelationshipType transformIntoRelationshipType(boolean show)
          Transform the current object attribute into a relationship type.
 DBMAttribute transformMonovaluedIntoMultivaluedAttribute(boolean show)
          Transform the current monovalued attribute into a multivalued attribute.
 java.lang.Object[] transformMultivaluedIntoAttributeList(boolean show)
          Transform the current multivalued attribute into a list of attributes.
 DBMAttribute transformMultivaluedIntoMonovaluedAttribute(boolean show)
          Transform the current multivalued attribute into a monovalued attribute.
 
Methods inherited from class com.dbmain.jidbm.DBMDataObject
addFirstGroup, addFirstSimpleAttribute, addNextGroup, addNextSimpleAttribute, copyGroup, createGroup, createUniqueGroup, deleteDataObject, getFirstAccessKey, getFirstCollection, getFirstGroup, getFirstReferentialConstraint, getFirstSecondaryIdentifier, getFirstSimpleAttribute, getLastCollection, getLastGroup, getLastSimpleAttribute, getNextAccessKey, getNextCollection, getNextGroup, getNextReferentialConstraint, getNextSecondaryIdentifier, getNextSimpleAttribute, getPreviousCollection, getPreviousGroup, getPreviousSimpleAttribute, getPrimaryIdentifier, getSchema, removeCollection, removeCollection, removeGroup, removeSchema, removeSimpleAttribute
 
Methods inherited from class com.dbmain.jidbm.DBMConcreteObject
deleteConcreteObject, getName, getQualifiedName, getSemanticDescription, getShortName, getTechnicalDescription, setName, setSemanticDescription, setShortName, setTechnicalDescription, toString
 
Methods inherited from class com.dbmain.jidbm.DBMGenericObject
addFirstNoteRelation, addFirstState, addFirstUserObject, addNextNoteRelation, addNextState, addNextUserObject, createNote, createNoteRelation, deleteGenericObject, equals, getFirstNoteRelation, getFirstState, getFirstUserObject, getFlag, getLastNoteRelation, getLastState, getLastUserObject, getMetaPropertyBooleanListValue, getMetaPropertyBooleanValue, getMetaPropertyCharListValue, getMetaPropertyCharValue, getMetaPropertyDoubleListValue, getMetaPropertyDoubleValue, getMetaPropertyIntListValue, getMetaPropertyIntValue, getMetaPropertyListValue, getMetaPropertyStringListValue, getMetaPropertyStringValue, getMetaPropertyValue, getNextNoteRelation, getNextState, getNextUserObject, getObjectIdentifier, getObjectType, getObjectTypeName, getPreviousNoteRelation, getPreviousState, getPreviousUserObject, getProjectIdentifier, hashCode, isAttribute, isCluster, isCollection, isCompoundAttribute, isConcreteObject, isConnection, isConstraint, isConstraintMember, isConsumption, isDataObject, isElement, isElementRelation, isEntityRelationshipType, isEntityType, isEnvironment, isFlagConstant, isGroup, isMetaObject, isMetaProperty, isNote, isNoteRelation, isProcessingUnit, isProcessingUnitCardinality, isProduct, isProductSet, isProject, isRelationshipType, isResource, isResourceCardinality, isResourceSubType, isRole, isSchema, isSimpleAttribute, isState, isSubType, isText, isTextLine, isUserObject, isUserView, removeNoteRelation, removeState, removeUserObject, setFlag, setFlagConstant, setMetaPropertyBooleanListValue, setMetaPropertyBooleanValue, setMetaPropertyCharListValue, setMetaPropertyCharValue, setMetaPropertyDoubleListValue, setMetaPropertyDoubleValue, setMetaPropertyIntListValue, setMetaPropertyIntValue, setMetaPropertyListValue, setMetaPropertyStringListValue, setMetaPropertyStringValue, setMetaPropertyValue
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

N_CARD

public static final int N_CARD
Constant of field maximumCardinality: Infinity value (N).

See Also:
Constant Field Values

SET_ATT

public static final char SET_ATT
Constant of field setType: Set type (unstructured collection of distinct elements).

See Also:
Constant Field Values

BAG_ATT

public static final char BAG_ATT
Constant of field setType: Bag type (unstructured collection of elements).

See Also:
Constant Field Values

ULIST_ATT

public static final char ULIST_ATT
Constant of field setType: Unique list type (sequenced collection of distinct elements).

See Also:
Constant Field Values

LIST_ATT

public static final char LIST_ATT
Constant of field setType: List type (sequenced collection of elements).

See Also:
Constant Field Values

UARRAY_ATT

public static final char UARRAY_ATT
Constant of field setType: Unique array type (indexed sequence of cells that can each contain a distinct element).

See Also:
Constant Field Values

ARRAY_ATT

public static final char ARRAY_ATT
Constant of field setType: Array type (indexed sequence of cells that can each contain an element).

See Also:
Constant Field Values
Constructor Detail

DBMAttribute

public DBMAttribute(int id,
                    long sysid)
Creates a new instance of the DBMAttribute class representing the attribute identified by id and sysid in the DB-MAIN repository.

Parameters:
id - the object identifier of a attribute.
sysid - the system identifier of a attribute.

DBMAttribute

public DBMAttribute(int id)
Creates a new instance of the DBMAttribute class representing the attribute identified by id and the current project in DB-MAIN.

Parameters:
id - the object identifier of a attribute.
Method Detail

getMinimumCardinality

public int getMinimumCardinality()
Returns the minimum cardinality of the current attribute.

Returns:
the int value of the field minimumCardinality.

setMinimumCardinality

public void setMinimumCardinality(int val)
Updates the value of minimum cardinality in the current attribute in the DB-MAIN repository.

Parameters:
val - the new int value of the field MinimumCardinality.

getMaximumCardinality

public int getMaximumCardinality()
Returns the maximum cardinality of the current attribute.

Returns:
the int value of the field maximumCardinality.

setMaximumCardinality

public void setMaximumCardinality(int val)
Updates the value of maximum cardinality in the current attribute in the DB-MAIN repository.

Parameters:
val - the new int value of the field MaximumCardinality.

getSetType

public char getSetType()
Returns the set type of the current attribute.

Returns:
the char value of the field setType.

getSetTypeName

public java.lang.String getSetTypeName()
Returns the set type constant name of the current attribute.

Returns:
the string representation of the field setType.

setSetType

public void setSetType(char val)
Updates the value of set type in the current attribute in the DB-MAIN repository.

Parameters:
val - the new char value of the field SetType.

deleteAttribute

public void deleteAttribute()
Deletes the attribute of the DB-MAIN repository represented by the current DBMAttribute instance.


getFirstMemberOfGroup

public DBMGroup getFirstMemberOfGroup()
Returns the first group of the current attribute in the DB-MAIN repository.

Returns:
the DBMGroup instance representing the first group.

getLastMemberOfGroup

public DBMGroup getLastMemberOfGroup()
Returns the last group of the current attribute in the DB-MAIN repository.

Returns:
the DBMGroup instance representing the last group.

getNextMemberOfGroup

public DBMGroup getNextMemberOfGroup(DBMGroup cur)
Returns the group (of the current attribute) that follows the group cur in the DB-MAIN repository.

Parameters:
cur - the current group.
Returns:
the DBMGroup instance representing the next group.

getPreviousMemberOfGroup

public DBMGroup getPreviousMemberOfGroup(DBMGroup cur)
Returns the group (of the current attribute) that precedes the group cur in the DB-MAIN repository.

Parameters:
cur - the current group.
Returns:
the DBMGroup instance representing the previous group.

removeMemberOfGroup

public void removeMemberOfGroup()
Removes the list of group attached to the current attribute in the DB-MAIN repository.


removeMemberOfGroup

public void removeMemberOfGroup(DBMGroup cur)
Removes a group attached to the current attribute in the DB-MAIN repository.

Parameters:
cur - the group to detach.

getAttributeOwner

public DBMGenericObject getAttributeOwner()
Returns the generic object of the current attribute.

Returns:
the DBMGenericObject instance representing the generic object.

removeAttributeOwner

public void removeAttributeOwner()
Removes the generic object attached to the current attribute in the DB-MAIN repository.


transformIntoEntityType

public DBMEntityType transformIntoEntityType(boolean show)
Transform the current attribute into an entity type.

Parameters:
show - indicate if the transformation dialogs must be displayed.
Returns:
the DBMEntityType instance representing the new object created by the transformation.

transformMultivaluedIntoMonovaluedAttribute

public DBMAttribute transformMultivaluedIntoMonovaluedAttribute(boolean show)
Transform the current multivalued attribute into a monovalued attribute.

Parameters:
show - indicate if the transformation dialogs must be displayed.
Returns:
the DBMAttribute instance representing the new object created by the transformation.

transformMonovaluedIntoMultivaluedAttribute

public DBMAttribute transformMonovaluedIntoMultivaluedAttribute(boolean show)
Transform the current monovalued attribute into a multivalued attribute.

Parameters:
show - indicate if the transformation dialogs must be displayed.
Returns:
the DBMAttribute instance representing the new object created by the transformation.

transformMultivaluedIntoAttributeList

public java.lang.Object[] transformMultivaluedIntoAttributeList(boolean show)
Transform the current multivalued attribute into a list of attributes.

Parameters:
show - indicate if the transformation dialogs must be displayed.
Returns:
the array of DBMAttribute instance representing the new attributes created by the transformation.

convertAttribute

public DBMAttribute convertAttribute(boolean show)
Convert the collection type of current multivalued attribute.

Parameters:
show - indicate if the transformation dialogs must be displayed.
Returns:
the DBMAttribute instance representing the new object created by the transformation.

convertAttribute

public DBMAttribute convertAttribute(char coltype,
                                     boolean loss,
                                     boolean show)
Convert the collection type of current multivalued attribute into coltype with or without semantic loss.

Parameters:
coltype - the new collection type.
loss - indicate if semantic is preserved (false) or not (true).
show - indicate if the transformation dialogs must be displayed.
Returns:
the DBMAttribute instance representing the new object created by the transformation.

materializeAttribute

public DBMAttribute materializeAttribute(boolean show)
Materialize the current user-defined attribute.

Parameters:
show - indicate if the transformation dialogs must be displayed.
Returns:
the DBMAttribute instance representing the new object created by the transformation.

transformIntoRelationshipType

public DBMRelationshipType transformIntoRelationshipType(boolean show)
Transform the current object attribute into a relationship type.

Parameters:
show - indicate if the transformation dialogs must be displayed.
Returns:
the DBMRelationshipType instance representing the new object created by the transformation.

isCharacter

public boolean isCharacter()
Verifies if the current attribute has the character type.

Parameters:
att - The attribute for which the type must be verified.
Returns:
True if the current attribute has the character type, false otherwise.

isNumeric

public boolean isNumeric()
Verifies if the current attribute has the numeric type.

Parameters:
att - The attribute for which the type must be verified.
Returns:
True if the current has the numeric type, false otherwise.

isVariableCharacter

public boolean isVariableCharacter()
Verifies if the current attribute has the variable character type.

Parameters:
att - The attribute for which the type must be verified.
Returns:
True if the current attribute has the variable character type, false otherwise.

isBoolean

public boolean isBoolean()
Verifies if the current attribute has the boolean type.

Parameters:
att - The attribute for which the type must be verified.
Returns:
True if the current attribute has the boolean type, false otherwise.

isFloat

public boolean isFloat()
Verifies if the current attribute has the float type.

Parameters:
att - The attribute for which the type must be verified.
Returns:
True if the current attribute has the float type, false otherwise.

isDate

public boolean isDate()
Verifies if the current attribute has the date type.

Parameters:
att - The attribute for which the type must be verified.
Returns:
True if the current attribute has the date type, false otherwise.

isObject

public boolean isObject()
Verifies if the current attribute has the object type.

Parameters:
att - The attribute for which the type must be verified.
Returns:
True if the current attribute has the object type, false otherwise.

isSequence

public boolean isSequence()
Verifies if the current attribute has the sequence type.

Parameters:
att - The attribute for which the type must be verified.
Returns:
True if the current attribute has the sequence type, false otherwise.

isIndex

public boolean isIndex()
Verifies if the current attribute has the index type.

Parameters:
att - The attribute for which the type must be verified.
Returns:
True if the current attribute has the index type, false otherwise.

isUserDefined

public boolean isUserDefined()
Verifies if the current attribute has the user-defined type.

Parameters:
att - The attribute for which the type must be verified.
Returns:
True if the current attribute has the user-defined type, false otherwise.

isCompound

public boolean isCompound()
Verifies if the current attribute has the compound type.

Parameters:
att - The attribute for which the type must be verified.
Returns:
True if the current attribute has the compound type, false otherwise.