本文整理汇总了Java中org.semanticweb.owlapi.model.OWLDataMinCardinality类的典型用法代码示例。如果您正苦于以下问题:Java OWLDataMinCardinality类的具体用法?Java OWLDataMinCardinality怎么用?Java OWLDataMinCardinality使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
OWLDataMinCardinality类属于org.semanticweb.owlapi.model包,在下文中一共展示了OWLDataMinCardinality类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: visit
import org.semanticweb.owlapi.model.OWLDataMinCardinality; //导入依赖的package包/类
@Override
public OWLClassExpression visit(OWLDataMinCardinality ce) {
boolean neg = negated;
int card = ce.getCardinality();
if (negated) {
card = ce.getCardinality() - 1;
if (card < 0) {
card = 0;
}
}
negated = false;
OWLDataRange filler = ce.getFiller().accept(this);
OWLClassExpression nnf = null;
if (neg) {
nnf = dataFactory.getOWLDataMaxCardinality(card, ce.getProperty(),
filler);
} else {
nnf = dataFactory.getOWLDataMinCardinality(card, ce.getProperty(),
filler);
}
negated = neg;
return nnf;
}
示例2: addToOntology
import org.semanticweb.owlapi.model.OWLDataMinCardinality; //导入依赖的package包/类
@Override
public void addToOntology() {
OWLDataProperty property = factory.getOWLDataProperty(":dataMinCardinality", pm);
OWLDatatype datatype = OWL2Datatype.XSD_BOOLEAN.getDatatype(factory);
addToGenericDomainAndNewRange(property, datatype);
OWLClass range = featurePool.getExclusiveClass(":DataMinCardinalityRange");
OWLDataMinCardinality cardinality = factory.getOWLDataMinCardinality(3, property);
addAxiomToOntology(factory.getOWLSubClassOfAxiom(range, cardinality));
}
示例3: addToOntology
import org.semanticweb.owlapi.model.OWLDataMinCardinality; //导入依赖的package包/类
@Override
public void addToOntology() {
OWLDataProperty property = factory.getOWLDataProperty(":dataMinQualifiedCardinality", pm);
OWLDatatype datatype = OWL2Datatype.XSD_FLOAT.getDatatype(factory);
addToGenericDomainAndNewRange(property, datatype);
OWLDatatype affectedDatatype = OWL2Datatype.XSD_DATE_TIME.getDatatype(factory);
OWLDataMinCardinality cardinality = factory.getOWLDataMinCardinality(9, property, affectedDatatype);
addAxiomToOntology(factory.getOWLSubClassOfAxiom(featurePool.getExclusiveClass(":DataMinQualifiedCardinalityRange"), cardinality));
}
示例4: visit
import org.semanticweb.owlapi.model.OWLDataMinCardinality; //导入依赖的package包/类
public void visit(OWLDataMinCardinality arg0) {
try {
final OWLDatatype dt = Utils.ensureDatatype(arg0.getFiller());
final OWLDataProperty dp = Utils.ensureDataProperty(arg0
.getProperty());
integrityConstraints.add(integrityConstraintFactory
.MinDataParticipationConstraint(subjClass, dp, dt,
arg0.getCardinality()));
} catch (UnsupportedICException e) {
notSupported(arg0);
}
}
示例5: visit
import org.semanticweb.owlapi.model.OWLDataMinCardinality; //导入依赖的package包/类
public OWLClassExpression visit(OWLDataMinCardinality object) {
OWLDataRange filler=object.getFiller();
OWLDataPropertyExpression prop=object.getProperty();
if (prop.isOWLTopDataProperty())
throwInvalidTopDPUseError(object);
if (isLiteral(filler))
return m_factory.getOWLDataMinCardinality(object.getCardinality(),prop,filler);
else {
OWLDatatype definition=getDefinitionFor(filler,m_alreadyExists);
if (!m_alreadyExists[0])
m_newDataRangeInclusions.add(new OWLDataRange[] { negative(definition),filler });
return m_factory.getOWLDataMinCardinality(object.getCardinality(),prop,definition);
}
}
示例6: visit
import org.semanticweb.owlapi.model.OWLDataMinCardinality; //导入依赖的package包/类
public OWLClassExpression visit(OWLDataMinCardinality d) {
if (d.getCardinality()==0)
return m_factory.getOWLNothing();
else {
OWLDataRange filler=getNNF(d.getFiller());
return m_factory.getOWLDataMaxCardinality(d.getCardinality()-1,d.getProperty(),filler);
}
}
示例7: visit
import org.semanticweb.owlapi.model.OWLDataMinCardinality; //导入依赖的package包/类
public void visit(OWLDataMinCardinality object) {
if (!object.getProperty().isOWLBottomDataProperty() || object.getCardinality()==0) {
AtomicRole atomicRole=getAtomicRole(object.getProperty());
LiteralDataRange literalRange=m_dataRangeConverter.convertDataRange(object.getFiller());
AtLeastDataRange atLeast=AtLeastDataRange.create(object.getCardinality(),atomicRole,literalRange);
if (!atLeast.isAlwaysFalse())
m_headAtoms.add(Atom.create(atLeast,X));
}
}
示例8: visit
import org.semanticweb.owlapi.model.OWLDataMinCardinality; //导入依赖的package包/类
@Override
public OWLDataMinCardinality visit(
ElkDataMinCardinalityQualified expression) {
return owlFactory_.getOWLDataMinCardinality(expression.getCardinality(),
convert(expression.getProperty()),
convert(expression.getFiller()));
}
示例9: convert
import org.semanticweb.owlapi.model.OWLDataMinCardinality; //导入依赖的package包/类
@SuppressWarnings("static-method")
public ElkDataMinCardinality convert(
OWLDataMinCardinality owlDataMinCardinality) {
if (owlDataMinCardinality.isQualified())
return new ElkDataMinCardinalityQualifiedWrap<OWLDataMinCardinality>(
owlDataMinCardinality);
// else
return new ElkDataMinCardinalityUnqualifiedWrap<OWLDataMinCardinality>(
owlDataMinCardinality);
}
示例10: visit
import org.semanticweb.owlapi.model.OWLDataMinCardinality; //导入依赖的package包/类
@Override
public void visit(OWLDataMinCardinality ce) {
hashCode = primes[37];
hashCode = hashCode * MULT + ce.getProperty().hashCode();
hashCode = hashCode * MULT + ce.getCardinality();
hashCode = hashCode * MULT + ce.getFiller().hashCode();
}
示例11: equals
import org.semanticweb.owlapi.model.OWLDataMinCardinality; //导入依赖的package包/类
@Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (!super.equals(obj)) {
return false;
}
return obj instanceof OWLDataMinCardinality;
}
示例12: visit
import org.semanticweb.owlapi.model.OWLDataMinCardinality; //导入依赖的package包/类
public void visit(OWLDataMinCardinality object) {
visitProperty(object.getProperty());
}
示例13: visit
import org.semanticweb.owlapi.model.OWLDataMinCardinality; //导入依赖的package包/类
public void visit(OWLDataMinCardinality object) {
m_hasDatatypes=true;
}
示例14: visit
import org.semanticweb.owlapi.model.OWLDataMinCardinality; //导入依赖的package包/类
@Override
public ElkDataMinCardinality visit(
OWLDataMinCardinality owlDataMinCardinality) {
return CONVERTER.convert(owlDataMinCardinality);
}
示例15: visit
import org.semanticweb.owlapi.model.OWLDataMinCardinality; //导入依赖的package包/类
@Override
public OWLDataMinCardinality visit(OWLDataMinCardinality ce) {
return null;
}