當前位置: 首頁>>代碼示例>>Java>>正文


Java OWLClassExpression.accept方法代碼示例

本文整理匯總了Java中org.semanticweb.owlapi.model.OWLClassExpression.accept方法的典型用法代碼示例。如果您正苦於以下問題:Java OWLClassExpression.accept方法的具體用法?Java OWLClassExpression.accept怎麽用?Java OWLClassExpression.accept使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.semanticweb.owlapi.model.OWLClassExpression的用法示例。


在下文中一共展示了OWLClassExpression.accept方法的12個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: visit

import org.semanticweb.owlapi.model.OWLClassExpression; //導入方法依賴的package包/類
@Override
public HandlerResult visit(OWLObjectUnionOf unionOf) {
	Set<OWLClassExpression> newOperands = new HashSet<OWLClassExpression>();
	boolean changed = false;
	for (OWLClassExpression ce : unionOf.getOperands()) {
		HandlerResult handlerResult = ce.accept(this);
		if (handlerResult != null) {
			if (handlerResult.remove) {
				return HandlerResult.remove();
			}
			changed = true;
			newOperands.add(handlerResult.modified);
		}
		else {
			newOperands.add(ce);
		}
	}
	if (changed) {
		if (newOperands.size() == 1) {
			return HandlerResult.modified(newOperands.iterator().next());
		}
		return HandlerResult.modified(factory.getOWLObjectUnionOf(newOperands));
	}
	return null;
}
 
開發者ID:owlcollab,項目名稱:owltools,代碼行數:26,代碼來源:CardinalityContraintsTools.java

示例2: unfoldExpressions

import org.semanticweb.owlapi.model.OWLClassExpression; //導入方法依賴的package包/類
Set<OWLClassExpression> unfoldExpressions(Collection<OWLClassExpression> expressions) {
	Set<OWLClassExpression> unfolded = new HashSet<OWLClassExpression>();
	boolean changed = false;
	
	for (OWLClassExpression expression : expressions) {
		OWLClassExpression unfoldedExpression = expression.accept(this);
		if (unfoldedExpression != null) {
			changed = true;
			unfolded.add(unfoldedExpression);
		}
		else {
			unfolded.add(expression);
		}
	}
	
	if (changed) {
		return unfolded;
	}
	return null;
}
 
開發者ID:owlcollab,項目名稱:owltools,代碼行數:21,代碼來源:TBoxUnFoldingTool.java

示例3: unfoldAxiom

import org.semanticweb.owlapi.model.OWLClassExpression; //導入方法依賴的package包/類
OWLEquivalentClassesAxiom unfoldAxiom(OWLEquivalentClassesAxiom ax, OWLClass owlClass) {
	Set<OWLClassExpression> existing = ax.getClassExpressionsMinus(owlClass);
	OWLClassExpression ce;
	if (existing == null || existing.isEmpty()) {
		return null;
	}
	else if (existing.size() == 1) {
		ce = existing.iterator().next();
	}
	else {
		ce = factory.getOWLObjectIntersectionOf(existing);
	}
	if(LOG.isDebugEnabled()) {
		LOG.debug("Unfolding axiom: "+ax);
	}
	OWLClassExpression unfolded = ce.accept(this);
	
	if (unfolded != null) {
		return factory.getOWLEquivalentClassesAxiom(owlClass, unfolded);
	}
	return null;
}
 
開發者ID:owlcollab,項目名稱:owltools,代碼行數:23,代碼來源:TBoxUnFoldingTool.java

示例4: visit

import org.semanticweb.owlapi.model.OWLClassExpression; //導入方法依賴的package包/類
@Override
public OWLObjectMaxCardinality visit(OWLObjectMaxCardinality ce) {
	if (LOG.isDebugEnabled()) {
		LOG.debug("Unfolding max_cardinality: "+ce);
	}
	OWLClassExpression filler = ce.getFiller();
	if (filler != null) {
		OWLClassExpression unfold = filler.accept(this);
		if (unfold != null) {
			return factory.getOWLObjectMaxCardinality(ce.getCardinality(), ce.getProperty(), unfold);
		}
	}
	return null;
}
 
開發者ID:owlcollab,項目名稱:owltools,代碼行數:15,代碼來源:TBoxUnFoldingTool.java

