Package ptolemy.data.ontologies
Class OntologySolverUtilities
- java.lang.Object
-
- ptolemy.data.ontologies.OntologySolverUtilities
-
public class OntologySolverUtilities extends java.lang.ObjectA class representing shared utilities for ontology solvers in the ontologies package.- Since:
- Ptolemy II 10.0
- Version:
- $Id$
- Author:
- Man-Kit Leung
- Pt.AcceptedRating:
- Red (cshelton)
- Pt.ProposedRating:
- Red (cshelton)
-
-
Constructor Summary
Constructors Constructor Description OntologySolverUtilities()Construct a new SharedUtilities object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddErrors(java.lang.String error)Record the given error message.java.util.Map<ASTPtRootNode,Attribute>getAttributes()Return the map that maps root ast node (keys) to the corresponding attribute (values).java.util.List<java.lang.String>getErrors()Return the list of error strings.java.util.Map<Attribute,ASTPtRootNode>getParseTrees()Return the map that maps attributes (keys) to their root ast nodes (values).protected voidputAttribute(ASTPtRootNode node, Attribute attribute)Record the association between the given ast node and the given attribute.java.util.List<java.lang.String>removeErrors()Clear and return the previously recorded errors.voidresetAll()Clear the states of this shared object.java.lang.StringtoString()Return the representation for the SharedUtilities object.
-
-
-
Method Detail
-
addErrors
public void addErrors(java.lang.String error)
Record the given error message.- Parameters:
error- The error message to record.
-
getAttributes
public java.util.Map<ASTPtRootNode,Attribute> getAttributes()
Return the map that maps root ast node (keys) to the corresponding attribute (values).- Returns:
- The mappings for root ast nodes to attributes.
-
getErrors
public java.util.List<java.lang.String> getErrors()
Return the list of error strings.- Returns:
- The list of error strings.
-
getParseTrees
public java.util.Map<Attribute,ASTPtRootNode> getParseTrees()
Return the map that maps attributes (keys) to their root ast nodes (values).- Returns:
- The mappings for attributes to their root ast nodes.
-
removeErrors
public java.util.List<java.lang.String> removeErrors()
Clear and return the previously recorded errors.- Returns:
- The list of previously recorded errors.
-
resetAll
public void resetAll()
Clear the states of this shared object. The states include all previously recorded information.
-
toString
public java.lang.String toString()
Return the representation for the SharedUtilities object.- Overrides:
toStringin classjava.lang.Object- Returns:
- The string representation of the SharedUtilities object
-
putAttribute
protected void putAttribute(ASTPtRootNode node, Attribute attribute)
Record the association between the given ast node and the given attribute.- Parameters:
node- The given ast node.attribute- The given attribute.
-
-