ANY23-352 updated to rdf4j version 2.3.2
authorHans <firedrake93@gmail.com>
Wed, 16 May 2018 04:32:04 +0000 (23:32 -0500)
committerHans <firedrake93@gmail.com>
Wed, 16 May 2018 04:32:04 +0000 (23:32 -0500)
core/src/test/java/org/apache/any23/writer/JSONWriterTest.java
pom.xml
service/src/test/java/org/apache/any23/servlet/ServletTest.java

index f6cdfeb..4c4fffd 100644 (file)
@@ -70,12 +70,34 @@ public class JSONWriterTest {
     public void testJSONLDWriting() throws TripleHandlerException {
         ByteArrayOutputStream baos = new ByteArrayOutputStream();
         writeContent(new JSONLDWriter(baos));
-        final String expected
-                = "["
-                + "{\"@graph\":[{\"@id\":\"http://sub/3\",\"http://pred/3\":[{\"@type\":\"http://datatype\",\"@value\":\"123\"}]}],\"@id\":\"http://any23.org/tmp/\"},"
-                + "{\"@graph\":[{\"@id\":\"_:bn1\",\"http://pred/1\":[{\"@id\":\"http://value/1\"}]}],\"@id\":\"http://graph/1\"},"
-                + "{\"@graph\":[{\"@id\":\"http://sub/2\",\"http://pred/2\":[{\"@language\":\"en\",\"@value\":\"language literal\"}]}],\"@id\":\"http://graph/2\"}"
-                + "]";
+        final String expected =
+                "[ {\n" +
+                "  \"@graph\" : [ {\n" +
+                "    \"@id\" : \"http://sub/3\",\n" +
+                "    \"http://pred/3\" : [ {\n" +
+                "      \"@type\" : \"http://datatype\",\n" +
+                "      \"@value\" : \"123\"\n" +
+                "    } ]\n" +
+                "  } ],\n" +
+                "  \"@id\" : \"http://any23.org/tmp/\"\n" +
+                "}, {\n" +
+                "  \"@graph\" : [ {\n" +
+                "    \"@id\" : \"_:bn1\",\n" +
+                "    \"http://pred/1\" : [ {\n" +
+                "      \"@id\" : \"http://value/1\"\n" +
+                "    } ]\n" +
+                "  } ],\n" +
+                "  \"@id\" : \"http://graph/1\"\n" +
+                "}, {\n" +
+                "  \"@graph\" : [ {\n" +
+                "    \"@id\" : \"http://sub/2\",\n" +
+                "    \"http://pred/2\" : [ {\n" +
+                "      \"@language\" : \"en\",\n" +
+                "      \"@value\" : \"language literal\"\n" +
+                "    } ]\n" +
+                "  } ],\n" +
+                "  \"@id\" : \"http://graph/2\"\n" +
+                "} ]";
         Assert.assertEquals(expected, baos.toString());
     }
 
diff --git a/pom.xml b/pom.xml
index 60c7c50..5e5211a 100644 (file)
--- a/pom.xml
+++ b/pom.xml
     <httpcore.version>4.4.6</httpcore.version>
     <owlapi.version>5.1.3</owlapi.version>
     <poi.version>3.16</poi.version>
-    <rdf4j.version>2.2.4</rdf4j.version>
+    <rdf4j.version>2.3.2</rdf4j.version>
     <semargl.version>0.7</semargl.version>
     <slf4j.logger.version>1.7.25</slf4j.logger.version>
     <tika.version>1.17</tika.version>
index 3d14f98..1a0128d 100644 (file)
@@ -416,13 +416,17 @@ public class ServletTest {
         String body = "<http://sub/1> <http://pred/1> \"123\"^^<http://datatype> <http://graph/1>.";
         HttpTester response = doPostRequest("/jsonld", body, "application/n-quads");
         Assert.assertEquals(200, response.getStatus());
-        final String EXPECTED_JSON
-                = "["
-                + "{\"@graph\":"
-                + "["
-                + "{\"@id\":\"http://sub/1\","
-                + "\"http://pred/1\":[{\"@type\":\"http://datatype\",\"@value\":\"123\"}]}],"
-                + "\"@id\":\"http://graph/1\"}]";
+        final String EXPECTED_JSON =
+                "[ {\n" +
+                "  \"@graph\" : [ {\n" +
+                "    \"@id\" : \"http://sub/1\",\n" +
+                "    \"http://pred/1\" : [ {\n" +
+                "      \"@type\" : \"http://datatype\",\n" +
+                "      \"@value\" : \"123\"\n" +
+                "    } ]\n" +
+                "  } ],\n" +
+                "  \"@id\" : \"http://graph/1\"\n" +
+                "} ]";
         assertContains(EXPECTED_JSON, response.getContent());
     }