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


Java OWLObjectComplementOf.getOperand方法代码示例

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


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

示例1: visit

import org.semanticweb.owlapi.model.OWLObjectComplementOf; //导入方法依赖的package包/类
public void visit(OWLObjectComplementOf object) {
    OWLClassExpression description=object.getOperand();
    if (description instanceof OWLObjectHasSelf) {
        OWLObjectPropertyExpression objectProperty=((OWLObjectHasSelf)description).getProperty();
        Atom roleAtom=getRoleAtom(objectProperty,X,X);
        m_bodyAtoms.add(roleAtom);
    }
    else if (description instanceof OWLObjectOneOf && ((OWLObjectOneOf)description).getIndividuals().size()==1) {
        OWLIndividual individual=((OWLObjectOneOf)description).getIndividuals().iterator().next();
        m_bodyAtoms.add(Atom.create(getConceptForNominal(individual),X));
    }
    else if (!(description instanceof OWLClass))
        throw new IllegalStateException("Internal error: invalid normal form.");
    else
        m_bodyAtoms.add(Atom.create(AtomicConcept.create(((OWLClass)description).getIRI().toString()),X));
}
 
开发者ID:robertoyus,项目名称:HermiT-android,代码行数:17,代码来源:OWLClausification.java

示例2: visit

import org.semanticweb.owlapi.model.OWLObjectComplementOf; //导入方法依赖的package包/类
public OWLClassExpression visit(OWLObjectComplementOf object) {
    if (isNominal(object.getOperand())) {
        OWLObjectOneOf objectOneOf=(OWLObjectOneOf)object.getOperand();
        OWLClass definition=getDefinitionForNegativeNominal(objectOneOf,m_alreadyExists);
        if (!m_alreadyExists[0])
            for (OWLIndividual individual : objectOneOf.getIndividuals())
                addFact(m_factory.getOWLClassAssertionAxiom(definition,individual));
        return m_factory.getOWLObjectComplementOf(definition);
    }
    else
        return object;
}
 
开发者ID:robertoyus,项目名称:HermiT-android,代码行数:13,代码来源:OWLNormalization.java

示例3: visit

import org.semanticweb.owlapi.model.OWLObjectComplementOf; //导入方法依赖的package包/类
@Override
public OWLObjectComplementOf visit(OWLObjectComplementOf ce) {
	if (LOG.isDebugEnabled()) {
		LOG.debug("Unfolding complement_of: "+ce);
	}
	
	OWLClassExpression operand = ce.getOperand();
	if (operand != null) {
		OWLClassExpression unfold = operand.accept(this);
		if (unfold != null) {
			return factory.getOWLObjectComplementOf(unfold);
		}
	}
	return null;
}
 
开发者ID:owlcollab,项目名称:owltools,代码行数:16,代码来源:TBoxUnFoldingTool.java

示例4: visit

import org.semanticweb.owlapi.model.OWLObjectComplementOf; //导入方法依赖的package包/类
public OWLClassExpression visit(OWLObjectComplementOf object) {
    if (isNominal(object.getOperand())) {
        OWLObjectOneOf objectOneOf=(OWLObjectOneOf)object.getOperand();
        OWLClass definition=getDefinitionForNegativeNominal(objectOneOf,m_alreadyExists);
        if (!m_alreadyExists[0]) {
            for (OWLIndividual individual : objectOneOf.getIndividuals()) {
                addFact(m_factory.getOWLClassAssertionAxiom(definition,individual));
            }
        }
        return m_factory.getOWLObjectComplementOf(definition);
    }
    else
        return object;
}
 
开发者ID:wolpertinger-reasoner,项目名称:Wolpertinger,代码行数:15,代码来源:OWLNormalization.java

示例5: visit

import org.semanticweb.owlapi.model.OWLObjectComplementOf; //导入方法依赖的package包/类
/**
 * We assume that we deal with a normalized axioms, i.e. they are in NNF and structural transformation took place.
 *
 * Thereofre we test here whether the operand
 * @see org.semanticweb.owlapi.model.OWLClassExpressionVisitor#visit(org.semanticweb.owlapi.model.OWLObjectComplementOf)
 */

