public void visit(SWRLSameIndividualAtom atom) { Set<OWLNamedIndividual> inds=new HashSet<OWLNamedIndividual>(); for (SWRLArgument arg : atom.getAllArguments()) { if (!(arg instanceof SWRLIndividualArgument)) throwVarError(atom); OWLIndividual ind=((SWRLIndividualArgument)arg).getIndividual(); if (ind.isAnonymous()) throwAnonIndError(atom); inds.add(ind.asOWLNamedIndividual()); } addFact(m_factory.getOWLSameIndividualAxiom(inds)); }
public void visit(SWRLDifferentIndividualsAtom atom) { Set<OWLNamedIndividual> inds=new HashSet<OWLNamedIndividual>(); for (SWRLArgument arg : atom.getAllArguments()) { if (!(arg instanceof SWRLIndividualArgument)) throwVarError(atom); OWLIndividual ind=((SWRLIndividualArgument)arg).getIndividual(); if (ind.isAnonymous()) throwAnonIndError(atom); inds.add(ind.asOWLNamedIndividual()); } addFact(m_factory.getOWLDifferentIndividualsAxiom(inds)); }
@Nonnull @Override public Collection<SWRLArgument> getAllArguments() { List<SWRLArgument> objs = new ArrayList<>(); objs.add(arg0); objs.add(arg1); return objs; }
@Override public void visit(@Nonnull SWRLBuiltInAtom node) { for (SWRLArgument obj : node.getAllArguments()) { obj.accept(this); } }
@Nonnull @Override public Collection<SWRLArgument> getAllArguments() { return CollectionFactory.createSet((SWRLArgument) arg); }