public class Ontology extends CompositeEntity
ConceptGraph
,
Concept
CompositeEntity.ContainedObjectsIterator
Modifier and Type | Field and Description |
---|---|
protected ConceptGraph |
_graph
The cached graph.
|
protected long |
_graphVersion
The workspace version at which the cached graph was valid.
|
_levelCrossingLinks
_changeListeners, _changeLock, _changeRequests, _debugging, _debugListeners, _deferChangeRequests, _elementName, _isPersistent, _verbose, _workspace, ATTRIBUTES, CLASSNAME, COMPLETE, CONTENTS, DEEP, FULLNAME, LINKS
Constructor and Description |
---|
Ontology(CompositeEntity container,
java.lang.String name)
Create a new Ontology with the specified container and the specified
name.
|
Ontology(Workspace workspace)
Create a new Ontology with no container or name.
|
Modifier and Type | Method and Description |
---|---|
protected ConceptGraph |
_buildConceptGraph()
Return the graph represented by this ontology.
|
Concept |
getConceptByString(java.lang.String conceptString)
Return the concept in the ontology represented by the given string, or
null if no such concept exists.
|
ConceptGraph |
getConceptGraph()
Return the graph represented by this ontology.
|
java.util.Set<FiniteConcept> |
getUnacceptableConcepts()
Return a set of finite concepts which are unacceptable solutions in all situations.
|
boolean |
isLattice()
Return true if the ontology graph is a lattice, false otherwise.
|
ComponentRelation |
newRelation(java.lang.String name)
Create a new relation with the specified name, add it to the
relation list, and return it.
|
_addEntity, _addRelation, _adjustDeferrals, _containedDecorators, _deepOpaqueEntityList, _description, _exportMoMLContents, _finishedAddEntity, _removeEntity, _removeRelation, _validateSettables, allAtomicEntityList, allowLevelCrossingConnect, classDefinitionList, clone, connect, connect, containedObjectsIterator, deepCompositeEntityList, deepEntityList, deepGetEntities, deepNamedObjList, deepOpaqueEntityList, deepRelationSet, entityList, entityList, exportLinks, exportMoML, getAttribute, getEntities, getEntity, getPort, getRelation, getRelations, isAtomic, isOpaque, lazyAllAtomicEntityList, lazyAllCompositeEntityList, lazyAllCompositeTransparentAndOpaqueEntityList, lazyClassDefinitionList, lazyDeepEntityList, lazyEntityList, lazyRelationList, numberOfEntities, numberOfRelations, numEntities, numRelations, relationList, removeAllEntities, removeAllRelations, setClassDefinition, setContainer, statistics, uniqueName
_checkContainer, _getContainedObject, _propagateExistence, getContainer, instantiate, moveDown, moveToFirst, moveToIndex, moveToLast, moveUp, newPort, propagateExistence, setName
_addPort, _removePort, connectedPortList, connectedPorts, connectionsChanged, getPorts, linkedRelationList, linkedRelations, portList, removeAllPorts
_setParent, getChildren, getElementName, getParent, getPrototypeList, isClassDefinition, isWithinClassDefinition
_addAttribute, _adjustOverride, _attachText, _cloneFixAttributeFields, _copyChangeRequestList, _debug, _debug, _debug, _debug, _debug, _executeChangeRequests, _getIndentPrefix, _isMoMLSuppressed, _markContentsDerived, _notifyHierarchyListenersAfterChange, _notifyHierarchyListenersBeforeChange, _propagateValue, _removeAttribute, _splitName, _stripNumericSuffix, addChangeListener, addDebugListener, addHierarchyListener, attributeChanged, attributeDeleted, attributeList, attributeList, attributeTypeChanged, clone, decorators, deepContains, depthInHierarchy, description, description, event, executeChangeRequests, exportMoML, exportMoML, exportMoML, exportMoML, exportMoMLPlain, getAttribute, getAttributes, getChangeListeners, getClassName, getDecoratorAttribute, getDecoratorAttributes, getDerivedLevel, getDerivedList, getDisplayName, getFullName, getModelErrorHandler, getName, getName, getSource, handleModelError, isDeferringChangeRequests, isOverridden, isPersistent, lazyContainedObjectsIterator, message, notifyOfNameChange, propagateValue, propagateValues, removeAttribute, removeChangeListener, removeDebugListener, removeHierarchyListener, requestChange, setClassName, setDeferringChangeRequests, setDerivedLevel, setDisplayName, setModelErrorHandler, setPersistent, setSource, sortContainedObjects, toplevel, toString, validateSettables, workspace
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getDerivedLevel, getDerivedList, propagateValue
description, getDisplayName, getFullName, getName, getName
protected ConceptGraph _graph
protected long _graphVersion
public Ontology(CompositeEntity container, java.lang.String name) throws NameDuplicationException, IllegalActionException
container
- The container.name
- The name for the ontology.NameDuplicationException
- If the container already contains an
ontology with the specified name.IllegalActionException
- If the base class throws it.public Ontology(Workspace workspace) throws IllegalActionException
workspace
- The workspace into which to put it.IllegalActionException
- If the base class throws it.public Concept getConceptByString(java.lang.String conceptString) throws IllegalActionException
conceptString
- The string of the concept to look for, which would be what
is returned by the concept's toString() method. This is not necessarily
the Ptolemy NamedObj
name of the
concept. For example, InfiniteConcepts
have automatically generated unique names that are not the same as
what is returned by their toString() method.IllegalActionException
- Thrown if there is an error getting the
concept.public ConceptGraph getConceptGraph()
public java.util.Set<FiniteConcept> getUnacceptableConcepts()
public boolean isLattice()
public ComponentRelation newRelation(java.lang.String name) throws IllegalActionException, NameDuplicationException
CompositeEntity.newRelation(java.lang.String)
of CompositeEntity.newRelation
in class CompositeEntity
name
- The name of the new relation.IllegalActionException
- If name argument is null.NameDuplicationException
- If name collides with a name
already in the container.protected ConceptGraph _buildConceptGraph()