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

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
                      extended by gov.nasa.arc.brahms.common.data.ConceptualInstance
All Implemented Interfaces:
IConceptInstance, Type, gov.nasa.arc.brahms.common.IConstants, java.io.Serializable
Direct Known Subclasses:
VMConceptualInstance

public class ConceptualInstance
extends ConceptualConcept
implements IConceptInstance

A conceptual object is used to allow for a user to track things that exist as concepts in people's minds, like the concept of an order. The concepts do not exist as such but do have incarnations in the form of real artifacts, such as a fax, a form, or a database record. Through conceptual objects statistics can be generated such as touch time and cycle time and object flows can be generated through a work process.

Version:
$Revision: 1.3 $ $Date: 2009/06/16 21:36:17 $ $Author: rvhoof $
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
ConceptualInstance()
           
ConceptualInstance(java.lang.String name)
           
ConceptualInstance(java.lang.String file, int line)
           
ConceptualInstance(java.lang.String name, java.lang.String file, int line)
           
 
Method Summary
 boolean addAggregate(ConceptualInstance concept)
           
 boolean addPart(ObjectInstance concept)
           
 boolean addSubAggregate(ConceptualInstance concept)
           
 IConceptCtx createContext()
          Creates a new context for this concept for use in a virtual machine.
 void delete()
          Deletes this group from the model and removes all references to this group in other model elements.
 ConceptualInstance getAggregate(java.lang.String name)
           
 java.util.Enumeration getAggregates()
           
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 concepts' attributes including the attributes inherited from its parent class and their parent super classes.
 ConceptualClass getParent()
           
 java.util.LinkedList<ConceptualClass> getParents(boolean includeParents)
          Returns all parents for this concept, if includeParents is true it will include all parents, direct and indirect, breadth first.
 ObjectInstance getPart(java.lang.String name)
           
 java.util.Enumeration getParts()
           
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 concepts' relations including the relations inherited from its parent class and their parent super classes.
 ConceptualInstance getSubAggregate(java.lang.String name)
           
 java.util.Enumeration getSubAggregates()
           
 boolean hasAggregates()
           
 boolean hasParts()
           
 boolean hasSubAggregates()
           
 boolean isInstanceOf(Concept concept)
          Checks whether this conceptual instance is an instance of the specified concept.
 boolean removeAggregate(java.lang.String name)
           
 boolean removePart(java.lang.String name)
           
 boolean removeSubAggregate(java.lang.String name)
           
protected  void setID()
          Sets the unique identifier.
 void setParent(ConceptualClass parent)
           
 
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, 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

ConceptualInstance

public ConceptualInstance()

ConceptualInstance

public ConceptualInstance(java.lang.String name)

ConceptualInstance

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

ConceptualInstance

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

setID

protected void setID()
Sets the unique identifier.

Overrides:
setID in class BrahmsObject

setParent

public void setParent(ConceptualClass parent)

getParent

public ConceptualClass getParent()

getParents

public java.util.LinkedList<ConceptualClass> getParents(boolean includeParents)
Returns all parents for this concept, if includeParents is true it will include all parents, direct and indirect, breadth first.

Parameters:
includeParents - true if also indirect parents are to be included in the list, false if only th direct parents are to be returned
Returns:
LinkedList the list of parents.

addAggregate

public boolean addAggregate(ConceptualInstance concept)

removeAggregate

public boolean removeAggregate(java.lang.String name)

getAggregate

public ConceptualInstance getAggregate(java.lang.String name)
                                throws java.util.NoSuchElementException
Throws:
java.util.NoSuchElementException

hasAggregates

public boolean hasAggregates()

getAggregates

public java.util.Enumeration getAggregates()

addSubAggregate

public boolean addSubAggregate(ConceptualInstance concept)

removeSubAggregate

public boolean removeSubAggregate(java.lang.String name)

getSubAggregate

public ConceptualInstance getSubAggregate(java.lang.String name)
                                   throws java.util.NoSuchElementException
Throws:
java.util.NoSuchElementException

hasSubAggregates

public boolean hasSubAggregates()

getSubAggregates

public java.util.Enumeration getSubAggregates()

addPart

public boolean addPart(ObjectInstance concept)

removePart

public boolean removePart(java.lang.String name)

getPart

public ObjectInstance getPart(java.lang.String name)
                       throws java.util.NoSuchElementException
Throws:
java.util.NoSuchElementException

hasParts

public boolean hasParts()

getParts

public java.util.Enumeration getParts()

getAttributeRecursive

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

Specified by:
getAttributeRecursive in class ConceptualConcept
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

getAttributesRecursive

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

Specified by:
getAttributesRecursive in class ConceptualConcept
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

getRelationRecursive

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

Specified by:
getRelationRecursive in class ConceptualConcept
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

getRelationsRecursive

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

Specified by:
getRelationsRecursive in class ConceptualConcept
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

delete

public void delete()
Deletes this group from the model and removes all references to this group in other model elements.

Overrides:
delete in class BrahmsObject

createContext

public IConceptCtx createContext()
Creates a new context for this concept for use in a virtual machine.

Overrides:
createContext in class Concept
Returns:
IConceptCtx the concept's context

isInstanceOf

public boolean isInstanceOf(Concept concept)
Checks whether this conceptual instance is an instance of the specified concept.

Parameters:
concept - the Concept to be checked to see if this conceptual instance is an instance of the concept
Returns:
true if this conceptual instance is an instance of the specified concept, false otherwise


Copyright © 1997-2012 All Rights Reserved.