|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object gov.nasa.arc.brahms.common.data.BrahmsObject gov.nasa.arc.brahms.common.data.ModelElement gov.nasa.arc.brahms.common.data.NamedModelElement gov.nasa.arc.brahms.common.data.Concept gov.nasa.arc.brahms.common.data.ConceptualConcept gov.nasa.arc.brahms.common.data.ConceptualClass
public class ConceptualClass
A conceptual object class defines a type of conceptual objects used in a model. For the definition of conceptual objects see the section on conceptual objects.
Field Summary |
---|
Fields inherited from class gov.nasa.arc.brahms.common.data.Concept |
---|
ATTRIBUTES_PROPERTY, RELATIONS_PROPERTY |
Fields inherited from class gov.nasa.arc.brahms.common.data.NamedModelElement |
---|
NAME_PROPERTY |
Fields inherited from interface gov.nasa.arc.brahms.common.IConstants |
---|
ABORT, ACTIVECLASS, ACTIVECONCEPT, ACTIVEINSTANCE, AGENT, ANONYMOUS, ANYAGENT, AREA, AREADEF, ASSIGNED, ATTRIBUTE, BASEAREADEF, BASECLASS, BASECONCEPTUALCLASS, BASEGROUP, BASELIBRARY, BOOLEAN, BROADCAST, BUILDING, BYTE, CCLOCK, CDATE, CHAR, CITY, CLASS, CLOCK, COLLECTALL, COMMUNICATE, COMPLETE, COMPOSITE, COMPUTER, CONCEPT, CONCEPTUALCLASS, CONCEPTUALCONCEPT, CONCEPTUALOBJECT, CONTINUE, COPY, CREATEAGENT, CREATEAREA, CREATEOBJECT, current, CURRENT, DATAFRAME, DATE, DB, DETECTABLE, DIV, DOUBLE, EMAIL, EMPTY_STRING, END, ENDACTIVITY, ENTAGENT, EQ, EXCEPTION, EXPR, FACE2FACE, FACTFRAME, FALSE, FAX, FLOAT, FOREACH, FORONE, G2, GE, GEOGRAPHYCONCEPT, GESTURE, GET, GROUP, GT, IMPASSE, INT, INVALID, JAVA, JAVA_TYPE, KNOWN_MODIFIER, KNOWNVAL_MODIFIER, LE, LOCAL, LONG, LT, MAP, MINUS, MOD, MOVE, MULT, NE, NEW, NONE, NOT_MODIFIER, NOWORK, O, OA, OBJECT, ONTOLOGY, PAGER, PARAMETER, PATH, PHONE, PLUS, PRIMITIVE, PRIVATE, PROAGENT, PROTECTED, PRSAGENT, PUBLIC, PUT, RECEIVE, RELATION, sACTIVECLASS, sACTIVECONCEPT, sACTIVEINSTANCE, sAGENT, sARCHIVE, sAREA, sAREADEF, sBOOLEAN, sBYTE, sBYTECODEEXT, sCHAR, sCLASS, sCOMPUTER, sCONCEPT, sCONCEPTUALCLASS, sCONCEPTUALCONCEPT, sCONCEPTUALOBJECT, sCOPY, sCURRENT, sDETECTABLE, sDOUBLE, sEMAIL, sEND, SEND, sFACE2FACE, sFAX, sFILEEXT, sFLOAT, sGEOGRAPHYCONCEPT, sGROUP, SHORT, SIMAGENT, sINT, sJAVA_TYPE, sLONG, sMAP, sNEW, sNONE, sNOWORK, sOBJECT, SOURCECODE, sPAGER, sPARAMETER, sPATH, sPHONE, sPRIVATE, sPROJECTEXT, sPROTECTED, sPUBLIC, sSHORT, sSTART, sSTRING, sSYMBOL, START, STRING, sUNKNOWN, sVOID, SYMBOL, TRUE, UDT, UML, UNASSIGNED, UNDEFINED, unknown, UNKNOWN, UNKNOWN_MODIFIER, V, VARIABLE, VOID, WHENEVER, WORKFRAME, WORLD, XML |
Constructor Summary | |
---|---|
ConceptualClass()
|
|
ConceptualClass(java.lang.String name)
|
|
ConceptualClass(java.lang.String file,
int line)
|
|
ConceptualClass(java.lang.String name,
java.lang.String file,
int line)
|
Method Summary | |
---|---|
boolean |
addMember(ConceptualInstance concept)
|
boolean |
addSubClass(ConceptualClass concept)
|
boolean |
addSuperClass(ConceptualClass concept)
|
void |
delete()
Deletes this element from the model and removes all references to this element in other model elements. |
protected Attribute |
getAttributeRecursive(java.lang.String name,
boolean includeThis)
Searches for the attribute with the specified name through the concept hierarchy breadth first. |
protected java.util.LinkedList<Attribute> |
getAttributesRecursive(boolean includeThis)
Returns the conceptual class' attributes including the attributes inherited from its parent class and their parent super classes. |
ConceptualInstance |
getMember(java.lang.String name)
|
java.util.Enumeration |
getMembers()
|
java.util.List<ConceptualInstance> |
getMembers(boolean includeSubClasses)
Returns a list of all the members of this class. |
void |
getMembersRecursive(java.util.HashMap<java.lang.String,ConceptualInstance> members,
boolean includeSubClasses,
java.util.HashMap<java.lang.String,ConceptualClass> classes)
Returns a list of all the members of this class. |
protected Relation |
getRelationRecursive(java.lang.String name,
boolean includeThis)
Searches for the relation with the specified name through the concept hierarchy breadth first. |
protected java.util.LinkedList<Relation> |
getRelationsRecursive(boolean includeThis)
Returns the conceptual class' relations including the relations inherited from its parent class and their parent super classes. |
ConceptualClass |
getSubClass(java.lang.String name)
|
java.util.Enumeration |
getSubClasses()
|
ConceptualClass |
getSuperClass(java.lang.String name)
|
java.util.Enumeration |
getSuperClasses()
|
java.util.LinkedList<ConceptualClass> |
getSuperClasses(boolean includeParents)
Returns all superclasses for this concept, if includeParents is true it will include all superclasses, direct and indirect, breadth first. |
boolean |
hasMembers()
|
boolean |
hasSubClasses()
|
boolean |
hasSuperClasses()
|
boolean |
isSubClassOf(Concept concept)
Checks whether this conceptual class is a sub class of the specified concept. |
protected boolean |
isSubClassOf(Concept concept,
java.util.Hashtable checked)
Checks recursively whether this conceptual class is a sub class of the specified concept, checking the concept hierarchy. |
boolean |
removeMember(java.lang.String name)
|
boolean |
removeSubClass(java.lang.String name)
|
boolean |
removeSuperClass(java.lang.String name)
|
protected void |
setID()
Sets the unique identifier. |
Methods inherited from class gov.nasa.arc.brahms.common.data.ConceptualConcept |
---|
getAttribute, getAttributes, getRelation, getRelations |
Methods inherited from class gov.nasa.arc.brahms.common.data.Concept |
---|
addAttribute, addRelation, compareTypes, createContext, equals, getAttribute, getAttributes, getContext, getFullyQualifiedName, getIcon, getModel, getName, getPackage, getRelation, getRelations, getType, hasAttributes, hasRelations, isLocal, isSerializable, removeAttribute, removeRelation, setContext, setIcon, setLocal, setModel, setPackage, setSerializable, toString |
Methods inherited from class gov.nasa.arc.brahms.common.data.NamedModelElement |
---|
getDisplayText, getOwner, setDisplayText, setFullyQualifiedName, setName, setOwner |
Methods inherited from class gov.nasa.arc.brahms.common.data.BrahmsObject |
---|
export, getFile, getID, getLine, getSerialNumber, isBCC, isDynamic, isLoaded, isResolved, setBCC, setDynamic, setFile, setID, setLine, setLoaded, setResolved, setSerialNumber |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface gov.nasa.arc.brahms.common.data.Type |
---|
getSerialNumber |
Constructor Detail |
---|
public ConceptualClass()
public ConceptualClass(java.lang.String name)
public ConceptualClass(java.lang.String file, int line)
public ConceptualClass(java.lang.String name, java.lang.String file, int line)
Method Detail |
---|
protected void setID()
setID
in class BrahmsObject
public boolean addSuperClass(ConceptualClass concept)
public boolean removeSuperClass(java.lang.String name)
public ConceptualClass getSuperClass(java.lang.String name) throws java.util.NoSuchElementException
java.util.NoSuchElementException
public boolean hasSuperClasses()
public java.util.Enumeration getSuperClasses()
public java.util.LinkedList<ConceptualClass> getSuperClasses(boolean includeParents)
includeParents
- true if also indirect superclasses are to be included
in the list, false if only th direct superclasses are to be returned
public boolean addSubClass(ConceptualClass concept)
public boolean removeSubClass(java.lang.String name)
public ConceptualClass getSubClass(java.lang.String name) throws java.util.NoSuchElementException
java.util.NoSuchElementException
public boolean hasSubClasses()
public java.util.Enumeration getSubClasses()
public boolean addMember(ConceptualInstance concept)
public boolean removeMember(java.lang.String name)
public ConceptualInstance getMember(java.lang.String name) throws java.util.NoSuchElementException
java.util.NoSuchElementException
public boolean hasMembers()
public java.util.Enumeration getMembers()
public java.util.List<ConceptualInstance> getMembers(boolean includeSubClasses)
includeSubClasses
- true to include members of subclasses, false for only
the direct members
public void getMembersRecursive(java.util.HashMap<java.lang.String,ConceptualInstance> members, boolean includeSubClasses, java.util.HashMap<java.lang.String,ConceptualClass> classes)
members
- the map to which to add the membersincludeSubClasses
- true to include members of subclasses, false for only
the direct membersclasses
- the map with classes for which members were already retrievedpublic void delete()
delete
in class BrahmsObject
protected Attribute getAttributeRecursive(java.lang.String name, boolean includeThis)
getAttributeRecursive
in class ConceptualConcept
name
- the name of the attribute to be foundincludeThis
- flag indicating whether to search for the attribute in
this concept or only to search in the parents
protected java.util.LinkedList<Attribute> getAttributesRecursive(boolean includeThis)
Note:When processing this list in other methods and an attribute with the same name occurs more then once, then only the last occurrence is to be used by the conceptual concept. The list contains the attibutes starting with the attributes highest in the class hierarchy.
getAttributesRecursive
in class ConceptualConcept
includeThis
- flag indicating whether to include the attibutes for
this concept or only to return the parent attributes
protected Relation getRelationRecursive(java.lang.String name, boolean includeThis)
getRelationRecursive
in class ConceptualConcept
name
- the name of the relation to be foundincludeThis
- flag indicating whether to search for the relation in
this concept or only to search in the parents
protected java.util.LinkedList<Relation> getRelationsRecursive(boolean includeThis)
Note:When processing this list in other methods and an relation with the same name occurs more then once, then only the last occurrence is to be used by the conceptual concept. The list contains the relations starting with the relations highest in the class hierarchy.
getRelationsRecursive
in class ConceptualConcept
includeThis
- flag indicating whether to include the relations for
this concept or only to return the parent relations
public boolean isSubClassOf(Concept concept)
concept
- the concept to be checked to see if it is a parent of
this conceptual class.
protected boolean isSubClassOf(Concept concept, java.util.Hashtable checked)
concept
- the concept to be checked to see if it is a parent of
this conceptual class.checked
- the table with parents already checked in the hierarchy to
prevent circular loops
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |