Package ptolemy.data.ontologies
Class InfiniteConceptRepresentative
- java.lang.Object
-
- ptolemy.kernel.util.NamedObj
-
- ptolemy.kernel.InstantiableNamedObj
-
- ptolemy.kernel.Entity<T>
-
- ptolemy.kernel.ComponentEntity
-
- ptolemy.data.ontologies.Concept
-
- ptolemy.data.ontologies.FiniteConcept
-
- ptolemy.data.ontologies.InfiniteConceptRepresentative
-
- All Implemented Interfaces:
java.lang.Cloneable
,InequalityTerm
,Changeable
,Debuggable
,DebugListener
,Derivable
,Flowable
,Instantiable
,ModelErrorHandler
,MoMLExportable
,Moveable
,Nameable
- Direct Known Subclasses:
FlatTokenRepresentativeConcept
public abstract class InfiniteConceptRepresentative extends FiniteConcept
An abstract base class for a finite concept in an ontology that represents a set of infinite concepts.- Since:
- Ptolemy II 10.0
- Version:
- $Id$
- Author:
- Charles Shelton
- See Also:
InfiniteConcept
- Pt.AcceptedRating:
- Red (blickly)
- Pt.ProposedRating:
- Red (blickly)
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class ptolemy.kernel.Entity
Entity.ContainedObjectsIterator
-
-
Field Summary
-
Fields inherited from class ptolemy.data.ontologies.FiniteConcept
abovePort, belowPort
-
Fields inherited from class ptolemy.data.ontologies.Concept
isAcceptable
-
Fields inherited from class ptolemy.kernel.util.NamedObj
_changeListeners, _changeLock, _changeRequests, _debugging, _debugListeners, _deferChangeRequests, _elementName, _isPersistent, _verbose, _workspace, ATTRIBUTES, CLASSNAME, COMPLETE, CONTENTS, DEEP, FULLNAME, LINKS
-
-
Constructor Summary
Constructors Constructor Description InfiniteConceptRepresentative(CompositeEntity ontology, java.lang.String name)
Create a new InfiniteConceptRepresentative with the specified name and ontology.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected void
_clearInstantiatedInfiniteConcepts()
Clear the set of instantiated infinite concepts for this representative.protected abstract InfiniteConcept
_createInfiniteConceptInstance(java.lang.String infiniteConceptString)
Create a new infinite concept for the given infinite concept string.java.lang.Object
clone(Workspace workspace)
Clone the InfiniteConceptRepresentative into the specified workspace.abstract boolean
containsThisInfiniteConceptString(java.lang.String infiniteConceptString)
Return true if the string can represent an infinite concept for this representative, false otherwise.InfiniteConcept
getInfiniteConceptByString(java.lang.String infiniteConceptString)
Return the InfiniteConcept that is represented by the given string.java.util.Set<InfiniteConcept>
getInstantiatedInfiniteConcepts()
Return the set of instantiated infinite concepts that are represented by this concept.-
Methods inherited from class ptolemy.data.ontologies.FiniteConcept
getCoverSetAbove, getCoverSetBelow, getIncomingPort, getOutgoingPort, toString
-
Methods inherited from class ptolemy.data.ontologies.Concept
getAssociatedObject, getColor, getOntology, getValue, getVariables, initialize, isAboveOrEqualTo, isSettable, isValueAcceptable, setValue
-
Methods inherited from class ptolemy.kernel.ComponentEntity
_adjustDeferrals, _checkContainer, _getContainedObject, _propagateExistence, getContainer, instantiate, isAtomic, isOpaque, moveDown, moveToFirst, moveToIndex, moveToLast, moveUp, newPort, propagateExistence, setContainer, setName
-
Methods inherited from class ptolemy.kernel.Entity
_addPort, _description, _exportMoMLContents, _removePort, _validateSettables, connectedPortList, connectedPorts, connectionsChanged, containedObjectsIterator, getAttribute, getPort, getPorts, linkedRelationList, linkedRelations, portList, removeAllPorts, setClassDefinition, uniqueName
-
Methods inherited from class ptolemy.kernel.InstantiableNamedObj
_setParent, exportMoML, getChildren, getElementName, getParent, getPrototypeList, isClassDefinition, isWithinClassDefinition
-
Methods inherited from class ptolemy.kernel.util.NamedObj
_addAttribute, _adjustOverride, _attachText, _cloneFixAttributeFields, _containedDecorators, _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, validateSettables, workspace
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface ptolemy.kernel.util.Derivable
getDerivedLevel, getDerivedList, propagateValue
-
Methods inherited from interface ptolemy.kernel.util.Nameable
description, getDisplayName, getFullName, getName, getName
-
-
-
-
Constructor Detail
-
InfiniteConceptRepresentative
public InfiniteConceptRepresentative(CompositeEntity ontology, java.lang.String name) throws NameDuplicationException, IllegalActionException
Create a new InfiniteConceptRepresentative with the specified name and ontology.- Parameters:
ontology
- The specified ontology where this concept resides.name
- The specified name for the concept.- Throws:
NameDuplicationException
- If the ontology already contains a concept with the specified name.IllegalActionException
- If the base class throws it.
-
-
Method Detail
-
clone
public java.lang.Object clone(Workspace workspace) throws java.lang.CloneNotSupportedException
Clone the InfiniteConceptRepresentative into the specified workspace. The result is a new InfiniteConceptRepresentative that is cloned normally with the superclass ComponentEntity clone() method with the exception that its private set of instantiated infinite concepts is not copied to the new object. This is necessary to prevent the cloned InfiniteConceptRepresentative from having references to the original representative's set of instantiated infinite concepts.- Overrides:
clone
in classComponentEntity
- Parameters:
workspace
- The workspace for the cloned object.- Returns:
- A new instance of InfiniteConceptRepresentative.
- Throws:
java.lang.CloneNotSupportedException
- If one of the attributes cannot be cloned.- See Also:
NamedObj.exportMoML(Writer, int, String)
,NamedObj.setDeferringChangeRequests(boolean)
-
getInfiniteConceptByString
public InfiniteConcept getInfiniteConceptByString(java.lang.String infiniteConceptString) throws IllegalActionException
Return the InfiniteConcept that is represented by the given string. If the infinite concept has already been instantiated, return it. If not, instantiate a new infinite concept for the given string and return it.- Parameters:
infiniteConceptString
- The specified string from which to return an infinite concept for this representative.- Returns:
- The InfiniteConcept that is represented by the given string.
- Throws:
IllegalActionException
- Thrown if there is an error finding or creating the infinite concept from the given string.
-
getInstantiatedInfiniteConcepts
public java.util.Set<InfiniteConcept> getInstantiatedInfiniteConcepts()
Return the set of instantiated infinite concepts that are represented by this concept.- Returns:
- The set of instantiated infinite concepts that are represented by this concept.
-
containsThisInfiniteConceptString
public abstract boolean containsThisInfiniteConceptString(java.lang.String infiniteConceptString)
Return true if the string can represent an infinite concept for this representative, false otherwise. Derived classes must implement this method based on how they generate their infinite concepts.- Parameters:
infiniteConceptString
- The string that represents the infinite concept.- Returns:
- true if the string can represent an infinite concept for this representative, false otherwise.
-
_clearInstantiatedInfiniteConcepts
protected void _clearInstantiatedInfiniteConcepts() throws IllegalActionException
Clear the set of instantiated infinite concepts for this representative.- Throws:
IllegalActionException
- Thrown if there is a problem setting the containers of the infinite concepts to null.
-
_createInfiniteConceptInstance
protected abstract InfiniteConcept _createInfiniteConceptInstance(java.lang.String infiniteConceptString) throws IllegalActionException
Create a new infinite concept for the given infinite concept string. Derived classes must implement this method to enable new infinite concepts to be generated from their representatives.- Parameters:
infiniteConceptString
- The specified concept string that represents the infinite concept to be created.- Returns:
- The newly created InfiniteConcept object.
- Throws:
IllegalActionException
- Thrown if the infinite concept cannot be created.
-
-