jena-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject svn commit: r1440036 - in /jena/trunk/jena-arq/src: main/java/com/hp/hpl/jena/sparql/util/ main/java/org/apache/jena/riot/system/ test/java/org/apache/jena/riot/out/ test/java/org/apache/jena/riot/system/ test/java/org/apache/jena/riot/tokens/
Date Tue, 29 Jan 2013 18:03:32 GMT
Author: andy
Date: Tue Jan 29 18:03:31 2013
New Revision: 1440036

URL: http://svn.apache.org/viewvc?rev=1440036&view=rev
Log:
Remove warnings.
Rename AbstractTestLightweightPrefixMap as AbstractTestPrefixMap.

Added:
    jena/trunk/jena-arq/src/test/java/org/apache/jena/riot/system/AbstractTestPrefixMap.java
      - copied, changed from r1440029, jena/trunk/jena-arq/src/test/java/org/apache/jena/riot/system/AbstractTestLightweightPrefixMap.java
Removed:
    jena/trunk/jena-arq/src/test/java/org/apache/jena/riot/system/AbstractTestLightweightPrefixMap.java
Modified:
    jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/util/MappingRegistry.java
    jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/util/NodeFactory.java
    jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/system/Prologue.java
    jena/trunk/jena-arq/src/test/java/org/apache/jena/riot/out/TestNodeFmt.java
    jena/trunk/jena-arq/src/test/java/org/apache/jena/riot/system/TestFastAbbreviatingPrefixMap.java
    jena/trunk/jena-arq/src/test/java/org/apache/jena/riot/system/TestPrefixMap.java
    jena/trunk/jena-arq/src/test/java/org/apache/jena/riot/system/TestPrefixMapExtended1.java
    jena/trunk/jena-arq/src/test/java/org/apache/jena/riot/system/TestPrefixMapExtended2.java
    jena/trunk/jena-arq/src/test/java/org/apache/jena/riot/tokens/TestTokenForNode.java

Modified: jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/util/MappingRegistry.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/util/MappingRegistry.java?rev=1440036&r1=1440035&r2=1440036&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/util/MappingRegistry.java (original)
+++ jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/util/MappingRegistry.java Tue
Jan 29 18:03:31 2013
@@ -18,9 +18,8 @@
 
 package com.hp.hpl.jena.sparql.util;
 
