com.dbmain.jidbm
Class DBMResource

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.DBMResource

public class DBMResource
extends DBMDataObject

The DBMResource class represents resource objects of the DB-MAIN repository.

A resource can have several resource sub-types, resource sub-types and resource cardinalitys.


Field Summary
 
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
DBMResource(int id)
          Creates a new instance of the DBMResource class representing the resource identified by id and the current project in DB-MAIN.
DBMResource(int id, long sysid)
          Creates a new instance of the DBMResource class representing the resource identified by id and sysid in the DB-MAIN repository.
 
Method Summary
 void addFirstGeneralizeResourceSubType(DBMResourceSubType cur)
          Adds a first resource sub-type (cur) to the current resource in the DB-MAIN repository.
 void addFirstResourceCardinality(DBMResourceCardinality cur)
          Adds a first resource cardinality (cur) to the current resource in the DB-MAIN repository.
 void addFirstSpecializeResourceSubType(DBMResourceSubType cur)
          Adds a first resource sub-type (cur) to the current resource in the DB-MAIN repository.
 void addNextGeneralizeResourceSubType(DBMResourceSubType cur, DBMResourceSubType prev)
          Adds a resource sub-type (cur) following the resource sub-type (prev) to the current resource in the DB-MAIN repository.
 void addNextResourceCardinality(DBMResourceCardinality cur, DBMResourceCardinality prev)
          Adds a resource cardinality (cur) following the resource cardinality (prev) to the current resource in the DB-MAIN repository.
 void addNextSpecializeResourceSubType(DBMResourceSubType cur, DBMResourceSubType prev)
          Adds a resource sub-type (cur) following the resource sub-type (prev) to the current resource in the DB-MAIN repository.
 DBMResourceCardinality createResourceCardinality(java.lang.String name, int min_card, int max_card, DBMConsumption consumption)
          Creates a new instance of resource cardinality attached to the current resource in the DB-MAIN repository.
 DBMResourceSubType createResourceSubType(java.lang.String name, DBMResource re_spec)
          Creates a new instance of resource sub-type attached to the current resource in the DB-MAIN repository.
 void deleteResource()
          Deletes the resource of the DB-MAIN repository represented by the current DBMResource instance.
 DBMResourceSubType getFirstGeneralizeResourceSubType()
          Returns the first resource sub-type of the current resource in the DB-MAIN repository.
 DBMResourceCardinality getFirstResourceCardinality()
          Returns the first resource cardinality of the current resource in the DB-MAIN repository.
 DBMResourceSubType getFirstSpecializeResourceSubType()
          Returns the first resource sub-type of the current resource in the DB-MAIN repository.
 DBMResourceSubType getLastGeneralizeResourceSubType()
          Returns the last resource sub-type of the current resource in the DB-MAIN repository.
 DBMResourceCardinality getLastResourceCardinality()
          Returns the last resource cardinality of the current resource in the DB-MAIN repository.
 DBMResourceSubType getLastSpecializeResourceSubType()
          Returns the last resource sub-type of the current resource in the DB-MAIN repository.
 DBMResourceSubType getNextGeneralizeResourceSubType(DBMResourceSubType cur)
          Returns the resource sub-type (of the current resource) that follows the resource sub-type cur in the DB-MAIN repository.
 DBMResourceCardinality getNextResourceCardinality(DBMResourceCardinality cur)
          Returns the resource cardinality (of the current resource) that follows the resource cardinality cur in the DB-MAIN repository.
 DBMResourceSubType getNextSpecializeResourceSubType(DBMResourceSubType cur)
          Returns the resource sub-type (of the current resource) that follows the resource sub-type cur in the DB-MAIN repository.
 DBMResourceSubType getPreviousGeneralizeResourceSubType(DBMResourceSubType cur)
          Returns the resource sub-type (of the current resource) that precedes the resource sub-type cur in the DB-MAIN repository.
 DBMResourceCardinality getPreviousResourceCardinality(DBMResourceCardinality cur)
          Returns the resource cardinality (of the current resource) that precedes the resource cardinality cur in the DB-MAIN repository.
 DBMResourceSubType getPreviousSpecializeResourceSubType(DBMResourceSubType cur)
          Returns the resource sub-type (of the current resource) that precedes the resource sub-type cur in the DB-MAIN repository.
 char getType()
          Returns the type of the current resource.
 void removeGeneralizeResourceSubType()
          Removes the list of resource sub-type attached to the current resource in the DB-MAIN repository.
 void removeResourceCardinality()
          Removes the list of resource cardinality attached to the current resource in the DB-MAIN repository.
 void removeSpecializeResourceSubType()
          Removes the list of resource sub-type attached to the current resource in the DB-MAIN repository.
 void setType(char val)
          Updates the value of type in the current resource in the DB-MAIN repository.
 
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
 

