jena-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rve...@apache.org
Subject svn commit: r1514086 - in /jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/sse: Tags.java builders/BuilderExpr.java
Date Wed, 14 Aug 2013 23:09:09 GMT
Author: rvesse
Date: Wed Aug 14 23:09:09 2013
New Revision: 1514086

URL: http://svn.apache.org/r1514086
Log:
Add Tags.tagIsNumeric and associated SSE builder (JENA-512)

Modified:
    jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/sse/Tags.java
    jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/sse/builders/BuilderExpr.java

Modified: jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/sse/Tags.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/sse/Tags.java?rev=1514086&r1=1514085&r2=1514086&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/sse/Tags.java (original)
+++ jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/sse/Tags.java Wed Aug 14 23:09:09
2013
@@ -193,6 +193,7 @@ public class Tags
     public static final String tagNumRound      = "round" ;
     public static final String tagNumCeiling    = "ceil" ;
     public static final String tagNumFloor      = "floor" ;
+    public static final String tagIsNumeric     = "isNumeric" ;
     
     public static final String tagBNode         = "bnode" ;
     public static final String tagIri           = "iri" ;

Modified: jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/sse/builders/BuilderExpr.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/sse/builders/BuilderExpr.java?rev=1514086&r1=1514085&r2=1514086&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/sse/builders/BuilderExpr.java
(original)
+++ jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/sse/builders/BuilderExpr.java
Wed Aug 14 23:09:09 2013
@@ -274,6 +274,7 @@ public class BuilderExpr
         dispatch.put(Tags.tagNumRound, buildNumRound) ;
         dispatch.put(Tags.tagNumCeiling, buildNumCeiling) ;
         dispatch.put(Tags.tagNumFloor, buildNumFloor) ;
+        dispatch.put(Tags.tagIsNumeric, buildIsNumeric) ;
         
         dispatch.put(Tags.tagLang, buildLang) ;
         dispatch.put(Tags.tagLangMatches, buildLangMatches) ;
@@ -1095,6 +1096,17 @@ public class BuilderExpr
         }
     };
     
+    final protected Build buildIsNumeric = new Build()
+    {
+        @Override
+        public Expr make(ItemList list)
+        {
+            BuilderLib.checkLength(2, list, "isNumeric: wanted 1 arguments: got: "+numArgs(list))
;
+            Expr ex = buildExpr(list.get(1)) ;
+            return new E_IsNumeric(ex) ;
+        }
+    };
+    
     final protected Build buildExists = new Build()
     {
         @Override



Mime
View raw message