|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object gov.nasa.arc.brahms.common.rt.BrahmsObjectCtx gov.nasa.arc.brahms.common.rt.ConceptCtx
public class ConceptCtx
The ConceptCtx is the runtime representation of concepts defined in a Brahms model. The concept context manages the creation and deletion time of the concepts.
Field Summary |
---|
Fields inherited from interface gov.nasa.arc.brahms.common.rt.IRuntimeConstants |
---|
ABORTED, ACTIVE, ACTIVITY, AVAILABLE, COMPLETED, CONSEQUENCE, DETECTABLE, ENDED, ENGINE, EXTERNAL_AGENT, FROM, IMPASSED, INITIAL, INTERRUPTED, JAVA_PROPERTY, sABORTED, sACTIVE, sAVAILABLE, sCOMPLETED, sENDED, sIMPASSED, sINTERRUPTED, sUNAVAILABLE, TO, TRANSFER, UNAVAILABLE |
Constructor Summary | |
---|---|
ConceptCtx(Concept concept)
Constructor, creates a new context for the specified concept. |
Method Summary | |
---|---|
protected void |
addAttribute(Attribute att)
Adds the specified attribute to the attribute cache containing a list of all the attributes specified for a concept, including the attributes specified for parent concepts (if available). |
protected void |
addRelation(Relation rel)
Adds the specified relation to the relation cache containing a list of all the relations specified for a concept, including the relations specified for parent concepts (if available). |
protected Attribute |
getAttribute(java.lang.String name)
Returns the attribute with the specified name from the cache. |
protected Relation |
getRelation(java.lang.String name)
Returns the relation with the specified name from the cache. |
protected void |
initAttributeRelationCache()
Initializes the cache for the attributes and relations. |
protected void |
removeAttribute(Attribute att)
Removes the specified attribute from the attribute cache containing a list of all the attributes specified for a concept, including the attributes specified for parent concepts (if available). |
protected void |
removeRelation(Relation rel)
Removes the specified relation from the relation cache containing a list of all the relations specified for a concept, including the relations specified for parent concepts (if available). |
protected void |
resetAttributeRelationCache()
Resets the attribute and relation cache |
java.lang.String |
toString()
Returns the fully qualified name of the conceptfor which this is a context |
Methods inherited from class gov.nasa.arc.brahms.common.rt.BrahmsObjectCtx |
---|
addNote, getContextFor, getEndTime, getID, getNote, getNotes, getStartTime, removeNote, setContextFor, setEndTime, setID, setStartTime |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface gov.nasa.arc.brahms.common.rt.IBrahmsObjectCtx |
---|
addNote, getContextFor, getEndTime, getID, getNote, getNotes, getStartTime, removeNote, setEndTime, setID, setStartTime |
Constructor Detail |
---|
public ConceptCtx(Concept concept)
concept
- the concept for which to create a contextMethod Detail |
---|
protected void initAttributeRelationCache() throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
gov.nasa.arc.brahms.common.exceptions.BrahmsException
- if an error occurs in initializing the cacheprotected void resetAttributeRelationCache()
initAttributeRelationCache
protected void addAttribute(Attribute att)
att
- the Attribute to be added to the attribute cacheprotected void removeAttribute(Attribute att)
att
- the Attribute to be removed from the attribute cacheprotected Attribute getAttribute(java.lang.String name) throws gov.nasa.arc.brahms.common.exceptions.BrahmsException, java.util.NoSuchElementException
Note: The cache does not get dynamically updated if the concept's concept hierarchy changes. The cache is generally built up at initialization time of the virtual machine. The cache is cleared when the concept is reset.
name
- the name of the requested Attribute
java.util.NoSuchElementException
- if no attribute with the specified name
is specified for the concept
gov.nasa.arc.brahms.common.exceptions.BrahmsException
- if the context is not associated with a conceptprotected void addRelation(Relation rel)
att
- the Relation to be added to the relation cacheprotected void removeRelation(Relation rel)
att
- the Relation to be removed from the relation cacheprotected Relation getRelation(java.lang.String name) throws gov.nasa.arc.brahms.common.exceptions.BrahmsException, java.util.NoSuchElementException
Note: The cache does not get dynamically updated if the concept's concept hierarchy changes. The cache is generally built up at initialization time of the virtual machine. The cache is cleared when the concept is reset.
name
- the name of the requested Relation
java.util.NoSuchElementException
- if no relation with the specified name
is specified for the concept
gov.nasa.arc.brahms.common.exceptions.BrahmsException
- if the context is not associated with a conceptpublic java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |