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


Java OWLDisjointObjectPropertiesAxiom类代码示例

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


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

示例1: splitToAnnotatedPairs

import org.semanticweb.owlapi.model.OWLDisjointObjectPropertiesAxiom; //导入依赖的package包/类
@Override
public Set<OWLDisjointObjectPropertiesAxiom> splitToAnnotatedPairs() {
    List<OWLObjectPropertyExpression> ops = new ArrayList<>(getProperties());
    if (ops.size() == 2) {
        return Collections
                .<OWLDisjointObjectPropertiesAxiom> singleton(this);
    }
    Set<OWLDisjointObjectPropertiesAxiom> result = new HashSet<>();
    for (int i = 0; i < ops.size() - 1; i++) {
        OWLObjectPropertyExpression indI = ops.get(i);
        OWLObjectPropertyExpression indJ = ops.get(i + 1);
        result.add(new OWLDisjointObjectPropertiesAxiomImpl(new HashSet<>(
                Arrays.asList(indI, indJ)), getAnnotations()));
    }
    return result;
}
 
开发者ID:matthewhorridge,项目名称:owlapi-gwt,代码行数:17,代码来源:OWLDisjointObjectPropertiesAxiomImpl.java

示例2: visit

import org.semanticweb.owlapi.model.OWLDisjointObjectPropertiesAxiom; //导入依赖的package包/类
public void visit(OWLDisjointObjectPropertiesAxiom axiom) {
    OWLObjectPropertyExpression[] objectPropertyExpressions=new OWLObjectPropertyExpression[axiom.getProperties().size()];
    axiom.getProperties().toArray(objectPropertyExpressions);
    for (int i=0;i<objectPropertyExpressions.length;i++) {
        objectPropertyExpressions[i]=objectPropertyExpressions[i].getSimplified();
        m_axioms.m_objectPropertiesOccurringInOWLAxioms.add(objectPropertyExpressions[i].getNamedProperty());
    }
    m_axioms.m_disjointObjectProperties.add(objectPropertyExpressions);
}
 
开发者ID:robertoyus,项目名称:HermiT-android,代码行数:10,代码来源:OWLNormalization.java

示例3: visit

import org.semanticweb.owlapi.model.OWLDisjointObjectPropertiesAxiom; //导入依赖的package包/类
public Boolean visit(OWLDisjointObjectPropertiesAxiom axiom) {
    int n=axiom.getProperties().size();
    OWLObjectPropertyExpression[] props=axiom.getProperties().toArray(new OWLObjectPropertyExpression[n]);
    for (int i=0;i<n-1;i++)
        for (int j=i+1;j<n;j++)
            if (!reasoner.isDisjointObjectProperty(props[i],props[j])) return Boolean.FALSE;
    return Boolean.TRUE;
}
 
开发者ID:robertoyus,项目名称:HermiT-android,代码行数:9,代码来源:EntailmentChecker.java

示例4: visit

import org.semanticweb.owlapi.model.OWLDisjointObjectPropertiesAxiom; //导入依赖的package包/类
@Override
public OWLDisjointObjectPropertiesAxiom visit(
		ElkDisjointObjectPropertiesAxiom axiom) {
	return owlFactory_.getOWLDisjointObjectPropertiesAxiom(
			toObjectPropertyExpressionSet(
					axiom.getObjectPropertyExpressions()));
}
 
开发者ID:liveontologies,项目名称:elk-reasoner,代码行数:8,代码来源:AbstractElkObjectConverter.java

示例5: visit

import org.semanticweb.owlapi.model.OWLDisjointObjectPropertiesAxiom; //导入依赖的package包/类
@Override
public T visit(OWLDisjointObjectPropertiesAxiom axiom) {
	throw new IllegalArgumentException(
			OWLDisjointObjectPropertiesAxiom.class.getSimpleName()
					+ " cannot be converted to "
					+ getTargetClass().getSimpleName());
}
 
开发者ID:liveontologies,项目名称:elk-reasoner,代码行数:8,代码来源:AbstractOwlAxiomConverterVisitor.java

