コード例 #1
0
 public void visit(OWLObjectUnionOf owlOr) {
   try {
     // We can't do "nested" arg lists, so translate all operands
     // and put the pointers into a set first, then create the intersection
     Set<ClassPointer> operandPointers = new HashSet<ClassPointer>();
     for (OWLDescription desc : owlOr.getOperands()) {
       desc.accept(this);
       operandPointers.add(getLastClassPointer());
     }
     faCTPlusPlus.initArgList();
     for (ClassPointer operandPointer : operandPointers) {
       faCTPlusPlus.addArg(operandPointer);
     }
     faCTPlusPlus.closeArgList();
     lastClassPointer = faCTPlusPlus.getConceptOr();
   } catch (Exception e) {
     throw new FaCTPlusPlusRuntimeException(e);
   }
 }
コード例 #2
0
 /**
  * A convenience method that translates an <code>OWLDescription</code> to the FaCT++
  * representation of the description.
  *
  * @param description The description to be translated.
  * @return The corresponding FaCT++ representation of the description.
  */
 public ClassPointer translate(OWLDescription description) throws OWLException {
   description.accept(this);
   return getLastClassPointer();
 }