You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@marmotta.apache.org by ja...@apache.org on 2014/04/04 11:30:43 UTC

[46/50] [abbrv] git commit: updated ldp vocab

updated ldp vocab


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

Branch: refs/heads/develop
Commit: 4652f714c10ad024e09b2f64470f67f166b9849e
Parents: a2b95c5
Author: Sergio Fernández <wi...@apache.org>
Authored: Thu Apr 3 09:37:42 2014 +0200
Committer: Sergio Fernández <wi...@apache.org>
Committed: Thu Apr 3 09:37:42 2014 +0200

----------------------------------------------------------------------
 .../apache/marmotta/commons/vocabulary/LDP.java | 43 +++++++++-----------
 .../platform/ldp/services/LdpServiceImpl.java   |  6 +--
 .../ldp/webservices/LdpWebServiceTest.java      |  4 +-
 3 files changed, 25 insertions(+), 28 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/marmotta/blob/4652f714/commons/marmotta-sesame-tools/marmotta-model-vocabs/src/main/java/org/apache/marmotta/commons/vocabulary/LDP.java
----------------------------------------------------------------------
diff --git a/commons/marmotta-sesame-tools/marmotta-model-vocabs/src/main/java/org/apache/marmotta/commons/vocabulary/LDP.java b/commons/marmotta-sesame-tools/marmotta-model-vocabs/src/main/java/org/apache/marmotta/commons/vocabulary/LDP.java
index d76ca13..0c9ccbd 100644
--- a/commons/marmotta-sesame-tools/marmotta-model-vocabs/src/main/java/org/apache/marmotta/commons/vocabulary/LDP.java
+++ b/commons/marmotta-sesame-tools/marmotta-model-vocabs/src/main/java/org/apache/marmotta/commons/vocabulary/LDP.java
@@ -17,12 +17,11 @@
 package org.apache.marmotta.commons.vocabulary;
 
 import org.openrdf.model.URI;
