Package ptolemy.data.ontologies.lattice
Class CollectLatticeOntologySolverDetails
- java.lang.Object
-
- ptolemy.kernel.util.NamedObj
-
- ptolemy.kernel.util.Attribute
-
- ptolemy.data.ontologies.lattice.CollectLatticeOntologySolverDetails
-
- All Implemented Interfaces:
java.lang.Cloneable
,Testable
,Changeable
,Debuggable
,DebugListener
,Derivable
,ModelErrorHandler
,MoMLExportable
,Moveable
,Nameable
public class CollectLatticeOntologySolverDetails extends Attribute implements Testable
Model attribute that collects the details of the lattice ontology solver resolution on the constraints collected and produces string outputs. This attribute is meant mainly for testing the LatticeOntologySolver.- Since:
- Ptolemy II 10.0
- Version:
- $Id$
- Author:
- Charles Shelton, Beth Latronico
- Pt.AcceptedRating:
- Red (cshelton)
- Pt.ProposedRating:
- Red (cshelton)
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class ptolemy.kernel.util.NamedObj
NamedObj.ContainedObjectsIterator
-
-
Field Summary
Fields Modifier and Type Field Description StringParameter
solverName
Name of the LatticeOntologySolver to collect information from.StringAttribute
trainedInitialSolverConstraints
The string attribute holding the value of the initial solver constraints for the LatticeOntologySolver.StringAttribute
trainedResolvedSolverConstraints
The string attribute holding the value of the resolved solver constraints for the LatticeOntologySolver.StringAttribute
unacceptableTerms
The string attribute holding the list of terms that resolved to unacceptable concepts for the LatticeOntologySolver.-
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 CollectLatticeOntologySolverDetails(CompositeEntity container, java.lang.String name)
Construct the CollectLatticeOntologySolverDetails attribute with the given container and name.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
test()
Test whether the details received from the LatticeOntologySolver matches the stored values in the actor.void
train()
Collect the solver details from the LatticeOntologySolver and store the values received in the actor for future tests.-
Methods inherited from class ptolemy.kernel.util.Attribute
_checkContainer, _getContainedObject, _propagateExistence, clone, getContainer, moveDown, moveToFirst, moveToIndex, moveToLast, moveUp, setContainer, setName, updateContent
-
Methods inherited from class ptolemy.kernel.util.NamedObj
_addAttribute, _adjustOverride, _attachText, _cloneFixAttributeFields, _containedDecorators, _copyChangeRequestList, _debug, _debug, _debug, _debug, _debug, _description, _executeChangeRequests, _exportMoMLContents, _getIndentPrefix, _isMoMLSuppressed, _markContentsDerived, _notifyHierarchyListenersAfterChange, _notifyHierarchyListenersBeforeChange, _propagateValue, _removeAttribute, _splitName, _stripNumericSuffix, _validateSettables, addChangeListener, addDebugListener, addHierarchyListener, attributeChanged, attributeDeleted, attributeList, attributeList, attributeTypeChanged, clone, containedObjectsIterator, decorators, deepContains, depthInHierarchy, description, description, event, executeChangeRequests, exportMoML, exportMoML, exportMoML, exportMoML, exportMoML, exportMoMLPlain, getAttribute, getAttribute, getAttributes, getChangeListeners, getClassName, getDecoratorAttribute, getDecoratorAttributes, getDerivedLevel, getDerivedList, getDisplayName, getElementName, getFullName, getModelErrorHandler, getName, getName, getPrototypeList, getSource, handleModelError, isDeferringChangeRequests, isOverridden, isPersistent, lazyContainedObjectsIterator, message, notifyOfNameChange, propagateExistence, propagateValue, propagateValues, removeAttribute, removeChangeListener, removeDebugListener, removeHierarchyListener, requestChange, setClassName, setDeferringChangeRequests, setDerivedLevel, setDisplayName, setModelErrorHandler, setPersistent, setSource, sortContainedObjects, toplevel, toString, uniqueName, validateSettables, workspace
-
-
-
-
Field Detail
-
solverName
public StringParameter solverName
Name of the LatticeOntologySolver to collect information from. If this is does not refer to a solver existing in the model, an exception is thrown when the actor fires.
-
trainedInitialSolverConstraints
public StringAttribute trainedInitialSolverConstraints
The string attribute holding the value of the initial solver constraints for the LatticeOntologySolver.
-
trainedResolvedSolverConstraints
public StringAttribute trainedResolvedSolverConstraints
The string attribute holding the value of the resolved solver constraints for the LatticeOntologySolver.
-
unacceptableTerms
public StringAttribute unacceptableTerms
The string attribute holding the list of terms that resolved to unacceptable concepts for the LatticeOntologySolver. For information only; not checked in the test() method.
-
-
Constructor Detail
-
CollectLatticeOntologySolverDetails
public CollectLatticeOntologySolverDetails(CompositeEntity container, java.lang.String name) throws IllegalActionException, NameDuplicationException
Construct the CollectLatticeOntologySolverDetails attribute with the given container and name.- Parameters:
container
- The container.name
- The name of this attribute.- Throws:
IllegalActionException
- If the entity cannot be contained by the proposed container.NameDuplicationException
- If the container already has an actor with this name.
-
-
Method Detail
-
test
public void test() throws IllegalActionException
Test whether the details received from the LatticeOntologySolver matches the stored values in the actor.- Specified by:
test
in interfaceTestable
- Throws:
IllegalActionException
- If the test fails and the results are different.
-
train
public void train() throws IllegalActionException
Collect the solver details from the LatticeOntologySolver and store the values received in the actor for future tests.- Specified by:
train
in interfaceTestable
- Throws:
IllegalActionException
- If solverName does not refer to a solver in the model, or if the solver throws it when getting constraints.
-
-