当前位置: 首页>>代码示例>>Java>>正文


Java OWLDataIntersectionOf类代码示例

本文整理汇总了Java中org.semanticweb.owlapi.model.OWLDataIntersectionOf的典型用法代码示例。如果您正苦于以下问题:Java OWLDataIntersectionOf类的具体用法?Java OWLDataIntersectionOf怎么用?Java OWLDataIntersectionOf使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


OWLDataIntersectionOf类属于org.semanticweb.owlapi.model包,在下文中一共展示了OWLDataIntersectionOf类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: visit

import org.semanticweb.owlapi.model.OWLDataIntersectionOf; //导入依赖的package包/类
public void visit(SWRLDataRangeAtom at) {
    OWLDataRange dr=at.getPredicate();
    SWRLDArgument argument=at.getArgument();
    if (!(argument instanceof SWRLVariable))
        throw new IllegalArgumentException("A SWRL rule contains a data range with an argument that is not a literal, and such rules are not supported.");
    if (!m_isPositive)
        dr=m_factory.getOWLDataComplementOf(dr);
    dr=m_expressionManager.getNNF(m_expressionManager.getSimplified(dr));
    if (dr instanceof OWLDataIntersectionOf || dr instanceof OWLDataUnionOf) {
        OWLDatatype definition=getDefinitionFor(dr,m_alreadyExists);
        if (!m_alreadyExists[0])
            m_dataRangeInclusions.add(new OWLDataRange[] { negative(definition),dr });
        dr=definition;
    }
    SWRLAtom atom=m_factory.getSWRLDataRangeAtom(dr,argument);
    m_normalizedHeadAtoms.add(atom);
    m_headDataRangeVariables.add((SWRLVariable)argument);
}
 
开发者ID:robertoyus,项目名称:HermiT-android,代码行数:19,代码来源:OWLNormalization.java

示例2: visit

import org.semanticweb.owlapi.model.OWLDataIntersectionOf; //导入依赖的package包/类
public Boolean visit(OWLDatatypeDefinitionAxiom axiom) {
    reasoner.throwInconsistentOntologyExceptionIfNecessary();
    if (!reasoner.isConsistent())
        return true;
    if (reasoner.m_dlOntology.hasDatatypes()) {
        OWLDataFactory factory=reasoner.getDataFactory();
        OWLIndividual freshIndividual=factory.getOWLAnonymousIndividual("fresh-individual");
        OWLDataProperty freshDataProperty=factory.getOWLDataProperty(IRI.create("fresh-data-property"));
        OWLDataRange dataRange=axiom.getDataRange();
        OWLDatatype dt=axiom.getDatatype();
        OWLDataIntersectionOf dr1=factory.getOWLDataIntersectionOf(factory.getOWLDataComplementOf(dataRange),dt);
        OWLDataIntersectionOf dr2=factory.getOWLDataIntersectionOf(factory.getOWLDataComplementOf(dt),dataRange);
        OWLDataUnionOf union=factory.getOWLDataUnionOf(dr1,dr2);
        OWLClassExpression c=factory.getOWLDataSomeValuesFrom(freshDataProperty,union);
        OWLClassAssertionAxiom ax=factory.getOWLClassAssertionAxiom(c,freshIndividual);
        Tableau tableau=reasoner.getTableau(ax);
        return !tableau.isSatisfiable(true,true,null,null,null,null,null,ReasoningTaskDescription.isAxiomEntailed(axiom));
    }
    else
        return false;
}
 
开发者ID:robertoyus,项目名称:HermiT-android,代码行数:22,代码来源:EntailmentChecker.java

示例3: addToOntology

import org.semanticweb.owlapi.model.OWLDataIntersectionOf; //导入依赖的package包/类
@Override
public void addToOntology() {
  OWLDatatype d1 = factory.getOWLDatatype(":DatatypeIntersectionOf_Datatype1", pm);
  OWLDatatype d2 = factory.getOWLDatatype(":DatatypeIntersectionOf_Datatype2", pm);
  OWLDataIntersectionOf intersection = factory.getOWLDataIntersectionOf(d1, d2);

  OWLDataProperty property = factory.getOWLDataProperty(":datatypeIntersectionOfProperty", pm);
  addToGenericDomainAndNewRange(property, intersection);
}
 
开发者ID:VisualDataWeb,项目名称:OntoBench,代码行数:10,代码来源:OwlDataIntersectionOfFeature.java

示例4: addToOntology

import org.semanticweb.owlapi.model.OWLDataIntersectionOf; //导入依赖的package包/类
@Override
public void addToOntology() {
  OWLDatatype d1 = OWL2Datatype.XSD_STRING.getDatatype(factory);
  OWLDatatype d2 = OWL2Datatype.XSD_DATE_TIME.getDatatype(factory);
  OWLDataIntersectionOf intersection = factory.getOWLDataIntersectionOf(d1, d2);

  OWLDataProperty property = factory.getOWLDataProperty(":datatypeIntersectionOfProperty_OWL2", pm);
  addToGenericDomainAndNewRange(property, intersection);
}
 
开发者ID:VisualDataWeb,项目名称:OntoBench,代码行数:10,代码来源:OwlDataIntersectionOfOwl2Feature.java

示例5: visit

