本文整理汇总了Java中org.coode.owlapi.manchesterowlsyntax.ManchesterOWLSyntaxEditorParser.parseClassExpression方法的典型用法代码示例。如果您正苦于以下问题:Java ManchesterOWLSyntaxEditorParser.parseClassExpression方法的具体用法?Java ManchesterOWLSyntaxEditorParser.parseClassExpression怎么用?Java ManchesterOWLSyntaxEditorParser.parseClassExpression使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.coode.owlapi.manchesterowlsyntax.ManchesterOWLSyntaxEditorParser
的用法示例。
在下文中一共展示了ManchesterOWLSyntaxEditorParser.parseClassExpression方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: 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();
}