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


Java OWLObjectOneOf.getIndividuals方法代码示例

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


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

示例1: visit

import org.semanticweb.owlapi.model.OWLObjectOneOf; //导入方法依赖的package包/类
public OWLClassExpression visit(OWLObjectOneOf object) {
     	//CHANGED
OWLClass definition=getDefinitionForNegativeNominal(object,m_alreadyExists);
if (!m_alreadyExists[0]) {
    for (OWLIndividual individual : object.getIndividuals()) {
        addFact(m_factory.getOWLClassAssertionAxiom(definition,individual));
    }
}
return definition;
         /*
         for (OWLIndividual ind : object.getIndividuals())
             if (ind.isAnonymous())
                 throw new IllegalArgumentException("Error: The class expression "+object+" contains anonymous individuals, which is not allowed in OWL 2 (erratum in first OWL 2 spec, to be fixed with next publication of minor corrections). ");
         return object;
         */
     }
 
开发者ID:wolpertinger-reasoner,项目名称:Wolpertinger,代码行数:17,代码来源:OWLNormalization.java

示例2: visit

import org.semanticweb.owlapi.model.OWLObjectOneOf; //导入方法依赖的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.OWLObjectOneOf; //导入方法依赖的package包/类
public void visit(OWLObjectOneOf object) {
    for (OWLIndividual individual : object.getIndividuals()) {
        Variable z=nextZ();
        AtomicConcept conceptForNominal=getConceptForNominal(individual);
        m_headAtoms.add(Atom.create(Equality.INSTANCE,X,z));
        m_bodyAtoms.add(Atom.create(conceptForNominal,z));
    }
}
 
开发者ID:robertoyus,项目名称:HermiT-android,代码行数:9,代码来源:OWLClausification.java

示例4: visit

import org.semanticweb.owlapi.model.OWLObjectOneOf; //导入方法依赖的package包/类
/**
 *
 * @see org.semanticweb.owlapi.model.OWLClassExpressionVisitor#visit(org.semanticweb.owlapi.model.OWLObjectOneOf)
 */

public void visit(OWLObjectOneOf owlOneOf) {
	boolean isFirst=true;
	for (OWLIndividual individual : owlOneOf.getIndividuals()) {
		if (individual.isNamed()){
			if (!isFirst)
				writer.write(ASP2CoreSymbols.CONJUNCTION);

			OWLClass guard = getNominalGuard(individual.asOWLNamedIndividual());
			visit(guard);
			isFirst=false;
		}
	}
}
 
开发者ID:wolpertinger-reasoner,项目名称:Wolpertinger,代码行数:19,代码来源:DebugTranslation.java

示例5: visit

import org.semanticweb.owlapi.model.OWLObjectOneOf; //导入方法依赖的package包/类
@Override
public IntegerClassExpression visit(OWLObjectOneOf ce) {
	Objects.requireNonNull(ce);
	Set<OWLIndividual> indivSet = ce.getIndividuals();
	if (indivSet.isEmpty()) {
		throw new TranslationException("It is not possible to translate ObjectOneOf with empty set.");
	}
	if (indivSet.size() > 1) {
		throw new TranslationException(
				"It is not possible to translate ObjectOneOf with multiple individuals: '" + indivSet + "'.");
	}
	return getDataTypeFactory().createObjectOneOf(translateIndividual(indivSet.iterator().next()));
}
 
开发者ID:julianmendez,项目名称:jcel,代码行数:14,代码来源:ClassExpressionTranslator.java

示例6: visit

import org.semanticweb.owlapi.model.OWLObjectOneOf; //导入方法依赖的package包/类
@Override
public void visit(@Nonnull OWLObjectOneOf ce) {
    for (OWLIndividual ind : ce.getIndividuals()) {
        ind.accept(this);
    }
}
 
开发者ID:matthewhorridge,项目名称:owlapi-gwt,代码行数:7,代码来源:AbstractEntityRegistrationManager.java


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