Package ptolemy.data.ontologies.lattice
Class ProductLatticeOntology
- java.lang.Object
-
- ptolemy.kernel.util.NamedObj
-
- ptolemy.kernel.InstantiableNamedObj
-
- ptolemy.kernel.Entity<T>
-
- ptolemy.kernel.ComponentEntity
-
- ptolemy.kernel.CompositeEntity
-
- ptolemy.data.ontologies.Ontology
-
- ptolemy.data.ontologies.lattice.ProductLatticeOntology
-
- All Implemented Interfaces:
java.lang.Cloneable
,Changeable
,Debuggable
,DebugListener
,Derivable
,Instantiable
,ModelErrorHandler
,MoMLExportable
,Moveable
,Nameable
public class ProductLatticeOntology extends Ontology
A product lattice-based ontologies. Represents an ontology based on a lattice derived from the cross product of a set of other lattice-based ontologies. Given the specified ontologies, the list of concepts for the product lattice ontology is automatically generated by taking all possible tuple combinations for each individual lattice ontology.- Since:
- Ptolemy II 10.0
- Version:
- $Id$
- Author:
- Charles Shelton
- Pt.AcceptedRating:
- Red (cshelton)
- Pt.ProposedRating:
- Red (cshelton)
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class ptolemy.kernel.CompositeEntity
CompositeEntity.ContainedObjectsIterator
-
-
Field Summary
Fields Modifier and Type Field Description Parameter
latticeOntologies
The parameter that holds the user-specified array of ontologies from which the product lattice ontology is derived.-
Fields inherited from class ptolemy.data.ontologies.Ontology
_graph, _graphVersion
-
Fields inherited from class ptolemy.kernel.CompositeEntity
_levelCrossingLinks
-
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 ProductLatticeOntology(CompositeEntity container, java.lang.String name)
Create a new ProductLatticeOntology with the specified container and the specified name.ProductLatticeOntology(Workspace workspace)
Create a new ProductLatticeOntology with no container or name.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ConceptGraph
_buildConceptGraph()
Return the graph represented by this ontology.void
attributeChanged(Attribute attribute)
React to a change in an attribute.Ontology
getColorOntology()
Return the current ontology from which concepts derive their highlight color definitions.java.util.List<Ontology>
getLatticeOntologies()
Return the list of lattice ontologies that comprise the product lattice ontology.ProductLatticeConcept
getProductLatticeConceptFromTuple(java.util.List<Concept> conceptTuple)
Return the product lattice concept in this ontology derived from the specified tuple of concepts.void
setColorOntology(Ontology colorOntology)
Set the component ontology from which the colors will be derived for the concepts in this product lattice ontology.-
Methods inherited from class ptolemy.data.ontologies.Ontology
getConceptByString, getConceptGraph, getUnacceptableConcepts, isLattice, newRelation
-
Methods inherited from class ptolemy.kernel.CompositeEntity
_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
-
Methods inherited from class ptolemy.kernel.ComponentEntity
_checkContainer, _getContainedObject, _propagateExistence, getContainer, instantiate, moveDown, moveToFirst, moveToIndex, moveToLast, moveUp, newPort, propagateExistence, setName
-
Methods inherited from class ptolemy.kernel.Entity
_addPort, _removePort, connectedPortList, connectedPorts, connectionsChanged, getPorts, linkedRelationList, linkedRelations, portList, removeAllPorts
-
Methods inherited from class ptolemy.kernel.InstantiableNamedObj
_setParent, getChildren, getElementName, getParent, getPrototypeList, isClassDefinition, isWithinClassDefinition
-
Methods inherited from class ptolemy.kernel.util.NamedObj
_addAttribute, _adjustOverride, _attachText, _cloneFixAttributeFields, _copyChangeRequestList, _debug, _debug, _debug, _debug, _debug, _executeChangeRequests, _getIndentPrefix, _isMoMLSuppressed, _markContentsDerived, _notifyHierarchyListenersAfterChange, _notifyHierarchyListenersBeforeChange, _propagateValue, _removeAttribute, _splitName, _stripNumericSuffix, addChangeListener, addDebugListener, addHierarchyListener, 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
-
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
-
-
-
-
Field Detail
-
latticeOntologies
public Parameter latticeOntologies
The parameter that holds the user-specified array of ontologies from which the product lattice ontology is derived.
-
-
Constructor Detail
-
ProductLatticeOntology
public ProductLatticeOntology(CompositeEntity container, java.lang.String name) throws NameDuplicationException, IllegalActionException
Create a new ProductLatticeOntology with the specified container and the specified name.- Parameters:
container
- The container.name
- The name for the ontology.- Throws:
NameDuplicationException
- If the container already contains an ontology with the specified name.IllegalActionException
- If the base class throws it.
-
ProductLatticeOntology
public ProductLatticeOntology(Workspace workspace) throws IllegalActionException
Create a new ProductLatticeOntology with no container or name.- Parameters:
workspace
- The workspace into which to put it.- Throws:
IllegalActionException
- If the base class throws it.
-
-
Method Detail
-
attributeChanged
public void attributeChanged(Attribute attribute) throws IllegalActionException
React to a change in an attribute. This method is called by a contained attribute when its value changes. When the latticeOntologies parameter is changed, a new list ofProductLatticeConcept
s is generated based on the array of Ontologies contained in that parameter.- Overrides:
attributeChanged
in classNamedObj
- Parameters:
attribute
- The attribute that changed.- Throws:
IllegalActionException
- If the product lattice concepts cannot be generated.
-
getColorOntology
public Ontology getColorOntology()
Return the current ontology from which concepts derive their highlight color definitions.- Returns:
- The current ontology from which concepts derive their highlight color definitions.
- See Also:
setColorOntology(Ontology)
-
getProductLatticeConceptFromTuple
public ProductLatticeConcept getProductLatticeConceptFromTuple(java.util.List<Concept> conceptTuple) throws IllegalActionException
Return the product lattice concept in this ontology derived from the specified tuple of concepts.- Parameters:
conceptTuple
- The list of concepts from which to create a product lattice concept in this ontology.- Returns:
- The result product lattice concept.
- Throws:
IllegalActionException
- Thrown if the input list of concepts is not composed of concepts from the component ontologies of this product lattice ontology.
-
getLatticeOntologies
public java.util.List<Ontology> getLatticeOntologies() throws IllegalActionException
Return the list of lattice ontologies that comprise the product lattice ontology.- Returns:
- The list of lattice ontology objects.
- Throws:
IllegalActionException
- If the latticeOntologies parameter does not return an array token that contains the ontology objects, or at least one of the specified component ontologies is not a lattice.
-
setColorOntology
public void setColorOntology(Ontology colorOntology) throws IllegalActionException
Set the component ontology from which the colors will be derived for the concepts in this product lattice ontology. If the specified ontology is not a part of this product lattice ontology, the color ontology will be set to null.- Parameters:
colorOntology
- The specified ontology to use for the color definitions for each product lattice concept. Or null if the concepts should have no color highlighting.- Throws:
IllegalActionException
- Thrown if the specified ontology is not part of the product lattice ontology.- See Also:
getColorOntology()
-
_buildConceptGraph
protected ConceptGraph _buildConceptGraph()
Return the graph represented by this ontology. For a product lattice ontology this is aProductLatticeCPO
.- Overrides:
_buildConceptGraph
in classOntology
- Returns:
- The concept graph as a ProductLatticeCPO.
-
-