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


Java OWLDataSomeValuesFrom类代码示例

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


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

示例1: visit

import org.semanticweb.owlapi.model.OWLDataSomeValuesFrom; //导入依赖的package包/类
public void visit(SWRLDataRangeAtom atom) {
    if (atom.getArgument() instanceof SWRLVariable)
        throwVarError(atom);
    // dr(literal) :-
    // convert to: ClassAssertion(DataSomeValuesFrom(freshDP DataOneOf(literal)) freshIndividual)
    // and top -> \forall freshDP.dr
    OWLLiteral lit=((SWRLLiteralArgument)atom.getArgument()).getLiteral();
    OWLDataRange dr=atom.getPredicate();
    OWLNamedIndividual freshIndividual=getFreshIndividual();
    OWLDataProperty freshDP=getFreshDataProperty();
    OWLDataSomeValuesFrom some=m_factory.getOWLDataSomeValuesFrom(freshDP,m_factory.getOWLDataOneOf(lit));
    OWLClassExpression definition=getDefinitionFor(some,m_alreadyExists);
    if (!m_alreadyExists[0])
        m_newInclusions.add(new OWLClassExpression[] { negative(definition),some });
    addFact(m_factory.getOWLClassAssertionAxiom(definition,freshIndividual));
    m_newInclusions.add(new OWLClassExpression[] { m_factory.getOWLDataAllValuesFrom(freshDP,dr) });
}
 
开发者ID:robertoyus,项目名称:HermiT-android,代码行数:18,代码来源:OWLNormalization.java

示例2: addToOntology

import org.semanticweb.owlapi.model.OWLDataSomeValuesFrom; //导入依赖的package包/类
@Override
public void addToOntology() {
  OWLDataProperty property = factory.getOWLDataProperty(":dataSomeValuesFromProperty_RL", pm);
  OWLDatatype datatype = OWL2Datatype.XSD_DATE_TIME.getDatatype(factory);

  OWLClass range = featurePool.getExclusiveClass(":DataSomeValuesFrom_RL");
  OWLDataSomeValuesFrom restriction = factory.getOWLDataSomeValuesFrom(property, datatype);
  addAxiomToOntology(factory.getOWLSubClassOfAxiom(restriction, range));
}
 
开发者ID:VisualDataWeb,项目名称:OntoBench,代码行数:10,代码来源:OwlDataSomeValuesFromOwl2RlFeature.java

示例3: addToOntology

import org.semanticweb.owlapi.model.OWLDataSomeValuesFrom; //导入依赖的package包/类
@Override
public void addToOntology() {
  OWLDataProperty property = factory.getOWLDataProperty(":dataSomeValuesFromProperty", pm);
  OWLDatatype datatype = OWL2Datatype.XSD_DATE_TIME.getDatatype(factory);

  OWLClass someValuesFrom = featurePool.getExclusiveClass(":DataSomeValuesFrom");
  OWLDataSomeValuesFrom restriction = factory.getOWLDataSomeValuesFrom(property, datatype);
  addAxiomToOntology(factory.getOWLSubClassOfAxiom(someValuesFrom, restriction));
}
 
开发者ID:VisualDataWeb,项目名称:OntoBench,代码行数:10,代码来源:OwlDataSomeValuesFromFeature.java

示例4: getClass2DataProperty2LiteralAxioms

import org.semanticweb.owlapi.model.OWLDataSomeValuesFrom; //导入依赖的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

示例5: visit

import org.semanticweb.owlapi.model.OWLDataSomeValuesFrom; //导入依赖的package包/类
public void visit(OWLDataSomeValuesFrom arg0) {
    try {
        final OWLDatatype dt = Utils.ensureDatatype(arg0.getFiller());
        final OWLDataProperty dp = Utils.ensureDataProperty(arg0
            .getProperty());

        integrityConstraints.add(integrityConstraintFactory
            .MinDataParticipationConstraint(subjClass, dp, dt, 1));
    } catch (UnsupportedICException e) {
        notSupported(arg0);
    }
}
 
开发者ID:kbss-cvut,项目名称:jopa,代码行数:13,代码来源:IntegrityConstraintClassParser.java

示例6: axiomatizeTopDataProperty

