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)); }
@Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof SWRLDifferentIndividualsAtom)) { return false; } SWRLDifferentIndividualsAtom other = (SWRLDifferentIndividualsAtom) obj; return other.getAllArguments().equals(getAllArguments()); }
public void visit(SWRLDifferentIndividualsAtom at) { if (m_isPositive) m_normalizedHeadAtoms.add(m_factory.getSWRLDifferentIndividualsAtom(getVariableFor(at.getFirstArgument()),getVariableFor(at.getSecondArgument()))); else m_normalizedHeadAtoms.add(m_factory.getSWRLSameIndividualAtom(getVariableFor(at.getFirstArgument()),getVariableFor(at.getSecondArgument()))); }
public Atom visit(SWRLDifferentIndividualsAtom atom) { Variable variable1=toVariable(atom.getFirstArgument()); Variable variable2=toVariable(atom.getSecondArgument()); return Atom.create(Inequality.INSTANCE,variable1,variable2); }
@Override public O visit(SWRLDifferentIndividualsAtom node) { return doDefault(node); }
@Override public void visit(SWRLDifferentIndividualsAtom node) { handleDefault(node); }
@Override public void visit(SWRLDifferentIndividualsAtom node) { type = RULE_OBJECT_TYPE_INDEX_BASE + 10; }
@Override public void visit(SWRLDifferentIndividualsAtom node) { node.getFirstArgument().accept(this); node.getSecondArgument().accept(this); }
@Override public void visit(SWRLDifferentIndividualsAtom node) { hashCode = primes[70]; hashCode = hashCode * MULT + node.getFirstArgument().hashCode(); hashCode = hashCode * MULT + node.getSecondArgument().hashCode(); }
@Override public SWRLDifferentIndividualsAtom visit( SWRLDifferentIndividualsAtom node) { return node; }
@Override public void visit(@Nonnull SWRLDifferentIndividualsAtom node) { node.getFirstArgument().accept(this); node.getSecondArgument().accept(this); }
@Override protected void writeObject(SWRLDifferentIndividualsAtom object, BinaryOWLOutputStream outputStream) throws IOException { outputStream.writeOWLObject(object.getFirstArgument()); outputStream.writeOWLObject(object.getSecondArgument()); }
@Override protected SWRLDifferentIndividualsAtom readObject(BinaryOWLInputStream inputStream) throws IOException, BinaryOWLParseException { SWRLIArgument first = inputStream.readOWLObject(); SWRLIArgument second = inputStream.readOWLObject(); return inputStream.getDataFactory().getSWRLDifferentIndividualsAtom(first, second); }