示例6: visit

import org.semanticweb.owlapi.model.OWLDisjointObjectPropertiesAxiom; //导入依赖的package包/类
/**
 * Disjoint Properties are translated into constraints:</br>
 * <code>:- r(X,Y), s(X,Y), ...</code>
 * @see org.semanticweb.owlapi.model.OWLAxiomVisitor#visit(org.semanticweb.owlapi.model.OWLDisjointObjectPropertiesAxiom)
 */

public void visit(OWLDisjointObjectPropertiesAxiom disProperties) {
	writer.write("icons " + ASP2CoreSymbols.IMPLICATION);
	writer.write(String.format(" activated(%d), ", nConstraints++));
	String cVar = var.currentVar();
	String nVar = var.nextVariable();

	boolean isFirst=true;
	for (OWLObjectPropertyExpression property : disProperties.getProperties()) {
		String propertyName = mapper.getPredicateName(property.getNamedProperty());

		if (!isFirst) {
			writer.write(ASP2CoreSymbols.CONJUNCTION);

		}
		isFirst = false;
		writer.write(propertyName);
		writer.write(ASP2CoreSymbols.BRACKET_OPEN);
		writer.write(cVar);
		writer.write(ASP2CoreSymbols.ARG_SEPERATOR);
		writer.write(nVar);
		writer.write(ASP2CoreSymbols.BRACKET_CLOSE);
	}

	writer.write(ASP2CoreSymbols.EOR);
}
 
开发者ID:wolpertinger-reasoner,项目名称:Wolpertinger,代码行数:32,代码来源:DebugTranslation.java

示例7: visit

import org.semanticweb.owlapi.model.OWLDisjointObjectPropertiesAxiom; //导入依赖的package包/类
/**
 * Disjoint Properties are translated into constraints:</br>
 * <code>:- r(X,Y), s(X,Y), ...</code>
 * @see org.semanticweb.owlapi.model.OWLAxiomVisitor#visit(org.semanticweb.owlapi.model.OWLDisjointObjectPropertiesAxiom)
 */

public void visit(OWLDisjointObjectPropertiesAxiom disProperties) {
	writer.write(ASP2CoreSymbols.IMPLICATION);

	String cVar = var.currentVar();
	String nVar = var.nextVariable();

	boolean isFirst=true;
	for (OWLObjectPropertyExpression property : disProperties.getProperties()) {
		String propertyName = mapper.getPredicateName(property.getNamedProperty());

		if (!isFirst) {
			writer.write(ASP2CoreSymbols.CONJUNCTION);
		}

		isFirst = false;
		writer.write(propertyName);
		writer.write(ASP2CoreSymbols.BRACKET_OPEN);
		writer.write(cVar);
		writer.write(ASP2CoreSymbols.ARG_SEPERATOR);
		writer.write(nVar);
		writer.write(ASP2CoreSymbols.BRACKET_CLOSE);
	}

	writer.write(ASP2CoreSymbols.EOR);
}
 
开发者ID:wolpertinger-reasoner,项目名称:Wolpertinger,代码行数:32,代码来源:NaiveTranslation.java

示例8: visit

import org.semanticweb.owlapi.model.OWLDisjointObjectPropertiesAxiom; //导入依赖的package包/类
@Override
public void visit(OWLDisjointObjectPropertiesAxiom axiom) {
	List<OWLObjectPropertyExpression> propertyExpressions = new LinkedList<>(axiom.getProperties());
	
	for(int i = 0; i < propertyExpressions.size(); i++){
		sparql += "{";
		OWLObjectPropertyExpression pe = propertyExpressions.remove(i);
		if(pe.isAnonymous()){
			sparql += objectVar + "<" + pe.getInverseProperty().asOWLObjectProperty().toStringID() + "> " + subjectVar + " .";
		} else {
			sparql += subjectVar + "<" + pe.asOWLObjectProperty().toStringID() + "> " + objectVar + " .";
		}
		for (OWLObjectPropertyExpression pe2 : propertyExpressions) {
			String pattern;
			if(pe2.isAnonymous()){
				pattern = objectVar + "<" + pe2.getInverseProperty().asOWLObjectProperty().toStringID() + "> " + subjectVar + " .";
			} else {
				pattern = subjectVar + "<" + pe2.asOWLObjectProperty().toStringID() + "> " + objectVar + " .";
			}
			sparql += notExists(pattern);
		}
		propertyExpressions.add(i, pe);
		sparql += "}";
		if(i < propertyExpressions.size()-1){
			sparql += " UNION ";
		}
	}
}
 
