コード例 #1
0
 @Override
 public void visit(SWRLClassAtom node) {
   node.getPredicate().accept(this);
   OWLClassExpression desc = (OWLClassExpression) obj;
   node.getArgument().accept(this);
   SWRLIArgument atom = (SWRLIArgument) obj;
   obj = dataFactory.getSWRLClassAtom(desc, atom);
 }
コード例 #2
0
 @Override
 protected int compareObjectOfSameType(OWLObject object) {
   SWRLClassAtom other = (SWRLClassAtom) object;
   int diff = getPredicate().compareTo(other.getPredicate());
   if (diff != 0) {
     return diff;
   }
   return getArgument().compareTo(other.getArgument());
 }
コード例 #3
0
 public Atom visit(SWRLClassAtom atom) {
   if (atom.getPredicate().isAnonymous())
     throw new IllegalStateException(
         "Internal error: SWRL rule class atoms should be normalized to contain only named classes, but this class atom has a complex concept: "
             + atom.getPredicate());
   Variable variable = toVariable(atom.getArgument());
   m_abstractVariables.add(variable);
   return Atom.create(
       AtomicConcept.create(atom.getPredicate().asOWLClass().getIRI().toString()), variable);
 }
コード例 #4
0
 @Override
 public boolean equals(Object obj) {
   if (obj == this) {
     return true;
   }
   if (!(obj instanceof SWRLClassAtom)) {
     return false;
   }
   SWRLClassAtom other = (SWRLClassAtom) obj;
   return other.getArgument().equals(getArgument()) && other.getPredicate().equals(getPredicate());
 }
コード例 #5
0
 @Override
 public void visit(SWRLClassAtom node) {
   handleObject(node);
   node.getPredicate().accept(this);
   node.getArgument().accept(this);
 }
 public void visit(SWRLClassAtom node) {
   node.getArgument().accept(this);
   node.getPredicate().accept(this);
 }
コード例 #7
0
 @Override
 public void visit(SWRLClassAtom node) {
   node.getArgument().accept(this);
 }