import org.semanticweb.owlapi.model.OWLDataSomeValuesFrom; //导入依赖的package包/类
protected void axiomatizeTopDataProperty(OWLAxioms axioms) {
    OWLDatatype anonymousConstantsDatatype=m_factory.getOWLDatatype(IRI.create("internal:anonymous-constants"));
    OWLLiteral newConstant=m_factory.getOWLLiteral("internal:constant",anonymousConstantsDatatype);
    OWLDataOneOf oneOfNewConstant=m_factory.getOWLDataOneOf(newConstant);
    OWLDataSomeValuesFrom hasTopNewConstant=m_factory.getOWLDataSomeValuesFrom(m_topDataProperty,oneOfNewConstant);
    axioms.m_conceptInclusions.add(new OWLClassExpression[] { hasTopNewConstant });
}
 
开发者ID:robertoyus,项目名称:HermiT-android,代码行数:8,代码来源:BuiltInPropertyManager.java

示例7: visit

import org.semanticweb.owlapi.model.OWLDataSomeValuesFrom; //导入依赖的package包/类
public OWLClassExpression visit(OWLDataSomeValuesFrom d) {
    OWLDataRange filler=getSimplified(d.getFiller());
    if (isBottomDataRange(filler))
        return m_factory.getOWLNothing();
    else
        return m_factory.getOWLDataSomeValuesFrom(d.getProperty(),filler);
}
 
开发者ID:robertoyus,项目名称:HermiT-android,代码行数:8,代码来源:ExpressionManager.java

示例8: visit

import org.semanticweb.owlapi.model.OWLDataSomeValuesFrom; //导入依赖的package包/类
public void visit(OWLDataSomeValuesFrom object) {
    if (!object.getProperty().isOWLBottomDataProperty()) {
        AtomicRole atomicRole=getAtomicRole(object.getProperty());
        LiteralDataRange literalRange=m_dataRangeConverter.convertDataRange(object.getFiller());
        AtLeastDataRange atLeastDataRange=AtLeastDataRange.create(1,atomicRole,literalRange);
        if (!atLeastDataRange.isAlwaysFalse())
            m_headAtoms.add(Atom.create(atLeastDataRange,X));
    }
}
 
开发者ID:robertoyus,项目名称:HermiT-android,代码行数:10,代码来源:OWLClausification.java

示例9: visit

import org.semanticweb.owlapi.model.OWLDataSomeValuesFrom; //导入依赖的package包/类
public Boolean visit(OWLDisjointDataPropertiesAxiom axiom) {
    int n=axiom.getProperties().size();
    OWLDataPropertyExpression[] props=axiom.getProperties().toArray(new OWLDataPropertyExpression[n]);
    for (int i=0;i<n-1;i++) {
        for (int j=i+1;j<n;j++) {
            OWLDataSomeValuesFrom some_i=factory.getOWLDataSomeValuesFrom(props[i],factory.getOWLDatatype(IRI.create(InternalDatatype.RDFS_LITERAL.getIRI())));
            OWLDataSomeValuesFrom some_j=factory.getOWLDataSomeValuesFrom(props[j],factory.getOWLDatatype(IRI.create(InternalDatatype.RDFS_LITERAL.getIRI())));
            OWLDataMaxCardinality max1=factory.getOWLDataMaxCardinality(1,factory.getOWLDataProperty(IRI.create(AtomicRole.TOP_DATA_ROLE.getIRI())));
            OWLClassExpression desc=factory.getOWLObjectIntersectionOf(some_i,some_j,max1);
            if (reasoner.isSatisfiable(desc))
                return Boolean.FALSE;
        }
    }
    return Boolean.TRUE;
}
 
开发者ID:robertoyus,项目名称:HermiT-android,代码行数:16,代码来源:EntailmentChecker.java

示例10: visit

import org.semanticweb.owlapi.model.OWLDataSomeValuesFrom; //导入依赖的package包/类
@Override
public OWLDataSomeValuesFrom visit(ElkDataSomeValuesFrom expression) {
	List<? extends ElkDataPropertyExpression> propertyExpressions = expression
			.getDataPropertyExpressions();
	if (propertyExpressions.size() > 0) {
		throw new IllegalArgumentException(
				"OWLAPI supports only one data property in OWLDataSomeValuesFrom");
	}
	return owlFactory_.getOWLDataSomeValuesFrom(
			convert(propertyExpressions.get(0)),
			convert(expression.getDataRange()));
}
 
开发者ID:liveontologies,项目名称:elk-reasoner,代码行数:13,代码来源:AbstractElkObjectConverter.java

示例11: visit

import org.semanticweb.owlapi.model.OWLDataSomeValuesFrom; //导入依赖的package包/类
@Override
public OWLClassExpression visit(OWLDataSomeValuesFrom ce) {
    OWLDataRange filler = ce.getFiller().accept(this);
    if (negated) {
        return dataFactory
                .getOWLDataAllValuesFrom(ce.getProperty(), filler);
    } else {
        return dataFactory.getOWLDataSomeValuesFrom(ce.getProperty(),
                filler);
    }
}
 
