示例#1
0
 private Object getValue(final PrologTerm v) {
   if (v.getFunctor().equals("p")) {
     CompoundPrologTerm cpt = BindingGenerator.getCompoundTerm(v, 1);
     if (cpt.getArgument(1).getFunctor().equals("true")) {
       return Boolean.TRUE;
     } else {
       return Boolean.FALSE;
     }
   } else if (v.getFunctor().equals("v")) {
     CompoundPrologTerm cpt = BindingGenerator.getCompoundTerm(v, 1);
     return cpt.getArgument(1).getFunctor();
   }
   v.getFunctor();
   return null;
 }
示例#2
0
  @Override
  public void processResult(final ISimplifiedROMap<String, PrologTerm> bindings) {

    result = PrologTerm.atomicString(bindings.get("Result"));
  }