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


Java OWLObjectAllValuesFrom类代码示例

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


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

示例1: addToOntology

import org.semanticweb.owlapi.model.OWLObjectAllValuesFrom; //导入依赖的package包/类
@Override
public void addToOntology() {
  OWLObjectProperty property = featurePool.getExclusiveProperty(":objectAllValuesFromProperty");
  OWLClass range = featurePool.getExclusiveClass(":ObjectAllValuesFromRange");

  OWLObjectAllValuesFrom restriction = factory.getOWLObjectAllValuesFrom(property, range);

  OWLClass allValuesFrom = featurePool.getExclusiveClass(":ObjectAllValuesFrom");
  addAxiomToOntology(factory.getOWLSubClassOfAxiom(allValuesFrom, restriction));
}
 
开发者ID:VisualDataWeb,项目名称:OntoBench,代码行数:11,代码来源:OwlObjectAllValuesFromFeature.java

示例2: visit

import org.semanticweb.owlapi.model.OWLObjectAllValuesFrom; //导入依赖的package包/类
public void visit(OWLObjectAllValuesFrom arg0) {
    try {
        OWLObjectProperty op = Utils.ensureObjectProperty(arg0.getProperty());
        OWLClass clz = Utils.ensureClass(arg0.getFiller());

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

示例3: visit

import org.semanticweb.owlapi.model.OWLObjectAllValuesFrom; //导入依赖的package包/类
public OWLClassExpression visit(OWLObjectAllValuesFrom object) {
    m_axioms.m_objectPropertiesOccurringInOWLAxioms.add(object.getProperty().getNamedProperty());
    OWLClassExpression filler=object.getFiller();
    if (isSimple(filler) || isNominal(filler) || isNegatedOneNominal(filler))
        // The nominal cases are optimizations.
        return object;
    else {
        OWLClassExpression definition=getDefinitionFor(filler,m_alreadyExists);
        if (!m_alreadyExists[0])
            m_newInclusions.add(new OWLClassExpression[] { negative(definition),filler });
        return m_factory.getOWLObjectAllValuesFrom(object.getProperty(),definition);
    }
}
 
开发者ID:robertoyus,项目名称:HermiT-android,代码行数:14,代码来源:OWLNormalization.java

示例4: visit

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

示例5: visit

import org.semanticweb.owlapi.model.OWLObjectAllValuesFrom; //导入依赖的package包/类
@Override
public OWLObjectAllValuesFrom visit(OWLObjectAllValuesFrom ce) {
	if (LOG.isDebugEnabled()) {
		LOG.debug("Unfolding all_values_from: "+ce);
	}
	
	OWLClassExpression filler = ce.getFiller();
	if (filler != null) {
		OWLClassExpression unfold = filler.accept(this);
		if (unfold != null) {
			return factory.getOWLObjectAllValuesFrom(ce.getProperty(), unfold);
		}
	}
	return null;
}
 
开发者ID:owlcollab,项目名称:owltools,代码行数:16,代码来源:TBoxUnFoldingTool.java

示例6: visit

import org.semanticweb.owlapi.model.OWLObjectAllValuesFrom; //导入依赖的package包/类
@Override
public Void visit(OWLObjectAllValuesFrom desc) {
  long restriction =
      getOrCreateNode(getIri(desc), OwlLabels.OWL_ALL_VALUES_FROM, OwlLabels.OWL_ANONYMOUS);
  if (!desc.getProperty().isAnonymous()) {
    long property = getOrCreateNode(getIri(desc.getProperty()));
    getOrCreateRelationship(restriction, property, OwlRelationships.PROPERTY);
    long cls = getOrCreateNode(getIri(desc.getFiller()));
    getOrCreateRelationship(restriction, cls, OwlRelationships.FILLER);
  }
  return null;
}
 
开发者ID:SciGraph,项目名称:SciGraph,代码行数:13,代码来源:GraphOwlVisitor.java

示例7: visit

import org.semanticweb.owlapi.model.OWLObjectAllValuesFrom; //导入依赖的package包/类
@Override
public OWLClassExpression visit(OWLObjectAllValuesFrom ce) {
	OWLClassExpression filler = ce.getFiller();
	OWLClassExpression shortenedFiller = filler.accept(this);
	if(shortenedFiller.isOWLThing()){// \forall r.\top \equiv \top
		return df.getOWLThing();
	} else if(beautify && shortenedFiller.isOWLNothing()) {// \forall r.\bot to \neg \exists r.\top
		return df.getOWLObjectComplementOf(df.getOWLObjectSomeValuesFrom(ce.getProperty(), df.getOWLThing()));
	} else if(!filler.equals(shortenedFiller)){
		return df.getOWLObjectAllValuesFrom(ce.getProperty(), shortenedFiller);
	}
	return ce;
}
 
开发者ID:SmartDataAnalytics,项目名称:OWL2SPARQL,代码行数:14,代码来源:OWLClassExpressionMinimizer.java

示例8: visit

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

示例9: visit

import org.semanticweb.owlapi.model.OWLObjectAllValuesFrom; //导入依赖的package包/类
@Override
public Set<OWLClassExpression> visit(OWLObjectAllValuesFrom ce) {
    Set<OWLClassExpression> result = new HashSet<>();
    result.add(ce);
    result.addAll(ce.getFiller().accept(this));
    return result;
}
 
开发者ID:matthewhorridge,项目名称:owlapi-gwt,代码行数:8,代码来源:OWLClassExpressionCollector.java

示例10: equals

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

示例11: visit

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

示例12: visit

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

示例13: visit

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

示例14: convert

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

示例15: makeUnionUsingReflexiveProperty

import org.semanticweb.owlapi.model.OWLObjectAllValuesFrom; //导入依赖的package包/类
/**
 * makes a reduced union expression.
 * 
 * Uses the following two reduction rules:
 * 
 * (r1 some X) U (r2 some Y) ==> lcs(r1,r2) some MakeUnionOf(X,Y)
 * (r1 some X) U X ==> reflexive-version-of-r1 some X
 * 
 * TODO: test for (r some r some X) u (r some X) cases. needs to be done over final expression.
 *  
 * if a reduced form cannot be made, returns null
 * 
 * @param xa
 * @param xb
 * @return class expression
 */
private OWLClassExpression makeUnionUsingReflexiveProperty(OWLClassExpression xa, OWLClassExpression xb) {
	LOG.info("testing if there is a more compact union expression for "+xa+" ++ "+xb);
	OWLDataFactory df = graph.getDataFactory();
	if (xa instanceof OWLQuantifiedRestriction) {
		// TODO - check before casting
		OWLObjectProperty prop = (OWLObjectProperty) ((OWLQuantifiedRestriction) xa).getProperty();
		OWLClassExpression xaRest = (OWLClassExpression) ((OWLQuantifiedRestriction)xa).getFiller();
		if (xb instanceof OWLQuantifiedRestriction) {
			OWLObjectPropertyExpression p2 =
				propertySubsumer(prop, 
					((OWLQuantifiedObjectRestriction) xb).getProperty());
			
			if (p2 != null) {
				OWLClassExpression xbRest = (OWLClassExpression) ((OWLQuantifiedRestriction)xb).getFiller();
				OWLClassExpression x = makeUnionWithReduction(xaRest,xbRest);
				// todo - mixing some and all
				if (xa instanceof OWLObjectSomeValuesFrom)
					return df.getOWLObjectSomeValuesFrom(p2,x);
				else if (xa instanceof OWLObjectAllValuesFrom)
					return df.getOWLObjectAllValuesFrom(p2, x);
			}
		}
		LOG.info("  test: "+xaRest+" == "+xb);
		

		if (xaRest.equals(xb)) {
			LOG.info("     TRUE: "+xaRest+" == "+xb);

			OWLObjectProperty rprop = null;
			if (graph.getIsReflexive(prop)) {
				rprop = prop;
			}
			if (forceReflexivePropertyCreation) {
				OWLOntologyManager manager = graph.getManager();
				OWLOntology ont = graph.getSourceOntology();
				rprop = 
					df.getOWLObjectProperty(IRI.create(prop.getIRI().toString()+"_reflexive"));
				manager.applyChange(new AddAxiom(ont, df.getOWLSubObjectPropertyOfAxiom(prop, rprop)));
				manager.applyChange(new AddAxiom(ont, df.getOWLTransitiveObjectPropertyAxiom(rprop)));
				LOG.info("  reflexive prop:"+rprop);

			}
			if (rprop != null) {
				if (xa instanceof OWLObjectSomeValuesFrom)
					return df.getOWLObjectSomeValuesFrom(rprop,xb);
				else if (xa instanceof OWLObjectAllValuesFrom)
					return df.getOWLObjectAllValuesFrom(rprop, xb);
			}

		}
	}
	return null;
}
 
开发者ID:owlcollab,项目名称:owltools,代码行数:70,代码来源:DescriptionTreeSimilarity.java


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