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


Java OWLNegativeObjectPropertyAssertionAxiom类代码示例

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


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

示例1: visit

import org.semanticweb.owlapi.model.OWLNegativeObjectPropertyAssertionAxiom; //导入依赖的package包/类
/**
 *
 * @see org.semanticweb.owlapi.model.OWLAxiomVisitor#visit(org.semanticweb.owlapi.model.OWLNegativeObjectPropertyAssertionAxiom)
 */

public void visit(OWLNegativeObjectPropertyAssertionAxiom negObjPropertyAssertion) {
	//assert !negObjPropertyAssertion.getProperty().isAnonymous();

	OWLObjectProperty property = negObjPropertyAssertion.getProperty().asOWLObjectProperty();
	String propertyName = mapper.getPredicateName(property);

	OWLNamedIndividual subject = negObjPropertyAssertion.getSubject().asOWLNamedIndividual();
	OWLNamedIndividual object = negObjPropertyAssertion.getObject().asOWLNamedIndividual();

	String subjectName = mapper.getConstantName(subject);
	String objectName = mapper.getConstantName(object);

	writer.print("not_");
	writer.print(propertyName);
	writer.print(ASP2CoreSymbols.BRACKET_OPEN);
	writer.print(subjectName);
	writer.print(ASP2CoreSymbols.ARG_SEPERATOR);
	writer.print(objectName);
	writer.print(ASP2CoreSymbols.BRACKET_CLOSE);
	writer.print(ASP2CoreSymbols.EOR);
}
 
开发者ID:wolpertinger-reasoner,项目名称:Wolpertinger,代码行数:27,代码来源:DebugTranslation.java

示例2: visit

import org.semanticweb.owlapi.model.OWLNegativeObjectPropertyAssertionAxiom; //导入依赖的package包/类
/**
 *
 * @see org.semanticweb.owlapi.model.OWLAxiomVisitor#visit(org.semanticweb.owlapi.model.OWLNegativeObjectPropertyAssertionAxiom)
 */

public void visit(OWLNegativeObjectPropertyAssertionAxiom negObjPropertyAssertion) {
	//assert !negObjPropertyAssertion.getProperty().isAnonymous();

	OWLObjectProperty property = negObjPropertyAssertion.getProperty().asOWLObjectProperty();
	String propertyName = mapper.getPredicateName(property);

	OWLNamedIndividual subject = negObjPropertyAssertion.getSubject().asOWLNamedIndividual();
	OWLNamedIndividual object = negObjPropertyAssertion.getObject().asOWLNamedIndividual();

	String subjectName = mapper.getConstantName(subject);
	String objectName = mapper.getConstantName(object);

	writer.print(ASP2CoreSymbols.CLASSICAL_NEGATION);
	writer.print(propertyName);
	writer.print(ASP2CoreSymbols.BRACKET_OPEN);
	writer.print(subjectName);
	writer.print(ASP2CoreSymbols.ARG_SEPERATOR);
	writer.print(objectName);
	writer.print(ASP2CoreSymbols.BRACKET_CLOSE);
	writer.print(ASP2CoreSymbols.EOR);
}
 
开发者ID:wolpertinger-reasoner,项目名称:Wolpertinger,代码行数:27,代码来源:NaiveTranslation.java

示例3: rewriteNegativeObjectPropertyAssertions

import org.semanticweb.owlapi.model.OWLNegativeObjectPropertyAssertionAxiom; //导入依赖的package包/类
public int rewriteNegativeObjectPropertyAssertions(OWLDataFactory factory,OWLAxioms axioms,int replacementIndex) {
    // now object property inclusion manager added all non-simple properties to axioms.m_complexObjectPropertyExpressions
    // now that we know which roles are non-simple, we can decide which negative object property assertions have to be
    // expressed as concept assertions so that transitivity rewriting applies properly. All new concepts for the concept
    // assertions must be normalised, because we are done with the normal normalisation phase.
    Set<OWLIndividualAxiom> redundantFacts=new HashSet<OWLIndividualAxiom>();
    Set<OWLIndividualAxiom> additionalFacts=new HashSet<OWLIndividualAxiom>();
    for (OWLIndividualAxiom axiom : axioms.m_facts) {
        if (axiom instanceof OWLNegativeObjectPropertyAssertionAxiom) {
            OWLNegativeObjectPropertyAssertionAxiom negAssertion=(OWLNegativeObjectPropertyAssertionAxiom)axiom;
            OWLObjectPropertyExpression prop=negAssertion.getProperty().getSimplified();
            if (axioms.m_complexObjectPropertyExpressions.contains(prop)) {
                // turn not op(a b) into
                // C(a) and not C or forall op not{b}
                OWLIndividual individual=negAssertion.getObject();
                // neg. op assertions cannot contain anonymous individuals
                OWLClass individualConcept=factory.getOWLClass(IRI.create("internal:nom#"+individual.asOWLNamedIndividual().getIRI().toString()));
                OWLClassExpression notIndividualConcept=factory.getOWLObjectComplementOf(individualConcept);
                OWLClassExpression allNotIndividualConcept=factory.getOWLObjectAllValuesFrom(prop,notIndividualConcept);
                OWLClassExpression definition=factory.getOWLClass(IRI.create("internal:def#"+(replacementIndex++)));
                axioms.m_conceptInclusions.add(new OWLClassExpression[] { factory.getOWLObjectComplementOf(definition), allNotIndividualConcept });
                additionalFacts.add(factory.getOWLClassAssertionAxiom(definition,negAssertion.getSubject()));
                additionalFacts.add(factory.getOWLClassAssertionAxiom(individualConcept,individual));
                redundantFacts.add(negAssertion);
            }
        }
    }
    axioms.m_facts.addAll(additionalFacts);
    axioms.m_facts.removeAll(redundantFacts);
    return replacementIndex;
}
 
