gov.nasa.arc.brahms.common.data
Class ConceptualConcept

java.lang.Object
  extended by gov.nasa.arc.brahms.common.data.BrahmsObject
      extended by gov.nasa.arc.brahms.common.data.ModelElement
          extended by gov.nasa.arc.brahms.common.data.NamedModelElement
              extended by gov.nasa.arc.brahms.common.data.Concept
                  extended by gov.nasa.arc.brahms.common.data.ConceptualConcept
All Implemented Interfaces:
Type, gov.nasa.arc.brahms.common.IConstants, java.io.Serializable
Direct Known Subclasses:
ConceptualClass, ConceptualInstance

public abstract class ConceptualConcept
extends Concept

class ConceptualConcept

Version:
12 April 2001
Author:
Ron van Hoof
See Also:
Serialized Form

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
ConceptualConcept()
           
ConceptualConcept(java.lang.String file, int line)
           
ConceptualConcept(java.lang.String name, java.lang.String file, int line)
           
 
Method Summary
 Attribute getAttribute(java.lang.String name, boolean includeParents)
          Returns the Attribute with the specified name.
protected abstract  Attribute getAttributeRecursive(java.lang.String name, boolean includeThis)
          Searches for the attribute with the specified name through the concept hierarchy breadth first.
 java.util.Enumeration getAttributes(boolean includeParents)
          Returns the conceptual concept's attributes.
protected abstract  java.util.LinkedList<Attribute> getAttributesRecursive(boolean includeThis)
          Returns the conceptual concepts' attributes including the attributes inherited from its parent class and their parent super classes.
 Relation getRelation(java.lang.String name, boolean includeParents)
          Returns the Relation with the specified name.
protected abstract  Relation getRelationRecursive(java.lang.String name, boolean includeThis)
          Searches for the relation with the specified name through the concept hierarchy breadth first.
 java.util.Enumeration getRelations(boolean includeParents)
          Returns the conceptual concept's relations.
protected abstract  java.util.LinkedList<Relation> getRelationsRecursive(boolean includeThis)
          Returns the conceptual concepts' relations including the relations inherited from its parent class and their parent super classes.
 
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
delete, export, getFile, getID, getLine, getSerialNumber, isBCC, isDynamic, isLoaded, isResolved, setBCC, setDynamic, setFile, setID, 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

ConceptualConcept

public ConceptualConcept()

ConceptualConcept

public ConceptualConcept(java.lang.String file,
                         int line)

ConceptualConcept

public ConceptualConcept(java.lang.String name,
                         java.lang.String file,
                         int line)
Method Detail

getAttribute

public Attribute getAttribute(java.lang.String name,
                              boolean includeParents)
                       throws java.util.NoSuchElementException
Returns the Attribute with the specified name. If includeParents is set to true and the attribute with the specified name is not defined for this concept, this method will try to find the attribute in one of the parent concepts. If includeParents is false the search will be limited to the attributes specified for only this concept and not that of its parent concepts.

Overrides:
getAttribute in class Concept
Parameters:
name - the name of the requested attribute
includeParents - true if the search should also include the parent concept, false if not.
Returns:
Attribute if the attribute with the specified name was found
Throws:
java.util.NoSuchElementException - if the attribute with the specified name is not defined for this concept or its parent concepts (if includeParents is true).

getAttributeRecursive

protected abstract Attribute getAttributeRecursive(java.lang.String name,
                                                   boolean includeThis)
Searches for the attribute with the specified name through the concept hierarchy breadth first. If the attribute with the specified name is found it is returned, otherwise null is returned.

Parameters:
name - the name of the attribute to be found
includeThis - flag indicating whether to search for the attribute in this concept or only to search in the parents
Returns:
Attribute the attribute if it was found, null otherwise

getAttributes

public java.util.Enumeration getAttributes(boolean includeParents)
Returns the conceptual concept's attributes. If the includeParents flag is false it excludes the inherited attributes defined for its parent conceptual classes or conceptual superclasses. If the flag is true it includes the inherited attributes defined for its parent conceptual classes or conceptual superclasses.

Overrides:
getAttributes in class Concept
Parameters:
includeParents - true if also the inherited attributes of its conceptual classes and superclasses are to be included, false otherwise
Returns:
Enumeration a list of all the conceptual concept's attibutes

getAttributesRecursive

protected abstract java.util.LinkedList<Attribute> getAttributesRecursive(boolean includeThis)
Returns the conceptual concepts' attributes including the attributes inherited from its parent class and their parent super classes. The attributes are retrieved recursively breadth first.

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.

Parameters:
includeThis - flag indicating whether to include the attibutes for this concept or only to return the parent attributes
Returns:
LinkedList the conceptual concept's (parent) attributes

getRelation

public Relation getRelation(java.lang.String name,
                            boolean includeParents)
                     throws java.util.NoSuchElementException
Returns the Relation with the specified name. If includeParents is set to true and the relation with the specified name is not defined for this concept, this method will try to find the relation in one of the parent concepts. If includeParents is false the search will be limited to the relations specified for only this concept and not that of its parent concepts.

Overrides:
getRelation in class Concept
Parameters:
name - the name of the requested relation
includeParents - true if the search should also include the parent concept, false if not.
Returns:
Relation if the relation with the specified name was found
Throws:
java.util.NoSuchElementException - if the relation with the specified name is not defined for this concept or its parent concepts (if includeParents is true).

getRelationRecursive

protected abstract Relation getRelationRecursive(java.lang.String name,
                                                 boolean includeThis)
Searches for the relation with the specified name through the concept hierarchy breadth first. If the relation with the specified name is found it is returned, otherwise null is returned.

Parameters:
name - the name of the relation to be found
includeThis - flag indicating whether to search for the relation in this concept or only to search in the parents
Returns:
Relation the relation if it was found, null otherwise

getRelations

public java.util.Enumeration getRelations(boolean includeParents)
Returns the conceptual concept's relations. If the includeParents flag is false it excludes the inherited relations defined for its parent conceptual classes or conceptual superclasses. If the flag is true it includes the inherited relations defined for its parent conceptual classes or conceptual superclasses.

Overrides:
getRelations in class Concept
Parameters:
includeParents - true if also the inherited relations of its conceptual classes and superclasses are to be included, false otherwise
Returns:
Enumeration a list of all the conceptual class's relations

getRelationsRecursive

protected abstract java.util.LinkedList<Relation> getRelationsRecursive(boolean includeThis)
Returns the conceptual concepts' relations including the relations inherited from its parent class and their parent super classes. The relations are retrieved recursively breadth first.

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.

Parameters:
includeThis - flag indicating whether to include the relations for this concept or only to return the parent relations
Returns:
LinkedList the conceptual concept's (parent) relations


Copyright © 1997-2012 All Rights Reserved.