You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jena.apache.org by an...@apache.org on 2015/12/22 13:41:26 UTC
[1/3] jena git commit: Move hex string processing.
Repository: jena
Updated Branches:
refs/heads/master 1c8060d8c -> 212d588e1
Move hex string processing.
Project: http://git-wip-us.apache.org/repos/asf/jena/repo
Commit: http://git-wip-us.apache.org/repos/asf/jena/commit/51522dc4
Tree: http://git-wip-us.apache.org/repos/asf/jena/tree/51522dc4
Diff: http://git-wip-us.apache.org/repos/asf/jena/diff/51522dc4
Branch: refs/heads/master
Commit: 51522dc49d065ac557fd8cfd7f4780778db883f4
Parents: 1c8060d
Author: Andy Seaborne <an...@apache.org>
Authored: Sun Dec 20 16:07:47 2015 +0000
Committer: Andy Seaborne <an...@apache.org>
Committed: Sun Dec 20 16:07:47 2015 +0000
----------------------------------------------------------------------
.../org/apache/jena/atlas/lib/EscapeStr.java | 42 +-------
.../java/org/apache/jena/atlas/lib/Hex.java | 101 ++++++++++++-------
.../java/org/apache/jena/atlas/lib/TestHex.java | 98 ++++++++++--------
3 files changed, 123 insertions(+), 118 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/jena/blob/51522dc4/jena-base/src/main/java/org/apache/jena/atlas/lib/EscapeStr.java
----------------------------------------------------------------------
diff --git a/jena-base/src/main/java/org/apache/jena/atlas/lib/EscapeStr.java b/jena-base/src/main/java/org/apache/jena/atlas/lib/EscapeStr.java
index cd387f6..fb5edf9 100644
--- a/jena-base/src/main/java/org/apache/jena/atlas/lib/EscapeStr.java
+++ b/jena-base/src/main/java/org/apache/jena/atlas/lib/EscapeStr.java
@@ -145,7 +145,7 @@ public class EscapeStr
// i points to the \ so i+6 is next character
if ( i+4 >= s.length() )
throw new AtlasException("\\u escape too short") ;
- int x = hex(s, i+1, 4) ;
+ int x = Hex.hexStringToInt(s, i+1, 4) ;
sb.append((char)x) ;
// Jump 1 2 3 4 -- already skipped \ and u
i = i+4 ;
@@ -156,7 +156,7 @@ public class EscapeStr
// i points to the \ so i+6 is next character
if ( i+8 >= s.length() )
throw new AtlasException("\\U escape too short") ;
- int x = hex(s, i+1, 8) ;
+ int x = Hex.hexStringToInt(s, i+1, 8) ;
// Convert to UTF-16 codepoint pair.
sb.append((char)x) ;
// Jump 1 2 3 4 5 6 7 8 -- already skipped \ and u
@@ -194,42 +194,4 @@ public class EscapeStr
}
return sb.toString() ;
}
-
- public static int hex(String s, int i, int len)
- {
-// if ( i+len >= s.length() )
-// {
-//
-// }
- int x = 0 ;
- for ( int j = i ; j < i+len ; j++ )
- {
- char ch = s.charAt(j) ;
- int k = 0 ;
- switch (ch)
- {
- case '0': k = 0 ; break ;
- case '1': k = 1 ; break ;
- case '2': k = 2 ; break ;
- case '3': k = 3 ; break ;
- case '4': k = 4 ; break ;
- case '5': k = 5 ; break ;
- case '6': k = 6 ; break ;
- case '7': k = 7 ; break ;
- case '8': k = 8 ; break ;
- case '9': k = 9 ; break ;
- case 'A': case 'a': k = 10 ; break ;
- case 'B': case 'b': k = 11 ; break ;
- case 'C': case 'c': k = 12 ; break ;
- case 'D': case 'd': k = 13 ; break ;
- case 'E': case 'e': k = 14 ; break ;
- case 'F': case 'f': k = 15 ; break ;
- default:
- throw new AtlasException("Illegal hex escape: "+ch) ;
- }
- x = (x<<4)+k ;
- }
- return x ;
- }
-
}
http://git-wip-us.apache.org/repos/asf/jena/blob/51522dc4/jena-base/src/main/java/org/apache/jena/atlas/lib/Hex.java
----------------------------------------------------------------------
diff --git a/jena-base/src/main/java/org/apache/jena/atlas/lib/Hex.java b/jena-base/src/main/java/org/apache/jena/atlas/lib/Hex.java
index 27ebbb5..3dc0fe3 100644
--- a/jena-base/src/main/java/org/apache/jena/atlas/lib/Hex.java
+++ b/jena-base/src/main/java/org/apache/jena/atlas/lib/Hex.java
@@ -24,15 +24,13 @@ import org.apache.jena.atlas.AtlasException ;
public class Hex
{
// No checking, fixed width.
- public static int formatUnsignedLongHex(final byte[] b, final int start, final long value, final int width)
- {
+ public static int formatUnsignedLongHex(final byte[] b, final int start, final long value, final int width) {
// Insert from low value end to high value end.
- int idx = start+width-1 ;
- int w = width ;
- long x = value ;
-
- while ( w > 0 )
- {
+ int idx = start + width - 1;
+ int w = width;
+ long x = value;
+
+ while (w > 0) {
int d = (int)(x & 0xF) ;
x = x>>>4 ; // Unsigned shift.
byte ch = Bytes.hexDigitsUC[d] ;
@@ -47,8 +45,7 @@ public class Hex
if ( x != 0 )
throw new AtlasException("formatUnsignedLongHex: overflow") ;
- while ( w > 0 )
- {
+ while (w > 0) {
b[idx] = '0' ;
idx-- ;
w-- ;
@@ -57,41 +54,71 @@ public class Hex
}
// No checking, fixed width.
- public static long getLong(byte[] arr, int idx)
- {
- long x = 0 ;
- for ( int i = 0 ; i < 16 ; i++ )
- {
- byte c = arr[idx] ;
- int v = hexByteToInt(c) ;
- x = x << 4 | v ;
- idx++ ;
+ public static long getLong(byte[] arr, int idx) {
+ long x = 0;
+ for ( int i = 0 ; i < 16 ; i++ ) {
+ byte c = arr[idx];
+ int v = hexByteToInt(c);
+ x = x << 4 | v;
+ idx++;
}
- return x ;
+ return x;
}
-
- public static int hexByteToInt(int c)
- {
- if ( '0' <= c && c <= '9' )
- return c-'0' ;
+
+ public static int hexByteToInt(int c) {
+ if ( '0' <= c && c <= '9' )
+ return c - '0';
else if ( 'A' <= c && c <= 'F' )
- return c-'A'+10 ;
+ return c - 'A' + 10;
else if ( 'a' <= c && c <= 'f' )
- return c-'a'+10 ;
+ return c - 'a' + 10;
else
- throw new IllegalArgumentException("Bad index char : "+c) ;
+ throw new IllegalArgumentException("Bad index char : " + c);
}
-
- /** Return the value of the hex digit, or the marker value if not a hex digit.*/
- public static int hexByteToInt(int c, int marker)
- {
- if ( '0' <= c && c <= '9' )
- return c-'0' ;
+
+ /**
+ * Return the value of the hex digit, or the marker value if not a hex
+ * digit.
+ */
+ public static int hexByteToInt(int c, int marker) {
+ if ( '0' <= c && c <= '9' )
+ return c - '0';
else if ( 'A' <= c && c <= 'F' )
- return c-'A'+10 ;
+ return c - 'A' + 10;
else if ( 'a' <= c && c <= 'f' )
- return c-'a'+10 ;
+ return c - 'a' + 10;
else
- return marker ;
+ return marker;
+ }
+
+ /** Hex string to value */
+ public static int hexStringToInt(String s, int i, int len) {
+ int x = 0;
+ for ( int j = i ; j < i + len ; j++ ) {
+ char ch = s.charAt(j);
+ int k = 0;
+ switch (ch) {
+ case '0': k = 0 ; break ;
+ case '1': k = 1 ; break ;
+ case '2': k = 2 ; break ;
+ case '3': k = 3 ; break ;
+ case '4': k = 4 ; break ;
+ case '5': k = 5 ; break ;
+ case '6': k = 6 ; break ;
+ case '7': k = 7 ; break ;
+ case '8': k = 8 ; break ;
+ case '9': k = 9 ; break ;
+ case 'A': case 'a': k = 10 ; break ;
+ case 'B': case 'b': k = 11 ; break ;
+ case 'C': case 'c': k = 12 ; break ;
+ case 'D': case 'd': k = 13 ; break ;
+ case 'E': case 'e': k = 14 ; break ;
+ case 'F': case 'f': k = 15 ; break ;
+ default:
+ throw new AtlasException("Illegal hex escape: "+ch) ;
+ }
+ x = (x<<4)+k ;
+ }
+ return x ;
}
}
http://git-wip-us.apache.org/repos/asf/jena/blob/51522dc4/jena-base/src/test/java/org/apache/jena/atlas/lib/TestHex.java
----------------------------------------------------------------------
diff --git a/jena-base/src/test/java/org/apache/jena/atlas/lib/TestHex.java b/jena-base/src/test/java/org/apache/jena/atlas/lib/TestHex.java
index e092e60..9da0e30 100644
--- a/jena-base/src/test/java/org/apache/jena/atlas/lib/TestHex.java
+++ b/jena-base/src/test/java/org/apache/jena/atlas/lib/TestHex.java
@@ -25,57 +25,73 @@ import org.junit.Test ;
public class TestHex extends BaseTest
{
- @Test public void hex_01()
- {
- byte[] b = new byte[16] ;
- test(0L, 0, b, 16) ;
+ @Test
+ public void hex_01() {
+ byte[] b = new byte[16];
+ test(0L, 0, b, 16);
}
-
- @Test public void hex_02()
- {
- byte[] b = new byte[16] ;
- test(1L, 0, b, 16) ;
+
+ @Test
+ public void hex_02() {
+ byte[] b = new byte[16];
+ test(1L, 0, b, 16);
}
- @Test public void hex_03()
- {
- byte[] b = new byte[16] ;
- test(Long.MAX_VALUE, 0, b, 16) ;
+ @Test
+ public void hex_03() {
+ byte[] b = new byte[16];
+ test(Long.MAX_VALUE, 0, b, 16);
}
-
- @Test public void hex_04()
- {
- byte[] b = new byte[16] ;
- test(Long.MIN_VALUE, 0, b, 16) ;
+
+ @Test
+ public void hex_04() {
+ byte[] b = new byte[16];
+ test(Long.MIN_VALUE, 0, b, 16);
}
-
- @Test public void hex_05()
- {
- byte[] b = new byte[16] ;
+
+ @Test
+ public void hex_05() {
+ byte[] b = new byte[16];
// -1L
- test(0xFFFFFFFFFFFFFFFFL, 0, b, 16) ;
+ test(0xFFFFFFFFFFFFFFFFL, 0, b, 16);
}
- @Test public void hex_06()
- {
- byte[] b = new byte[16] ;
- test(-1L, 0, b, 16) ;
+ @Test
+ public void hex_06() {
+ byte[] b = new byte[16];
+ test(-1L, 0, b, 16);
}
- private static void test(long value, int idx, byte[] b, int width)
- {
- int x = Hex.formatUnsignedLongHex(b, idx, value, width) ;
- assertEquals(width, x) ;
- for ( int i = 0 ; i < width ; i++ )
- {
- int v = b[i] ;
- if ( v >= '0' && v <= '9' ) continue ;
- if ( v >= 'a' && v <= 'f' ) continue ;
- if ( v >= 'A' && v <= 'F' ) continue ;
- fail(String.format("Not a hex digit: %02X",b[i])) ;
+ private static void test(long value, int idx, byte[] b, int width) {
+ int x = Hex.formatUnsignedLongHex(b, idx, value, width);
+ assertEquals(width, x);
+ for ( int i = 0 ; i < width ; i++ ) {
+ int v = b[i];
+ if ( v >= '0' && v <= '9' )
+ continue;
+ if ( v >= 'a' && v <= 'f' )
+ continue;
+ if ( v >= 'A' && v <= 'F' )
+ continue;
+ fail(String.format("Not a hex digit: %02X", b[i]));
}
-
- long v = Hex.getLong(b, idx) ;
- assertEquals(value, v) ;
+
+ long v = Hex.getLong(b, idx);
+ assertEquals(value, v);
}
+
+ private static void testStr2Val(String str, int expected) {
+ testStr2Val(str, 0, str.length(), expected) ;
+ }
+
+ private static void testStr2Val(String str, int start, int length, int expected) {
+ int v = Hex.hexStringToInt(str, start, length) ;
+ }
+
+ @Test public void hexValue_01() { testStr2Val("A", 10); }
+ @Test public void hexValue_02() { testStr2Val("0A", 10); }
+ @Test public void hexValue_03() { testStr2Val("AA", 16*10+10); }
+ @Test public void hexValue_04() { testStr2Val("FF", 255); }
+ @Test public void hexValue_05() { testStr2Val("00FF00", 2, 2, 255); }
+
}
[2/3] jena git commit: Note for jena 864.
Posted by an...@apache.org.
Note for jena 864.
Project: http://git-wip-us.apache.org/repos/asf/jena/repo
Commit: http://git-wip-us.apache.org/repos/asf/jena/commit/802acb59
Tree: http://git-wip-us.apache.org/repos/asf/jena/tree/802acb59
Diff: http://git-wip-us.apache.org/repos/asf/jena/diff/802acb59
Branch: refs/heads/master
Commit: 802acb59fba183bfa9f51b1c949210b3d5d0d404
Parents: 51522dc
Author: Andy Seaborne <an...@apache.org>
Authored: Sun Dec 20 18:44:34 2015 +0000
Committer: Andy Seaborne <an...@apache.org>
Committed: Sun Dec 20 18:44:34 2015 +0000
----------------------------------------------------------------------
.../src/main/java/org/apache/jena/riot/system/IRIResolver.java | 2 ++
1 file changed, 2 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/jena/blob/802acb59/jena-arq/src/main/java/org/apache/jena/riot/system/IRIResolver.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/org/apache/jena/riot/system/IRIResolver.java b/jena-arq/src/main/java/org/apache/jena/riot/system/IRIResolver.java
index 5887c76..7be0efa 100644
--- a/jena-arq/src/main/java/org/apache/jena/riot/system/IRIResolver.java
+++ b/jena-arq/src/main/java/org/apache/jena/riot/system/IRIResolver.java
@@ -72,6 +72,8 @@ public abstract class IRIResolver
// See JENA-864
//iriFactory.setIsError(ViolationCodes.NOT_NFC, false) ;
//iriFactory.setIsError(ViolationCodes.NOT_NFKC, false) ;
+ //iriFactory.setIsWarning(ViolationCodes.NOT_NFC, false) ;
+ //iriFactory.setIsWarning(ViolationCodes.NOT_NFKC, false) ;
// ** Applies to various unicode blocks.
// setErrorWarning(iriFactory, ViolationCodes.COMPATIBILITY_CHARACTER, false, false) ;
[3/3] jena git commit: Mod ModSymbol to better name ModContext
Posted by an...@apache.org.
Mod ModSymbol to better name ModContext
Project: http://git-wip-us.apache.org/repos/asf/jena/repo
Commit: http://git-wip-us.apache.org/repos/asf/jena/commit/212d588e
Tree: http://git-wip-us.apache.org/repos/asf/jena/tree/212d588e
Diff: http://git-wip-us.apache.org/repos/asf/jena/diff/212d588e
Branch: refs/heads/master
Commit: 212d588e1f14c6dd53b71db46b9ae1ed5d1c68ba
Parents: 802acb5
Author: Andy Seaborne <an...@apache.org>
Authored: Tue Dec 22 12:41:04 2015 +0000
Committer: Andy Seaborne <an...@apache.org>
Committed: Tue Dec 22 12:41:04 2015 +0000
----------------------------------------------------------------------
jena-arq/src/main/java/arq/cmdline/CmdARQ.java | 4 +-
.../src/main/java/arq/cmdline/ModContext.java | 92 ++++++++++++++++++++
.../src/main/java/arq/cmdline/ModSymbol.java | 80 ++---------------
.../src/main/java/riotcmd/CmdLangParse.java | 6 +-
jena-arq/src/test/java/riotcmd/rdflangtest.java | 6 +-
5 files changed, 105 insertions(+), 83 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/jena/blob/212d588e/jena-arq/src/main/java/arq/cmdline/CmdARQ.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/arq/cmdline/CmdARQ.java b/jena-arq/src/main/java/arq/cmdline/CmdARQ.java
index 2d82d98..d6fb553 100644
--- a/jena-arq/src/main/java/arq/cmdline/CmdARQ.java
+++ b/jena-arq/src/main/java/arq/cmdline/CmdARQ.java
@@ -31,7 +31,7 @@ public abstract class CmdARQ extends CmdGeneral
{
static { JenaSystem.init() ; }
- protected ModSymbol modSymbol = new ModSymbol() ;
+ protected ModContext modContext = new ModContext() ;
ArgDecl strictDecl = new ArgDecl(ArgDecl.NoValue, "strict") ;
protected boolean cmdStrictMode = false ;
@@ -39,11 +39,11 @@ public abstract class CmdARQ extends CmdGeneral
protected CmdARQ(String[] argv)
{
super(argv) ;
- addModule(modSymbol) ;
modVersion.addClass(Jena.class) ;
modVersion.addClass(ARQ.class) ;
modVersion.addClass(RIOT.class) ;
super.add(strictDecl, "--strict", "Operate in strict SPARQL mode (no extensions of any kind)") ;
+ addModule(modContext) ;
}
@Override
http://git-wip-us.apache.org/repos/asf/jena/blob/212d588e/jena-arq/src/main/java/arq/cmdline/ModContext.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/arq/cmdline/ModContext.java b/jena-arq/src/main/java/arq/cmdline/ModContext.java
new file mode 100644
index 0000000..28c999a
--- /dev/null
+++ b/jena-arq/src/main/java/arq/cmdline/ModContext.java
@@ -0,0 +1,92 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package arq.cmdline;
+
+import java.io.PrintStream ;
+
+import jena.cmd.ArgDecl;
+import jena.cmd.CmdArgModule;
+import jena.cmd.CmdGeneral;
+import jena.cmd.ModBase;
+
+import org.apache.jena.atlas.io.IndentedWriter ;
+import org.apache.jena.query.ARQ ;
+import org.apache.jena.sparql.util.Context ;
+import org.apache.jena.sparql.util.MappingRegistry ;
+import org.apache.jena.sparql.util.Symbol ;
+import org.apache.jena.system.JenaSystem ;
+
+/** Set Context items */
+public class ModContext extends ModBase
+{
+ static { JenaSystem.init(); }
+
+ protected final ArgDecl setDecl = new ArgDecl(ArgDecl.HasValue, "set", "define", "defn", "def") ;
+
+ private Context context = new Context() ;
+
+ @Override
+ public void registerWith(CmdGeneral cmdLine) {
+ cmdLine.getUsage().startCategory("Symbol definition");
+ cmdLine.add(setDecl, "--set", "Set a configuration symbol to a value");
+ }
+
+ public void checkCommandLine(CmdArgModule cmdLine) {}
+
+ @Override
+ public void processArgs(CmdArgModule cmdLine) {
+ if ( cmdLine.getValues(setDecl) == null || cmdLine.getValues(setDecl).size() == 0 )
+ return;
+
+ for ( String arg : cmdLine.getValues(setDecl) ) {
+ String[] frags = arg.split("=", 2);
+ if ( frags.length != 2 ) {
+ throw new RuntimeException("Can't split '" + arg + "' -- looking for '=' to separate name and value");
+ }
+
+ String symbolName = frags[0];
+ String value = frags[1];
+
+ // Make it a long name.
+ symbolName = MappingRegistry.mapPrefixName(symbolName);
+ Symbol symbol = Symbol.create(symbolName);
+ context.set(symbol, value);
+ System.err.println(symbol+"="+value);
+ }
+
+ ARQ.getContext().putAll(context);
+ }
+
+ public void verbose() {
+ verbose(System.out);
+ }
+
+ public void verbose(PrintStream stream) {
+ IndentedWriter out = new IndentedWriter(stream);
+ verbose(out);
+ out.flush();
+ }
+
+ public void verbose(IndentedWriter out) {
+ for ( Symbol symbol : context.keys() ) {
+ String value = context.getAsString(symbol);
+ out.println(symbol + " -> " + value);
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/jena/blob/212d588e/jena-arq/src/main/java/arq/cmdline/ModSymbol.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/arq/cmdline/ModSymbol.java b/jena-arq/src/main/java/arq/cmdline/ModSymbol.java
index 689dafe..b465644 100644
--- a/jena-arq/src/main/java/arq/cmdline/ModSymbol.java
+++ b/jena-arq/src/main/java/arq/cmdline/ModSymbol.java
@@ -18,79 +18,9 @@
package arq.cmdline;
-import java.io.PrintStream ;
-
-import jena.cmd.ArgDecl;
-import jena.cmd.CmdArgModule;
-import jena.cmd.CmdGeneral;
-import jena.cmd.ModBase;
-
-import org.apache.jena.atlas.io.IndentedWriter ;
-import org.apache.jena.query.ARQ ;
-import org.apache.jena.sparql.util.Context ;
-import org.apache.jena.sparql.util.MappingRegistry ;
-import org.apache.jena.sparql.util.Symbol ;
-import org.apache.jena.system.JenaSystem ;
-
-public class ModSymbol extends ModBase
-{
- static { JenaSystem.init(); }
-
- protected final ArgDecl setDecl = new ArgDecl(ArgDecl.HasValue, "set", "define", "defn", "def") ;
-private Context context = new Context() ;
-
- @Override
- public void registerWith(CmdGeneral cmdLine)
- {
- cmdLine.getUsage().startCategory("Symbol definition") ;
- cmdLine.add(setDecl, "--set", "Set a configuration symbol to a value") ;
- }
-
- public void checkCommandLine(CmdArgModule cmdLine)
- {}
-
- @Override
- public void processArgs(CmdArgModule cmdLine)
- {
-
- if ( cmdLine.getValues(setDecl) == null || cmdLine.getValues(setDecl).size() == 0 )
- return ;
-
- for ( String arg : cmdLine.getValues( setDecl ) )
- {
- String[] frags = arg.split( "=", 2 );
- if ( frags.length != 2 )
- {
- throw new RuntimeException( "Can't split '" + arg + "' -- looking for '=' to separate name and value" );
- }
-
- String symbolName = frags[0];
- String value = frags[1];
-
- // Make it a long name.
- symbolName = MappingRegistry.mapPrefixName( symbolName );
- Symbol symbol = Symbol.create( symbolName );
- context.set( symbol, value );
- }
-
- ARQ.getContext().putAll(context) ;
- }
-
- public void verbose() { verbose(System.out) ; }
-
- public void verbose(PrintStream stream)
- {
- IndentedWriter out = new IndentedWriter(stream) ;
- verbose(out) ;
- out.flush();
- }
-
- public void verbose(IndentedWriter out)
- {
- for ( Symbol symbol : context.keys() )
- {
- String value = context.getAsString( symbol );
- out.println( symbol + " -> " + value );
- }
- }
+/** Set Context items
+ * @deprecated Use ModContext.
+ */
+@Deprecated
+public class ModSymbol extends ModContext {
}
http://git-wip-us.apache.org/repos/asf/jena/blob/212d588e/jena-arq/src/main/java/riotcmd/CmdLangParse.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/riotcmd/CmdLangParse.java b/jena-arq/src/main/java/riotcmd/CmdLangParse.java
index 86756e7..61f3b96 100644
--- a/jena-arq/src/main/java/riotcmd/CmdLangParse.java
+++ b/jena-arq/src/main/java/riotcmd/CmdLangParse.java
@@ -25,7 +25,7 @@ import java.util.zip.GZIPOutputStream ;
import arq.cmdline.ModLangOutput ;
import arq.cmdline.ModLangParse ;
-import arq.cmdline.ModSymbol ;
+import arq.cmdline.ModContext ;
import arq.cmdline.ModTime ;
import jena.cmd.ArgDecl ;
import jena.cmd.CmdException;
@@ -58,7 +58,7 @@ public abstract class CmdLangParse extends CmdGeneral
protected ModLangParse modLangParse = new ModLangParse() ;
protected ModLangOutput modLangOutput = new ModLangOutput() ;
protected InferenceSetupRDFS setup = null ;
- protected ModSymbol modSymbol = new ModSymbol() ;
+ protected ModContext modContext = new ModContext() ;
protected ArgDecl strictDecl = new ArgDecl(ArgDecl.NoValue, "strict") ;
protected boolean cmdStrictMode = false ;
@@ -92,7 +92,7 @@ public abstract class CmdLangParse extends CmdGeneral
protected CmdLangParse(String[] argv)
{
super(argv) ;
- addModule(modSymbol) ;
+ addModule(modContext) ;
addModule(modTime) ;
addModule(modLangOutput) ;
addModule(modLangParse) ;
http://git-wip-us.apache.org/repos/asf/jena/blob/212d588e/jena-arq/src/test/java/riotcmd/rdflangtest.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/test/java/riotcmd/rdflangtest.java b/jena-arq/src/test/java/riotcmd/rdflangtest.java
index 5fafa91..1f5af3b 100644
--- a/jena-arq/src/test/java/riotcmd/rdflangtest.java
+++ b/jena-arq/src/test/java/riotcmd/rdflangtest.java
@@ -19,7 +19,7 @@
package riotcmd;
import arq.cmdline.ModEngine ;
-import arq.cmdline.ModSymbol ;
+import arq.cmdline.ModContext ;
import jena.cmd.ArgDecl ;
import jena.cmd.CmdException ;
import jena.cmd.CmdGeneral ;
@@ -61,7 +61,7 @@ import org.apache.jena.vocabulary.RDF ;
public class rdflangtest extends CmdGeneral
{
static { JenaSystem.init() ; }
- protected ModSymbol modSymbol = new ModSymbol() ;
+ protected ModContext modContext = new ModContext() ;
protected ArgDecl strictDecl = new ArgDecl(ArgDecl.NoValue, "strict") ;
protected boolean cmdStrictMode = false ;
@@ -79,13 +79,13 @@ public class rdflangtest extends CmdGeneral
public rdflangtest(String[] argv)
{
super(argv) ;
- addModule(modSymbol) ;
super.add(strictDecl, "--strict", "Operate in strict mode (no extensions of any kind)") ;
super.modVersion.addClass(ARQ.class) ;
//add(allDecl, "--all", "run all tests") ;
getUsage().startCategory("Tests (execute test manifest)") ;
getUsage().addUsage("<manifest>", "run the tests specified in the given manifest") ;
add(earlDecl, "--earl", "create EARL report") ;
+ addModule(modContext) ;
}
protected ModEngine setModEngine()