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


Java OWLDataHasValue类代码示例

本文整理汇总了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));
}
 
开发者ID:VisualDataWeb,项目名称:OntoBench,代码行数:11,代码来源:OwlDataHasValueFeature.java

示例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;
}
 
开发者ID:md-k-sarker,项目名称:OWLAx,代码行数:43,代码来源:IntegrateOntologyWithProtege.java

示例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));
}
 
开发者ID:kbss-cvut,项目名称:jopa,代码行数:10,代码来源:IntegrityConstraintClassParser.java

示例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()));
}
 
开发者ID:robertoyus,项目名称:HermiT-android,代码行数:28,代码来源:OWLNormalization.java

示例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()));
}
 
开发者ID:wolpertinger-reasoner,项目名称:Wolpertinger,代码行数:28,代码来源:OWLNormalization.java

示例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);
}
 
开发者ID:julianmendez,项目名称:jcel,代码行数:9,代码来源:ClassExpressionTranslator.java

示例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());
}
 
开发者ID:matthewhorridge,项目名称:owlapi-gwt,代码行数:14,代码来源:OWLDataHasValueImpl.java

示例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());
}
 
开发者ID:matthewhorridge,项目名称:owlapi-gwt,代码行数:10,代码来源:OWLDataHasValueImpl.java

示例9: visit

import org.semanticweb.owlapi.model.OWLDataHasValue; //导入依赖的package包/类
public void visit(OWLDataHasValue object) {
    visitProperty(object.getProperty());
}
 
开发者ID:robertoyus,项目名称:HermiT-android,代码行数:4,代码来源:BuiltInPropertyManager.java

示例10: visit

import org.semanticweb.owlapi.model.OWLDataHasValue; //导入依赖的package包/类
public void visit(OWLDataHasValue object) {
    m_hasDatatypes=true;
}
 
开发者ID:robertoyus,项目名称:HermiT-android,代码行数:4,代码来源:OWLAxiomsExpressivity.java

示例11: visit

import org.semanticweb.owlapi.model.OWLDataHasValue; //导入依赖的package包/类
public OWLClassExpression visit(OWLDataHasValue d) {
    return d;
}
 
开发者ID:robertoyus,项目名称:HermiT-android,代码行数:4,代码来源:ExpressionManager.java

示例12: visit

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

示例13: visit

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

示例14: visit

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

示例15: convert

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


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