Class Parser
java.lang.Object
io.github.kodymoodley.owlapilite.Parser
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
FieldsModifier and TypeFieldDescriptionprotected static org.semanticweb.owlapi.manchestersyntax.renderer.ManchesterOWLSyntaxOWLObjectRendererImpla Manchester OWL Syntax renderer instance for rendering OWL entities in short form -
Method Summary
Modifier and TypeMethodDescriptionvoidaddVocab(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 stringsorg.semanticweb.owlapi.model.OWLAxiomcreateAxiom(String axiomStr) Returns an OWLAxiom constructed from a string representation of the axiom in Manchester OWL Syntaxorg.semanticweb.owlapi.model.OWLClassExpressioncreateClassExpression(String classExpressionStr) Returns an OWLClassExpression constructed from a string representation of the expression in Manchester OWL Syntaxstatic ParserReturns Parser instance.org.semanticweb.owlapi.util.mansyntax.ManchesterOWLSyntaxParserGets the core Manchester OWL parser instancevoidSets the working string for the parser
-
Field Details
-
renderer
protected static org.semanticweb.owlapi.manchestersyntax.renderer.ManchesterOWLSyntaxOWLObjectRendererImpl renderera Manchester OWL Syntax renderer instance for rendering OWL entities in short form
-
-
Method Details
-
getInstance
Returns Parser instance.- Returns:
- A reference to a Parser instance
-
setString
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
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
-