Class Ontology

    • Field Detail

      • _graphVersion

        protected long _graphVersion
        The workspace version at which the cached graph was valid.
    • Method Detail

      • getConceptByString

        public Concept getConceptByString​(java.lang.String conceptString)
                                   throws IllegalActionException
        Return the concept in the ontology represented by the given string, or null if no such concept exists.
        Parameters:
        conceptString - The string of the concept to look for, which would be what is returned by the concept's toString() method. This is not necessarily the Ptolemy NamedObj name of the concept. For example, InfiniteConcepts have automatically generated unique names that are not the same as what is returned by their toString() method.
        Returns:
        The concept that is represented by the given string, or null if no such concept exists.
        Throws:
        IllegalActionException - Thrown if there is an error getting the concept.
      • getConceptGraph

        public ConceptGraph getConceptGraph()
        Return the graph represented by this ontology. Graph is weighted by Concepts on the nodes and ConceptRelations on the edges. Currently we only have ontologies that are lattices, but in general, an ontology can represent more general relationships that might have a graph structure that is not a lattice. So we provide the getGraph() method in the base class for any future ontology subclasses that are not lattices.
        Returns:
        The concept graph.
      • getUnacceptableConcepts

        public java.util.Set<FiniteConcept> getUnacceptableConcepts()
        Return a set of finite concepts which are unacceptable solutions in all situations. Here these concepts are undesirable for any user of this ontology, for example, "Top" may indicate a conflict for all models using this ontology. Ontologies may not contain duplicate concepts, so the collection of unacceptable finite concepts is always a set.
        Returns:
        The set of unacceptable finite concepts in this ontology.
      • isLattice

        public boolean isLattice()
        Return true if the ontology graph is a lattice, false otherwise.
        Returns:
        True if the graph is a lattice, false otherwise.
      • _buildConceptGraph

        protected ConceptGraph _buildConceptGraph()
        Return the graph represented by this ontology. Graph is weighted by FiniteConcepts on the nodes and ConceptRelations on the edges.
        Returns:
        The concept graph.