Class Parser

java.lang.Object
io.github.kodymoodley.owlapilite.Parser

public class Parser extends Object
Represents a Parser wrapper class for working with the Manchester OWL syntax.
Version:
1.0.1
Author:
Kody Moodley, https://kodymoodley.github.io
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected static org.semanticweb.owlapi.manchestersyntax.renderer.ManchesterOWLSyntaxOWLObjectRendererImpl
    a Manchester OWL Syntax renderer instance for rendering OWL entities in short form
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addVocab(org.semanticweb.owlapi.model.OWLEntity entity)
    Adds a new OWLEntity instance to the parser i.e., a new class, property or individual name to the parsers vocabulary so that the user can construct OWLAxiom instances using this vocabulary from strings
    org.semanticweb.owlapi.model.OWLAxiom
    createAxiom(String axiomStr)
    Returns an OWLAxiom constructed from a string representation of the axiom in Manchester OWL Syntax
    org.semanticweb.owlapi.model.OWLClassExpression
    createClassExpression(String classExpressionStr)
    Returns an OWLClassExpression constructed from a string representation of the expression in Manchester OWL Syntax
    static Parser
    Returns Parser instance.
    org.semanticweb.owlapi.util.mansyntax.ManchesterOWLSyntaxParser
    Gets the core Manchester OWL parser instance
    void
    Sets the working string for the parser

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • renderer

      protected static org.semanticweb.owlapi.manchestersyntax.renderer.ManchesterOWLSyntaxOWLObjectRendererImpl renderer
      a Manchester OWL Syntax renderer instance for rendering OWL entities in short form
  • Method Details

    • getInstance

      public static Parser getInstance()
      Returns Parser instance.
      Returns:
      A reference to a Parser instance
    • setString

      public void setString(String str)
      Sets the working string for the parser
      Parameters:
      str - A string for the parser to parse
    • getParser

      public org.semanticweb.owlapi.util.mansyntax.ManchesterOWLSyntaxParser getParser()
      Gets the core Manchester OWL parser instance
      Returns:
      a reference to a ManchesterOWLSyntaxParser instance
    • addVocab

      public void addVocab(org.semanticweb.owlapi.model.OWLEntity entity)
      Adds a new OWLEntity instance to the parser i.e., a new class, property or individual name to the parsers vocabulary so that the user can construct OWLAxiom instances using this vocabulary from strings
      Parameters:
      entity - A reference to an OWLEntity instance
    • createClassExpression

      public org.semanticweb.owlapi.model.OWLClassExpression createClassExpression(String classExpressionStr)
      Returns an OWLClassExpression constructed from a string representation of the expression in Manchester OWL Syntax
      Parameters:
      classExpressionStr - A string to parse into an OWLClassExpression object
      Returns:
      An OWLClassExpression object constructed from the input string
    • createAxiom

      public org.semanticweb.owlapi.model.OWLAxiom createAxiom(String axiomStr)
      Returns an OWLAxiom constructed from a string representation of the axiom in Manchester OWL Syntax
      Parameters:
      axiomStr - A string to parse into an OWLAxiom object
      Returns:
      An OWLAxiom object constructed from the input string