import org.semanticweb.owlapi.model.OWLDataIntersectionOf; //导入依赖的package包/类
public OWLDataRange visit(OWLDataIntersectionOf range) {
    Set<OWLDataRange> newConjuncts=new HashSet<OWLDataRange>();
    for (OWLDataRange dr : range.getOperands()) {
        OWLDataRange drSimplified=getSimplified(dr);
        if (drSimplified.isTopDatatype())
            continue;
        else if (drSimplified instanceof OWLDataIntersectionOf)
            newConjuncts.addAll(((OWLDataIntersectionOf)drSimplified).getOperands());
        else
            newConjuncts.add(drSimplified);
    }
    return m_factory.getOWLDataIntersectionOf(newConjuncts);
}
 
开发者ID:robertoyus,项目名称:HermiT-android,代码行数:14,代码来源:ExpressionManager.java

示例6: visit

import org.semanticweb.owlapi.model.OWLDataIntersectionOf; //导入依赖的package包/类
@Override
public OWLDataRange visit(OWLDataIntersectionOf node) {
    Set<OWLDataRange> ops = new HashSet<>();
    for (OWLDataRange op : node.getOperands()) {
        ops.add(op.accept(this));
    }
    if (negated) {
        return dataFactory.getOWLDataUnionOf(ops);
    } else {
        return dataFactory.getOWLDataIntersectionOf(ops);
    }
}
 
开发者ID:matthewhorridge,项目名称:owlapi-gwt,代码行数:13,代码来源:NNF.java

示例7: equals

import org.semanticweb.owlapi.model.OWLDataIntersectionOf; //导入依赖的package包/类
@Override
public boolean equals(Object obj) {
    if (obj == this) {
        return true;
    }
    if (!(obj instanceof OWLDataIntersectionOf)) {
        return false;
    }
    OWLDataIntersectionOf other = (OWLDataIntersectionOf) obj;
    return getOperands().equals(other.getOperands());
}
 
开发者ID:matthewhorridge,项目名称:owlapi-gwt,代码行数:12,代码来源:OWLDataIntersectionOfImpl.java

示例8: visit

import org.semanticweb.owlapi.model.OWLDataIntersectionOf; //导入依赖的package包/类
public void visit(OWLDataIntersectionOf dr) {
    throw new IllegalStateException("Internal error: invalid normal form.");
}
 
开发者ID:robertoyus,项目名称:HermiT-android,代码行数:4,代码来源:OWLClausification.java

示例9: visit

import org.semanticweb.owlapi.model.OWLDataIntersectionOf; //导入依赖的package包/类
@Override
public OWLDataIntersectionOf visit(ElkDataIntersectionOf expression) {
	return owlFactory_.getOWLDataIntersectionOf(
			toDataRangeSet(expression.getDataRanges()));
}
 
开发者ID:liveontologies,项目名称:elk-reasoner,代码行数:6,代码来源:AbstractElkObjectConverter.java

示例10: convert

import org.semanticweb.owlapi.model.OWLDataIntersectionOf; //导入依赖的package包/类
@SuppressWarnings("static-method")
public ElkDataIntersectionOf convert(
		OWLDataIntersectionOf owlDataIntersectionOf) {
	return new ElkDataIntersectionOfWrap<OWLDataIntersectionOf>(
			owlDataIntersectionOf);
}
 
开发者ID:liveontologies,项目名称:elk-reasoner,代码行数:7,代码来源:OwlConverter.java

示例11: visit

import org.semanticweb.owlapi.model.OWLDataIntersectionOf; //导入依赖的package包/类
@Override
public ElkDataIntersectionOf visit(
		OWLDataIntersectionOf owlDataIntersectionOf) {
	return CONVERTER.convert(owlDataIntersectionOf);
}
 
开发者ID:liveontologies,项目名称:elk-reasoner,代码行数:6,代码来源:OwlDataRangeConverterVisitor.java

示例12: visit

import org.semanticweb.owlapi.model.OWLDataIntersectionOf; //导入依赖的package包/类
@Override
public O visit(OWLDataIntersectionOf node) {
    return doDefault(node);
}
 
开发者ID:matthewhorridge,项目名称:owlapi-gwt,代码行数:5,代码来源:OWLDataVisitorExAdapter.java

示例13: visit

import org.semanticweb.owlapi.model.OWLDataIntersectionOf; //导入依赖的package包/类
@Override
public void visit(OWLDataIntersectionOf node) {
    handleDefault(node);
}
 
开发者ID:matthewhorridge,项目名称:owlapi-gwt,代码行数:5,代码来源:OWLObjectVisitorAdapter.java

示例14: visit

import org.semanticweb.owlapi.model.OWLDataIntersectionOf; //导入依赖的package包/类
@Override
public void visit(OWLDataIntersectionOf node) {
    type = DATA_TYPE_INDEX_BASE + 4;
}
 
开发者ID:matthewhorridge,项目名称:owlapi-gwt,代码行数:5,代码来源:OWLObjectTypeIndexProvider.java

示例15: visit

import org.semanticweb.owlapi.model.OWLDataIntersectionOf; //导入依赖的package包/类
@Override
public void visit(OWLDataIntersectionOf node) {
    hashCode = primes[76];
    hashCode = hashCode * MULT + node.getOperands().hashCode();
}
 
开发者ID:matthewhorridge,项目名称:owlapi-gwt,代码行数:6,代码来源:HashCode.java


注:本文中的org.semanticweb.owlapi.model.OWLDataIntersectionOf类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。