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


Java OWLDataMaxCardinality类代码示例

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


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

示例1: visit

import org.semanticweb.owlapi.model.OWLDataMaxCardinality; //导入依赖的package包/类
public void visit(OWLDataMaxCardinality object) {
    int number=object.getCardinality();
    LiteralDataRange negatedDataRange=m_dataRangeConverter.convertDataRange(object.getFiller()).getNegation();
    ensureYNotZero();
    Variable[] yVars=new Variable[number+1];
    for (int i=0;i<yVars.length;i++) {
        yVars[i]=nextY();
        m_bodyAtoms.add(getRoleAtom(object.getProperty(),X,yVars[i]));
        if (negatedDataRange.isNegatedInternalDatatype()) {
            InternalDatatype negated=(InternalDatatype)negatedDataRange.getNegation();
            if (!negated.isAlwaysTrue())
                m_bodyAtoms.add(Atom.create(negated,yVars[i]));
        }
        else {
            if (!negatedDataRange.isAlwaysFalse())
                m_headAtoms.add(Atom.create((DLPredicate)negatedDataRange,yVars[i]));
        }
    }
    for (int i=0;i<yVars.length;i++)
        for (int j=i+1;j<yVars.length;j++)
            m_headAtoms.add(Atom.create(Equality.INSTANCE,yVars[i],yVars[j]));
}
 
开发者ID:robertoyus,项目名称:HermiT-android,代码行数:23,代码来源:OWLClausification.java

示例2: visit

import org.semanticweb.owlapi.model.OWLDataMaxCardinality; //导入依赖的package包/类
@Override
public OWLClassExpression visit(OWLDataMaxCardinality ce) {
    boolean neg = negated;
    int card = ce.getCardinality();
    if (negated) {
        card = ce.getCardinality() + 1;
    }
    negated = false;
    OWLDataRange filler = ce.getFiller().accept(this);
    OWLClassExpression nnf = null;
    if (neg) {
        nnf = dataFactory.getOWLDataMinCardinality(card, ce.getProperty(),
                filler);
    } else {
        nnf = dataFactory.getOWLDataMaxCardinality(card, ce.getProperty(),
                filler);
    }
    negated = neg;
    return nnf;
}
 
开发者ID:matthewhorridge,项目名称:owlapi-gwt,代码行数:21,代码来源:NNF.java

示例3: addToOntology

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

  OWLDatatype affectedDatatype = OWL2Datatype.XSD_BYTE.getDatatype(factory);
  OWLDataMaxCardinality cardinality = factory.getOWLDataMaxCardinality(1, property, affectedDatatype);

  addAxiomToOntology(factory.getOWLSubClassOfAxiom(featurePool.getExclusiveClass(":DataMaxQualifiedCardinalityRange_RL"), cardinality));
}
 
开发者ID:VisualDataWeb,项目名称:OntoBench,代码行数:12,代码来源:OwlDataMaxQualifiedCardinalityOwl2RlFeature.java

示例4: addToOntology

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

  OWLClass range = featurePool.getExclusiveClass(":DataMaxCardinalityRange_RL");
  OWLDataMaxCardinality cardinality = factory.getOWLDataMaxCardinality(1, property);

  addAxiomToOntology(factory.getOWLSubClassOfAxiom(range, cardinality));
}
 
开发者ID:VisualDataWeb,项目名称:OntoBench,代码行数:12,代码来源:OwlDataMaxCardinalityOwl2RlFeature.java

示例5: addToOntology

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

  OWLDatatype affectedDatatype = OWL2Datatype.XSD_BYTE.getDatatype(factory);
  OWLDataMaxCardinality cardinality = factory.getOWLDataMaxCardinality(18, property, affectedDatatype);

  addAxiomToOntology(factory.getOWLSubClassOfAxiom(featurePool.getExclusiveClass(":DataMaxQualifiedCardinalityRange"), cardinality));
}
 
开发者ID:VisualDataWeb,项目名称:OntoBench,代码行数:12,代码来源:OwlDataMaxQualifiedCardinalityFeature.java

示例6: addToOntology

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

  OWLClass range = featurePool.getExclusiveClass(":DataMaxCardinalityRange");
  OWLDataMaxCardinality cardinality = factory.getOWLDataMaxCardinality(19, property);

  addAxiomToOntology(factory.getOWLSubClassOfAxiom(range, cardinality));
}
 
开发者ID:VisualDataWeb,项目名称:OntoBench,代码行数:12,代码来源:OwlDataMaxCardinalityFeature.java

示例7: getClass2DataProperty2LiteralAxioms

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

示例8: visit

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

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

示例9: visit

import org.semanticweb.owlapi.model.OWLDataMaxCardinality; //导入依赖的package包/类
public OWLClassExpression visit(OWLDataMaxCardinality object) {
    OWLDataRange filler=object.getFiller();
    OWLDataPropertyExpression prop=object.getProperty();
    if (prop.isOWLTopDataProperty())
        throwInvalidTopDPUseError(object);
    if (isLiteral(filler))
        return m_factory.getOWLDataMaxCardinality(object.getCardinality(),prop,filler);
    else {
        OWLDataRange complementDescription=m_expressionManager.getComplementNNF(filler);
        OWLDatatype definition=getDefinitionFor(complementDescription,m_alreadyExists);
        if (!m_alreadyExists[0])
            m_newDataRangeInclusions.add(new OWLDataRange[] { negative(definition),filler });
        return m_factory.getOWLDataMaxCardinality(object.getCardinality(),prop,m_expressionManager.getComplementNNF(definition));
    }
}
 
开发者ID:robertoyus,项目名称:HermiT-android,代码行数:16,代码来源:OWLNormalization.java

示例10: visit

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

示例11: visit

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

示例12: visit

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

示例13: convert

import org.semanticweb.owlapi.model.OWLDataMaxCardinality; //导入依赖的package包/类
@SuppressWarnings("static-method")
public ElkDataMaxCardinality convert(
		OWLDataMaxCardinality owlDataMaxCardinality) {
	if (owlDataMaxCardinality.isQualified())
		return new ElkDataMaxCardinalityQualifiedWrap<OWLDataMaxCardinality>(
				owlDataMaxCardinality);
	// else
	return new ElkDataMaxCardinalityUnqualifiedWrap<OWLDataMaxCardinality>(
			owlDataMaxCardinality);
}
 
开发者ID:liveontologies,项目名称:elk-reasoner,代码行数:11,代码来源:OwlConverter.java

示例14: visit

import org.semanticweb.owlapi.model.OWLDataMaxCardinality; //导入依赖的package包/类
@Override
public void visit(OWLDataMaxCardinality ce) {
    hashCode = primes[36];
    hashCode = hashCode * MULT + ce.getProperty().hashCode();
    hashCode = hashCode * MULT + ce.getCardinality();
    hashCode = hashCode * MULT + ce.getFiller().hashCode();
}
 
开发者ID:matthewhorridge,项目名称:owlapi-gwt,代码行数:8,代码来源:HashCode.java

示例15: equals

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


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