You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@marmotta.apache.org by wi...@apache.org on 2014/01/17 12:58:20 UTC
[1/2] git commit: MARMOTTA-423: finally got an entity without
conflictive data, so suitable for a unit test
Updated Branches:
refs/heads/develop 5229ba4c2 -> dd23600a0
MARMOTTA-423: finally got an entity without conflictive data, so suitable for a unit test
Project: http://git-wip-us.apache.org/repos/asf/marmotta/repo
Commit: http://git-wip-us.apache.org/repos/asf/marmotta/commit/d503cc08
Tree: http://git-wip-us.apache.org/repos/asf/marmotta/tree/d503cc08
Diff: http://git-wip-us.apache.org/repos/asf/marmotta/diff/d503cc08
Branch: refs/heads/develop
Commit: d503cc083e9818b8e9b5cbed39fc1e78df42e131
Parents: 56911f0
Author: Sergio Fernández <wi...@apache.org>
Authored: Fri Jan 17 12:55:18 2014 +0100
Committer: Sergio Fernández <wi...@apache.org>
Committed: Fri Jan 17 12:55:18 2014 +0100
----------------------------------------------------------------------
.../test/freebase/TestFreebaseProvider.java | 29 ++++++++++++++++++--
.../ldclient/test/freebase/m.0h21k1c.sparql | 26 ++++++++++++++++++
2 files changed, 53 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/marmotta/blob/d503cc08/libraries/ldclient/ldclient-provider-freebase/src/test/java/org/apache/marmotta/ldclient/test/freebase/TestFreebaseProvider.java
----------------------------------------------------------------------
diff --git a/libraries/ldclient/ldclient-provider-freebase/src/test/java/org/apache/marmotta/ldclient/test/freebase/TestFreebaseProvider.java b/libraries/ldclient/ldclient-provider-freebase/src/test/java/org/apache/marmotta/ldclient/test/freebase/TestFreebaseProvider.java
index dec7c25..253e1b3 100644
--- a/libraries/ldclient/ldclient-provider-freebase/src/test/java/org/apache/marmotta/ldclient/test/freebase/TestFreebaseProvider.java
+++ b/libraries/ldclient/ldclient-provider-freebase/src/test/java/org/apache/marmotta/ldclient/test/freebase/TestFreebaseProvider.java
@@ -17,12 +17,25 @@
*/
package org.apache.marmotta.ldclient.test.freebase;
+import org.apache.commons.io.IOUtils;
+import org.apache.marmotta.commons.sesame.model.ModelCommons;
import org.apache.marmotta.ldclient.exception.DataRetrievalException;
import org.apache.marmotta.ldclient.model.ClientResponse;
import org.apache.marmotta.ldclient.test.provider.ProviderTestBase;
import org.junit.Assert;
+import org.junit.Assume;
import org.junit.Ignore;
import org.junit.Test;
+import org.openrdf.query.BooleanQuery;
+import org.openrdf.query.QueryLanguage;
+import org.openrdf.repository.RepositoryConnection;
+import org.openrdf.rio.RDFFormat;
+import org.openrdf.rio.Rio;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.InputStream;
+import java.io.StringWriter;
/**
* Test if the FreebaseProvider is working properly.
@@ -31,11 +44,12 @@ import org.junit.Test;
*/
public class TestFreebaseProvider extends ProviderTestBase {
- private static final String ASF = "http://rdf.freebase.com/ns/m.0nzm";
+ private static Logger log = LoggerFactory.getLogger(TestFreebaseProvider.class);
+ private static final String ASF = "http://rdf.freebase.com/ns/m.0nzm";
private static final String MARMOTTA = "http://rdf.freebase.com/ns/m.0wqhskn";
-
private static final String SERGIO = "http://rdf.freebase.com/ns/m.07zqbwz";
+ private static final String WAS = "http://rdf.freebase.com/ns/m.0h21k1c";
/**
* Tests accessing ASF's page from Freebase.
@@ -73,4 +87,15 @@ public class TestFreebaseProvider extends ProviderTestBase {
testResource(SERGIO, "m.07zqbwz.sparql");
}
+ /**
+ * Tests accessing WAS's page from Freebase.
+ *
+ * @throws Exception
+ *
+ */
+ @Test
+ public void testWAS() throws Exception {
+ testResource(WAS, "m.0h21k1c.sparql");
+ }
+
}
http://git-wip-us.apache.org/repos/asf/marmotta/blob/d503cc08/libraries/ldclient/ldclient-provider-freebase/src/test/resources/org/apache/marmotta/ldclient/test/freebase/m.0h21k1c.sparql
----------------------------------------------------------------------
diff --git a/libraries/ldclient/ldclient-provider-freebase/src/test/resources/org/apache/marmotta/ldclient/test/freebase/m.0h21k1c.sparql b/libraries/ldclient/ldclient-provider-freebase/src/test/resources/org/apache/marmotta/ldclient/test/freebase/m.0h21k1c.sparql
new file mode 100644
index 0000000..351d38a
--- /dev/null
+++ b/libraries/ldclient/ldclient-provider-freebase/src/test/resources/org/apache/marmotta/ldclient/test/freebase/m.0h21k1c.sparql
@@ -0,0 +1,26 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+PREFIX ns: <http://rdf.freebase.com/ns/>
+PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
+
+ASK {
+ ns:m.0h21k1c ns:rdf:type ns:music.musical_group ;
+ rdfs:label "We Are Standard"@en ;
+ ns:common.topic.official_website <http://www.wearestandard.net/> .
+}
[2/2] git commit: Merge branch 'develop' of
https://git-wip-us.apache.org/repos/asf/marmotta into develop
Posted by wi...@apache.org.
Merge branch 'develop' of https://git-wip-us.apache.org/repos/asf/marmotta into develop
Project: http://git-wip-us.apache.org/repos/asf/marmotta/repo
Commit: http://git-wip-us.apache.org/repos/asf/marmotta/commit/dd23600a
Tree: http://git-wip-us.apache.org/repos/asf/marmotta/tree/dd23600a
Diff: http://git-wip-us.apache.org/repos/asf/marmotta/diff/dd23600a
Branch: refs/heads/develop
Commit: dd23600a05618d04e0d9a34d0325ec4be6ee5dca
Parents: d503cc0 5229ba4
Author: Sergio Fernández <wi...@apache.org>
Authored: Fri Jan 17 12:58:08 2014 +0100
Committer: Sergio Fernández <wi...@apache.org>
Committed: Fri Jan 17 12:58:08 2014 +0100
----------------------------------------------------------------------
.../kiwi/caching/BNodeExternalizer.java | 2 +-
.../caching/BooleanLiteralExternalizer.java | 2 +-
.../kiwi/caching/DateLiteralExternalizer.java | 2 +-
.../kiwi/caching/DoubleLiteralExternalizer.java | 2 +-
.../marmotta/kiwi/caching/ExternalizerIds.java | 41 +++
.../kiwi/caching/IntLiteralExternalizer.java | 2 +-
.../marmotta/kiwi/caching/KiWiCacheManager.java | 57 ++--
.../kiwi/caching/StringLiteralExternalizer.java | 2 +-
.../marmotta/kiwi/caching/UriExternalizer.java | 2 +-
.../generator/DatabaseSequenceIDGenerator.java | 75 -----
.../marmotta/kiwi/generator/IDGenerator.java | 27 +-
.../kiwi/generator/IDGeneratorType.java | 12 -
.../generator/MemorySequenceIDGenerator.java | 178 -----------
.../kiwi/generator/SnowflakeIDGenerator.java | 30 +-
.../kiwi/generator/UUIDRandomIDGenerator.java | 30 +-
.../kiwi/generator/UUIDTimeIDGenerator.java | 29 +-
.../kiwi/persistence/KiWiConnection.java | 6 +-
.../kiwi/persistence/KiWiPersistence.java | 2 +-
.../marmotta/kiwi/test/TestValueFactory.java | 318 +++++++++++++++++++
.../test/externalizer/ExternalizerTest.java | 188 +++++++++++
.../kiwi/test/generator/SnowflakeTest.java | 4 +-
.../kiwi/test/generator/UUIDRandomTest.java | 6 +-
.../kiwi/test/generator/UUIDTimeTest.java | 6 +-
23 files changed, 611 insertions(+), 412 deletions(-)
----------------------------------------------------------------------