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


Java OWLAxiom.accept方法代码示例

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


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

示例1: processAxioms

import org.semanticweb.owlapi.model.OWLAxiom; //导入方法依赖的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.OWLAxiom; //导入方法依赖的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: parse

import org.semanticweb.owlapi.model.OWLAxiom; //导入方法依赖的package包/类
public void parse() {
    final IntegrityConstraintParser parser = new IntegrityConstraintParser();
    for (final OWLAxiom a : axioms) {
        a.accept(parser);
    }
    this.set = parser.getClassIntegrityConstraintSet();
}
 
开发者ID:kbss-cvut,项目名称:jopa,代码行数:8,代码来源:ContextDefinition.java

示例4: entails

import org.semanticweb.owlapi.model.OWLAxiom; //导入方法依赖的package包/类
/**
 * Checks entailment of a set of axioms (an ontology) against the loaded ontology.
 *
 * @param axioms
 *            the axioms that should be checked for enailment
 * @return true if all axioms follow from the loaded ontology and false otherwise.
 */
public boolean entails(Set<? extends OWLAxiom> axioms) {
    anonymousIndividualAxioms.clear();
    for (OWLAxiom axiom : axioms) {
        if (axiom.isLogicalAxiom())
            if (!axiom.accept(this))
                return false;
    }
    return checkAnonymousIndividuals();
}
 
开发者ID:robertoyus,项目名称:HermiT-android,代码行数:17,代码来源:EntailmentChecker.java

示例5: removeCardinalityConstraints

import org.semanticweb.owlapi.model.OWLAxiom; //导入方法依赖的package包/类
/**
 * Remove the cardinality constraints, by removing the axioms and replacing
 * them with the weaker axioms without the constraints.
 * 
 * @param ontology
 */
public static void removeCardinalityConstraints(OWLOntology ontology) {
	CardinalityRemover remover = new CardinalityRemover(ontology);
	for(OWLAxiom axiom : ontology.getAxioms()) {
		axiom.accept(remover);
	}
}
 
开发者ID:owlcollab,项目名称:owltools,代码行数:13,代码来源:CardinalityContraintsTools.java

示例6: findCardinalityConstraints

import org.semanticweb.owlapi.model.OWLAxiom; //导入方法依赖的package包/类
/**
 * Find the axioms with cardinality constraints. Creates also the weaker
 * axioms as potential replacement.
 * 
 * @param ontology
 * @return reporter with the axiom potential changes
 */
public static CardinalityReporter findCardinalityConstraints(OWLOntology ontology) {
	CardinalityReporter reporter = new CardinalityReporter(ontology);
	for(OWLAxiom axiom : ontology.getAxioms()) {
		axiom.accept(reporter);
	}
	return reporter;
}
 
开发者ID:owlcollab,项目名称:owltools,代码行数:15,代码来源:CardinalityContraintsTools.java

示例7: OWLAlignmentReader

import org.semanticweb.owlapi.model.OWLAxiom; //导入方法依赖的package包/类
public OWLAlignmentReader(String owl_alignment_file) throws Exception{
	
	//try{
		OWLOntology onto_mappings = loadOntology(owl_alignment_file);
		
		for (OWLAxiom ax : onto_mappings.getAxioms()){
		
			//System.out.println(ax);
			
			owlMappingAxiomVisitor.reInitValues();
			
			ax.accept(owlMappingAxiomVisitor);
		
			/*System.out.println(owlMappingAxiomVisitor.getIRIEntity1() + "\n" +
					owlMappingAxiomVisitor.getIRIEntity2() + "\n" +
					owlMappingAxiomVisitor.getMeasure() + "\n" +
					owlMappingAxiomVisitor.getRelation() + "\n" +
					owlMappingAxiomVisitor.getTypeMapping());
			*/
			
			if (owlMappingAxiomVisitor.getIRIEntity1()==null || owlMappingAxiomVisitor.getIRIEntity2()==null
				|| owlMappingAxiomVisitor.getIRIEntity1().equals("") || owlMappingAxiomVisitor.getIRIEntity2().equals(""))
				continue; //no good axioms
			
			
			//Add for all axioms? I think so...
			mappings.add(new MappingObjectStr(
					owlMappingAxiomVisitor.getIRIEntity1(), 
					owlMappingAxiomVisitor.getIRIEntity2(), 
					owlMappingAxiomVisitor.getMeasure(),
					owlMappingAxiomVisitor.getRelation(),
					owlMappingAxiomVisitor.getTypeMapping()));	
		}
		
		LogOutput.print("Read OWL mapping objects: " + getMappingObjectsSize());
		
	//}
	//catch (Exception e){
	//	System.err.println("Error reading OWL mappings file: " + e.getMessage());
	//}
	
}
 
开发者ID:ernestojimenezruiz,项目名称:logmap-matcher,代码行数:43,代码来源:OWLAlignmentReader.java

示例8: convert

import org.semanticweb.owlapi.model.OWLAxiom; //导入方法依赖的package包/类
@SuppressWarnings("static-method")
public ElkAxiom convert(OWLAxiom owlAxiom) {
	return owlAxiom.accept(OWL_AXIOM_CONVERTER);
}
 
开发者ID:liveontologies,项目名称:elk-reasoner,代码行数:5,代码来源:OwlConverter.java

示例9: accept

import org.semanticweb.owlapi.model.OWLAxiom; //导入方法依赖的package包/类
@Override
public boolean accept(OWLAxiom axiom) {
	Objects.requireNonNull(axiom);
	return axiom.accept(this);
}
 
开发者ID:julianmendez,项目名称:born,代码行数:6,代码来源:CycleDetector.java

示例10: changeAxiomAnnotations

import org.semanticweb.owlapi.model.OWLAxiom; //导入方法依赖的package包/类
/**
 * Update the given axiom to the new set of axiom annotation. Recreates the
 * axiom with the new annotations using the given factory.
 * 
 * @param axiom
 * @param annotations
 * @param factory
 * @return newAxiom
 */
public static OWLAxiom changeAxiomAnnotations(OWLAxiom axiom, Set<OWLAnnotation> annotations, OWLDataFactory factory) {
	final AxiomAnnotationsChanger changer = new AxiomAnnotationsChanger(annotations, factory);
	final OWLAxiom newAxiom = axiom.accept(changer);
	return newAxiom;
}
 
开发者ID:owlcollab,项目名称:owltools,代码行数:15,代码来源:AxiomAnnotationTools.java


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