• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java XSDVocabulary类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了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;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java HttpRequestEntity类代码示例发布时间:2022-05-22
下一篇:
Java Frequency类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap