jena-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject [07/15] jena git commit: Abstract the presentation for strings generated by the querybuilder.
Date Tue, 23 Dec 2014 17:59:03 GMT
Abstract the presentation for strings generated by the querybuilder.

Project: http://git-wip-us.apache.org/repos/asf/jena/repo
Commit: http://git-wip-us.apache.org/repos/asf/jena/commit/36ae896f
Tree: http://git-wip-us.apache.org/repos/asf/jena/tree/36ae896f
Diff: http://git-wip-us.apache.org/repos/asf/jena/diff/36ae896f

Branch: refs/heads/master
Commit: 36ae896fa8c1b1a345fd9c6a5fd59f8d5b37b9ae
Parents: 244e1bf
Author: Andy Seaborne <andy@apache.org>
Authored: Tue Dec 23 15:34:41 2014 +0000
Committer: Andy Seaborne <andy@apache.org>
Committed: Tue Dec 23 15:34:41 2014 +0000

----------------------------------------------------------------------
 .../org/apache/jena/arq/AbstractRegexpBasedTest.java     | 11 +++++++++++
 1 file changed, 11 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jena/blob/36ae896f/jena-extras/jena-querybuilder/src/test/java/org/apache/jena/arq/AbstractRegexpBasedTest.java
----------------------------------------------------------------------
diff --git a/jena-extras/jena-querybuilder/src/test/java/org/apache/jena/arq/AbstractRegexpBasedTest.java
b/jena-extras/jena-querybuilder/src/test/java/org/apache/jena/arq/AbstractRegexpBasedTest.java
index 7190707..d398dd2 100644
--- a/jena-extras/jena-querybuilder/src/test/java/org/apache/jena/arq/AbstractRegexpBasedTest.java
+++ b/jena-extras/jena-querybuilder/src/test/java/org/apache/jena/arq/AbstractRegexpBasedTest.java
@@ -22,6 +22,8 @@ import static org.junit.Assert.fail;
 import java.util.Arrays;
 import java.util.regex.Pattern;
 
+import com.hp.hpl.jena.JenaRuntime ;
+
 public abstract class AbstractRegexpBasedTest {
 	protected static final String SPACE = "\\s+";
 	protected static final String OPT_SPACE = "\\s*";
@@ -56,6 +58,15 @@ public abstract class AbstractRegexpBasedTest {
 		return "\\?" + s;
 	}
 
+	/** Match the type of a xsd:string typed term.
+	 * RDF 1.0 : use ^^xsd:string form.
+	 * RDF 1.1 : use untyped form.
+	 */
+	protected final String presentStringType() {
+	    return 
+	        JenaRuntime.isRDF11 ? "" : "\\^\\^\\<http://www.w3.org/2001/XMLSchema#string\\>"
;
+	}
+
 	protected final void assertNotContainsRegex(String expected, String lst) {
 
 		Pattern patt = Pattern.compile(expected, Pattern.DOTALL);


Mime
View raw message