Constructor Detail

DBMResource

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

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

DBMResource

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

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

getType

public char getType()
Returns the type of the current resource.

Returns:
the char value of the field type.

setType

public void setType(char val)
Updates the value of type in the current resource in the DB-MAIN repository.

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

deleteResource

public void deleteResource()
Deletes the resource of the DB-MAIN repository represented by the current DBMResource instance.


createResourceSubType

public DBMResourceSubType createResourceSubType(java.lang.String name,
                                                DBMResource re_spec)
Creates a new instance of resource sub-type attached to the current resource in the DB-MAIN repository.

Parameters:
name - the value of the field name.
re_spec - the resource linked to the created object.
Returns:
the DBMResourceSubType instance representing the new resource sub-type.

createResourceCardinality

public DBMResourceCardinality createResourceCardinality(java.lang.String name,
                                                        int min_card,
                                                        int max_card,
                                                        DBMConsumption consumption)
Creates a new instance of resource cardinality attached to the current resource in the DB-MAIN repository.

Parameters:
name - the value of the field name.
min_card - the value of the field minimum cardinality.
max_card - the value of the field maximum cardinality.
consumption - the consumption linked to the created object.
Returns:
the DBMResourceCardinality instance representing the new resource cardinality.

getFirstSpecializeResourceSubType

public DBMResourceSubType getFirstSpecializeResourceSubType()
Returns the first resource sub-type of the current resource in the DB-MAIN repository.

Returns:
the DBMResourceSubType instance representing the first resource sub-type.

getLastSpecializeResourceSubType

public DBMResourceSubType getLastSpecializeResourceSubType()
Returns the last resource sub-type of the current resource in the DB-MAIN repository.

Returns:
the DBMResourceSubType instance representing the last resource sub-type.

getNextSpecializeResourceSubType

public DBMResourceSubType getNextSpecializeResourceSubType(DBMResourceSubType cur)
Returns the resource sub-type (of the current resource) that follows the resource sub-type cur in the DB-MAIN repository.

Parameters:
cur - the current resource sub-type.
Returns:
the DBMResourceSubType instance representing the next resource sub-type.

getPreviousSpecializeResourceSubType

public DBMResourceSubType getPreviousSpecializeResourceSubType(DBMResourceSubType cur)
Returns the resource sub-type (of the current resource) that precedes the resource sub-type cur in the DB-MAIN repository.

Parameters:
cur - the current resource sub-type.
Returns:
the DBMResourceSubType instance representing the previous resource sub-type.

addFirstSpecializeResourceSubType

public void addFirstSpecializeResourceSubType(DBMResourceSubType cur)
Adds a first resource sub-type (cur) to the current resource in the DB-MAIN repository.

Parameters:
cur - the added resource sub-type.

addNextSpecializeResourceSubType

public void addNextSpecializeResourceSubType(DBMResourceSubType cur,
                                             DBMResourceSubType prev)
Adds a resource sub-type (cur) following the resource sub-type (prev) to the current resource in the DB-MAIN repository.

Parameters:
cur - the added resource sub-type.
prev - the resource sub-type after which the resource sub-type cur is inserted.

removeSpecializeResourceSubType

public void removeSpecializeResourceSubType()
Removes the list of resource sub-type attached to the current resource in the DB-MAIN repository.


