本文整理汇总了Java中org.coode.owlapi.manchesterowlsyntax.ManchesterOWLSyntaxEditorParser类的典型用法代码示例。如果您正苦于以下问题:Java ManchesterOWLSyntaxEditorParser类的具体用法?Java ManchesterOWLSyntaxEditorParser怎么用?Java ManchesterOWLSyntaxEditorParser使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ManchesterOWLSyntaxEditorParser类属于org.coode.owlapi.manchesterowlsyntax包,在下文中一共展示了ManchesterOWLSyntaxEditorParser类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: parseClassExpression
import org.coode.owlapi.manchesterowlsyntax.ManchesterOWLSyntaxEditorParser; //导入依赖的package包/类
/**
* Parses a class expression string to obtain a class expression.
*
* @param classExpressionString
* The class expression string
* @return The corresponding class expression if the class expression string
* is malformed or contains unknown entity names.
*/
public OWLClassExpression
parseClassExpression(String classExpressionString) {
OWLDataFactory dataFactory = rootOntology.getOWLOntologyManager()
.getOWLDataFactory();
// Set up the real parser
ManchesterOWLSyntaxEditorParser parser = new ManchesterOWLSyntaxEditorParser(
dataFactory, classExpressionString);
parser.setDefaultOntology(rootOntology);
// Specify an entity checker that wil be used to check a class
// expression contains the correct names.
OWLEntityChecker entityChecker = new ShortFormEntityChecker(
bidiShortFormProvider);
parser.setOWLEntityChecker(entityChecker);
// Do the actual parsing
return parser.parseClassExpression();
}
示例2: parseClassExpression
import org.coode.owlapi.manchesterowlsyntax.ManchesterOWLSyntaxEditorParser; //导入依赖的package包/类
/** Parses a class expression string to obtain a class expression.
*
* @param classExpressionString
* The class expression string
* @return The corresponding class expression */
public OWLClassExpression parseClassExpression(String classExpressionString) {
ManchesterOWLSyntaxEditorParser parser = createParser(classExpressionString);
OWLClassExpression classExpression = null;
// Do the actual parsing
try {
classExpression = parser.parseClassExpression();
} catch (ParserException e) {
throw new RuntimeException(e);
}
return classExpression;
}
示例3: createParser
import org.coode.owlapi.manchesterowlsyntax.ManchesterOWLSyntaxEditorParser; //导入依赖的package包/类
private ManchesterOWLSyntaxEditorParser createParser(String expressionString) {
OWLDataFactory dataFactory = rootOntology.getOWLOntologyManager()
.getOWLDataFactory();
// Set up the real parser
ManchesterOWLSyntaxEditorParser parser = new ManchesterOWLSyntaxEditorParser(
dataFactory, expressionString);
parser.setDefaultOntology(rootOntology);
// Specify an entity checker that will be used to check a class
// expression contains the correct names.
OWLEntityChecker entityChecker = new ShortFormEntityChecker(bidiShortFormProvider);
parser.setOWLEntityChecker(entityChecker);
return parser;
}
示例4: parseIndividualFrame
import org.coode.owlapi.manchesterowlsyntax.ManchesterOWLSyntaxEditorParser; //导入依赖的package包/类
public Set<OntologyAxiomPair> parseIndividualFrame(String string) {
ManchesterOWLSyntaxEditorParser parser = createParser(string);
try {
return parser.parseIndividualFrame();
} catch (ParserException e) {
throw new RuntimeException(e);
}
}
示例5: parseIndividual
import org.coode.owlapi.manchesterowlsyntax.ManchesterOWLSyntaxEditorParser; //导入依赖的package包/类
public OWLIndividual parseIndividual(String string) {
ManchesterOWLSyntaxEditorParser parser = createParser(string);
try {
return parser.parseIndividual();
} catch (ParserException e) {
throw new RuntimeException(e);
}
}
示例6: parseAxiom
import org.coode.owlapi.manchesterowlsyntax.ManchesterOWLSyntaxEditorParser; //导入依赖的package包/类
public OWLAxiom parseAxiom(String string) {
ManchesterOWLSyntaxEditorParser parser = createParser(string);
try {
return parser.parseAxiom();
} catch (ParserException e) {
throw new RuntimeException(e);
}
}
示例7: parseClassExpression
import org.coode.owlapi.manchesterowlsyntax.ManchesterOWLSyntaxEditorParser; //导入依赖的package包/类
/**
* Parses a class expression string to obtain a class expression.
*
* @param classExpressionString The class expression string
* @return The corresponding class expression
* @throws ParserException if the class expression string is malformed or contains
* unknown entity names.
*/
public OWLClassExpression parseClassExpression(String classExpressionString) throws ParserException {
OWLDataFactory dataFactory = rootOntology.getOWLOntologyManager().getOWLDataFactory();
// Set up the real co.schmitt.si.parser
ManchesterOWLSyntaxEditorParser parser = new ManchesterOWLSyntaxEditorParser(dataFactory, classExpressionString);
parser.setDefaultOntology(rootOntology);
// Specify an entity checker that wil be used to check a class
// expression contains the correct names.
OWLEntityChecker entityChecker = new ShortFormEntityChecker(bidiShortFormProvider);
parser.setOWLEntityChecker(entityChecker);
// Do the actual parsing
return parser.parseClassExpression();
}