You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@clerezza.apache.org by re...@apache.org on 2014/12/17 17:20:14 UTC
clerezza git commit: CLEREZZA-956: Fixed mime-type for n-triples
Repository: clerezza
Updated Branches:
refs/heads/master d12c2daf5 -> 68d7f66ad
CLEREZZA-956: Fixed mime-type for n-triples
Project: http://git-wip-us.apache.org/repos/asf/clerezza/repo
Commit: http://git-wip-us.apache.org/repos/asf/clerezza/commit/68d7f66a
Tree: http://git-wip-us.apache.org/repos/asf/clerezza/tree/68d7f66a
Diff: http://git-wip-us.apache.org/repos/asf/clerezza/diff/68d7f66a
Branch: refs/heads/master
Commit: 68d7f66ad138c391921bcc43a1a7a78988615670
Parents: d12c2da
Author: Reto Gmür <re...@apache.org>
Authored: Wed Dec 17 17:19:34 2014 +0100
Committer: Reto Gmür <re...@apache.org>
Committed: Wed Dec 17 17:19:34 2014 +0100
----------------------------------------------------------------------
.../ontologiesplugin/OntologyJavaClassCreatorMojo.java | 2 +-
nbactions.xml | 9 +++++++++
.../clerezza/rdf/core/serializedform/SupportedFormat.java | 7 ++++++-
rdf.core/src/site/xsite/content/tutorial_1.xhtml | 2 +-
.../clerezza/rdf/jena/parser/JenaParserProviderTest.java | 6 +++---
.../rdf/jena/serializer/TestJenaSerializerProvider.java | 2 +-
.../rdf/stable/serializer/NTriplesSerializerTest.java | 2 +-
.../rdf/stable/serializer/StableSerializerGraphTest.java | 4 ++--
site/troubleshooting.txt | 2 +-
.../org/apache/clerezza/web/fileserver/util/mime.types | 2 +-
10 files changed, 26 insertions(+), 12 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/clerezza/blob/68d7f66a/maven-ontologies-plugin/src/main/java/org/apache/clerezza/ontologiesplugin/OntologyJavaClassCreatorMojo.java
----------------------------------------------------------------------
diff --git a/maven-ontologies-plugin/src/main/java/org/apache/clerezza/ontologiesplugin/OntologyJavaClassCreatorMojo.java b/maven-ontologies-plugin/src/main/java/org/apache/clerezza/ontologiesplugin/OntologyJavaClassCreatorMojo.java
index 2692a10..e67ba00 100644
--- a/maven-ontologies-plugin/src/main/java/org/apache/clerezza/ontologiesplugin/OntologyJavaClassCreatorMojo.java
+++ b/maven-ontologies-plugin/src/main/java/org/apache/clerezza/ontologiesplugin/OntologyJavaClassCreatorMojo.java
@@ -90,7 +90,7 @@ public class OntologyJavaClassCreatorMojo extends AbstractMojo {
@Override
public void execute() throws MojoExecutionException {
- supportedFormats.put(".nt", "text/rdf+nt");
+ supportedFormats.put(".nt", "application/n-triples");
supportedFormats.put(".n3", "text/rdf+n3");
supportedFormats.put(".rdf", "application/rdf+xml");
supportedFormats.put(".ttl", "text/turtle");
http://git-wip-us.apache.org/repos/asf/clerezza/blob/68d7f66a/nbactions.xml
----------------------------------------------------------------------
diff --git a/nbactions.xml b/nbactions.xml
index 1dd1bd7..0b6b82a 100644
--- a/nbactions.xml
+++ b/nbactions.xml
@@ -20,6 +20,15 @@
</properties>
</action>
<action>
+ <actionName>test</actionName>
+ <goals>
+ <goal>test</goal>
+ </goals>
+ <properties>
+ <Env.MAVEN_OPTS>-Xmx3g -XX:MaxPermSize=768M</Env.MAVEN_OPTS>
+ </properties>
+ </action>
+ <action>
<actionName>CUSTOM-update zz-version</actionName>
<displayName>update zz-version</displayName>
<goals>
http://git-wip-us.apache.org/repos/asf/clerezza/blob/68d7f66a/rdf.core/src/main/java/org/apache/clerezza/rdf/core/serializedform/SupportedFormat.java
----------------------------------------------------------------------
diff --git a/rdf.core/src/main/java/org/apache/clerezza/rdf/core/serializedform/SupportedFormat.java b/rdf.core/src/main/java/org/apache/clerezza/rdf/core/serializedform/SupportedFormat.java
index dc4a69f..8174366 100644
--- a/rdf.core/src/main/java/org/apache/clerezza/rdf/core/serializedform/SupportedFormat.java
+++ b/rdf.core/src/main/java/org/apache/clerezza/rdf/core/serializedform/SupportedFormat.java
@@ -40,7 +40,12 @@ public @interface SupportedFormat {
public static final String RDF_XML = "application/rdf+xml";
public static final String TURTLE = "text/turtle";
public static final String X_TURTLE = "application/x-turtle";
- public static final String N_TRIPLE = "text/rdf+nt";
+ public static final String N_TRIPLE = "application/n-triples";
+ /**
+ * @deprecated: The mime-type for N Triples is "application/n-triples": http://www.w3.org/TR/n-triples/#sec-mediaReg-n-triples
+ */
+ @Deprecated
+ public static final String TEXT_RDF_NT = "text/rdf+nt";
public static final String N3 = "text/rdf+n3";
public static final String RDF_JSON = "application/rdf+json";
//both html and xhtml can be rdf formats with RDFa
http://git-wip-us.apache.org/repos/asf/clerezza/blob/68d7f66a/rdf.core/src/site/xsite/content/tutorial_1.xhtml
----------------------------------------------------------------------
diff --git a/rdf.core/src/site/xsite/content/tutorial_1.xhtml b/rdf.core/src/site/xsite/content/tutorial_1.xhtml
index fb6dbdd..1df2513 100644
--- a/rdf.core/src/site/xsite/content/tutorial_1.xhtml
+++ b/rdf.core/src/site/xsite/content/tutorial_1.xhtml
@@ -397,7 +397,7 @@ final Serializer serializer = Serializer.getInstance();
serializer.serialize(System.out, mGraph, "text/turtle");
</blockcode>
<p>The above code serialized <code>mGraph</code> in the turtle format
- to the standard output. You may want to try "text/rdf+nt" and
+ to the standard output. You may want to try "application/n-triples" and
"application/rdf+xml" to see the triples serialized in different ways.
</p>
<p>The typical way to get specific triples is to use the <code>filter</code>
http://git-wip-us.apache.org/repos/asf/clerezza/blob/68d7f66a/rdf.jena.parser/src/test/java/org/apache/clerezza/rdf/jena/parser/JenaParserProviderTest.java
----------------------------------------------------------------------
diff --git a/rdf.jena.parser/src/test/java/org/apache/clerezza/rdf/jena/parser/JenaParserProviderTest.java b/rdf.jena.parser/src/test/java/org/apache/clerezza/rdf/jena/parser/JenaParserProviderTest.java
index 4ac59ae..92d89ae 100644
--- a/rdf.jena.parser/src/test/java/org/apache/clerezza/rdf/jena/parser/JenaParserProviderTest.java
+++ b/rdf.jena.parser/src/test/java/org/apache/clerezza/rdf/jena/parser/JenaParserProviderTest.java
@@ -44,7 +44,7 @@ public class JenaParserProviderTest {
ParsingProvider provider = new JenaParserProvider();
InputStream nTriplesIn = getClass().getResourceAsStream("test-04.nt");
InputStream turtleIn = getClass().getResourceAsStream("test-04.ttl");
- Graph graphFromNTriples = parse(provider, nTriplesIn, "text/rdf+nt", null);
+ Graph graphFromNTriples = parse(provider, nTriplesIn, "application/n-triples", null);
Graph graphFromTurtle = parse(provider, turtleIn, "text/turtle", null);
Assert.assertEquals(graphFromNTriples, graphFromTurtle);
}
@@ -57,7 +57,7 @@ public class JenaParserProviderTest {
ParsingProvider provider = new JenaParserProvider();
InputStream nTriplesIn = getClass().getResourceAsStream("test-04.nt");
InputStream rdfIn = getClass().getResourceAsStream("test-04.rdf");
- Graph graphFromNTriples = parse(provider, nTriplesIn, "text/rdf+nt", null);
+ Graph graphFromNTriples = parse(provider, nTriplesIn, "application/n-triples", null);
Graph graphFromTurtle = parse(provider, rdfIn, "application/rdf+xml", null);
Assert.assertEquals(graphFromNTriples, graphFromTurtle);
}
@@ -67,7 +67,7 @@ public class JenaParserProviderTest {
ParsingProvider provider = new JenaParserProvider();
InputStream nTriplesIn = getClass().getResourceAsStream("test-04.nt");
InputStream turtleIn = getClass().getResourceAsStream("test-04.ttl");
- Graph graphFromNTriples = parse(provider, nTriplesIn, "text/rdf+nt", null);
+ Graph graphFromNTriples = parse(provider, nTriplesIn, "application/n-triples", null);
Graph graphFromTurtle = parse(provider, turtleIn, "text/turtle;charset=UTF-", null);
Assert.assertEquals(graphFromNTriples, graphFromTurtle);
}
http://git-wip-us.apache.org/repos/asf/clerezza/blob/68d7f66a/rdf.jena.serializer/src/test/java/org/apache/clerezza/rdf/jena/serializer/TestJenaSerializerProvider.java
----------------------------------------------------------------------
diff --git a/rdf.jena.serializer/src/test/java/org/apache/clerezza/rdf/jena/serializer/TestJenaSerializerProvider.java b/rdf.jena.serializer/src/test/java/org/apache/clerezza/rdf/jena/serializer/TestJenaSerializerProvider.java
index 4d7a644..073a0c7 100644
--- a/rdf.jena.serializer/src/test/java/org/apache/clerezza/rdf/jena/serializer/TestJenaSerializerProvider.java
+++ b/rdf.jena.serializer/src/test/java/org/apache/clerezza/rdf/jena/serializer/TestJenaSerializerProvider.java
@@ -140,7 +140,7 @@ public class TestJenaSerializerProvider {
SerializingProvider provider = new JenaSerializerProvider();
ByteArrayOutputStream serializedGraph = new ByteArrayOutputStream();
- provider.serialize(serializedGraph, mGraph.getGraph(), "text/rdf+nt");
+ provider.serialize(serializedGraph, mGraph.getGraph(), "application/n-triples");
InputStream in = new ByteArrayInputStream(serializedGraph.toByteArray());
Graph deserializedGraph = parse(in, "N-TRIPLE");
http://git-wip-us.apache.org/repos/asf/clerezza/blob/68d7f66a/rdf.stable.serializer/src/test/java/org/apache/clerezza/rdf/stable/serializer/NTriplesSerializerTest.java
----------------------------------------------------------------------
diff --git a/rdf.stable.serializer/src/test/java/org/apache/clerezza/rdf/stable/serializer/NTriplesSerializerTest.java b/rdf.stable.serializer/src/test/java/org/apache/clerezza/rdf/stable/serializer/NTriplesSerializerTest.java
index ff00537..2376937 100644
--- a/rdf.stable.serializer/src/test/java/org/apache/clerezza/rdf/stable/serializer/NTriplesSerializerTest.java
+++ b/rdf.stable.serializer/src/test/java/org/apache/clerezza/rdf/stable/serializer/NTriplesSerializerTest.java
@@ -83,7 +83,7 @@ public class NTriplesSerializerTest {
ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());
- Graph deserializedGraphNew = parser.parse(bais, "text/rdf+nt");
+ Graph deserializedGraphNew = parser.parse(bais, "application/n-triples");
Assert.assertEquals(deserializedGraphNew, deserializedGraphOld);
}
http://git-wip-us.apache.org/repos/asf/clerezza/blob/68d7f66a/rdf.stable.serializer/src/test/java/org/apache/clerezza/rdf/stable/serializer/StableSerializerGraphTest.java
----------------------------------------------------------------------
diff --git a/rdf.stable.serializer/src/test/java/org/apache/clerezza/rdf/stable/serializer/StableSerializerGraphTest.java b/rdf.stable.serializer/src/test/java/org/apache/clerezza/rdf/stable/serializer/StableSerializerGraphTest.java
index 64e69b1..032737f 100644
--- a/rdf.stable.serializer/src/test/java/org/apache/clerezza/rdf/stable/serializer/StableSerializerGraphTest.java
+++ b/rdf.stable.serializer/src/test/java/org/apache/clerezza/rdf/stable/serializer/StableSerializerGraphTest.java
@@ -77,11 +77,11 @@ public class StableSerializerGraphTest {
tc.addAll(deserializedGraphOld);
ByteArrayOutputStream baos = new ByteArrayOutputStream();
- ssp.serialize(baos, tc, "text/rdf+nt");
+ ssp.serialize(baos, tc, "application/n-triples");
ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());
- Graph deserializedGraphNew = parser.parse(bais, "text/rdf+nt");
+ Graph deserializedGraphNew = parser.parse(bais, "application/n-triples");
Assert.assertEquals(deserializedGraphOld, deserializedGraphNew);
http://git-wip-us.apache.org/repos/asf/clerezza/blob/68d7f66a/site/troubleshooting.txt
----------------------------------------------------------------------
diff --git a/site/troubleshooting.txt b/site/troubleshooting.txt
index 3f59304..0711866 100644
--- a/site/troubleshooting.txt
+++ b/site/troubleshooting.txt
@@ -3,7 +3,7 @@ Troubleshooting
If things don't just work as described in the readme.
Getting the content graph manually:
-- curl -u admin:admin -H "Accept: text/rdf+nt" http://localhost:8080/graph?name=urn:x-localinstance:/content.graph > graph.nt
+- curl -u admin:admin -H "Accept: application/n-triples" http://localhost:8080/graph?name=urn:x-localinstance:/content.graph > graph.nt
Manually deploying:
- retrieve a zipped offline version from http://localhost:8080/admin/offline/download?baseUri=http://localhost:8080/&targetUri=http://incubator.apache.org/clerezza/&formatExtension=xhtml&formatExtension=rdf&formatExtension=png&formatExtension=html&formatExtension=js&formatExtension=jpeg&rootLinkPrefix=/clerezza
http://git-wip-us.apache.org/repos/asf/clerezza/blob/68d7f66a/web.fileserver/src/main/resources/org/apache/clerezza/web/fileserver/util/mime.types
----------------------------------------------------------------------
diff --git a/web.fileserver/src/main/resources/org/apache/clerezza/web/fileserver/util/mime.types b/web.fileserver/src/main/resources/org/apache/clerezza/web/fileserver/util/mime.types
index 9805ffb..cd46577 100644
--- a/web.fileserver/src/main/resources/org/apache/clerezza/web/fileserver/util/mime.types
+++ b/web.fileserver/src/main/resources/org/apache/clerezza/web/fileserver/util/mime.types
@@ -662,7 +662,7 @@ text/parityfec
text/plain asc txt text diff pot
text/prs.lines.tag
text/x-psp psp
-text/rdf+nt nt
+application/n-triples nt
text/rdf+n3 n3
text/rfc822-headers
text/richtext rtx