getFirstGeneralizeResourceSubType

public DBMResourceSubType getFirstGeneralizeResourceSubType()
Returns the first resource sub-type of the current resource in the DB-MAIN repository.

Returns:
the DBMResourceSubType instance representing the first resource sub-type.

getLastGeneralizeResourceSubType

public DBMResourceSubType getLastGeneralizeResourceSubType()
Returns the last resource sub-type of the current resource in the DB-MAIN repository.

Returns:
the DBMResourceSubType instance representing the last resource sub-type.

getNextGeneralizeResourceSubType

public DBMResourceSubType getNextGeneralizeResourceSubType(DBMResourceSubType cur)
Returns the resource sub-type (of the current resource) that follows the resource sub-type cur in the DB-MAIN repository.

Parameters:
cur - the current resource sub-type.
Returns:
the DBMResourceSubType instance representing the next resource sub-type.

getPreviousGeneralizeResourceSubType

public DBMResourceSubType getPreviousGeneralizeResourceSubType(DBMResourceSubType cur)
Returns the resource sub-type (of the current resource) that precedes the resource sub-type cur in the DB-MAIN repository.

Parameters:
cur - the current resource sub-type.
Returns:
the DBMResourceSubType instance representing the previous resource sub-type.

addFirstGeneralizeResourceSubType

public void addFirstGeneralizeResourceSubType(DBMResourceSubType cur)
Adds a first resource sub-type (cur) to the current resource in the DB-MAIN repository.

Parameters:
cur - the added resource sub-type.

addNextGeneralizeResourceSubType

public void addNextGeneralizeResourceSubType(DBMResourceSubType cur,
                                             DBMResourceSubType prev)
Adds a resource sub-type (cur) following the resource sub-type (prev) to the current resource in the DB-MAIN repository.

Parameters:
cur - the added resource sub-type.
prev - the resource sub-type after which the resource sub-type cur is inserted.

removeGeneralizeResourceSubType

public void removeGeneralizeResourceSubType()
Removes the list of resource sub-type attached to the current resource in the DB-MAIN repository.


getFirstResourceCardinality

public DBMResourceCardinality getFirstResourceCardinality()
Returns the first resource cardinality of the current resource in the DB-MAIN repository.

Returns:
the DBMResourceCardinality instance representing the first resource cardinality.

getLastResourceCardinality

public DBMResourceCardinality getLastResourceCardinality()
Returns the last resource cardinality of the current resource in the DB-MAIN repository.

Returns:
the DBMResourceCardinality instance representing the last resource cardinality.

getNextResourceCardinality

public DBMResourceCardinality getNextResourceCardinality(DBMResourceCardinality cur)
Returns the resource cardinality (of the current resource) that follows the resource cardinality cur in the DB-MAIN repository.

Parameters:
cur - the current resource cardinality.
Returns:
the DBMResourceCardinality instance representing the next resource cardinality.

getPreviousResourceCardinality

public DBMResourceCardinality getPreviousResourceCardinality(DBMResourceCardinality cur)
Returns the resource cardinality (of the current resource) that precedes the resource cardinality cur in the DB-MAIN repository.

Parameters:
cur - the current resource cardinality.
Returns:
the DBMResourceCardinality instance representing the previous resource cardinality.

addFirstResourceCardinality

public void addFirstResourceCardinality(DBMResourceCardinality cur)
Adds a first resource cardinality (cur) to the current resource in the DB-MAIN repository.

Parameters:
cur - the added resource cardinality.

addNextResourceCardinality

public void addNextResourceCardinality(DBMResourceCardinality cur,
                                       DBMResourceCardinality prev)
Adds a resource cardinality (cur) following the resource cardinality (prev) to the current resource in the DB-MAIN repository.

Parameters:
cur - the added resource cardinality.
prev - the resource cardinality after which the resource cardinality cur is inserted.

removeResourceCardinality

public void removeResourceCardinality()
Removes the list of resource cardinality attached to the current resource in the DB-MAIN repository.