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 2011/08/07 22:49:51 UTC
svn commit: r1154765 - in /incubator/jena/Jena2/ARQ/trunk/src/org/openjena:
atlas/web/HttpException.java riot/WebContent.java riot/WebReader.java
riot/system/ContentNeg.java
Author: andy
Date: Sun Aug 7 20:49:51 2011
New Revision: 1154765
URL: http://svn.apache.org/viewvc?rev=1154765&view=rev
Log:
WIP: Better HTTP support (graph reading and SPARQL results)
Added:
incubator/jena/Jena2/ARQ/trunk/src/org/openjena/atlas/web/HttpException.java (with props)
Modified:
incubator/jena/Jena2/ARQ/trunk/src/org/openjena/riot/WebContent.java
incubator/jena/Jena2/ARQ/trunk/src/org/openjena/riot/WebReader.java
incubator/jena/Jena2/ARQ/trunk/src/org/openjena/riot/system/ContentNeg.java
Added: incubator/jena/Jena2/ARQ/trunk/src/org/openjena/atlas/web/HttpException.java
URL: http://svn.apache.org/viewvc/incubator/jena/Jena2/ARQ/trunk/src/org/openjena/atlas/web/HttpException.java?rev=1154765&view=auto
==============================================================================
--- incubator/jena/Jena2/ARQ/trunk/src/org/openjena/atlas/web/HttpException.java (added)
+++ incubator/jena/Jena2/ARQ/trunk/src/org/openjena/atlas/web/HttpException.java Sun Aug 7 20:49:51 2011
@@ -0,0 +1,28 @@
+/**
+ * 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 org.openjena.atlas.web;
+
+public class HttpException extends RuntimeException
+{
+ public HttpException() {}
+ public HttpException(String message) { super(message) ; }
+ public HttpException(Throwable cause) { super(cause) ; }
+ public HttpException(String message, Throwable cause) { super(message, cause) ;}
+}
+
Propchange: incubator/jena/Jena2/ARQ/trunk/src/org/openjena/atlas/web/HttpException.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Modified: incubator/jena/Jena2/ARQ/trunk/src/org/openjena/riot/WebContent.java
URL: http://svn.apache.org/viewvc/incubator/jena/Jena2/ARQ/trunk/src/org/openjena/riot/WebContent.java?rev=1154765&r1=1154764&r2=1154765&view=diff
==============================================================================
--- incubator/jena/Jena2/ARQ/trunk/src/org/openjena/riot/WebContent.java (original)
+++ incubator/jena/Jena2/ARQ/trunk/src/org/openjena/riot/WebContent.java Sun Aug 7 20:49:51 2011
@@ -20,8 +20,15 @@ public class WebContent
public static final String contentTypeN3Alt1 = "application/n3" ;
public static final String contentTypeN3Alt2 = "text/n3" ;
- public static final String contentTypeTurtle1 = "application/turtle" ;
- public static final String contentTypeTurtle2 = "text/turtle" ;
+ public static final String contentTypeTurtle = "text/turtle" ;
+ public static final String contentTypeTurtleAlt1 = "application/turtle" ;
+ public static final String contentTypeTurtleAlt2 = "application/x-turtle" ;
+
+ /** @deprecated Use contentTypeTurtleAlt1 */ @Deprecated
+ public static final String contentTypeTurtle1 = "application/turtle" ;
+ /** @deprecated Use contentTypeTurtle */ @Deprecated
+ public static final String contentTypeTurtle2 = "text/turtle" ;
+ /** @deprecated Use contentTypeTurtleAlt2 */ @Deprecated
public static final String contentTypeTurtle3 = "application/x-turtle" ;
public static final String contentTypeRDFXML = "application/rdf+xml" ;
Modified: incubator/jena/Jena2/ARQ/trunk/src/org/openjena/riot/WebReader.java
URL: http://svn.apache.org/viewvc/incubator/jena/Jena2/ARQ/trunk/src/org/openjena/riot/WebReader.java?rev=1154765&r1=1154764&r2=1154765&view=diff
==============================================================================
--- incubator/jena/Jena2/ARQ/trunk/src/org/openjena/riot/WebReader.java (original)
+++ incubator/jena/Jena2/ARQ/trunk/src/org/openjena/riot/WebReader.java Sun Aug 7 20:49:51 2011
@@ -16,9 +16,9 @@ import static org.openjena.riot.WebConte
import static org.openjena.riot.WebContent.contentTypeRDFXML ;
import static org.openjena.riot.WebContent.contentTypeTriG ;
import static org.openjena.riot.WebContent.contentTypeTriGAlt ;
-import static org.openjena.riot.WebContent.contentTypeTurtle1 ;
-import static org.openjena.riot.WebContent.contentTypeTurtle2 ;
-import static org.openjena.riot.WebContent.contentTypeTurtle3 ;
+import static org.openjena.riot.WebContent.contentTypeTurtle ;
+import static org.openjena.riot.WebContent.contentTypeTurtleAlt1 ;
+import static org.openjena.riot.WebContent.contentTypeTurtleAlt2 ;
import java.io.InputStream ;
import java.util.HashMap ;
@@ -112,9 +112,9 @@ public class WebReader
contentTypeToLang.put(contentTypeN3Alt1.toLowerCase(), Lang.N3) ;
contentTypeToLang.put(contentTypeN3Alt2.toLowerCase(), Lang.N3) ;
- contentTypeToLang.put(contentTypeTurtle1.toLowerCase(), Lang.TURTLE) ;
- contentTypeToLang.put(contentTypeTurtle2.toLowerCase(), Lang.TURTLE) ;
- contentTypeToLang.put(contentTypeTurtle3.toLowerCase(), Lang.TURTLE) ;
+ contentTypeToLang.put(contentTypeTurtle.toLowerCase(), Lang.TURTLE) ;
+ contentTypeToLang.put(contentTypeTurtleAlt1.toLowerCase(), Lang.TURTLE) ;
+ contentTypeToLang.put(contentTypeTurtleAlt2.toLowerCase(), Lang.TURTLE) ;
contentTypeToLang.put(contentTypeNTriples.toLowerCase(), Lang.NTRIPLES) ;
contentTypeToLang.put(contentTypeNTriplesAlt.toLowerCase(), Lang.NTRIPLES) ;
Modified: incubator/jena/Jena2/ARQ/trunk/src/org/openjena/riot/system/ContentNeg.java
URL: http://svn.apache.org/viewvc/incubator/jena/Jena2/ARQ/trunk/src/org/openjena/riot/system/ContentNeg.java?rev=1154765&r1=1154764&r2=1154765&view=diff
==============================================================================
--- incubator/jena/Jena2/ARQ/trunk/src/org/openjena/riot/system/ContentNeg.java (original)
+++ incubator/jena/Jena2/ARQ/trunk/src/org/openjena/riot/system/ContentNeg.java Sun Aug 7 20:49:51 2011
@@ -100,7 +100,7 @@ public class ContentNeg
private static void init()
{
extToMimeType.put("n3", contentTypeN3) ;
- extToMimeType.put("ttl", contentTypeTurtle1) ;
+ extToMimeType.put("ttl", contentTypeTurtle) ;
extToMimeType.put("nt", InternalNTriples) ;
extToMimeType.put("rdf", contentTypeRDFXML) ;
extToMimeType.put("owl", contentTypeRDFXML) ;
@@ -113,11 +113,9 @@ public class ContentNeg
readers.put(contentTypeN3Alt1, langN3) ;
readers.put(contentTypeN3Alt2, langN3) ;
- readers.put(contentTypeTurtle1, langTurtle) ;
- readers.put(contentTypeTurtle2, langTurtle) ;
- readers.put(contentTypeTurtle3, langTurtle) ;
-
- readers.put("text/turtle", langTurtle) ; //??
+ readers.put(contentTypeTurtle, langTurtle) ;
+ readers.put(contentTypeTurtleAlt1, langTurtle) ;
+ readers.put(contentTypeTurtleAlt2, langTurtle) ;
readers.put("text/plain", "NT") ; // ??
readers.put(InternalNTriples, "NT") ; // Internal name.