Package ptolemy.data.ontologies.lattice
Class LatticeOntologyCompositeAdapter
- java.lang.Object
-
- ptolemy.data.ontologies.OntologyAdapter
-
- ptolemy.data.ontologies.lattice.LatticeOntologyAdapter
-
- ptolemy.data.ontologies.lattice.LatticeOntologyCompositeAdapter
-
- Direct Known Subclasses:
LatticeOntologyModalFSMAdapter
,ProductLatticeOntologyCompositeAdapter
public class LatticeOntologyCompositeAdapter extends LatticeOntologyAdapter
Code generator adapter for composite actor.- Since:
- Ptolemy II 10.0
- Version:
- $Id$
- Author:
- Man-Kit Leung, Thomas Mandl
- 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 LatticeOntologyCompositeAdapter(LatticeOntologySolver solver, CompositeEntity component)
Construct the property constraint adapter associated with the given TypedCompositeActor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
_addDefaultConstraints(LatticeOntologySolver.ConstraintType actorConstraintType)
Add default constraints for the composite actor referred to by this LatticeOntologyCompositeAdapter based on the given ConstraintType.protected void
_addInterConnectionConstraints()
Add all the constraints between actors inside the composite actor referenced by this adapter.protected java.util.List<OntologyAdapter>
_getSubAdapters()
Return the list of sub-adapters.java.util.List<Inequality>
constraintList()
Return all constraints of this component.-
Methods inherited from class ptolemy.data.ontologies.lattice.LatticeOntologyAdapter
_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, getPropertyables, putAttribute, setComponent, setEquals, toString
-
-
-
-
Constructor Detail
-
LatticeOntologyCompositeAdapter
public LatticeOntologyCompositeAdapter(LatticeOntologySolver solver, CompositeEntity component) throws IllegalActionException
Construct the property constraint adapter associated with the given TypedCompositeActor.- Parameters:
solver
- The lattice ontology solver used for this adapter.component
- The associated component.- Throws:
IllegalActionException
- If the adapter cannot be initialized.
-
-
Method Detail
-
_addDefaultConstraints
protected void _addDefaultConstraints(LatticeOntologySolver.ConstraintType actorConstraintType) throws IllegalActionException
Add default constraints for the composite actor referred to by this LatticeOntologyCompositeAdapter based on the given ConstraintType. This method iteratively adds all the default constraints for all model components contained by the composite component referred to by this adapter.- Overrides:
_addDefaultConstraints
in classLatticeOntologyAdapter
- Parameters:
actorConstraintType
- The given ConstraintType for the default constraints for the composite actor referred to by this LatticeOntologyCompositeAdapter- Throws:
IllegalActionException
- If an exception is thrown- See Also:
LatticeOntologySolver.ConstraintType
-
_getSubAdapters
protected java.util.List<OntologyAdapter> _getSubAdapters() throws IllegalActionException
Return the list of sub-adapters. In this base class, it returns the list of ASTNode adapters and the adapters for the contained entities.- Overrides:
_getSubAdapters
in classLatticeOntologyAdapter
- Returns:
- The list of sub-adapters.
- Throws:
IllegalActionException
- Thrown if there is an error getting the adapter for any contained entities.
-
constraintList
public java.util.List<Inequality> constraintList() throws IllegalActionException
Return all constraints of this component. The constraints is a list of inequalities.- Overrides:
constraintList
in classLatticeOntologyAdapter
- Returns:
- A list of Inequalities.
- Throws:
IllegalActionException
- Thrown if _addInterConnectionConstraints() has an error or if the superclass call to constraintList() has an error.
-
_addInterConnectionConstraints
protected void _addInterConnectionConstraints() throws IllegalActionException
Add all the constraints between actors inside the composite actor referenced by this adapter.- Throws:
IllegalActionException
- Thrown if getAdapter() has an error when it is called.
-
-