當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。