示例5: visit

import org.semanticweb.owlapi.model.OWLClassExpression; //導入方法依賴的package包/類
public void visit(OWLSubClassOfAxiom subClassAxiom) {
	OWLClassExpression subClass = subClassAxiom.getSubClass();
	OWLClassExpression supClass = subClassAxiom.getSuperClass();
	
	subClass.accept(this);
	supClass.accept(this);
}
 
開發者ID:wolpertinger-reasoner,項目名稱:Wolpertinger,代碼行數:8,代碼來源:NiceAxiomPrinter.java

示例6: getDefinitionFor

import org.semanticweb.owlapi.model.OWLClassExpression; //導入方法依賴的package包/類
protected OWLClassExpression getDefinitionFor(OWLClassExpression description,boolean[] alreadyExists,boolean forcePositive) {
    OWLClassExpression definition=m_definitions.get(description);
    if (definition==null || (forcePositive && !(definition instanceof OWLClass))) {
        definition=m_factory.getOWLClass(IRI.create("internal:def#"+(m_definitions.size()+m_firstReplacementIndex)));
        if (!forcePositive && !description.accept(m_plVisitor))
            definition=m_factory.getOWLObjectComplementOf(definition);
        m_definitions.put(description,definition);
        alreadyExists[0]=false;
    }
    else
        alreadyExists[0]=true;
    return definition;
}
 
開發者ID:wolpertinger-reasoner,項目名稱:Wolpertinger,代碼行數:14,代碼來源:OWLNormalization.java

示例7: visit

import org.semanticweb.owlapi.model.OWLClassExpression; //導入方法依賴的package包/類
public void visit(OWLObjectIntersectionOf arg0) {
    for (final OWLClassExpression e : arg0.getOperands()) {
        e.accept(this);
    }
}
 
開發者ID:kbss-cvut,項目名稱:jopa,代碼行數:6,代碼來源:IntegrityConstraintClassParser.java

示例8: visit

import org.semanticweb.owlapi.model.OWLClassExpression; //導入方法依賴的package包/類
public void visit(OWLObjectIntersectionOf object) {
    for (OWLClassExpression description : object.getOperands())
        description.accept(this);
}
 
開發者ID:robertoyus,項目名稱:HermiT-android,代碼行數:5,代碼來源:BuiltInPropertyManager.java

示例9: getNNF

import org.semanticweb.owlapi.model.OWLClassExpression; //導入方法依賴的package包/類
public OWLClassExpression getNNF(OWLClassExpression description) {
    return description.accept(m_descriptionNNFVisitor);
}
 
開發者ID:wolpertinger-reasoner,項目名稱:Wolpertinger,代碼行數:4,代碼來源:ExpressionManager.java

示例10: translateClassExpression

import org.semanticweb.owlapi.model.OWLClassExpression; //導入方法依賴的package包/類
public IntegerClassExpression translateClassExpression(OWLClassExpression owlClassExpression)
		throws TranslationException {
	return owlClassExpression.accept(getClassExpressionTranslator());
}
 
開發者ID:julianmendez,項目名稱:jcel,代碼行數:5,代碼來源:AxiomTranslator.java

示例11: visit

import org.semanticweb.owlapi.model.OWLClassExpression; //導入方法依賴的package包/類
public Boolean visit(OWLObjectUnionOf object) {
    for (OWLClassExpression desc : object.getOperands())
        if (desc.accept(this))
            return Boolean.TRUE;
    return Boolean.FALSE;
}
 
開發者ID:wolpertinger-reasoner,項目名稱:Wolpertinger,代碼行數:7,代碼來源:OWLNormalization.java

示例12: classExprToATerm

import org.semanticweb.owlapi.model.OWLClassExpression; //導入方法依賴的package包/類
public static ATermAppl classExprToATerm(	OWLClassExpression classExpr,
											KnowledgeBase kb) {
	
	PelletVisitor visitor = new PelletVisitor(kb); 
	
	classExpr.accept( visitor );
	
	return visitor.result();
}
 
開發者ID:klinovp,項目名稱:pronto,代碼行數:10,代碼來源:CCUtils.java


注:本文中的org.semanticweb.owlapi.model.OWLClassExpression.accept方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。