You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stanbol.apache.org by rw...@apache.org on 2012/07/03 17:27:52 UTC
svn commit: r1356788 -
/incubator/stanbol/trunk/entityhub/jersey/src/main/java/org/apache/stanbol/entityhub/jersey/resource/EntityhubRootResource.java
Author: rwesten
Date: Tue Jul 3 15:27:51 2012
New Revision: 1356788
URL: http://svn.apache.org/viewvc?rev=1356788&view=rev
Log:
fix for http://markmail.org/message/h5smtjlxxgjvnv4v (sorry no STANBOL-XXX because Jira is still unavailable)
Modified:
incubator/stanbol/trunk/entityhub/jersey/src/main/java/org/apache/stanbol/entityhub/jersey/resource/EntityhubRootResource.java
Modified: incubator/stanbol/trunk/entityhub/jersey/src/main/java/org/apache/stanbol/entityhub/jersey/resource/EntityhubRootResource.java
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/entityhub/jersey/src/main/java/org/apache/stanbol/entityhub/jersey/resource/EntityhubRootResource.java?rev=1356788&r1=1356787&r2=1356788&view=diff
==============================================================================
--- incubator/stanbol/trunk/entityhub/jersey/src/main/java/org/apache/stanbol/entityhub/jersey/resource/EntityhubRootResource.java (original)
+++ incubator/stanbol/trunk/entityhub/jersey/src/main/java/org/apache/stanbol/entityhub/jersey/resource/EntityhubRootResource.java Tue Jul 3 15:27:51 2012
@@ -347,6 +347,12 @@ public class EntityhubRootResource exten
it.remove(); //not the Entity nor the metadata of the parsed ID
}
}
+ if(parsed.isEmpty()){
+ return Response.status(Status.BAD_REQUEST)
+ .entity(String.format("Parsed RDF data do not contain any "
+ + "Information about the parsed id '%s'",id))
+ .header(HttpHeaders.ACCEPT, accepted).build();
+ }
}
//First check if all parsed Representation can be created/updated
if(!(create && update)){ //if both create and update are enabled skip this