Class OntologySolver

    • Field Detail

      • _momlHandler

        protected OntologyMoMLHandler _momlHandler
        The handler that issues MoML requests and makes model changes.
      • _eol

        protected static final java.lang.String _eol
        The system-specific end-of-line character.
    • Constructor Detail

      • OntologySolver

        public OntologySolver​(NamedObj container,
                              java.lang.String name)
                       throws IllegalActionException,
        Construct an OntologySolver with the specified container and name. If this is the first OntologySolver created in the model, the shared utility object will also be created.
        container - The specified container.
        name - The specified name.
        IllegalActionException - If the PropertySolver is not of an acceptable attribute for the container.
        NameDuplicationException - If the name coincides with an attribute already in the container.
    • Method Detail

      • checkErrors

        public void checkErrors()
                         throws OntologyResolutionException
        Check whether there are any regression testing errors after resolving properties. If so, throw a new PropertyResolutionException with an error message that includes all the properties that does not match the regression test values.
        OntologyResolutionException - Thrown if there are any errors from running the OntologySolver in the regression test.
      • checkResolutionErrors

        public void checkResolutionErrors()
                                   throws IllegalActionException
        Check whether there are any OntologySolver resolution errors after resolving properties. If so, throw an IllegalActionException.
        IllegalActionException - If an exception is thrown by calling checkErrors()
      • configure

        public void configure​( base,
                              java.lang.String source,
                              java.lang.String text)
                       throws java.lang.Exception
        Construct and configure the contained model with the specified source and text. This parses the specified MoML text. Also set the container solver for the contained model to be the ontology solver.
        Specified by:
        configure in interface Configurable
        configure in class MoMLModelAttribute
        base - The base URL for relative references, or null if not known.
        source - The URI of a document providing source, which is ignored in this class.
        text - The MoML description.
        java.lang.Exception - If the parsing fails.
      • displayConcepts

        public void displayConcepts()
                             throws IllegalActionException
        If the value of the highlight parameter is set to true, highlight the given property-able object with the specified color associated with the given property, if there exists any. If the value of the showText parameter is true, show the given property value for the given property-able object. If the property is not null, this looks for the _showInfo parameter in the property-able object. Create a new _showInfo StringParameter if one does not already exist. Set its value to the given property value. If the given property is null, this removes the _showInfo parameter from the property-able object.
        IllegalActionException - Thrown if an error occurs when creating or setting the value for the _showInfo parameter in the property-able object. Thrown if an error occurs when creating or setting the value for the highlightColor attribute in the property-able object.
      • getMoMLHandler

        public OntologyMoMLHandler getMoMLHandler()
        Return the PropertyMoMLHandler for this OntologySolver.
        The PropertyMoMLHandler for the OntologySolver
      • invokeSolver

        public void invokeSolver​(boolean displayProperties)
                          throws IllegalActionException
        Invoke the solver directly, with a choice as to whether or not this solver should display its resolved concepts.
        displayProperties - True if the solver should display its properties; false otherwise (for example, if it is called from another solver)
        IllegalActionException - If there is no ontology.
      • isSettable

        public boolean isSettable​(java.lang.Object object)
        Return true if the specified property-able object is settable; otherwise false which means that its concept has been set by OntologyAdapter.setEquals().
        object - The specified property-able object.
        True if the specified property-able object is settable, otherwise false.
      • reset

        public void reset()
        Reset the solver. This removes the internal states of the solver (e.g. previously recorded properties, statistics, etc.). It also removes this solver from the list of ran solvers.
        reset in class OntologySolverBase