Repository: marmotta
Updated Branches:
  refs/heads/develop 3bd812477 -> 7e5683c0d


MARMOTTA-514: Explicitly adding types ldp:Container and ldp:BasicContainer for 
resources created using the LDPC Interaction Model.

This should fix the testContainerSupportsHttpLinkHeader that failed from time 
to time in the ldp-testsuite.


Project: http://git-wip-us.apache.org/repos/asf/marmotta/repo
Commit: http://git-wip-us.apache.org/repos/asf/marmotta/commit/7e5683c0
Tree: http://git-wip-us.apache.org/repos/asf/marmotta/tree/7e5683c0
Diff: http://git-wip-us.apache.org/repos/asf/marmotta/diff/7e5683c0

Branch: refs/heads/develop
Commit: 7e5683c0d56dc9cbe7a81730b2fd3c4b7757a85f
Parents: 1d0fa4c
Author: Jakob Frank <[email protected]>
Authored: Thu Sep 25 16:31:29 2014 +0200
Committer: Jakob Frank <[email protected]>
Committed: Thu Sep 25 16:36:18 2014 +0200

----------------------------------------------------------------------
 .../apache/marmotta/platform/ldp/services/LdpServiceImpl.java   | 5 +++++
 1 file changed, 5 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/marmotta/blob/7e5683c0/platform/marmotta-ldp/src/main/java/org/apache/marmotta/platform/ldp/services/LdpServiceImpl.java
----------------------------------------------------------------------
diff --git 
a/platform/marmotta-ldp/src/main/java/org/apache/marmotta/platform/ldp/services/LdpServiceImpl.java
 
b/platform/marmotta-ldp/src/main/java/org/apache/marmotta/platform/ldp/services/LdpServiceImpl.java
index 624ff84..3976f9c 100644
--- 
a/platform/marmotta-ldp/src/main/java/org/apache/marmotta/platform/ldp/services/LdpServiceImpl.java
+++ 
b/platform/marmotta-ldp/src/main/java/org/apache/marmotta/platform/ldp/services/LdpServiceImpl.java
@@ -370,6 +370,11 @@ public class LdpServiceImpl implements LdpService {
         connection.add(resource, RDF.TYPE, LDP.Resource, ldpContext);
         connection.add(resource, RDF.TYPE, LDP.RDFSource, ldpContext);
         connection.add(resource, ldpInteractionModelProperty, 
interactionModel.getUri(), ldpContext);
+        if (interactionModel == InteractionModel.LDPC) {
+            connection.add(resource, RDF.TYPE, LDP.Container, ldpContext);
+            // TODO: For the future we might need to check for other container 
types here first.
+            connection.add(resource, RDF.TYPE, LDP.BasicContainer, ldpContext);
+        }
         connection.add(resource, DCTERMS.created, now, ldpContext);
         connection.add(resource, DCTERMS.modified, now, ldpContext);
 

Reply via email to