1 10 package com.hp.hpl.jena.reasoner.rulesys.builtins; 11 12 import com.hp.hpl.jena.reasoner.rulesys.*; 13 import com.hp.hpl.jena.graph.*; 14 15 18 24 public class GE extends BaseBuiltin { 25 26 30 public String getName() { 31 return "ge"; 32 } 33 34 37 public int getArgLength() { 38 return 2; 39 } 40 41 49 public boolean bodyCall(Node[] args, int length, RuleContext context) { 50 checkArgs(length, context); 51 Node n0 = getArg(0, args, context); 52 Node n1 = getArg(1, args, context); 53 if ( Util.isNumeric(n0) && Util.isNumeric(n1) ) { 54 return Util.compareNumbers(n0, n1) >= 0; 55 } else if (Util.isInstant(n0) && Util.isInstant(n1)) { 56 return Util.compareInstants(n0, n1) >= 0; 57 } else { 58 return false; 59 } 60 } 61 62 } 63 64 | Popular Tags |