开发者ID:matthewhorridge,项目名称:owlapi-gwt,代码行数:12,代码来源:NNF.java

示例12: equals

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

示例13: getClass2DataProperty2DataTypeAxioms

import org.semanticweb.owlapi.model.OWLDataSomeValuesFrom; //导入依赖的package包/类
/**
 * create axioms for class--dataproperty----datatype relation.
 */
// be sure for OWLDatatype vs OWL2DataType
private void getClass2DataProperty2DataTypeAxioms(OWLClass src, OWLDataProperty dataprop, OWLDatatype dest) {

	// Set<OWLAxiom> tmpaxioms = new HashSet<OWLAxiom>();
	OWLAxiom axiom;
	OWLDataSomeValuesFrom owlDataSomeValuesFrom;
	OWLDataAllValuesFrom owlDataAllValuesFrom;
	OWLDataMaxCardinality owlDataMaxCardinality;

	// set domain and range
	// scoped domain
	if (editor.isGenerateDomainAxiom()) {
		owlDataSomeValuesFrom = owlDataFactory.getOWLDataSomeValuesFrom(dataprop, dest);
		axiom = owlDataFactory.getOWLSubClassOfAxiom(owlDataSomeValuesFrom, src);
		domainAndRangeAxioms.add(axiom);

		owlDataSomeValuesFrom = owlDataFactory.getOWLDataSomeValuesFrom(dataprop, owlDataFactory.getTopDatatype());
		axiom = owlDataFactory.getOWLSubClassOfAxiom(owlDataSomeValuesFrom, src);
		domainAndRangeAxioms.add(axiom);
	}

	// scoped range
	if (editor.isGenerateRangeAxiom()) {
		owlDataAllValuesFrom = owlDataFactory.getOWLDataAllValuesFrom(dataprop, dest);
		axiom = owlDataFactory.getOWLSubClassOfAxiom(src, owlDataAllValuesFrom);
		domainAndRangeAxioms.add(axiom);

		owlDataAllValuesFrom = owlDataFactory.getOWLDataAllValuesFrom(dataprop, dest);
		axiom = owlDataFactory.getOWLSubClassOfAxiom(owlDataFactory.getOWLThing(), owlDataAllValuesFrom);
		domainAndRangeAxioms.add(axiom);
	}

	// set existential restriction
	// source existential functionality
	if (editor.isGenerateExistentialAxiom()) {
		owlDataSomeValuesFrom = owlDataFactory.getOWLDataSomeValuesFrom(dataprop, dest);
		axiom = owlDataFactory.getOWLSubClassOfAxiom(src, owlDataSomeValuesFrom);
		existentialAxioms.add(axiom);
	}

	// destination existential functionality. dataproperty doesn't have
	// inverse property

	// set cardinality restriction
	if (editor.isGenerateCardinalityAxiom()) {
		owlDataMaxCardinality = owlDataFactory.getOWLDataMaxCardinality(1, dataprop, dest);
		axiom = owlDataFactory.getOWLSubClassOfAxiom(src, owlDataMaxCardinality);
		cardinalityAxioms.add(axiom);

		owlDataMaxCardinality = owlDataFactory.getOWLDataMaxCardinality(1, dataprop, dest);
		axiom = owlDataFactory.getOWLSubClassOfAxiom(owlDataFactory.getOWLThing(), owlDataMaxCardinality);
		cardinalityAxioms.add(axiom);

		owlDataMaxCardinality = owlDataFactory.getOWLDataMaxCardinality(1, dataprop,
				owlDataFactory.getTopDatatype());
		axiom = owlDataFactory.getOWLSubClassOfAxiom(owlDataFactory.getOWLThing(), owlDataMaxCardinality);
		cardinalityAxioms.add(axiom);

		owlDataMaxCardinality = owlDataFactory.getOWLDataMaxCardinality(1, dataprop,
				owlDataFactory.getTopDatatype());
		axiom = owlDataFactory.getOWLSubClassOfAxiom(src, owlDataMaxCardinality);
		cardinalityAxioms.add(axiom);
	}
	// dataproperty doesn't have inverse property

	// System.out.println(axiom.toString());

	// return tmpaxioms;
}
 
开发者ID:md-k-sarker,项目名称:OWLAx,代码行数:73,代码来源:IntegrateOntologyWithProtege.java

示例14: visit

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

示例15: visit

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


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