use of fr.lirmm.graphik.graal.api.core.InMemoryAtomSet in project graal by graphik-team.
the class OWLAxiomParser method visit.
@Override
public Iterable<? extends Object> visit(OWLInverseFunctionalObjectPropertyAxiom arg) {
InMemoryAtomSet body = arg.getProperty().accept(propertyVisitorXZ);
body.addAll(arg.getProperty().accept(propertyVisitorYZ));
InMemoryAtomSet head = GraalUtils.createAtomSet(new DefaultAtom(equalityPredicate, glueVarX, glueVarY));
return Collections.<Rule>singleton(DefaultRuleFactory.instance().create(body, head));
}
use of fr.lirmm.graphik.graal.api.core.InMemoryAtomSet in project graal by graphik-team.
the class OWLAxiomParser method functionalPropertyAxiom.
// /////////////////////////////////////////////////////////////////////////
// PRIVATE METHODS
// /////////////////////////////////////////////////////////////////////////
private Iterable<? extends Object> functionalPropertyAxiom(OWLPropertyExpression property) {
InMemoryAtomSet body = property.accept(propertyVisitorXY);
body.addAll(property.accept(propertyVisitorXZ));
InMemoryAtomSet head = GraalUtils.createAtomSet(new DefaultAtom(equalityPredicate, glueVarY, glueVarZ));
return Collections.<Rule>singleton(DefaultRuleFactory.instance().create(body, head));
}
use of fr.lirmm.graphik.graal.api.core.InMemoryAtomSet in project graal by graphik-team.
the class OWLAxiomParser method visit.
// /////////////////////////////////////////////////////////////////////////
// PropertyChain
// /////////////////////////////////////////////////////////////////////////
@Override
public Iterable<? extends Object> visit(OWLSubPropertyChainOfAxiom arg) {
freeVarGen.setIndex(0);
InMemoryAtomSet body = GraalUtils.createAtomSet();
Term varX, varY, firstVarInChain;
firstVarInChain = varX = freeVarGen.getFreshSymbol();
for (OWLPropertyExpression pe : arg.getPropertyChain()) {
varY = freeVarGen.getFreshSymbol();
body.addAll(pe.accept(new OWLPropertyExpressionVisitorImpl(varX, varY)));
varX = varY;
}
InMemoryAtomSet head = arg.getSuperProperty().accept(new OWLPropertyExpressionVisitorImpl(firstVarInChain, varX));
return Collections.singleton(DefaultRuleFactory.instance().create(body, head));
}
use of fr.lirmm.graphik.graal.api.core.InMemoryAtomSet in project graal by graphik-team.
the class OWLAxiomParser method visit.
// /////////////////////////////////////////////////////////////////////////
// DataPropertyAxiom
// /////////////////////////////////////////////////////////////////////////
@Override
public Iterable<? extends Object> visit(OWLSubDataPropertyOfAxiom arg) {
InMemoryAtomSet a1, a2;
a1 = arg.getSubProperty().accept(propertyVisitorXY);
a2 = arg.getSuperProperty().accept(propertyVisitorXY);
return Collections.singleton(DefaultRuleFactory.instance().create(a1, a2));
}
use of fr.lirmm.graphik.graal.api.core.InMemoryAtomSet in project graal by graphik-team.
the class OWLAxiomParser method visit.
@Override
public Iterable<? extends Object> visit(OWLDataPropertyRangeAxiom arg) {
InMemoryAtomSet body = arg.getProperty().accept(propertyVisitorYX);
InMemoryAtomSet head = null;
try {
head = arg.getRange().accept(dataRangeVisitorX);
} catch (UnsupportedConstructor e) {
if (LOGGER.isWarnEnabled()) {
LOGGER.warn("[ " + e.getConstructor() + "] is not supported here. This axioms was skipped : " + arg);
}
return Collections.emptyList();
}
return Collections.singleton(DefaultRuleFactory.instance().create(body, head));
}
Aggregations