clerezza-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From m..@apache.org
Subject svn commit: r891173 - /incubator/clerezza/trunk/org.apache.clerezza.parent/org.apache.clerezza.webapp.parent/org.apache.clerezza.platform.content/src/main/java/org/apache/clerezza/platform/content/ContentPostSupport.java
Date Wed, 16 Dec 2009 10:05:37 GMT
Author: mir
Date: Wed Dec 16 10:05:37 2009
New Revision: 891173

URL: http://svn.apache.org/viewvc?rev=891173&view=rev
Log:
CLEREZZA-26: existence of resource now checked over RDF:type property

Modified:
    incubator/clerezza/trunk/org.apache.clerezza.parent/org.apache.clerezza.webapp.parent/org.apache.clerezza.platform.content/src/main/java/org/apache/clerezza/platform/content/ContentPostSupport.java

Modified: incubator/clerezza/trunk/org.apache.clerezza.parent/org.apache.clerezza.webapp.parent/org.apache.clerezza.platform.content/src/main/java/org/apache/clerezza/platform/content/ContentPostSupport.java
URL: http://svn.apache.org/viewvc/incubator/clerezza/trunk/org.apache.clerezza.parent/org.apache.clerezza.webapp.parent/org.apache.clerezza.platform.content/src/main/java/org/apache/clerezza/platform/content/ContentPostSupport.java?rev=891173&r1=891172&r2=891173&view=diff
==============================================================================
--- incubator/clerezza/trunk/org.apache.clerezza.parent/org.apache.clerezza.webapp.parent/org.apache.clerezza.platform.content/src/main/java/org/apache/clerezza/platform/content/ContentPostSupport.java
(original)
+++ incubator/clerezza/trunk/org.apache.clerezza.parent/org.apache.clerezza.webapp.parent/org.apache.clerezza.platform.content/src/main/java/org/apache/clerezza/platform/content/ContentPostSupport.java
Wed Dec 16 10:05:37 2009
@@ -30,6 +30,7 @@
 import org.apache.clerezza.jaxrs.utils.form.MultiPartBody;
 import org.apache.clerezza.platform.graphprovider.content.ContentGraphProvider;
 import org.apache.clerezza.rdf.core.UriRef;
+import org.apache.clerezza.rdf.ontologies.RDF;
 import org.apache.felix.scr.annotations.Component;
 import org.apache.felix.scr.annotations.Property;
 import org.apache.felix.scr.annotations.Reference;
@@ -76,7 +77,7 @@
 			return Response.status(400).entity("Required form field is missing").
 					type(MediaType.TEXT_PLAIN_TYPE).build();
 		}
-		if (cgProvider.getContentGraph().filter(new UriRef(uri), null, null).hasNext()) {
+		if (cgProvider.getContentGraph().filter(new UriRef(uri), RDF.type, null).hasNext()) {
 			return Response.status(Response.Status.CONFLICT).
 					entity("A resource with the specified URI already exists").
 					type(MediaType.TEXT_PLAIN_TYPE).build();



Mime
View raw message