public void visit(OWLObjectComplementOf objComplementOf) {
	OWLClassExpression operand = objComplementOf.getOperand();
	if (operand instanceof OWLClass) {
		OWLClass owlClass = operand.asOWLClass();
		String predicateName = mapper.getPredicateName(owlClass);

		writer.print(predicateName);
		writer.print(ASP2CoreSymbols.BRACKET_OPEN);
		writer.print(var.currentVar());
		writer.print(ASP2CoreSymbols.BRACKET_CLOSE);

		if (isAuxiliaryClass(owlClass)) auxClasses.add(owlClass);
	}
	//
	else if (operand instanceof OWLObjectHasSelf) {
		OWLObjectHasSelf owlHasSelf = (OWLObjectHasSelf) operand;
		OWLObjectProperty property = owlHasSelf.getProperty().asOWLObjectProperty();
		String propertyName = mapper.getPredicateName(property);
		String cVar = var.currentVar();

		// r(X,X)
		writer.print(propertyName);
		writer.print(ASP2CoreSymbols.BRACKET_OPEN);
		writer.print(cVar);
		writer.print(ASP2CoreSymbols.ARG_SEPERATOR);
		writer.print(cVar);
		writer.print(ASP2CoreSymbols.BRACKET_CLOSE);
	}
	else if (operand instanceof OWLObjectOneOf) {
		throw new NotImplementedException();
	}
}
 
开发者ID:wolpertinger-reasoner,项目名称:Wolpertinger,代码行数:40,代码来源:DebugTranslation.java

示例6: visit

import org.semanticweb.owlapi.model.OWLObjectComplementOf; //导入方法依赖的package包/类
/**
 * We assume that we deal with a normalized axioms, i.e. they are in NNF and structural transformation took place.
 *
 * Thereofre we test here whether the operand
 * @see org.semanticweb.owlapi.model.OWLClassExpressionVisitor#visit(org.semanticweb.owlapi.model.OWLObjectComplementOf)
 */

public void visit(OWLObjectComplementOf objComplementOf) {
	OWLClassExpression operand = objComplementOf.getOperand();

	if (operand instanceof OWLClass) {
		OWLClass owlClass = operand.asOWLClass();
		String predicateName = mapper.getPredicateName(owlClass);

		writer.print(predicateName);
		writer.print(ASP2CoreSymbols.BRACKET_OPEN);
		writer.print(var.currentVar());
		writer.print(ASP2CoreSymbols.BRACKET_CLOSE);

		if (isAuxiliaryClass(owlClass)) auxClasses.add(owlClass);
	}
	else if (operand instanceof OWLObjectHasSelf) {
		OWLObjectHasSelf owlHasSelf = (OWLObjectHasSelf) operand;
		OWLObjectProperty property = owlHasSelf.getProperty().asOWLObjectProperty();
		String propertyName = mapper.getPredicateName(property);
		String cVar = var.currentVar();

		// r(X,X)
		writer.print(propertyName);
		writer.print(ASP2CoreSymbols.BRACKET_OPEN);
		writer.print(cVar);
		writer.print(ASP2CoreSymbols.ARG_SEPERATOR);
		writer.print(cVar);
		writer.print(ASP2CoreSymbols.BRACKET_CLOSE);
	}
	else if (operand instanceof OWLObjectOneOf) {
		throw new NotImplementedException();
	}
}
 
开发者ID:wolpertinger-reasoner,项目名称:Wolpertinger,代码行数:40,代码来源:NaiveTranslation.java

示例7: visit

import org.semanticweb.owlapi.model.OWLObjectComplementOf; //导入方法依赖的package包/类
@Override
public OWLClassExpression visit(OWLObjectComplementOf ce) {
	OWLClassExpression operand = ce.getOperand();
	OWLClassExpression shortendedOperand = operand.accept(this);
	if(shortendedOperand.isOWLThing()){// \neg \top \equiv \bot
		return df.getOWLNothing();
	} else if(shortendedOperand.isOWLNothing()){// \neg \bot \equiv \top
		return df.getOWLThing();
	} else if(operand != shortendedOperand){
		return df.getOWLObjectComplementOf(shortendedOperand);
	}
	return ce;
}
 
开发者ID:SmartDataAnalytics,项目名称:OWL2SPARQL,代码行数:14,代码来源:OWLClassExpressionMinimizer.java


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