本文整理汇总了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);
}
示例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;
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
}
示例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());
}
示例8: visit
import org.semanticweb.owlapi.model.OWLDataIntersectionOf; //导入依赖的package包/类
public void visit(OWLDataIntersectionOf dr) {
throw new IllegalStateException("Internal error: invalid normal form.");
}
示例9: visit
import org.semanticweb.owlapi.model.OWLDataIntersectionOf; //导入依赖的package包/类
@Override
public OWLDataIntersectionOf visit(ElkDataIntersectionOf expression) {
return owlFactory_.getOWLDataIntersectionOf(
toDataRangeSet(expression.getDataRanges()));
}
示例10: convert
import org.semanticweb.owlapi.model.OWLDataIntersectionOf; //导入依赖的package包/类
@SuppressWarnings("static-method")
public ElkDataIntersectionOf convert(
OWLDataIntersectionOf owlDataIntersectionOf) {
return new ElkDataIntersectionOfWrap<OWLDataIntersectionOf>(
owlDataIntersectionOf);
}
示例11: visit
import org.semanticweb.owlapi.model.OWLDataIntersectionOf; //导入依赖的package包/类
@Override
public ElkDataIntersectionOf visit(
OWLDataIntersectionOf owlDataIntersectionOf) {
return CONVERTER.convert(owlDataIntersectionOf);
}
示例12: visit
import org.semanticweb.owlapi.model.OWLDataIntersectionOf; //导入依赖的package包/类
@Override
public O visit(OWLDataIntersectionOf node) {
return doDefault(node);
}
示例13: visit
import org.semanticweb.owlapi.model.OWLDataIntersectionOf; //导入依赖的package包/类
@Override
public void visit(OWLDataIntersectionOf node) {
handleDefault(node);
}
示例14: visit
import org.semanticweb.owlapi.model.OWLDataIntersectionOf; //导入依赖的package包/类
@Override
public void visit(OWLDataIntersectionOf node) {
type = DATA_TYPE_INDEX_BASE + 4;
}
示例15: visit
import org.semanticweb.owlapi.model.OWLDataIntersectionOf; //导入依赖的package包/类
@Override
public void visit(OWLDataIntersectionOf node) {
hashCode = primes[76];
hashCode = hashCode * MULT + node.getOperands().hashCode();
}