Package ptolemy.data.ontologies.lattice
Class LatticeOntologyASTNodeAdapter
- java.lang.Object
-
- ptolemy.data.ontologies.OntologyAdapter
-
- ptolemy.data.ontologies.lattice.LatticeOntologyAdapter
-
- ptolemy.data.ontologies.lattice.LatticeOntologyASTNodeAdapter
-
- Direct Known Subclasses:
ASTPtFunctionalIfNode
,ASTPtLeafNode
,ASTPtLeafNode
,ASTPtLeafNode
,ASTPtLeafNode
,ASTPtLeafNode
,ASTPtLeafNode
,ASTPtProductNode
,ASTPtRelationalNode
,ASTPtSumNode
,ASTPtUnaryNode
,ProductLatticeOntologyASTNodeAdapter
public class LatticeOntologyASTNodeAdapter extends LatticeOntologyAdapter
A base class representing a property constraint adapter.- Since:
- Ptolemy II 10.0
- Version:
- $Id$
- Author:
- Man-Kit Leung, Thomas Mandl, Edward A. Lee
- Pt.AcceptedRating:
- Red (mankit)
- Pt.ProposedRating:
- Red (mankit)
-
-
Field Summary
-
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 LatticeOntologyASTNodeAdapter(LatticeOntologySolver solver, ASTPtRootNode node)
Construct the property constraint adapter associated with the given AST node.LatticeOntologyASTNodeAdapter(LatticeOntologySolver solver, ASTPtRootNode node, boolean useDefaultConstraints)
Construct the property constraint adapter for the given property solver and AST node.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected InequalityTerm[]
_getChildNodeTerms()
Return an array of all the inequality terms for the child nodes to this product node.protected ASTPtRootNode
_getNode()
Return the node this adapter references.protected java.util.List<OntologyAdapter>
_getSubAdapters()
Return the list of sub-adapters.java.util.List<Inequality>
constraintList()
Return the constraints of this component.static NamedObj
getNamedObject(Entity container, java.lang.String name)
Returns the component referenced by the given name in the given container.java.util.List<java.lang.Object>
getPropertyables()
Return a list of property-able NamedObj contained by the component.-
Methods inherited from class ptolemy.data.ontologies.lattice.LatticeOntologyAdapter
_addDefaultConstraints, _addSubAdapterConstraints, _annotationEvaluator, _constrainAttributes, _constrainObject, _constrainObjectLists, _constrainSingleObject, _getConstrainedPorts, _getConstraintingPorts, _setConnectionConstraintType, _union, getPropertyTerm, getSolver, isConstraintSource, reinitialize, setAtLeast, setAtMost, setSameAs
-
Methods inherited from class ptolemy.data.ontologies.OntologyAdapter
_getASTNodeAdapters, _getAttributeParseTrees, _getPropertyableAttributes, _getSinkPortList, _getSourcePortList, getComponent, getContainerEntity, getName, getParseTree, putAttribute, setComponent, setEquals, toString
-
-
-
-
Constructor Detail
-
LatticeOntologyASTNodeAdapter
public LatticeOntologyASTNodeAdapter(LatticeOntologySolver solver, ASTPtRootNode node) throws IllegalActionException
Construct the property constraint adapter associated with the given AST node.- Parameters:
solver
- The lattice-based ontology solver for this adapternode
- The given AST node- Throws:
IllegalActionException
- Thrown if LatticeOntologyASTNodeAdapter(NamedObj, ASTPtRootNode, boolean) throws it.
-
LatticeOntologyASTNodeAdapter
public LatticeOntologyASTNodeAdapter(LatticeOntologySolver solver, ASTPtRootNode node, boolean useDefaultConstraints) throws IllegalActionException
Construct the property constraint adapter for the given property solver and AST node.- Parameters:
solver
- The lattice-based ontology solver for this adapternode
- The given AST nodeuseDefaultConstraints
- Indicate whether this adapter uses the default actor constraints- Throws:
IllegalActionException
- If the adapter cannot be initialized.
-
-
Method Detail
-
constraintList
public java.util.List<Inequality> constraintList() throws IllegalActionException
Return the constraints of this component. The constraints is a list of inequalities.- Overrides:
constraintList
in classLatticeOntologyAdapter
- Returns:
- A list of Inequalities.
- Throws:
IllegalActionException
- Not thrown in this base class.
-
getNamedObject
public static NamedObj getNamedObject(Entity container, java.lang.String name)
Returns the component referenced by the given name in the given container.- Parameters:
container
- The container in which to find the componentname
- The name of the component- Returns:
- The NamedObj component referred to by the name found in the container, or null if it is not found
-
getPropertyables
public java.util.List<java.lang.Object> getPropertyables()
Return a list of property-able NamedObj contained by the component. All ports and parameters are considered property-able.- Overrides:
getPropertyables
in classOntologyAdapter
- Returns:
- The list of property-able named object.
-
_getChildNodeTerms
protected InequalityTerm[] _getChildNodeTerms()
Return an array of all the inequality terms for the child nodes to this product node.- Returns:
- The array of inequality terms for the child nodes.
-
_getNode
protected ASTPtRootNode _getNode()
Return the node this adapter references.- Returns:
- The node referred to by this adapter
-
_getSubAdapters
protected java.util.List<OntologyAdapter> _getSubAdapters()
Return the list of sub-adapters. In this base class, return an empty list.- Overrides:
_getSubAdapters
in classLatticeOntologyAdapter
- Returns:
- The list of sub-adapters.
-
-