开发者ID:SmartDataAnalytics,项目名称:OWL2SPARQL,代码行数:29,代码来源:OWLAxiomToSPARQLConverter.java

示例9: visit

import org.semanticweb.owlapi.model.OWLDisjointObjectPropertiesAxiom; //导入依赖的package包/类
@Override
public void visit(@Nonnull OWLDisjointObjectPropertiesAxiom axiom) {
    for (OWLObjectPropertyExpression prop : axiom.getProperties()) {
        prop.accept(this);
    }
    processAxiomAnnotations(axiom);
}
 
开发者ID:matthewhorridge,项目名称:owlapi-gwt,代码行数:8,代码来源:AbstractEntityRegistrationManager.java

示例10: getAxiomWithoutAnnotations

import org.semanticweb.owlapi.model.OWLDisjointObjectPropertiesAxiom; //导入依赖的package包/类
@Nonnull
@Override
public OWLDisjointObjectPropertiesAxiom getAxiomWithoutAnnotations() {
    if (!isAnnotated()) {
        return this;
    }
    return new OWLDisjointObjectPropertiesAxiomImpl(getProperties(),
            NO_ANNOTATIONS);
}
 
开发者ID:matthewhorridge,项目名称:owlapi-gwt,代码行数:10,代码来源:OWLDisjointObjectPropertiesAxiomImpl.java

示例11: getAnnotatedAxiom

import org.semanticweb.owlapi.model.OWLDisjointObjectPropertiesAxiom; //导入依赖的package包/类
@Nonnull
@Override
public OWLDisjointObjectPropertiesAxiom getAnnotatedAxiom(
        @Nonnull Set<OWLAnnotation> annotations) {
    return new OWLDisjointObjectPropertiesAxiomImpl(getProperties(),
            mergeAnnos(annotations));
}
 
开发者ID:matthewhorridge,项目名称:owlapi-gwt,代码行数:8,代码来源:OWLDisjointObjectPropertiesAxiomImpl.java

示例12: asPairwiseAxioms

import org.semanticweb.owlapi.model.OWLDisjointObjectPropertiesAxiom; //导入依赖的package包/类
@Nonnull
@Override
public Set<OWLDisjointObjectPropertiesAxiom> asPairwiseAxioms() {
    Set<OWLDisjointObjectPropertiesAxiom> result = new HashSet<>();
    List<OWLObjectPropertyExpression> list = new ArrayList<>(
            getProperties());
    for (int i = 0; i < list.size() - 1; i++) {
        for (int j = i + 1; j < list.size(); j++) {
            result.add(new OWLDisjointObjectPropertiesAxiomImpl(
                    new HashSet<>(Arrays.asList(list.get(i), list.get(j))),
                    NO_ANNOTATIONS));
        }
    }
    return result;
}
 
开发者ID:matthewhorridge,项目名称:owlapi-gwt,代码行数:16,代码来源:OWLDisjointObjectPropertiesAxiomImpl.java

示例13: equals

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

示例14: visit

import org.semanticweb.owlapi.model.OWLDisjointObjectPropertiesAxiom; //导入依赖的package包/类
public void visit(OWLDisjointObjectPropertiesAxiom axiom) {
    notSupported(axiom);
}
 
开发者ID:kbss-cvut,项目名称:jopa,代码行数:4,代码来源:IntegrityConstraintParser.java

示例15: convert

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


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