aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.lyo.oslc4j.provider.jena/src/main/java/org/eclipse/lyo/oslc4j/provider/jena/OslcRdfXmlProvider.java')
-rw-r--r--org.eclipse.lyo.oslc4j.provider.jena/src/main/java/org/eclipse/lyo/oslc4j/provider/jena/OslcRdfXmlProvider.java23
1 files changed, 19 insertions, 4 deletions
diff --git a/org.eclipse.lyo.oslc4j.provider.jena/src/main/java/org/eclipse/lyo/oslc4j/provider/jena/OslcRdfXmlProvider.java b/org.eclipse.lyo.oslc4j.provider.jena/src/main/java/org/eclipse/lyo/oslc4j/provider/jena/OslcRdfXmlProvider.java
index 67f2fd6..2faf7e2 100644
--- a/org.eclipse.lyo.oslc4j.provider.jena/src/main/java/org/eclipse/lyo/oslc4j/provider/jena/OslcRdfXmlProvider.java
+++ b/org.eclipse.lyo.oslc4j.provider.jena/src/main/java/org/eclipse/lyo/oslc4j/provider/jena/OslcRdfXmlProvider.java
@@ -27,6 +27,7 @@ import java.lang.annotation.Annotation;
import java.lang.reflect.GenericArrayType;
import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;
+import java.net.URI;
import java.util.Collection;
import java.util.Map;
@@ -163,8 +164,24 @@ public class OslcRdfXmlProvider
if (filteredResource instanceof ResponseInfo<?>)
{
- descriptionURI = OSLC4JUtils.resolveURI(httpServletRequest, true);
- responseInfoURI = descriptionURI;
+ responseInfo = (ResponseInfo<?>)filteredResource;
+
+ String requestURI = OSLC4JUtils.resolveURI(httpServletRequest, true);
+ responseInfoURI = requestURI;
+
+ FilteredResource<?> container = responseInfo.getContainer();
+ if (container != null)
+ {
+ URI containerAboutURI = container.getAbout();
+ if (containerAboutURI != null)
+ {
+ descriptionURI = containerAboutURI.toString();
+ }
+ }
+ if (null == descriptionURI)
+ {
+ descriptionURI = requestURI;
+ }
final String queryString = httpServletRequest.getQueryString();
@@ -185,8 +202,6 @@ public class OslcRdfXmlProvider
objects = collection.toArray(new Object[collection.size()]);
}
-
- responseInfo = (ResponseInfo<?>)filteredResource;
}
else
{