-import org.apache.jena.riot.system.PrefixMap;
-import org.apache.jena.riot.system.PrefixMapFactory;
-import org.apache.jena.riot.system.PrefixMapStd ;
+import org.apache.jena.riot.system.PrefixMap ;
+import org.apache.jena.riot.system.PrefixMapFactory ;
 
 /** Assist with naming symbols by URI.
  *  This class keeps a prefix mapping so that subsystems can register their

Modified: jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/util/NodeFactory.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/util/NodeFactory.java?rev=1440036&r1=1440035&r2=1440036&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/util/NodeFactory.java (original)
+++ jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/util/NodeFactory.java Tue Jan
29 18:03:31 2013
@@ -19,9 +19,8 @@
 package com.hp.hpl.jena.sparql.util;
 
 import org.apache.jena.riot.RiotException ;
-import org.apache.jena.riot.system.PrefixMap;
-import org.apache.jena.riot.system.PrefixMapFactory;
-import org.apache.jena.riot.system.PrefixMapStd ;
+import org.apache.jena.riot.system.PrefixMap ;
+import org.apache.jena.riot.system.PrefixMapFactory ;
 import org.apache.jena.riot.tokens.Token ;
 import org.apache.jena.riot.tokens.Tokenizer ;
 import org.apache.jena.riot.tokens.TokenizerFactory ;

Modified: jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/system/Prologue.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/system/Prologue.java?rev=1440036&r1=1440035&r2=1440036&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/system/Prologue.java (original)
+++ jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/system/Prologue.java Tue Jan 29
18:03:31 2013
@@ -18,9 +18,6 @@
 
 package org.apache.jena.riot.system;
 
-import java.util.Map ;
-import java.util.Map.Entry ;
-
 import org.apache.jena.iri.IRI ;
 import com.hp.hpl.jena.shared.PrefixMapping ;
 

Modified: jena/trunk/jena-arq/src/test/java/org/apache/jena/riot/out/TestNodeFmt.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/test/java/org/apache/jena/riot/out/TestNodeFmt.java?rev=1440036&r1=1440035&r2=1440036&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/test/java/org/apache/jena/riot/out/TestNodeFmt.java (original)
+++ jena/trunk/jena-arq/src/test/java/org/apache/jena/riot/out/TestNodeFmt.java Tue Jan 29
18:03:31 2013
@@ -21,12 +21,8 @@ package org.apache.jena.riot.out;
 import java.io.StringWriter ;
 
 import org.apache.jena.atlas.junit.BaseTest ;
-import org.apache.jena.riot.out.NodeFormatter ;
-import org.apache.jena.riot.out.NodeFormatterNT ;
-import org.apache.jena.riot.out.NodeFormatterTTL ;
-import org.apache.jena.riot.system.PrefixMap;
-import org.apache.jena.riot.system.PrefixMapFactory;
-import org.apache.jena.riot.system.PrefixMapStd ;
+import org.apache.jena.riot.system.PrefixMap ;
+import org.apache.jena.riot.system.PrefixMapFactory ;
 import org.junit.Test ;
 
 import com.hp.hpl.jena.graph.Node ;

Copied: jena/trunk/jena-arq/src/test/java/org/apache/jena/riot/system/AbstractTestPrefixMap.java
(from r1440029, jena/trunk/jena-arq/src/test/java/org/apache/jena/riot/system/AbstractTestLightweightPrefixMap.java)
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/test/java/org/apache/jena/riot/system/AbstractTestPrefixMap.java?p2=jena/trunk/jena-arq/src/test/java/org/apache/jena/riot/system/AbstractTestPrefixMap.java&p1=jena/trunk/jena-arq/src/test/java/org/apache/jena/riot/system/AbstractTestLightweightPrefixMap.java&r1=1440029&r2=1440036&rev=1440036&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/test/java/org/apache/jena/riot/system/AbstractTestLightweightPrefixMap.java
(original)
+++ jena/trunk/jena-arq/src/test/java/org/apache/jena/riot/system/AbstractTestPrefixMap.java
Tue Jan 29 18:03:31 2013
@@ -27,7 +27,7 @@ import org.junit.Test ;
  * Abstract tests for {@link PrefixMap} implementations
  * 
  */
-public abstract class AbstractTestLightweightPrefixMap extends BaseTest {
+public abstract class AbstractTestPrefixMap extends BaseTest {
     protected IRIFactory factory = IRIFactory.iriImplementation();
 
     /**
@@ -38,6 +38,36 @@ public abstract class AbstractTestLightw
      */
     protected abstract PrefixMap getPrefixMap();
 
+    @Test
+    public void prefixMap_basic_01()
+    {
+        PrefixMap pmap = getPrefixMap();
+        assertTrue(pmap.getMapping().isEmpty()) ;
+        assertTrue(pmap.getMappingCopy().isEmpty()) ;
+        assertTrue(pmap.getMappingCopyStr().isEmpty()) ;
+    }
+    
+    @Test
+    public void prefixMap_basic_02()
+    {
+        PrefixMap pmap = getPrefixMap();
+        pmap.add("", "http://example/") ;
+        assertTrue(pmap.contains("")) ;
+        assertTrue(pmap.getMapping().containsKey("")) ;
+        assertTrue(pmap.getMappingCopy().containsKey("")) ;
+        assertTrue(pmap.getMappingCopyStr().containsKey("")) ;
+    }
+
+    @Test
+    public void prefixMap_basic_03()
+    {
+        PrefixMap pmap = getPrefixMap();
+        pmap.add("", "http://example/") ;
+        pmap.add("org", "http://example.org/") ;
+        assertTrue(pmap.contains("")) ;
+        assertTrue(pmap.contains("org")) ;
+    }
+
     /**
      * Simple expand test
      */

Modified: jena/trunk/jena-arq/src/test/java/org/apache/jena/riot/system/TestFastAbbreviatingPrefixMap.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/test/java/org/apache/jena/riot/system/TestFastAbbreviatingPrefixMap.java?rev=1440036&r1=1440035&r2=1440036&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/test/java/org/apache/jena/riot/system/TestFastAbbreviatingPrefixMap.java
(original)
+++ jena/trunk/jena-arq/src/test/java/org/apache/jena/riot/system/TestFastAbbreviatingPrefixMap.java
Tue Jan 29 18:03:31 2013
@@ -22,7 +22,7 @@ package org.apache.jena.riot.system;
  * Tests the {@link FastAbbreviatingPrefixMap} implementation
  *
  */
-public class TestFastAbbreviatingPrefixMap extends AbstractTestLightweightPrefixMap {
+public class TestFastAbbreviatingPrefixMap extends AbstractTestPrefixMap {
 
     @Override
     protected PrefixMap getPrefixMap() {

Modified: jena/trunk/jena-arq/src/test/java/org/apache/jena/riot/system/TestPrefixMap.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/test/java/org/apache/jena/riot/system/TestPrefixMap.java?rev=1440036&r1=1440035&r2=1440036&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/test/java/org/apache/jena/riot/system/TestPrefixMap.java (original)
+++ jena/trunk/jena-arq/src/test/java/org/apache/jena/riot/system/TestPrefixMap.java Tue Jan
29 18:03:31 2013
@@ -22,7 +22,7 @@ package org.apache.jena.riot.system;
  * Test the standard {@link PrefixMapStd} implementation
  *
  */
-public class TestPrefixMap extends AbstractTestLightweightPrefixMap {
+public class TestPrefixMap extends AbstractTestPrefixMap {
 
     @Override
     protected PrefixMap getPrefixMap() {

Modified: jena/trunk/jena-arq/src/test/java/org/apache/jena/riot/system/TestPrefixMapExtended1.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/test/java/org/apache/jena/riot/system/TestPrefixMapExtended1.java?rev=1440036&r1=1440035&r2=1440036&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/test/java/org/apache/jena/riot/system/TestPrefixMapExtended1.java
(original)
+++ jena/trunk/jena-arq/src/test/java/org/apache/jena/riot/system/TestPrefixMapExtended1.java
Tue Jan 29 18:03:31 2013
@@ -22,7 +22,7 @@ package org.apache.jena.riot.system;
  * Tests for {@link PrefixMapExtended} applied over a {@link PrefixMapStd}
  *
  */
-public class TestPrefixMapExtended1 extends AbstractTestLightweightPrefixMap {
+public class TestPrefixMapExtended1 extends AbstractTestPrefixMap {
 
     @Override
     protected PrefixMap getPrefixMap() {

Modified: jena/trunk/jena-arq/src/test/java/org/apache/jena/riot/system/TestPrefixMapExtended2.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/test/java/org/apache/jena/riot/system/TestPrefixMapExtended2.java?rev=1440036&r1=1440035&r2=1440036&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/test/java/org/apache/jena/riot/system/TestPrefixMapExtended2.java
(original)
+++ jena/trunk/jena-arq/src/test/java/org/apache/jena/riot/system/TestPrefixMapExtended2.java
Tue Jan 29 18:03:31 2013
@@ -22,7 +22,7 @@ package org.apache.jena.riot.system;
  * Tests for {@link PrefixMapExtended} applied over a {@link FastAbbreviatingPrefixMap}
  *
  */
-public class TestPrefixMapExtended2 extends AbstractTestLightweightPrefixMap {
+public class TestPrefixMapExtended2 extends AbstractTestPrefixMap {
 
     @Override
     protected PrefixMap getPrefixMap() {

Modified: jena/trunk/jena-arq/src/test/java/org/apache/jena/riot/tokens/TestTokenForNode.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/test/java/org/apache/jena/riot/tokens/TestTokenForNode.java?rev=1440036&r1=1440035&r2=1440036&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/test/java/org/apache/jena/riot/tokens/TestTokenForNode.java (original)
+++ jena/trunk/jena-arq/src/test/java/org/apache/jena/riot/tokens/TestTokenForNode.java Tue
Jan 29 18:03:31 2013
@@ -19,11 +19,8 @@
 package org.apache.jena.riot.tokens;
 
 import org.apache.jena.atlas.junit.BaseTest ;
-import org.apache.jena.riot.system.PrefixMap;
-import org.apache.jena.riot.system.PrefixMapFactory;
-import org.apache.jena.riot.system.PrefixMapStd ;
-import org.apache.jena.riot.tokens.Token ;
-import org.apache.jena.riot.tokens.TokenType ;
+import org.apache.jena.riot.system.PrefixMap ;
+import org.apache.jena.riot.system.PrefixMapFactory ;
 import org.junit.BeforeClass ;
 import org.junit.Test ;
 



Mime
View raw message