openllet.owlapi.OWL.Datatype()方法的使用及代码示例

x33g5p2x  于2022-01-26 转载在 其他  
字(3.3k)|赞(0)|评价(0)|浏览(96)

本文整理了Java中openllet.owlapi.OWL.Datatype()方法的一些代码示例,展示了OWL.Datatype()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。OWL.Datatype()方法的具体详情如下:
包路径:openllet.owlapi.OWL
类名称:OWL
方法名:Datatype

OWL.Datatype介绍

暂无

代码示例

代码示例来源:origin: Galigator/openllet

private static OWLEntity createEntity(final String type, final String entityIRI)
{
  if (CLASS_KEYWORD.equals(type))
    return OWL.Class(entityIRI);
  else
    if (DATA_TYPE_KEYWORD.equals(type))
      return OWL.Datatype(entityIRI);
    else
      if (INDIVIDUAL_KEYWORD.equals(type))
        return OWL.Individual(entityIRI);
      else
        if (DATA_PROPERTY_KEYWORD.equals(type))
          return OWL.DataProperty(entityIRI);
        else
          if (OBJECT_PROPERTY_KEYWORD.equals(type))
            return OWL.ObjectProperty(entityIRI);
  throw new IllegalArgumentException("Unrecognized type of OWLEntity in module " + type);
}

代码示例来源:origin: Galigator/openllet

private static OWLEntity createEntity(final String type, final String entityIRI)
{
  if (CLASS_KEYWORD.equals(type))
    return OWL.Class(entityIRI);
  else
    if (DATA_TYPE_KEYWORD.equals(type))
      return OWL.Datatype(entityIRI);
    else
      if (INDIVIDUAL_KEYWORD.equals(type))
        return OWL.Individual(entityIRI);
      else
        if (DATA_PROPERTY_KEYWORD.equals(type))
          return OWL.DataProperty(entityIRI);
        else
          if (OBJECT_PROPERTY_KEYWORD.equals(type))
            return OWL.ObjectProperty(entityIRI);
  throw new IllegalArgumentException("Unrecognized type of OWLEntity in module " + type);
}

代码示例来源:origin: Galigator/openllet

@Test
public void datatypeDefinition()
{
  final OWLDatatype between5and10 = OWL.Datatype("between5and10");
  final OWLDatatype between6and8 = OWL.Datatype("between6and8");
  createReasoner(OWL.datatypeDefinition(between5and10, OWL.restrict(XSD.INTEGER, OWL.minInclusive(5), OWL.maxInclusive(10))), OWL.datatypeDefinition(between6and8, OWL.restrict(XSD.INTEGER, OWL.minInclusive(6), OWL.maxInclusive(8))), OWL.equivalentClasses(_A, OWL.some(_dp, between5and10)), OWL.equivalentClasses(_B, OWL.some(_dp, between6and8)), OWL.propertyAssertion(_a, _dp, OWL.constant(9)), OWL.propertyAssertion(_b, _dp, OWL.constant(7)));
  assertTrue(_reasoner.isEntailed(OWL.subClassOf(_B, _A)));
  assertTrue(_reasoner.isEntailed(OWL.classAssertion(_a, _A)));
  assertFalse(_reasoner.isEntailed(OWL.classAssertion(_a, _B)));
  assertTrue(_reasoner.isEntailed(OWL.classAssertion(_b, _A)));
  assertTrue(_reasoner.isEntailed(OWL.classAssertion(_b, _B)));
}

代码示例来源:origin: Galigator/openllet

@Before
public void createEntities()
{
  _A = OWL.Class(ontologyURI + "A");
  _B = OWL.Class(ontologyURI + "B");
  _C = OWL.Class(ontologyURI + "C");
  _D = OWL.Class(ontologyURI + "D");
  _E = OWL.Class(ontologyURI + "E");
  _F = OWL.Class(ontologyURI + "F");
  _p = OWL.ObjectProperty(ontologyURI + "p");
  _q = OWL.ObjectProperty(ontologyURI + "q");
  _r = OWL.ObjectProperty(ontologyURI + "r");
  dp = OWL.DataProperty(ontologyURI + "dp");
  dq = OWL.DataProperty(ontologyURI + "dq");
  dr = OWL.DataProperty(ontologyURI + "dr");
  _a = OWL.Individual(ontologyURI + "a");
  _b = OWL.Individual(ontologyURI + "b");
  _c = OWL.Individual(ontologyURI + "c");
  _d = OWL.Individual(ontologyURI + "d");
  _dt = OWL.Datatype(ontologyURI + "dt");
  _anon1 = OWL.AnonymousIndividual("anon1");
  _x = SWRL.variable(ontologyURI + "x");
  _y = SWRL.variable(ontologyURI + "y");
  _dx = SWRL.variable(ontologyURI + "dx");
}

相关文章