-import org.openrdf.model.Value;
 import org.openrdf.model.ValueFactory;
 import org.openrdf.model.impl.ValueFactoryImpl;
 
 /**
- * Namespace LDP
+ * LDP Namespace
  */
 public class LDP {
 
@@ -30,8 +29,6 @@ public class LDP {
 
     public static final String PREFIX = "ldp";
 
-    
-    
     public static final URI BasicContainer;
     public static final URI Container;
     public static final URI contains;
@@ -43,7 +40,7 @@ public class LDP {
     public static final URI member;
     public static final URI membershipResource;
     public static final URI MemberSubject;
-    public static final URI NonRdfResource;
+    public static final URI NonRDFSource;
     public static final URI PreferContainment;
     public static final URI PreferEmptyContainer;
     public static final URI PreferMembership;
@@ -51,25 +48,25 @@ public class LDP {
     public static final URI Resource;
 
     static {
+        //TODO: check missing terms in the vocab
         ValueFactory factory = ValueFactoryImpl.getInstance();
-        BasicContainer = factory.createURI(LDP.NAMESPACE, "BasicContainer"); //TODO: missing term in the vocab
-        Container = factory.createURI(LDP.NAMESPACE, "Container"); //TODO: missing term in the vocab
-        contains = factory.createURI(LDP.NAMESPACE, "contains"); //TODO: missing term in the vocab
-        DirectContainer = factory.createURI(LDP.NAMESPACE, "DirectContainer"); //TODO: missing term in the vocab
-        hasMemberRelation = factory.createURI(LDP.NAMESPACE, "hasMemberRelation"); //TODO: missing term in the vocab
-        IndirectContainer = factory.createURI(LDP.NAMESPACE, "IndirectContainer"); //TODO: missing term in the vocab
-        insertedContentRelation = factory.createURI(LDP.NAMESPACE, "insertedContentRelation"); //TODO: missing term in the vocab
-        isMemberOfRelation = factory.createURI(LDP.NAMESPACE, "isMemberOfRelation"); //TODO: missing term in the vocab
-        member = factory.createURI(LDP.NAMESPACE, "member"); //TODO: missing term in the vocab
-        membershipResource = factory.createURI(LDP.NAMESPACE, "membershipResource"); //TODO: missing term in the vocab
-        MemberSubject = factory.createURI(LDP.NAMESPACE, "MemberSubject"); //TODO: missing term in the vocab
-        NonRdfResource = factory.createURI(LDP.NAMESPACE, "NonRdfResource"); //TODO: missing term in the vocab
-        PreferContainment = factory.createURI(LDP.NAMESPACE, "PreferContainment"); //TODO: missing term in the vocab
-        PreferEmptyContainer = factory.createURI(LDP.NAMESPACE, "PreferEmptyContainer"); //TODO: missing term in the vocab
-        PreferMembership = factory.createURI(LDP.NAMESPACE, "PreferMembership"); //TODO: missing term in the vocab
-        RDFSource = factory.createURI(LDP.NAMESPACE, "RDFSource"); //TODO: missing term in the vocab
-        Resource = factory.createURI(LDP.NAMESPACE, "Resource"); //TODO: missing term in the vocab
-
+        BasicContainer = factory.createURI(LDP.NAMESPACE, "BasicContainer");
+        Container = factory.createURI(LDP.NAMESPACE, "Container");
+        contains = factory.createURI(LDP.NAMESPACE, "contains");
+        DirectContainer = factory.createURI(LDP.NAMESPACE, "DirectContainer");
+        hasMemberRelation = factory.createURI(LDP.NAMESPACE, "hasMemberRelation");
+        IndirectContainer = factory.createURI(LDP.NAMESPACE, "IndirectContainer");
+        insertedContentRelation = factory.createURI(LDP.NAMESPACE, "insertedContentRelation");
+        isMemberOfRelation = factory.createURI(LDP.NAMESPACE, "isMemberOfRelation");
+        member = factory.createURI(LDP.NAMESPACE, "member");
+        membershipResource = factory.createURI(LDP.NAMESPACE, "membershipResource");
+        MemberSubject = factory.createURI(LDP.NAMESPACE, "MemberSubject");
+        NonRDFSource = factory.createURI(LDP.NAMESPACE, "NonRDFSource");
+        PreferContainment = factory.createURI(LDP.NAMESPACE, "PreferContainment");
+        PreferEmptyContainer = factory.createURI(LDP.NAMESPACE, "PreferEmptyContainer");
+        PreferMembership = factory.createURI(LDP.NAMESPACE, "PreferMembership");
+        RDFSource = factory.createURI(LDP.NAMESPACE, "RDFSource");
+        Resource = factory.createURI(LDP.NAMESPACE, "Resource");
     }
 
 }

http://git-wip-us.apache.org/repos/asf/marmotta/blob/4652f714/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 da4a302..75d7923 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
@@ -130,7 +130,7 @@ public class LdpServiceImpl implements LdpService {
 
     @Override
     public boolean isNonRdfSourceResource(RepositoryConnection connection, URI uri) throws RepositoryException {
-        return connection.hasStatement(uri, RDF.TYPE, LDP.NonRdfResource, true, ldpContext);
+        return connection.hasStatement(uri, RDF.TYPE, LDP.NonRDFSource, true, ldpContext);
     }
 
 
@@ -172,7 +172,7 @@ public class LdpServiceImpl implements LdpService {
                     @Override
                     protected boolean accept(Statement statement) throws RepositoryException {
                         return statement.getObject() instanceof URI
-                                && connection.hasStatement((URI) statement.getObject(), RDF.TYPE, LDP.NonRdfResource, true, ldpContext);
+                                && connection.hasStatement((URI) statement.getObject(), RDF.TYPE, LDP.NonRDFSource, true, ldpContext);
                     }
                 };
         try {
@@ -293,7 +293,7 @@ public class LdpServiceImpl implements LdpService {
             connection.add(binaryResource, DCTERMS.created, now, ldpContext);
             connection.add(binaryResource, DCTERMS.modified, now, ldpContext);
             connection.add(binaryResource, RDF.TYPE, LDP.Resource, ldpContext);
-            connection.add(binaryResource, RDF.TYPE, LDP.NonRdfResource, ldpContext);
+            connection.add(binaryResource, RDF.TYPE, LDP.NonRDFSource, ldpContext);
 
             //extra triples
             //TODO: check conformance with 6.2.3.12

http://git-wip-us.apache.org/repos/asf/marmotta/blob/4652f714/platform/marmotta-ldp/src/test/java/org/apache/marmotta/platform/ldp/webservices/LdpWebServiceTest.java
----------------------------------------------------------------------
diff --git a/platform/marmotta-ldp/src/test/java/org/apache/marmotta/platform/ldp/webservices/LdpWebServiceTest.java b/platform/marmotta-ldp/src/test/java/org/apache/marmotta/platform/ldp/webservices/LdpWebServiceTest.java
index 47ecd8e..8cd5c69 100644
--- a/platform/marmotta-ldp/src/test/java/org/apache/marmotta/platform/ldp/webservices/LdpWebServiceTest.java
+++ b/platform/marmotta-ldp/src/test/java/org/apache/marmotta/platform/ldp/webservices/LdpWebServiceTest.java
@@ -241,13 +241,13 @@ public class LdpWebServiceTest {
                 .header("Link", CoreMatchers.anyOf( //TODO: RestAssured only checks the FIRST header...
                         HeaderMatchers.isLink(LdpWebService.LDP_SERVER_CONSTRAINTS, "describedby"),
                         HeaderMatchers.isLink(LDP.Resource.stringValue(), "type"),
-                        HeaderMatchers.isLink(LDP.NonRdfResource.stringValue(), "type"))
+                        HeaderMatchers.isLink(LDP.NonRDFSource.stringValue(), "type"))
                 )
                 .header("ETag", HeaderMatchers.hasEntityTag(false)) // FIXME: be more specific here
                 .contentType(RDFFormat.TURTLE.getDefaultMIMEType())
                 .body(SesameMatchers.rdfStringMatches(RDFFormat.TURTLE.getDefaultMIMEType(), baseUrl + newResource+".png",
                         SesameMatchers.hasStatement(new URIImpl(baseUrl + newResource+".png"), RDF.TYPE, LDP.Resource),
-                        SesameMatchers.hasStatement(new URIImpl(baseUrl + newResource+".png"), RDF.TYPE, LDP.NonRdfResource),
+                        SesameMatchers.hasStatement(new URIImpl(baseUrl + newResource+".png"), RDF.TYPE, LDP.NonRDFSource),
                         SesameMatchers.hasStatement(new URIImpl(baseUrl + newResource+".png"), DCTERMS.MODIFIED, null),
                         SesameMatchers.hasStatement(new URIImpl(baseUrl + newResource+".png"), DCTERMS.FORMAT, new LiteralImpl(mimeType)),
                         SesameMatchers.hasStatement(new URIImpl(baseUrl + newResource+".png"), DCTERMS.IS_FORMAT_OF, new URIImpl(baseUrl + newResource))