本文整理汇总了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;
*/
}
示例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;
}
示例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));
}
}
示例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;
}
}
}
示例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()));
}
示例6: visit
import org.semanticweb.owlapi.model.OWLObjectOneOf; //导入方法依赖的package包/类
@Override
public void visit(@Nonnull OWLObjectOneOf ce) {
for (OWLIndividual ind : ce.getIndividuals()) {
ind.accept(this);
}
}