Class ManchesterSyntaxTool

java.lang.Object
org.obolibrary.macro.ManchesterSyntaxTool

public class ManchesterSyntaxTool extends Object
wrapper for parsing Manchester Syntax.
Author:
heiko
  • Constructor Details

    • ManchesterSyntaxTool

      public ManchesterSyntaxTool(OWLOntology inputOntology)
      Create a new parser instance for the given ontology. By default, this parser will also try to resolve OWLObject instances via their identifier or rdfs:label.
      Parameters:
      inputOntology - input ontology
    • ManchesterSyntaxTool

      public ManchesterSyntaxTool(OWLOntology inputOntology, @Nullable Collection<OWLOntology> auxiliaryOntologies)
      Create a new parser instance for the given ontologies. By default, this parser will also try to resolve OWLObject instances via their identifier or rdfs:label.
      Parameters:
      inputOntology - input ontology
      auxiliaryOntologies - set of additional ontologies or null
  • Method Details

    • parseManchesterExpressionFrames

      public Set<OntologyAxiomPair> parseManchesterExpressionFrames(String expression)
      Parse frame expressions in Manchester syntax.
      Parameters:
      expression - expression
      Returns:
      set of OntologyAxiomPair
      Throws:
      ParserException - parser exception
    • parseManchesterExpression

      public OWLClassExpression parseManchesterExpression(String expression)
      Parse a class expression in Manchester syntax.
      Parameters:
      expression - expression
      Returns:
      OWLClassExpression
      Throws:
      ParserException - parser exception
    • getId

      public String getId(IRI iri)
      Translate the IRI into the short form as expected by the parser.
      Parameters:
      iri - iri
      Returns:
      short form
    • getId

      public String getId(OWLEntity entity)
      Translate the OWLEntity identifier into the short form as expected by the parser.
      Parameters:
      entity - entity
      Returns:
      short form
    • dispose

      public void dispose()
      Call this method to dispose the internal data structures. This will remove also the listeners registered with the ontology manager.