当前位置: 首页>>代码示例>>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;未经允许,请勿转载。