Package ptolemy.data.ontologies.lattice
Class ActorProductLatticeConstraintsDefinitionAdapter
- java.lang.Object
-
- ptolemy.data.ontologies.OntologyAdapter
-
- ptolemy.data.ontologies.lattice.LatticeOntologyAdapter
-
- ptolemy.data.ontologies.lattice.ActorConstraintsDefinitionAdapter
-
- ptolemy.data.ontologies.lattice.ActorProductLatticeConstraintsDefinitionAdapter
-
public class ActorProductLatticeConstraintsDefinitionAdapter extends ActorConstraintsDefinitionAdapter
A class that creates a product lattice-based ontology adapter from a model-based actor constraints definition attribute.- Since:
- Ptolemy II 10.0
- Version:
- $Id$
- Author:
- Charles Shelton
- See Also:
ActorConstraintsDefinitionAttribute
- Pt.AcceptedRating:
- Red (cshelton)
- Pt.ProposedRating:
- Green (cshelton)
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
INHERIT
String representing that the actor port or attribute should inherit its constraints from the tuple ontology solvers for the product lattice ontology solver.-
Fields inherited from class ptolemy.data.ontologies.lattice.ActorConstraintsDefinitionAdapter
_constraintTermExpressions
-
Fields inherited from class ptolemy.data.ontologies.lattice.LatticeOntologyAdapter
_ownConstraints, _subAdapterConstraints, _useDefaultConstraints, interconnectConstraintType
-
Fields inherited from class ptolemy.data.ontologies.OntologyAdapter
_annotationEvaluator, _solver
-
-
Constructor Summary
Constructors Constructor Description ActorProductLatticeConstraintsDefinitionAdapter(ProductLatticeOntologySolver solver, ComponentEntity component, java.util.List<StringParameter> constraintExpressions)
Construct the lattice ontology adapter for the given component and property lattice.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static boolean
areActorElementConstraintsInherited(StringParameter actorElementConstraintExpression)
Return true if the actor element is set to inherit its constraints from the tuple ontologies that comprise the product lattice ontology, false otherwise.java.util.List<Inequality>
constraintList()
Return the constraints of this component.-
Methods inherited from class ptolemy.data.ontologies.lattice.ActorConstraintsDefinitionAdapter
_getConceptFunctionTerm, _getPropertyableAttributes, _setConstraints, getPropertyables
-
Methods inherited from class ptolemy.data.ontologies.lattice.LatticeOntologyAdapter
_addDefaultConstraints, _addSubAdapterConstraints, _annotationEvaluator, _constrainAttributes, _constrainObject, _constrainObjectLists, _constrainSingleObject, _getConstrainedPorts, _getConstraintingPorts, _getSubAdapters, _setConnectionConstraintType, _union, getPropertyTerm, getSolver, isConstraintSource, reinitialize, setAtLeast, setAtMost, setSameAs
-
Methods inherited from class ptolemy.data.ontologies.OntologyAdapter
_getASTNodeAdapters, _getAttributeParseTrees, _getSinkPortList, _getSourcePortList, getComponent, getContainerEntity, getName, getParseTree, putAttribute, setComponent, setEquals, toString
-
-
-
-
Field Detail
-
INHERIT
public static final java.lang.String INHERIT
String representing that the actor port or attribute should inherit its constraints from the tuple ontology solvers for the product lattice ontology solver.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ActorProductLatticeConstraintsDefinitionAdapter
public ActorProductLatticeConstraintsDefinitionAdapter(ProductLatticeOntologySolver solver, ComponentEntity component, java.util.List<StringParameter> constraintExpressions) throws IllegalActionException
Construct the lattice ontology adapter for the given component and property lattice.- Parameters:
solver
- The specified lattice-based ontology solver.component
- The given component.constraintExpressions
- The list of constraint expressions for each port or component in the actor.- Throws:
IllegalActionException
- Thrown if the adapter cannot be initialized.
-
-
Method Detail
-
areActorElementConstraintsInherited
public static boolean areActorElementConstraintsInherited(StringParameter actorElementConstraintExpression) throws IllegalActionException
Return true if the actor element is set to inherit its constraints from the tuple ontologies that comprise the product lattice ontology, false otherwise.- Parameters:
actorElementConstraintExpression
- The constraint expression for the actor element.- Returns:
- true if the actor element is set to inherit its constraints from the tuple ontologies that comprise the product lattice ontology, false otherwise.
- Throws:
IllegalActionException
- If the constrain expression parameter is null.
-
constraintList
public java.util.List<Inequality> constraintList() throws IllegalActionException
Return the constraints of this component. The constraints are generated from the expressions passed in from an ActorConstraintsDefinitionAttribute that allows the user to define actor constraints in the OntologySolver model.- Overrides:
constraintList
in classActorConstraintsDefinitionAdapter
- Returns:
- The list of constraints for this component.
- Throws:
IllegalActionException
- If there is a problem parsing the constraint expression strings to create the actor constraints.
-
-