本文整理汇总了Java中org.semanticweb.owlapi.model.OWLDataHasValue类的典型用法代码示例。如果您正苦于以下问题:Java OWLDataHasValue类的具体用法?Java OWLDataHasValue怎么用?Java OWLDataHasValue使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
OWLDataHasValue类属于org.semanticweb.owlapi.model包,在下文中一共展示了OWLDataHasValue类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: addToOntology
import org.semanticweb.owlapi.model.OWLDataHasValue; //导入依赖的package包/类
@Override
public void addToOntology() {
OWLDataProperty property = factory.getOWLDataProperty(":dataHasValueProperty", pm);
OWLDataHasValue restriction = factory.getOWLDataHasValue(property, factory.getOWLLiteral(6));
addToGenericDomainAndNewRange(property, OWL2Datatype.XSD_NON_NEGATIVE_INTEGER.getDatatype(factory));
OWLClass hasValue = featurePool.getExclusiveClass(":DataHasValue");
addAxiomToOntology(factory.getOWLSubClassOfAxiom(hasValue, restriction));
}
示例2: getClass2DataProperty2LiteralAxioms
import org.semanticweb.owlapi.model.OWLDataHasValue; //导入依赖的package包/类
/**
* create axioms for class--dataproperty----literal relation.
*
* @param src
* @param dataprop
* @param dest
* @return
*/
private void getClass2DataProperty2LiteralAxioms(OWLClass src, OWLDataProperty dataprop, OWLLiteral dest) {
// Set<OWLAxiom> tmpaxioms = new HashSet<OWLAxiom>();
OWLAxiom axiom;
OWLDataSomeValuesFrom owlDataSomeValuesFrom;
OWLDataHasValue owlLDataHasValue;
OWLDataMaxCardinality owlDataMaxCardinality;
OWLDataOneOf owldataOneOf;
// set domain and range
// scoped domain
if (editor.isGenerateDomainAxiom()) {
owlLDataHasValue = owlDataFactory.getOWLDataHasValue(dataprop, dest);
axiom = owlDataFactory.getOWLSubClassOfAxiom(owlLDataHasValue, src);
domainAndRangeAxioms.add(axiom);
owlDataSomeValuesFrom = owlDataFactory.getOWLDataSomeValuesFrom(dataprop, owlDataFactory.getTopDatatype());
axiom = owlDataFactory.getOWLSubClassOfAxiom(owlDataSomeValuesFrom, src);
domainAndRangeAxioms.add(axiom);
}
if (editor.isGenerateCardinalityAxiom()) {
owlDataMaxCardinality = owlDataFactory.getOWLDataMaxCardinality(1, dataprop,
owlDataFactory.getTopDatatype());
axiom = owlDataFactory.getOWLSubClassOfAxiom(owlDataFactory.getOWLThing(), owlDataMaxCardinality);
cardinalityAxioms.add(axiom);
// need to verify with Adila
owlDataMaxCardinality = owlDataFactory.getOWLDataMaxCardinality(1, dataprop,
owlDataFactory.getTopDatatype());
axiom = owlDataFactory.getOWLSubClassOfAxiom(src, owlDataMaxCardinality);
cardinalityAxioms.add(axiom);
}
// return tmpaxioms;
}
示例3: visit
import org.semanticweb.owlapi.model.OWLDataHasValue; //导入依赖的package包/类
public void visit(OWLDataHasValue arg0) {
notSupported(arg0);
//IntegrityConstraintParser.ensureDataProperty(arg0.getProperty());
//
// set.add(IntegrityConstraintFactoryImpl
// .datatypeParticipationConstraint(subjClass, arg0
// .getProperty().asOWLDataProperty(), f
// .getOWLDataOneOf(arg0.getValue()), 1, 1));
}
示例4: visit
import org.semanticweb.owlapi.model.OWLDataHasValue; //导入依赖的package包/类
public void visit(OWLClassAssertionAxiom axiom) {
OWLClassExpression classExpression=axiom.getClassExpression();
if (classExpression instanceof OWLDataHasValue) {
OWLDataHasValue hasValue=(OWLDataHasValue)classExpression;
addFact(m_factory.getOWLDataPropertyAssertionAxiom(hasValue.getProperty(), axiom.getIndividual(), hasValue.getValue()));
return;
}
if (classExpression instanceof OWLDataSomeValuesFrom) {
OWLDataSomeValuesFrom someValuesFrom=(OWLDataSomeValuesFrom)classExpression;
OWLDataRange dataRange=someValuesFrom.getFiller();
if (dataRange instanceof OWLDataOneOf) {
OWLDataOneOf oneOf=(OWLDataOneOf)dataRange;
if (oneOf.getValues().size()==1) {
addFact(m_factory.getOWLDataPropertyAssertionAxiom(someValuesFrom.getProperty(),axiom.getIndividual(),oneOf.getValues().iterator().next()));
return;
}
}
}
classExpression=positive(classExpression);
if (!isSimple(classExpression)) {
OWLClassExpression definition=getDefinitionFor(classExpression,m_alreadyExists);
if (!m_alreadyExists[0])
m_classExpressionInclusionsAsDisjunctions.add(new OWLClassExpression[] { negative(definition),classExpression });
classExpression=definition;
}
addFact(m_factory.getOWLClassAssertionAxiom(classExpression,axiom.getIndividual()));
}
示例5: visit
import org.semanticweb.owlapi.model.OWLDataHasValue; //导入依赖的package包/类
public void visit(OWLClassAssertionAxiom axiom) {
OWLClassExpression classExpression=axiom.getClassExpression();
if (classExpression instanceof OWLDataHasValue) {
OWLDataHasValue hasValue=(OWLDataHasValue)classExpression;
addFact(m_factory.getOWLDataPropertyAssertionAxiom(hasValue.getProperty(), axiom.getIndividual(), hasValue.getValue()));
return;
}
if (classExpression instanceof OWLDataSomeValuesFrom) {
OWLDataSomeValuesFrom someValuesFrom=(OWLDataSomeValuesFrom)classExpression;
OWLDataRange dataRange=someValuesFrom.getFiller();
if (dataRange instanceof OWLDataOneOf) {
OWLDataOneOf oneOf=(OWLDataOneOf)dataRange;
if (oneOf.getValues().size()==1) {
addFact(m_factory.getOWLDataPropertyAssertionAxiom(someValuesFrom.getProperty(),axiom.getIndividual(),oneOf.getValues().iterator().next()));
return;
}
}
}
classExpression=positive(classExpression);
if (!isSimple(classExpression)) {
OWLClassExpression definition=getDefinitionFor(classExpression,m_alreadyExists);
if (!m_alreadyExists[0])
m_classExpressionInclusionsAsDisjunctions.add(new OWLClassExpression[] { negative(definition),classExpression });
classExpression=definition;
}
addFact(m_factory.getOWLClassAssertionAxiom(classExpression,axiom.getIndividual()));
}
示例6: visit
import org.semanticweb.owlapi.model.OWLDataHasValue; //导入依赖的package包/类
@Override
public IntegerClassExpression visit(OWLDataHasValue ce) {
Objects.requireNonNull(ce);
Integer dataPropertyId = getObjectPropertyExpressionTranslator().getTranslationRepository()
.getId(ce.getProperty().asOWLDataProperty());
Integer literalId = getTranslationRepository().getId(ce.getFiller());
return getDataTypeFactory().createDataHasValue(dataPropertyId, literalId);
}
示例7: equals
import org.semanticweb.owlapi.model.OWLDataHasValue; //导入依赖的package包/类
@Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (!super.equals(obj)) {
return false;
}
if (!(obj instanceof OWLDataHasValue)) {
return false;
}
return property.equals(((OWLDataHasValue) obj).getProperty());
}
示例8: compareObjectOfSameType
import org.semanticweb.owlapi.model.OWLDataHasValue; //导入依赖的package包/类
@Override
protected int compareObjectOfSameType(OWLObject object) {
OWLDataHasValue other = (OWLDataHasValue) object;
int diff = getProperty().compareTo(other.getProperty());
if (diff != 0) {
return diff;
}
return value.compareTo(other.getFiller());
}
示例9: visit
import org.semanticweb.owlapi.model.OWLDataHasValue; //导入依赖的package包/类
public void visit(OWLDataHasValue object) {
visitProperty(object.getProperty());
}
示例10: visit
import org.semanticweb.owlapi.model.OWLDataHasValue; //导入依赖的package包/类
public void visit(OWLDataHasValue object) {
m_hasDatatypes=true;
}
示例11: visit
import org.semanticweb.owlapi.model.OWLDataHasValue; //导入依赖的package包/类
public OWLClassExpression visit(OWLDataHasValue d) {
return d;
}
示例12: visit
import org.semanticweb.owlapi.model.OWLDataHasValue; //导入依赖的package包/类
public void visit(OWLDataHasValue object) {
throw new IllegalStateException("Internal error: Invalid normal form.");
}
示例13: visit
import org.semanticweb.owlapi.model.OWLDataHasValue; //导入依赖的package包/类
@Override
public OWLDataHasValue visit(ElkDataHasValue expression) {
return owlFactory_.getOWLDataHasValue(convert(expression.getProperty()),
convert(expression.getFiller()));
}
示例14: visit
import org.semanticweb.owlapi.model.OWLDataHasValue; //导入依赖的package包/类
@Override
public ElkDataHasValue visit(OWLDataHasValue owlDataHasValue) {
return CONVERTER.convert(owlDataHasValue);
}
示例15: convert
import org.semanticweb.owlapi.model.OWLDataHasValue; //导入依赖的package包/类
@SuppressWarnings("static-method")
public ElkDataHasValue convert(OWLDataHasValue owlDataHasValue) {
return new ElkDataHasValueWrap<OWLDataHasValue>(owlDataHasValue);
}