本文整理汇总了Java中org.semanticweb.owlapi.vocab.XSDVocabulary类的典型用法代码示例。如果您正苦于以下问题:Java XSDVocabulary类的具体用法?Java XSDVocabulary怎么用?Java XSDVocabulary使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
XSDVocabulary类属于org.semanticweb.owlapi.vocab包,在下文中一共展示了XSDVocabulary类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: transformGeneratesDPParticipationConstraintWithCorrectDatatypeIri
import org.semanticweb.owlapi.vocab.XSDVocabulary; //导入依赖的package包/类
@Test
public void transformGeneratesDPParticipationConstraintWithCorrectDatatypeIri() throws Exception {
final File targetDir = getTempDirectory();
assertEquals(0, targetDir.listFiles().length);
transformer.setOntology(IC_ONTOLOGY_IRI, mappingFilePath, true);
transformer.transform(CONTEXT, PACKAGE, targetDir.getAbsolutePath(), true);
final List<String> generatedClass = getGeneratedClass(targetDir, "Answer");
String fieldDeclaration = getFieldDeclaration(generatedClass, "hasValue");
assertTrue(fieldDeclaration.contains(
"@ParticipationConstraint(owlObjectIRI = \"" + XSDVocabulary.STRING.getIRI().toString() + "\""));
}
开发者ID:kbss-cvut,项目名称:jopa,代码行数:13,代码来源:OWL2JavaTransformerTest.java
示例2: LiteralTranslator
import org.semanticweb.owlapi.vocab.XSDVocabulary; //导入依赖的package包/类
public LiteralTranslator(OWLDataFactory dataFactory) {
this.dataFactory = dataFactory;
STRING_DATATYPE = dataFactory.getOWLDatatype(XSDVocabulary.STRING.getIRI());
}
开发者ID:protegeproject,项目名称:sparql-dl-api,代码行数:5,代码来源:LiteralTranslator.java
示例3: testSucceedOnDatatype
import org.semanticweb.owlapi.vocab.XSDVocabulary; //导入依赖的package包/类
@Test
public void testSucceedOnDatatype() throws Exception {
Utils.ensureDatatype(f.getOWLDatatype(XSDVocabulary.STRING.getIRI()));
}
开发者ID:kbss-cvut,项目名称:jopa,代码行数:5,代码来源:UtilsTest.java
示例4: getPatchAxioms
import org.semanticweb.owlapi.vocab.XSDVocabulary; //导入依赖的package包/类
/**
* <!-- getPatchAxioms -->
*
* Add patch class axioms
*
* @param logicalIRI Logical IRI of the ontology
* @param factory OWLDataFactory to build axioms
* @param program NetLogo program
* @param generator Entity IRI generator
* @return Set of axioms about patches' variables
* @throws ExtensionException
*/
public static Set<OWLAxiom> getPatchAxioms(IRI logicalIRI, OWLDataFactory factory, Program program,
NetLogoEntityIRIGenerator generator, Options options) throws ExtensionException {
Set<OWLAxiom> axioms = new HashSet<OWLAxiom>();
if(!options.hasOption(Options.NO_PATCHES_OPTION)) {
if(program.patchesOwn().size() > State.NETLOGO_PATCH_OWN_ARRAY_START) {
ArrayList<String> arr =
new ArrayList<String>(program.patchesOwn().size() - State.NETLOGO_PATCH_OWN_ARRAY_START);
for(String var: program.patchesOwn()) {
if(var.equalsIgnoreCase(NETLOGO_PXCOR_VAR) || var.equalsIgnoreCase(NETLOGO_PYCOR_VAR)
|| var.equalsIgnoreCase(NETLOGO_PCOLOR_VAR) || var.equalsIgnoreCase(NETLOGO_PLABEL_VAR)
|| var.equalsIgnoreCase(NETLOGO_PLABEL_COLOR_VAR)) {
continue;
}
arr.add(var);
}
addClassAndProperties(axioms, logicalIRI, factory, PATCH_CLASS, arr, generator);
}
// Add netlogo axioms for patches and spatial location. We can't give X
// and Y a domain because they will be used for patches and (visible)
// turtles, and we don't know in advance which breeds of turtles will
// always be visible.
axioms.add(factory.getOWLDataPropertyRangeAxiom(
factory.getOWLDataProperty(generator.getEntityIRI(X_PROPERTY, false)),
factory.getOWLDatatype(XSDVocabulary.DOUBLE.getIRI())));
axioms.add(factory.getOWLDataPropertyRangeAxiom(
factory.getOWLDataProperty(generator.getEntityIRI(Y_PROPERTY, false)),
factory.getOWLDatatype(XSDVocabulary.DOUBLE.getIRI())));
if(generator.hasDomainSpecified(LOCATION_PROPERTY)) {
addLinkProperty(axioms, logicalIRI, factory, LOCATION_PROPERTY, generator.getDomain(LOCATION_PROPERTY), PATCH_CLASS, true, false, generator);
}
else {
addLinkProperty(axioms, logicalIRI, factory, LOCATION_PROPERTY, null, PATCH_CLASS, true, false, generator);
}
}
return axioms;
}
开发者ID:garypolhill,项目名称:netlogo-owl,代码行数:57,代码来源:Structure.java
注:本文中的org.semanticweb.owlapi.vocab.XSDVocabulary类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论