开发者ID:robertoyus,项目名称:HermiT-android,代码行数:32,代码来源:ObjectPropertyInclusionManager.java

示例4: visit

import org.semanticweb.owlapi.model.OWLNegativeObjectPropertyAssertionAxiom; //导入依赖的package包/类
public Boolean visit(OWLNegativeObjectPropertyAssertionAxiom axiom) {
    // see OWL 2 Syntax, Sec 11.2
    // No axiom in Ax of the following form contains anonymous individuals:
    // SameIndividual, DifferentIndividuals, NegativeObjectPropertyAssertion, and NegativeDataPropertyAssertion.
    if (axiom.getSubject().isAnonymous()||axiom.getObject().isAnonymous()) {
        throw new IllegalArgumentException("NegativeObjectPropertyAssertion axioms are not allowed to be used "+"with anonymous individuals (see OWL 2 Syntax Sec 11.2) but the axiom "+axiom+" cotains an anonymous subject or object. ");
    }
    OWLClassExpression hasValue=factory.getOWLObjectHasValue(axiom.getProperty(),axiom.getObject());
    OWLClassExpression doesNotHaveValue=factory.getOWLObjectComplementOf(hasValue);
    return reasoner.hasType(axiom.getSubject().asOWLNamedIndividual(),doesNotHaveValue,false);
}
 
开发者ID:robertoyus,项目名称:HermiT-android,代码行数:12,代码来源:EntailmentChecker.java

示例5: visit

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

示例6: visit

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

示例7: visit

import org.semanticweb.owlapi.model.OWLNegativeObjectPropertyAssertionAxiom; //导入依赖的package包/类
@Override
public Set<ComplexIntegerAxiom> visit(OWLNegativeObjectPropertyAssertionAxiom axiom) {
	Objects.requireNonNull(axiom);
	IntegerObjectPropertyExpression propertyExpr = translateObjectPropertyExpression(axiom.getProperty());
	Integer subjectId = translateIndividual(axiom.getSubject());
	Integer objectId = translateIndividual(axiom.getObject());
	ComplexIntegerAxiom ret = getAxiomFactory().createNegativeObjectPropertyAssertionAxiom(propertyExpr, subjectId,
			objectId, translateAnnotations(axiom.getAnnotations()));
	return Collections.singleton(ret);
}
 
开发者ID:julianmendez,项目名称:jcel,代码行数:11,代码来源:AxiomTranslator.java

示例8: visit

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

示例9: getAxiomWithoutAnnotations

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

示例10: equals

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

示例11: visit

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

示例12: readAxiom

import org.semanticweb.owlapi.model.OWLNegativeObjectPropertyAssertionAxiom; //导入依赖的package包/类
@Override
protected OWLNegativeObjectPropertyAssertionAxiom readAxiom(BinaryOWLInputStream inputStream, Set<OWLAnnotation> annotations) throws IOException, BinaryOWLParseException {
    OWLObjectPropertyExpression property = inputStream.readOWLObject();
    OWLIndividual subject = inputStream.readOWLObject();
    OWLIndividual object = inputStream.readOWLObject();
    return inputStream.getDataFactory().getOWLNegativeObjectPropertyAssertionAxiom(property, subject, object, annotations);
}
 
开发者ID:matthewhorridge,项目名称:binaryowl,代码行数:8,代码来源:OWLNegativeObjectPropertyAssertionAxiomSerializer.java

示例13: visit

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

示例14: visit

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

示例15: visit

import org.semanticweb.owlapi.model.OWLNegativeObjectPropertyAssertionAxiom; //导入依赖的package包/类
public void visit(OWLNegativeObjectPropertyAssertionAxiom axiom) {
    if (axiom.containsAnonymousIndividuals())
        throw new IllegalArgumentException("The axiom "+axiom+" contains anonymous individuals, which is not allowed in OWL 2 DL. ");
    addFact(m_factory.getOWLNegativeObjectPropertyAssertionAxiom(axiom.getProperty().getSimplified(),axiom.getSubject(),axiom.getObject()));
    m_axioms.m_objectPropertiesOccurringInOWLAxioms.add(axiom.getProperty().getNamedProperty());
}
 
开发者ID:robertoyus,项目名称:HermiT-android,代码行数:7,代码来源:OWLNormalization.java


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