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


Java SWRLRule类代码示例

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


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

示例1: processAxioms

import org.semanticweb.owlapi.model.SWRLRule; //导入依赖的package包/类
public void processAxioms(Collection<? extends OWLAxiom> axioms) {
    AxiomVisitor axiomVisitor=new AxiomVisitor();
    for (OWLAxiom axiom : axioms)
        axiom.accept(axiomVisitor);
    // now all axioms are in NNF and converted into disjunctions wherever possible
    // exact cardinalities are rewritten into at least and at most cardinalities etc
    // Rules with multiple head atoms are rewritten into several rules (Lloyd-Topor transformation)

    // normalize rules, this might add new concept and data range inclusions
    // in case a rule atom uses a complex concept or data range
    // we keep this inclusions separate because they are only applied to named individuals
    RuleNormalizer ruleNormalizer=new RuleNormalizer(m_axioms.m_rules,axiomVisitor.m_classExpressionInclusionsAsDisjunctions,axiomVisitor.m_dataRangeInclusionsAsDisjunctions);
    for (SWRLRule rule : axiomVisitor.m_rules)
        ruleNormalizer.visit(rule);

    // in normalization, we now simplify the disjuncts where possible (eliminate
    // unnecessary conjuncts/disjuncts) and introduce fresh atomic concepts for complex
    // concepts m_axioms.m_conceptInclusions contains the normalized axioms after the normalization
    normalizeInclusions(axiomVisitor.m_classExpressionInclusionsAsDisjunctions,axiomVisitor.m_dataRangeInclusionsAsDisjunctions);
}
 
开发者ID:robertoyus,项目名称:HermiT-android,代码行数:21,代码来源:OWLNormalization.java

示例2: processAxioms

import org.semanticweb.owlapi.model.SWRLRule; //导入依赖的package包/类
public void processAxioms(Collection<? extends OWLAxiom> axioms) {
    AxiomVisitor axiomVisitor=new AxiomVisitor();

    for (OWLAxiom axiom : axioms) {
    	axiom = preprocessAssertion(axiom);
		axiom.accept(axiomVisitor);
    }

    // now all axioms are in NNF and converted into disjunctions wherever possible
    // exact cardinalities are rewritten into at least and at most cardinalities etc
    // Rules with multiple head atoms are rewritten into several rules (Lloyd-Topor transformation)

    // normalize rules, this might add new concept and data range inclusions
    // in case a rule atom uses a complex concept or data range
    // we keep this inclusions separate because they are only applied to named individuals
    RuleNormalizer ruleNormalizer=new RuleNormalizer(m_axioms.m_rules,axiomVisitor.m_classExpressionInclusionsAsDisjunctions,axiomVisitor.m_dataRangeInclusionsAsDisjunctions);
    for (SWRLRule rule : axiomVisitor.m_rules)
        ruleNormalizer.visit(rule);

    // in normalization, we now simplify the disjuncts where possible (eliminate
    // unnecessary conjuncts/disjuncts) and introduce fresh atomic concepts for complex
    // concepts m_axioms.m_conceptInclusions contains the normalized axioms after the normalization
    normalizeInclusions(axiomVisitor.m_classExpressionInclusionsAsDisjunctions,axiomVisitor.m_dataRangeInclusionsAsDisjunctions);
}
 
开发者ID:wolpertinger-reasoner,项目名称:Wolpertinger,代码行数:25,代码来源:OWLNormalization.java

示例3: isUnsupportedExtensionAxiom

import org.semanticweb.owlapi.model.SWRLRule; //导入依赖的package包/类
protected static boolean isUnsupportedExtensionAxiom(OWLAxiom axiom) {
	return axiom instanceof OWLSubObjectPropertyOfAxiom
			|| axiom instanceof OWLTransitiveObjectPropertyAxiom
			|| axiom instanceof OWLSubPropertyChainOfAxiom
			|| axiom instanceof OWLFunctionalObjectPropertyAxiom
			|| axiom instanceof OWLInverseFunctionalObjectPropertyAxiom
			|| axiom instanceof SWRLRule;
}
 
开发者ID:robertoyus,项目名称:HermiT-android,代码行数:9,代码来源:Reasoner.java

示例4: getAxiomWithoutAnnotations

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

示例5: equals

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

示例6: compareObjectOfSameType

import org.semanticweb.owlapi.model.SWRLRule; //导入依赖的package包/类
@Override
protected int compareObjectOfSameType(OWLObject object) {
    SWRLRule other = (SWRLRule) object;
    int diff = compareSets(getBody(), other.getBody());
    if (diff == 0) {
        diff = compareSets(getHead(), other.getHead());
    }
    return diff;
}
 
开发者ID:matthewhorridge,项目名称:owlapi-gwt,代码行数:10,代码来源:SWRLRuleImpl.java

示例7: visit

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

示例8: AxiomVisitor

import org.semanticweb.owlapi.model.SWRLRule; //导入依赖的package包/类
public AxiomVisitor() {
    m_classExpressionInclusionsAsDisjunctions=new ArrayList<OWLClassExpression[]>();
    m_dataRangeInclusionsAsDisjunctions=new ArrayList<OWLDataRange[]>();
    m_rules=new HashSet<SWRLRule>();
    m_alreadyExists=new boolean[1];
}
 
开发者ID:robertoyus,项目名称:HermiT-android,代码行数:7,代码来源:OWLNormalization.java

示例9: visit

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

示例10: visit

import org.semanticweb.owlapi.model.SWRLRule; //导入依赖的package包/类
public Atom visit(SWRLRule rule) {
    throw new IllegalStateException("Internal error: this part of the code is unused.");
}
 
开发者ID:robertoyus,项目名称:HermiT-android,代码行数:4,代码来源:OWLClausification.java

示例11: visit

import org.semanticweb.owlapi.model.SWRLRule; //导入依赖的package包/类
public Boolean visit(SWRLRule rule) {
    throw new UnsupportedOperationException();
}
 
开发者ID:robertoyus,项目名称:HermiT-android,代码行数:4,代码来源:EntailmentChecker.java

示例12: visit

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

示例13: convert

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

示例14: visit

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

示例15: visit

import org.semanticweb.owlapi.model.SWRLRule; //导入依赖的package包/类
@Override
public void visit(SWRLRule rule) {
	defaultVisit(rule);
}
 
开发者ID:liveontologies,项目名称:elk-reasoner,代码行数:5,代码来源:FailingOwlAxiomVisitor.java


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