You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commonsrdf.apache.org by st...@apache.org on 2016/09/08 15:31:29 UTC
[01/50] incubator-commonsrdf git commit: pom typo
Repository: incubator-commonsrdf
Updated Branches:
refs/heads/jsonld-java a2e482fbc -> 80ad999d7
pom typo
Project: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/commit/4d229d76
Tree: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/tree/4d229d76
Diff: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/diff/4d229d76
Branch: refs/heads/jsonld-java
Commit: 4d229d767b2e871fbc7d7be53c9754b52a921177
Parents: 82b81e7
Author: Stian Soiland-Reyes <st...@apache.org>
Authored: Fri Apr 22 14:45:47 2016 +0100
Committer: Stian Soiland-Reyes <st...@apache.org>
Committed: Fri Apr 22 14:45:47 2016 +0100
----------------------------------------------------------------------
pom.xml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/4d229d76/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 5ec2f94..269a39f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -206,7 +206,7 @@
</roles>
<timezone>+1</timezone>
</contributor>
- <developer>
+ <contributor>
<name>Andy Seaborne</name>
<email>andy[at]apache[dot]org</email>
<roles>
@@ -214,7 +214,7 @@
<role>Emeritus PPPMC Member</role>
</roles>
<timezone>+0</timezone>
- </developer>
+ </contributor>
</contributors>
<modules>
[05/50] incubator-commonsrdf git commit: [maven-release-plugin]
prepare for next development iteration
Posted by st...@apache.org.
[maven-release-plugin] prepare for next development iteration
Project: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/commit/beaeea36
Tree: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/tree/beaeea36
Diff: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/diff/beaeea36
Branch: refs/heads/jsonld-java
Commit: beaeea362c707035f23e8673892f95040f9873b9
Parents: f02b6bd
Author: Lewis John McGibbney <le...@jpl.nasa.gov>
Authored: Thu Apr 28 16:04:56 2016 -0700
Committer: Lewis John McGibbney <le...@jpl.nasa.gov>
Committed: Thu Apr 28 16:04:56 2016 -0700
----------------------------------------------------------------------
api/pom.xml | 2 +-
pom.xml | 4 ++--
simple/pom.xml | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/beaeea36/api/pom.xml
----------------------------------------------------------------------
diff --git a/api/pom.xml b/api/pom.xml
index bc8e506..46564b6 100644
--- a/api/pom.xml
+++ b/api/pom.xml
@@ -24,7 +24,7 @@
<parent>
<groupId>org.apache.commons</groupId>
<artifactId>commons-rdf-parent</artifactId>
- <version>0.2.0-incubating</version>
+ <version>0.2.1-incubating-SNAPSHOT</version>
</parent>
<artifactId>commons-rdf-api</artifactId>
http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/beaeea36/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index b1ee489..3b17b0d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -29,7 +29,7 @@
<groupId>org.apache.commons</groupId>
<artifactId>commons-rdf-parent</artifactId>
- <version>0.2.0-incubating</version>
+ <version>0.2.1-incubating-SNAPSHOT</version>
<packaging>pom</packaging>
<name>Commons RDF</name>
@@ -66,7 +66,7 @@
<url>https://git-wip-us.apache.org/repos/asf/incubator-commonsrdf.git</url>
<connection>scm:git:https://git-wip-us.apache.org/repos/asf/incubator-commonsrdf.git</connection>
<developerConnection>scm:git:https://git-wip-us.apache.org/repos/asf/incubator-commonsrdf.git</developerConnection>
- <tag>0.2.0-incubating</tag>
+ <tag>HEAD</tag>
</scm>
<issueManagement>
http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/beaeea36/simple/pom.xml
----------------------------------------------------------------------
diff --git a/simple/pom.xml b/simple/pom.xml
index 170716a..e12c80a 100644
--- a/simple/pom.xml
+++ b/simple/pom.xml
@@ -24,7 +24,7 @@
<parent>
<groupId>org.apache.commons</groupId>
<artifactId>commons-rdf-parent</artifactId>
- <version>0.2.0-incubating</version>
+ <version>0.2.1-incubating-SNAPSHOT</version>
</parent>
<artifactId>commons-rdf-simple</artifactId>
[26/50] incubator-commonsrdf git commit: Added GraphLike and renamed
getTriples() -> stream()
Posted by st...@apache.org.
Added GraphLike and renamed getTriples() -> stream()
Project: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/commit/b25af136
Tree: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/tree/b25af136
Diff: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/diff/b25af136
Branch: refs/heads/jsonld-java
Commit: b25af1363bac61ad0c088f92479ff6f44b821f82
Parents: bc639bb
Author: Stian Soiland-Reyes <st...@apache.org>
Authored: Thu Jun 2 12:10:13 2016 +0100
Committer: Stian Soiland-Reyes <st...@apache.org>
Committed: Thu Jun 2 12:10:13 2016 +0100
----------------------------------------------------------------------
.../org/apache/commons/rdf/api/Dataset.java | 12 +--
.../java/org/apache/commons/rdf/api/Graph.java | 10 +-
.../org/apache/commons/rdf/api/GraphLike.java | 97 ++++++++++++++++++++
.../commons/rdf/api/AbstractGraphTest.java | 20 ++--
.../apache/commons/rdf/simple/DatasetImpl.java | 17 ++--
.../apache/commons/rdf/simple/GraphImpl.java | 12 +--
.../commons/rdf/simple/TestWritingGraph.java | 8 +-
7 files changed, 137 insertions(+), 39 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/b25af136/api/src/main/java/org/apache/commons/rdf/api/Dataset.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/org/apache/commons/rdf/api/Dataset.java b/api/src/main/java/org/apache/commons/rdf/api/Dataset.java
index 706366c..c809bc9 100644
--- a/api/src/main/java/org/apache/commons/rdf/api/Dataset.java
+++ b/api/src/main/java/org/apache/commons/rdf/api/Dataset.java
@@ -28,7 +28,7 @@ import java.util.stream.Stream;
* <a href="http://www.w3.org/TR/rdf11-concepts/" >RDF-1.1 Concepts and Abstract
* Syntax</a>, a W3C Recommendation published on 25 February 2014.
*/
-public interface Dataset extends AutoCloseable {
+public interface Dataset extends AutoCloseable, GraphLike<Quad, BlankNodeOrIRI, IRI, RDFTerm> {
/**
* Add a quad to the dataset, possibly mapping any of the components of the
@@ -144,7 +144,7 @@ public interface Dataset extends AutoCloseable {
* Get the graph names in this Dataset.
* <p>
* The set of returned graph names is equivalent to the set of unique
- * {@link Quad#getGraphName()} of all the {@link #getQuads()} of this
+ * {@link Quad#getGraphName()} of all the {@link #stream()} of this
* dataset (excluding the default graph).
* <p>
* The returned {@link Stream} SHOULD NOT contain duplicate graph names.
@@ -217,7 +217,7 @@ public interface Dataset extends AutoCloseable {
*
* @return A {@link Stream} over all of the quads in the dataset
*/
- Stream<? extends Quad> getQuads();
+ Stream<? extends Quad> stream();
/**
* Get all quads contained by the dataset matched with the pattern.
@@ -244,7 +244,7 @@ public interface Dataset extends AutoCloseable {
* The quad object (<code>null</code> is a wildcard)
* @return A {@link Stream} over the matched quads.
*/
- Stream<? extends Quad> getQuads(Optional<BlankNodeOrIRI> graphName, BlankNodeOrIRI subject, IRI predicate,
+ Stream<? extends Quad> stream(Optional<BlankNodeOrIRI> graphName, BlankNodeOrIRI subject, IRI predicate,
RDFTerm object);
/**
@@ -281,7 +281,7 @@ public interface Dataset extends AutoCloseable {
*/
@SuppressWarnings("unchecked")
default Iterable<Quad> iterate() throws ConcurrentModificationException, IllegalStateException {
- return ((Stream<Quad>) getQuads())::iterator;
+ return ((Stream<Quad>) stream())::iterator;
}
/**
@@ -333,6 +333,6 @@ public interface Dataset extends AutoCloseable {
@SuppressWarnings("unchecked")
default Iterable<Quad> iterate(Optional<BlankNodeOrIRI> graphName, BlankNodeOrIRI subject, IRI predicate,
RDFTerm object) throws ConcurrentModificationException, IllegalStateException {
- return ((Stream<Quad>) getQuads(graphName, subject, predicate, object))::iterator;
+ return ((Stream<Quad>) stream(graphName, subject, predicate, object))::iterator;
}
}
http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/b25af136/api/src/main/java/org/apache/commons/rdf/api/Graph.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/org/apache/commons/rdf/api/Graph.java b/api/src/main/java/org/apache/commons/rdf/api/Graph.java
index c421226..42ced98 100644
--- a/api/src/main/java/org/apache/commons/rdf/api/Graph.java
+++ b/api/src/main/java/org/apache/commons/rdf/api/Graph.java
@@ -27,7 +27,7 @@ import java.util.stream.Stream;
* href="http://www.w3.org/TR/rdf11-concepts/" >RDF-1.1 Concepts and Abstract
* Syntax</a>, a W3C Recommendation published on 25 February 2014.
*/
-public interface Graph extends AutoCloseable {
+public interface Graph extends AutoCloseable,GraphLike<Triple, BlankNodeOrIRI, IRI, RDFTerm> {
/**
* Add a triple to the graph, possibly mapping any of the components of the
@@ -128,7 +128,7 @@ public interface Graph extends AutoCloseable {
*
* @return A {@link Stream} over all of the triples in the graph
*/
- Stream<? extends Triple> getTriples();
+ Stream<? extends Triple> stream();
/**
* Get all triples contained by the graph matched with the pattern.
@@ -148,7 +148,7 @@ public interface Graph extends AutoCloseable {
* @param object The triple object (null is a wildcard)
* @return A {@link Stream} over the matched triples.
*/
- Stream<? extends Triple> getTriples(BlankNodeOrIRI subject, IRI predicate,
+ Stream<? extends Triple> stream(BlankNodeOrIRI subject, IRI predicate,
RDFTerm object);
/**
@@ -184,7 +184,7 @@ public interface Graph extends AutoCloseable {
@SuppressWarnings("unchecked")
default Iterable<Triple> iterate()
throws ConcurrentModificationException, IllegalStateException {
- return ((Stream<Triple>)getTriples())::iterator;
+ return ((Stream<Triple>)stream())::iterator;
}
/**
@@ -231,6 +231,6 @@ public interface Graph extends AutoCloseable {
default Iterable<Triple> iterate(
BlankNodeOrIRI subject, IRI predicate, RDFTerm object)
throws ConcurrentModificationException, IllegalStateException {
- return ((Stream<Triple>) getTriples(subject, predicate, object))::iterator;
+ return ((Stream<Triple>) stream(subject, predicate, object))::iterator;
}
}
http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/b25af136/api/src/main/java/org/apache/commons/rdf/api/GraphLike.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/org/apache/commons/rdf/api/GraphLike.java b/api/src/main/java/org/apache/commons/rdf/api/GraphLike.java
new file mode 100644
index 0000000..57b55cb
--- /dev/null
+++ b/api/src/main/java/org/apache/commons/rdf/api/GraphLike.java
@@ -0,0 +1,97 @@
+/**
+ * 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.
+ */
+package org.apache.commons.rdf.api;
+
+import java.util.ConcurrentModificationException;
+import java.util.stream.Stream;
+
+/**
+ * A "graph-like" interface that contains {@link TripleLike} statements.
+ * <p>
+ * Extended by {@link Graph} (for {@link Triple}) and {@link Dataset} (for
+ * {@link Quad}).
+ * <p>
+ * Unlike {@link Graph} and {@link Dataset}, this interface can support
+ * with generalised {@link TripleLike} or {@link QuadLike} statements, and
+ * does not include semantics like {@link #size()} or the requirement of
+ * mapping {@link RDFTerm} instances from different implementations.
+ *
+ * @see Graph
+ * @see Dataset
+ * @see TripleLike
+ */
+public interface GraphLike<T extends TripleLike<S, P, O>, S extends RDFTerm, P extends RDFTerm, O extends RDFTerm> {
+
+ /**
+ * Add a statement.
+ *
+ * @param statement
+ * The TripleLike statement to add
+ */
+ void add(T statement);
+
+ /**
+ * Check if statement is contained.
+ *
+ * @param statement
+ * The {@link TripleLike} statement to chec
+ * @return True if the statement is contained
+ */
+ boolean contains(T statement);
+
+ /**
+ * Add a statement.
+ *
+ * @param statement
+ * The TripleLike statement to add
+ */
+ void remove(T statement);
+
+ /**
+ * Remove all statements.
+ */
+ void clear();
+
+ /**
+ * Number of statements.
+ *
+ * @return
+ */
+ long size();
+
+ /**
+ * Return a Stream of contained statements.
+ *
+ * @return A {@link Stream} of {@link TripleLike} statements.
+ */
+ Stream<? extends T> stream();
+
+ /**
+ * Iterate over contained statements.
+ *
+ * @return An {@link Iterable} of {@link TripleLike} statements.
+ *
+ * @throws IllegalStateException
+ * if the {@link Iterable} has been reused
+ * @throws ConcurrentModificationException
+ * if a concurrency conflict occurs while the Iterator is
+ * active.
+ */
+ Iterable<T> iterate() throws ConcurrentModificationException, IllegalStateException;
+
+}
http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/b25af136/api/src/test/java/org/apache/commons/rdf/api/AbstractGraphTest.java
----------------------------------------------------------------------
diff --git a/api/src/test/java/org/apache/commons/rdf/api/AbstractGraphTest.java b/api/src/test/java/org/apache/commons/rdf/api/AbstractGraphTest.java
index 9029cc4..15773df 100644
--- a/api/src/test/java/org/apache/commons/rdf/api/AbstractGraphTest.java
+++ b/api/src/test/java/org/apache/commons/rdf/api/AbstractGraphTest.java
@@ -177,7 +177,7 @@ public abstract class AbstractGraphTest {
assertTrue(graph.contains(alice, knows, bob));
- Optional<? extends Triple> first = graph.getTriples().skip(4)
+ Optional<? extends Triple> first = graph.stream().skip(4)
.findFirst();
Assume.assumeTrue(first.isPresent());
Triple existingTriple = first.get();
@@ -218,7 +218,7 @@ public abstract class AbstractGraphTest {
graph.remove(alice, knows, bob);
assertEquals(shrunkSize, graph.size());
- Optional<? extends Triple> anyTriple = graph.getTriples().findAny();
+ Optional<? extends Triple> anyTriple = graph.stream().findAny();
Assume.assumeTrue(anyTriple.isPresent());
Triple otherTriple = anyTriple.get();
@@ -242,9 +242,9 @@ public abstract class AbstractGraphTest {
@Test
public void getTriples() throws Exception {
- long tripleCount = graph.getTriples().count();
+ long tripleCount = graph.stream().count();
assertTrue(tripleCount > 0);
- assertTrue(graph.getTriples().allMatch(t -> graph.contains(t)));
+ assertTrue(graph.stream().allMatch(t -> graph.contains(t)));
// Check exact count
Assume.assumeNotNull(bnode1, bnode2, aliceName, bobName, secretClubName,
companyName, bobNameTriple);
@@ -254,15 +254,15 @@ public abstract class AbstractGraphTest {
@Test
public void getTriplesQuery() throws Exception {
- long aliceCount = graph.getTriples(alice, null, null).count();
+ long aliceCount = graph.stream(alice, null, null).count();
assertTrue(aliceCount > 0);
Assume.assumeNotNull(aliceName);
assertEquals(3, aliceCount);
Assume.assumeNotNull(bnode1, bnode2, bobName, companyName, secretClubName);
- assertEquals(4, graph.getTriples(null, name, null).count());
+ assertEquals(4, graph.stream(null, name, null).count());
Assume.assumeNotNull(bnode1);
- assertEquals(3, graph.getTriples(null, member, null).count());
+ assertEquals(3, graph.stream(null, member, null).count());
}
/**
@@ -287,14 +287,14 @@ public abstract class AbstractGraphTest {
// Find a secret organizations
assertEquals(
"\"The Secret Club\"",
- graph.getTriples(null, knows, null)
+ graph.stream(null, knows, null)
// Find One-way "knows"
.filter(t -> !graph.contains(
(BlankNodeOrIRI) t.getObject(), knows,
t.getSubject()))
.map(knowsTriple -> graph
// and those they know, what are they member of?
- .getTriples(
+ .stream(
(BlankNodeOrIRI) knowsTriple
.getObject(), member, null)
// keep those which first-guy is a member of
@@ -305,7 +305,7 @@ public abstract class AbstractGraphTest {
.get().getObject())
// then look up the name of that org
.map(org -> graph
- .getTriples((BlankNodeOrIRI) org, name, null)
+ .stream((BlankNodeOrIRI) org, name, null)
.findFirst().get().getObject().ntriplesString())
.findFirst().get());
http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/b25af136/simple/src/main/java/org/apache/commons/rdf/simple/DatasetImpl.java
----------------------------------------------------------------------
diff --git a/simple/src/main/java/org/apache/commons/rdf/simple/DatasetImpl.java b/simple/src/main/java/org/apache/commons/rdf/simple/DatasetImpl.java
index af9b01d..9de358f 100644
--- a/simple/src/main/java/org/apache/commons/rdf/simple/DatasetImpl.java
+++ b/simple/src/main/java/org/apache/commons/rdf/simple/DatasetImpl.java
@@ -120,7 +120,7 @@ final class DatasetImpl implements Dataset {
@Override
public boolean contains(Optional<BlankNodeOrIRI> graphName, BlankNodeOrIRI subject, IRI predicate, RDFTerm object) {
- return getQuads(graphName, subject, predicate, object).findAny().isPresent();
+ return stream(graphName, subject, predicate, object).findAny().isPresent();
}
@Override
@@ -129,12 +129,12 @@ final class DatasetImpl implements Dataset {
}
@Override
- public Stream<Quad> getQuads() {
+ public Stream<Quad> stream() {
return quads.parallelStream().unordered();
}
@Override
- public Stream<Quad> getQuads(Optional<BlankNodeOrIRI> graphName, BlankNodeOrIRI subject, IRI predicate,
+ public Stream<Quad> stream(Optional<BlankNodeOrIRI> graphName, BlankNodeOrIRI subject, IRI predicate,
RDFTerm object) {
final Optional<BlankNodeOrIRI> newGraphName = graphName.map(g -> (BlankNodeOrIRI)internallyMap(g));
final BlankNodeOrIRI newSubject = (BlankNodeOrIRI) internallyMap(subject);
@@ -160,12 +160,12 @@ final class DatasetImpl implements Dataset {
}
private Stream<Quad> getQuads(final Predicate<Quad> filter) {
- return getQuads().filter(filter);
+ return stream().filter(filter);
}
@Override
public void remove(Optional<BlankNodeOrIRI> graphName, BlankNodeOrIRI subject, IRI predicate, RDFTerm object) {
- Stream<Quad> toRemove = getQuads(graphName, subject, predicate, object);
+ Stream<Quad> toRemove = stream(graphName, subject, predicate, object);
for (Quad t : toRemove.collect(Collectors.toList())) {
// Avoid ConcurrentModificationException in ArrayList
remove(t);
@@ -184,7 +184,7 @@ final class DatasetImpl implements Dataset {
@Override
public String toString() {
- String s = getQuads().limit(TO_STRING_MAX).map(Object::toString)
+ String s = stream().limit(TO_STRING_MAX).map(Object::toString)
.collect(Collectors.joining("\n"));
if (size() > TO_STRING_MAX) {
return s + "\n# ... +" + (size() - TO_STRING_MAX) + " more";
@@ -206,7 +206,7 @@ final class DatasetImpl implements Dataset {
public Optional<Graph> getGraph(BlankNodeOrIRI graphName) {
// NOTE: Always returns a new copy
Graph g = new GraphImpl(factory);
- getQuads(Optional.ofNullable(graphName), null, null, null)
+ stream(Optional.ofNullable(graphName), null, null, null)
.map(Quad::asTriple)
.sequential()
.forEach(g::add);
@@ -216,11 +216,12 @@ final class DatasetImpl implements Dataset {
@Override
public Stream<BlankNodeOrIRI> getGraphNames() {
// Not very efficient..
- return getQuads()
+ return stream()
.map(Quad::getGraphName)
.filter(Optional::isPresent).map(Optional::get)
.distinct();
}
+
}
http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/b25af136/simple/src/main/java/org/apache/commons/rdf/simple/GraphImpl.java
----------------------------------------------------------------------
diff --git a/simple/src/main/java/org/apache/commons/rdf/simple/GraphImpl.java b/simple/src/main/java/org/apache/commons/rdf/simple/GraphImpl.java
index 024da21..1f19d57 100644
--- a/simple/src/main/java/org/apache/commons/rdf/simple/GraphImpl.java
+++ b/simple/src/main/java/org/apache/commons/rdf/simple/GraphImpl.java
@@ -111,7 +111,7 @@ final class GraphImpl implements Graph {
@Override
public boolean contains(BlankNodeOrIRI subject, IRI predicate,
RDFTerm object) {
- return getTriples(subject, predicate, object).findFirst().isPresent();
+ return stream(subject, predicate, object).findFirst().isPresent();
}
@Override
@@ -120,12 +120,12 @@ final class GraphImpl implements Graph {
}
@Override
- public Stream<Triple> getTriples() {
+ public Stream<Triple> stream() {
return triples.parallelStream().unordered();
}
@Override
- public Stream<Triple> getTriples(final BlankNodeOrIRI subject,
+ public Stream<Triple> stream(final BlankNodeOrIRI subject,
final IRI predicate, final RDFTerm object) {
final BlankNodeOrIRI newSubject = (BlankNodeOrIRI) internallyMap(subject);
final IRI newPredicate = (IRI) internallyMap(predicate);
@@ -148,12 +148,12 @@ final class GraphImpl implements Graph {
}
private Stream<Triple> getTriples(final Predicate<Triple> filter) {
- return getTriples().filter(filter);
+ return stream().filter(filter);
}
@Override
public void remove(BlankNodeOrIRI subject, IRI predicate, RDFTerm object) {
- Stream<Triple> toRemove = getTriples(subject, predicate, object);
+ Stream<Triple> toRemove = stream(subject, predicate, object);
for (Triple t : toRemove.collect(Collectors.toList())) {
// Avoid ConcurrentModificationException in ArrayList
remove(t);
@@ -172,7 +172,7 @@ final class GraphImpl implements Graph {
@Override
public String toString() {
- String s = getTriples().limit(TO_STRING_MAX).map(Object::toString)
+ String s = stream().limit(TO_STRING_MAX).map(Object::toString)
.collect(Collectors.joining("\n"));
if (size() > TO_STRING_MAX) {
return s + "\n# ... +" + (size() - TO_STRING_MAX) + " more";
http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/b25af136/simple/src/test/java/org/apache/commons/rdf/simple/TestWritingGraph.java
----------------------------------------------------------------------
diff --git a/simple/src/test/java/org/apache/commons/rdf/simple/TestWritingGraph.java b/simple/src/test/java/org/apache/commons/rdf/simple/TestWritingGraph.java
index 9862770..6cd8f52 100644
--- a/simple/src/test/java/org/apache/commons/rdf/simple/TestWritingGraph.java
+++ b/simple/src/test/java/org/apache/commons/rdf/simple/TestWritingGraph.java
@@ -102,7 +102,7 @@ public class TestWritingGraph {
public void countQuery() {
IRI subject = factory.createIRI("subj");
IRI predicate = factory.createIRI("pred");
- long count = graph.getTriples(subject, predicate, null).unordered()
+ long count = graph.stream(subject, predicate, null).unordered()
.parallel().count();
//System.out.println("Counted - " + count);
assertEquals(count, TRIPLES);
@@ -123,7 +123,7 @@ public class TestWritingGraph {
graphFile.toFile().deleteOnExit();
}
- Stream<CharSequence> stream = graph.getTriples().map(TestWritingGraph::tripleAsString);
+ Stream<CharSequence> stream = graph.stream().map(TestWritingGraph::tripleAsString);
Files.write(graphFile, stream::iterator, StandardCharsets.UTF_8);
}
@@ -139,7 +139,7 @@ public class TestWritingGraph {
IRI subject = factory.createIRI("subj");
IRI predicate = factory.createIRI("pred");
Stream<CharSequence> stream = graph
- .getTriples(subject, predicate, null).map(TestWritingGraph::tripleAsString);
+ .stream(subject, predicate, null).map(TestWritingGraph::tripleAsString);
Files.write(graphFile, stream::iterator, StandardCharsets.UTF_8);
}
@@ -156,7 +156,7 @@ public class TestWritingGraph {
IRI subject = factory.createIRI("nonexistent");
IRI predicate = factory.createIRI("pred");
Stream<CharSequence> stream = graph
- .getTriples(subject, predicate, null).map(Object::toString);
+ .stream(subject, predicate, null).map(Object::toString);
Files.write(graphFile, stream::iterator, StandardCharsets.UTF_8);
}
[15/50] incubator-commonsrdf git commit: switched to the new
lists.apache.org
Posted by st...@apache.org.
switched to the new lists.apache.org
Project: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/commit/ae3103a2
Tree: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/tree/ae3103a2
Diff: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/diff/ae3103a2
Branch: refs/heads/jsonld-java
Commit: ae3103a2e90116ed36b45f6751e94e31b7920496
Parents: 71e5855
Author: Sergio Fern�ndez <wi...@apache.org>
Authored: Thu May 12 17:15:58 2016 -0700
Committer: Sergio Fern�ndez <wi...@apache.org>
Committed: Thu May 12 17:15:58 2016 -0700
----------------------------------------------------------------------
pom.xml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/ae3103a2/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index a782b5b..5353db3 100644
--- a/pom.xml
+++ b/pom.xml
@@ -80,7 +80,7 @@
<post>dev@commonsrdf.incubator.apache.org</post>
<subscribe>dev-subscribe@commonsrdf.incubator.apache.org</subscribe>
<unsubscribe>dev-unsubscribe@commonsrdf.incubator.apache.org</unsubscribe>
- <archive>http://mail-archives.apache.org/mod_mbox/commonsrdf-dev/</archive>
+ <archive>https://lists.apache.org/list.html?dev@commonsrdf.apache.org</archive>
<otherArchives>
<otherArchive>http://markmail.org/search/?q=list%3Aorg.apache.commonsrdf.dev</otherArchive>
</otherArchives>
@@ -90,7 +90,7 @@
<post>commits@commonsrdf.incubator.apache.org</post>
<subscribe>commits-subscribe@commonsrdf.incubator.apache.org</subscribe>
<unsubscribe>commits-unsubscribe@commonsrdf.incubator.apache.org</unsubscribe>
- <archive>http://mail-archives.apache.org/mod_mbox/commonsrdf-commits/</archive>
+ <archive>https://lists.apache.org/list.html?commits@commonsrdf.apache.org</archive>
<otherArchives>
<otherArchive>http://markmail.org/search/?q=list%3Aorg.apache.commonsrdf.commits</otherArchive>
</otherArchives>
[24/50] incubator-commonsrdf git commit: Avoid links to
dist.apache.org for *.asc etc.
Posted by st...@apache.org.
Avoid links to dist.apache.org for *.asc etc.
we should rather use https://www.apache.org/dist/incubator/commonsrdf/
(except for
See https://www.apache.org/dev/release.html
Project: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/commit/058f7812
Tree: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/tree/058f7812
Diff: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/diff/058f7812
Branch: refs/heads/jsonld-java
Commit: 058f781231ccb00c12861e39b05a3d1b5c805f95
Parents: e20c41b
Author: Stian Soiland-Reyes <st...@apache.org>
Authored: Wed Jun 1 01:20:46 2016 +0100
Committer: Stian Soiland-Reyes <st...@apache.org>
Committed: Wed Jun 1 01:20:46 2016 +0100
----------------------------------------------------------------------
src/site/markdown/download.md | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/058f7812/src/site/markdown/download.md
----------------------------------------------------------------------
diff --git a/src/site/markdown/download.md b/src/site/markdown/download.md
index 117797c..931d2ac 100644
--- a/src/site/markdown/download.md
+++ b/src/site/markdown/download.md
@@ -72,14 +72,14 @@ from official mirrors of the
ASF Distribution Directory [incubator/commonsrdf](https://www.apache.org/dyn/closer.lua/incubator/commonsrdf/0.2.0-incubating/):
* [apache-commonsrdf-0.2.0-incubating-source-release.zip](https://www.apache.org/dyn/closer.lua/incubator/commonsrdf/0.2.0-incubating/apache-commonsrdf-0.2.0-incubating-source-release.zip)
- ([asc](https://dist.apache.org/repos/dist/release/incubator/commonsrdf/0.2.0-incubating/apache-commonsrdf-0.2.0-incubating-source-release.zip.asc),
- [md5](https://dist.apache.org/repos/dist/release/incubator/commonsrdf/0.2.0-incubating/apache-commonsrdf-0.2.0-incubating-source-release.zip.md5),
- [sha1](https://dist.apache.org/repos/dist/release/incubator/commonsrdf/0.2.0-incubating/apache-commonsrdf-0.2.0-incubating-source-release.zip.sha1))
+ ([asc](https://www.apache.org/dist/incubator/commonsrdf/0.2.0-incubating/apache-commonsrdf-0.2.0-incubating-source-release.zip.asc),
+ [md5](https://www.apache.org/dist/incubator/commonsrdf/0.2.0-incubating/apache-commonsrdf-0.2.0-incubating-source-release.zip.md5),
+ [sha1](https://www.apache.org/dist/incubator/commonsrdf/0.2.0-incubating/apache-commonsrdf-0.2.0-incubating-source-release.zip.sha1))
-After downloading the files, check the signatures using the following [KEYS](https://dist.apache.org/repos/dist/release/incubator/commonsrdf/KEYS)
+After downloading the files, check the signatures using the following [KEYS](https://www.apache.org/dist/incubator/commonsrdf/KEYS)
file. The [changelog](https://s.apache.org/0.2.0-incubating)
is available from the [Apache Commons RDF Jira](https://issues.apache.org/jira/browse/COMMONSRDF).
### Previous Releases
-Previous release are available from [archive.apache.org](http://archive.apache.org/dist/incubator/commonsrdf/).
+Previous release are available from [archive.apache.org](https://archive.apache.org/dist/incubator/commonsrdf/).
[33/50] incubator-commonsrdf git commit: COMMONSRDF-37: Improve Quad
javadoc
Posted by st...@apache.org.
COMMONSRDF-37: Improve Quad javadoc
Project: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/commit/a1d65546
Tree: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/tree/a1d65546
Diff: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/diff/a1d65546
Branch: refs/heads/jsonld-java
Commit: a1d65546388f3d9acf56456d08d923aae3beaa41
Parents: 53ef228
Author: Stian Soiland-Reyes <st...@apache.org>
Authored: Thu Jul 7 10:47:06 2016 +0100
Committer: Stian Soiland-Reyes <st...@apache.org>
Committed: Thu Jul 7 10:47:06 2016 +0100
----------------------------------------------------------------------
.../org/apache/commons/rdf/api/GraphLike.java | 21 +++++++++++++++---
.../java/org/apache/commons/rdf/api/Quad.java | 23 +++++++++++---------
.../org/apache/commons/rdf/api/QuadLike.java | 18 +++++++++++----
.../org/apache/commons/rdf/api/TripleLike.java | 14 +++++++++---
.../commons/rdf/simple/DatasetGraphView.java | 2 +-
5 files changed, 57 insertions(+), 21 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/a1d65546/api/src/main/java/org/apache/commons/rdf/api/GraphLike.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/org/apache/commons/rdf/api/GraphLike.java b/api/src/main/java/org/apache/commons/rdf/api/GraphLike.java
index c68278e..bd37510 100644
--- a/api/src/main/java/org/apache/commons/rdf/api/GraphLike.java
+++ b/api/src/main/java/org/apache/commons/rdf/api/GraphLike.java
@@ -30,7 +30,23 @@ import java.util.stream.Stream;
* generalised {@link TripleLike} or {@link QuadLike} statements, and does not
* include semantics like {@link #size()} or the requirement of mapping
* {@link RDFTerm} instances from different implementations.
+ * <p>
+ * As {@link TripleLike} do not have a specific {@link Object#equals(Object)}
+ * semantics, the behaviour of methods like {@link #contains(TripleLike)} and
+ * {@link #remove(TripleLike)} is undefined for arguments that are not object
+ * identical to previously added or returned {@link TripleLike} statements.
*
+ * @param <T>
+ * A {@link TripleLike} type used by the graph methods, typically
+ * {@link Triple} or {@link Quad}
+ * @param <S>
+ * The type of subjects in the statements, typically
+ * {@link BlankNodeOrIRI}
+ * @param <P>
+ * The type of predicates in the statements, typically {@link IRI}
+ * @param <O>
+ * The type of objects in the statements, typically {@link RDFTerm}
+ *
* @since 0.3.0-incubating
* @see Graph
* @see Dataset
@@ -50,7 +66,7 @@ public interface GraphLike<T extends TripleLike<S, P, O>, S extends RDFTerm, P e
* Check if statement is contained.
*
* @param statement
- * The {@link TripleLike} statement to chec
+ * The {@link TripleLike} statement to check
* @return True if the statement is contained
*/
boolean contains(T statement);
@@ -71,7 +87,7 @@ public interface GraphLike<T extends TripleLike<S, P, O>, S extends RDFTerm, P e
/**
* Number of statements.
*
- * @return
+ * @return Number of statements
*/
long size();
@@ -86,7 +102,6 @@ public interface GraphLike<T extends TripleLike<S, P, O>, S extends RDFTerm, P e
* Iterate over contained statements.
*
* @return An {@link Iterable} of {@link TripleLike} statements.
- *
* @throws IllegalStateException
* if the {@link Iterable} has been reused
* @throws ConcurrentModificationException
http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/a1d65546/api/src/main/java/org/apache/commons/rdf/api/Quad.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/org/apache/commons/rdf/api/Quad.java b/api/src/main/java/org/apache/commons/rdf/api/Quad.java
index 5a67571..679000b 100644
--- a/api/src/main/java/org/apache/commons/rdf/api/Quad.java
+++ b/api/src/main/java/org/apache/commons/rdf/api/Quad.java
@@ -67,31 +67,31 @@ public interface Quad extends QuadLike<BlankNodeOrIRI,IRI,RDFTerm,BlankNodeOrIRI
BlankNodeOrIRI getSubject();
/**
- * The predicate {@link IRI} of this triple.
+ * The predicate {@link IRI} of this quad.
*
- * @return The predicate {@link IRI} of this triple.
+ * @return The predicate {@link IRI} of this quad.
* @see <a href="http://www.w3.org/TR/rdf11-concepts/#dfn-predicate">RDF-1.1
* Triple predicate</a>
*/
IRI getPredicate();
/**
- * The object of this triple, which may be either a {@link BlankNode}, an
+ * The object of this quad, which may be either a {@link BlankNode}, an
* {@link IRI}, or a {@link Literal}, which are represented in Commons RDF
* by the interface {@link RDFTerm}.
*
- * @return The object {@link RDFTerm} of this triple.
+ * @return The object {@link RDFTerm} of this quad.
* @see <a href="http://www.w3.org/TR/rdf11-concepts/#dfn-object">RDF-1.1
* Triple object</a>
*/
RDFTerm getObject();
/**
- * Convert this Quad to a Triple.
+ * Adapt this Quad to a Triple.
* <p>
* The returned {@link Triple} will have equivalent values returned from the
- * methods {@link TripleOrQuad#getSubject()},
- * {@link TripleOrQuad#getPredicate()} and {@link TripleOrQuad#getObject()}.
+ * methods {@link TripleLike#getSubject()},
+ * {@link TripleLike#getPredicate()} and {@link TripleLike#getObject()}.
* <p>
* The returned {@link Triple} MUST NOT be {@link #equals(Object)} to this
* {@link Quad}, even if this quad has a default graph
@@ -113,12 +113,12 @@ public interface Quad extends QuadLike<BlankNodeOrIRI,IRI,RDFTerm,BlankNodeOrIRI
*
* The <code>default</code> implementation of this method return a proxy
* {@link Triple} instance that keeps a reference to this {@link Quad} to
- * calls the underlying {@link TripleOrQuad} methods, but supplies a
+ * call the underlying {@link TripleLike} methods, but supplies a
* {@link Triple} compatible implementation of {@link Triple#equals(Object)}
* and {@link Triple#hashCode()}. Implementations may override this method,
* e.g. for a more efficient solution.
*
- * @return A {@link Triple} that contains the same {@link TripleOrQuad}
+ * @return A {@link Triple} that contains the same {@link TripleLike}
* properties as this Quad.
*/
default Triple asTriple() {
@@ -140,6 +140,9 @@ public interface Quad extends QuadLike<BlankNodeOrIRI,IRI,RDFTerm,BlankNodeOrIRI
@Override
public boolean equals(Object obj) {
+ if (obj == this) {
+ return true;
+ }
if (!(obj instanceof Triple)) {
return false;
}
@@ -159,7 +162,7 @@ public interface Quad extends QuadLike<BlankNodeOrIRI,IRI,RDFTerm,BlankNodeOrIRI
/**
* Check it this Quad is equal to another Quad.
* <p>
- * Two Triples are equal if and only if their {@link #getGraphName()},
+ * Two Quads are equal if and only if their {@link #getGraphName()},
* {@link #getSubject()}, {@link #getPredicate()} and
* {@link #getObject()} are equal.
* </p>
http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/a1d65546/api/src/main/java/org/apache/commons/rdf/api/QuadLike.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/org/apache/commons/rdf/api/QuadLike.java b/api/src/main/java/org/apache/commons/rdf/api/QuadLike.java
index 9c42465..3f85862 100644
--- a/api/src/main/java/org/apache/commons/rdf/api/QuadLike.java
+++ b/api/src/main/java/org/apache/commons/rdf/api/QuadLike.java
@@ -28,10 +28,20 @@ import java.util.Optional;
* {@link Quad#equals(Object)} semantics, and can allow generalised quads (e.g.
* a {@link BlankNode} as predicate).
* <p>
- * Implementations should specialise which {@link RDFTerm} subclasses they
- * return for subject {@link S}, predicate {@link P}, object {@link O} and graph
- * name {@link G}.
- * <p>
+ * Implementations should specialise which specific {@link RDFTerm} types they
+ * return for {@link #getSubject()}, {@link #getPredicate()},
+ * {@link #getObject()} and {@link #getGraphName()}.
+ *
+ * @param <S>
+ * The type of subjects in the statements, typically
+ * {@link BlankNodeOrIRI}
+ * @param <P>
+ * The type of predicates in the statements, typically {@link IRI}
+ * @param <O>
+ * The type of objects in the statements, typically {@link RDFTerm}
+ * @param <G>
+ * The type of graph names in the statements, typically
+ * {@link BlankNodeOrIRI}
*
* @since 0.3.0-incubating
* @see Quad
http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/a1d65546/api/src/main/java/org/apache/commons/rdf/api/TripleLike.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/org/apache/commons/rdf/api/TripleLike.java b/api/src/main/java/org/apache/commons/rdf/api/TripleLike.java
index 2fbeb11..9bead97 100644
--- a/api/src/main/java/org/apache/commons/rdf/api/TripleLike.java
+++ b/api/src/main/java/org/apache/commons/rdf/api/TripleLike.java
@@ -26,14 +26,22 @@ package org.apache.commons.rdf.api;
* does not have a formalised {@link Triple#equals(Object)} semantics, and can
* allow generalised triples (e.g. a {@link BlankNode} as predicate).
* <p>
- * Implementations should specialise which {@link RDFTerm} subclasses they
- * return for subject {@link S}, predicate {@link P} and object {@link O}.
+ * Implementations should specialise which specific {@link RDFTerm} types they
+ * return for {@link #getSubject()}, {@link #getPredicate()} and
+ * {@link #getObject()}.
+ *
+ * @param <S>
+ * The type of subjects in the statements, typically
+ * {@link BlankNodeOrIRI}
+ * @param <P>
+ * The type of predicates in the statements, typically {@link IRI}
+ * @param <O>
+ * The type of objects in the statements, typically {@link RDFTerm}
*
* @since 0.3.0-incubating
* @see Triple
* @see Quad
* @see QuadLike
- *
*/
public interface TripleLike<S extends RDFTerm, P extends RDFTerm, O extends RDFTerm> {
http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/a1d65546/simple/src/main/java/org/apache/commons/rdf/simple/DatasetGraphView.java
----------------------------------------------------------------------
diff --git a/simple/src/main/java/org/apache/commons/rdf/simple/DatasetGraphView.java b/simple/src/main/java/org/apache/commons/rdf/simple/DatasetGraphView.java
index a347c3e..d578a40 100644
--- a/simple/src/main/java/org/apache/commons/rdf/simple/DatasetGraphView.java
+++ b/simple/src/main/java/org/apache/commons/rdf/simple/DatasetGraphView.java
@@ -41,7 +41,7 @@ import org.apache.commons.rdf.api.Triple;
* triples will add them to the <em>default graph</em>, while removing triples
* will remove from all graphs.</dd>
*
- * <dt>{@link #DatasetGraphView(Dataset, IRI)}</dt>
+ * <dt>{@link #DatasetGraphView(Dataset, BlankNodeOrIRI)}</dt>
* <dd>Expose a particular graph of the Dataset, either named by an {@link IRI}, a
* {@link BlankNode}, or <code>null</code> for the <em>default graph</em>.</dd>
* </dl>
[50/50] incubator-commonsrdf git commit: Hide implementations -
expose JsonLd* interfaces
Posted by st...@apache.org.
Hide implementations - expose JsonLd* interfaces
Project: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/commit/80ad999d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/tree/80ad999d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/diff/80ad999d
Branch: refs/heads/jsonld-java
Commit: 80ad999d72217d4aeb6375bbe7a78e2427f41df5
Parents: 44031f3
Author: Stian Soiland-Reyes <st...@apache.org>
Authored: Thu Sep 8 16:27:45 2016 +0100
Committer: Stian Soiland-Reyes <st...@apache.org>
Committed: Thu Sep 8 16:31:12 2016 +0100
----------------------------------------------------------------------
.../commons/rdf/jsonldjava/JsonLdBlankNode.java | 64 +++++-----
.../commons/rdf/jsonldjava/JsonLdIRI.java | 68 +++++-----
.../commons/rdf/jsonldjava/JsonLdLiteral.java | 128 ++++++++++---------
.../commons/rdf/jsonldjava/JsonLdQuad.java | 61 +++++----
.../commons/rdf/jsonldjava/JsonLdQuadLike.java | 73 ++++++-----
.../rdf/jsonldjava/JsonLdRDFTermFactory.java | 42 +++---
.../commons/rdf/jsonldjava/JsonLdTerm.java | 26 +++-
.../commons/rdf/jsonldjava/JsonLdTriple.java | 49 ++++---
8 files changed, 281 insertions(+), 230 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/80ad999d/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdBlankNode.java
----------------------------------------------------------------------
diff --git a/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdBlankNode.java b/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdBlankNode.java
index f93d3b4..e54c894 100644
--- a/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdBlankNode.java
+++ b/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdBlankNode.java
@@ -21,38 +21,42 @@ import org.apache.commons.rdf.api.BlankNode;
import com.github.jsonldjava.core.RDFDataset.Node;
-final class JsonLdBlankNode extends JsonLdTerm implements BlankNode {
- private String blankNodePrefix;
-
- JsonLdBlankNode(Node node, String blankNodePrefix) {
- super(node);
- this.blankNodePrefix = blankNodePrefix;
- if (! node.isBlankNode()) {
- throw new IllegalArgumentException("Node is not a BlankNode:" + node);
+public interface JsonLdBlankNode extends JsonLdTerm, BlankNode {
+
+ final class JsonLdBlankNodeImpl extends JsonLdTermImpl implements JsonLdBlankNode {
+ private String blankNodePrefix;
+
+ JsonLdBlankNodeImpl(Node node, String blankNodePrefix) {
+ super(node);
+ this.blankNodePrefix = blankNodePrefix;
+ if (! node.isBlankNode()) {
+ throw new IllegalArgumentException("Node is not a BlankNode:" + node);
+ }
}
- }
-
- @Override
- public String ntriplesString() {
- return node.getValue();
- }
-
- @Override
- public String uniqueReference() {
- return blankNodePrefix + node.getValue();
- }
-
- @Override
- public boolean equals(Object obj) {
- if (! ( obj instanceof BlankNode)) {
- return false;
+
+ @Override
+ public String ntriplesString() {
+ return node.getValue();
+ }
+
+ @Override
+ public String uniqueReference() {
+ return blankNodePrefix + node.getValue();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (! ( obj instanceof BlankNode)) {
+ return false;
+ }
+ BlankNode other = (BlankNode) obj;
+ return uniqueReference().equals(other.uniqueReference());
+ }
+
+ @Override
+ public int hashCode() {
+ return uniqueReference().hashCode();
}
- BlankNode other = (BlankNode) obj;
- return uniqueReference().equals(other.uniqueReference());
}
- @Override
- public int hashCode() {
- return uniqueReference().hashCode();
- }
}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/80ad999d/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdIRI.java
----------------------------------------------------------------------
diff --git a/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdIRI.java b/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdIRI.java
index e21f55c..aac13e6 100644
--- a/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdIRI.java
+++ b/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdIRI.java
@@ -22,40 +22,44 @@ import org.apache.commons.rdf.api.IRI;
import com.github.jsonldjava.core.RDFDataset;
import com.github.jsonldjava.core.RDFDataset.Node;
-final class JsonLdIRI extends JsonLdTerm implements IRI {
+public interface JsonLdIRI extends JsonLdTerm, IRI {
- JsonLdIRI(Node node) {
- super(node);
- if (! node.isIRI()) {
- throw new IllegalArgumentException("Node is not an IRI:" + node);
+ final class JsonLdIRIImpl extends JsonLdTermImpl implements JsonLdIRI {
+
+ JsonLdIRIImpl(Node node) {
+ super(node);
+ if (! node.isIRI()) {
+ throw new IllegalArgumentException("Node is not an IRI:" + node);
+ }
+ }
+
+ JsonLdIRIImpl(String iri) {
+ super(new RDFDataset.IRI(iri));
+ }
+
+ @Override
+ public String ntriplesString() {
+ return "<" + node.getValue() + ">";
+ }
+
+ @Override
+ public String getIRIString() {
+ return node.getValue();
+ }
+
+ @Override
+ public int hashCode() {
+ return node.getValue().hashCode();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (! (obj instanceof IRI)) {
+ return false;
+ }
+ IRI other = (IRI) obj;
+ return node.getValue().equals(other.getIRIString());
}
}
- public JsonLdIRI(String iri) {
- super(new RDFDataset.IRI(iri));
- }
-
- @Override
- public String ntriplesString() {
- return "<" + node.getValue() + ">";
- }
-
- @Override
- public String getIRIString() {
- return node.getValue();
- }
-
- @Override
- public int hashCode() {
- return node.getValue().hashCode();
- }
-
- @Override
- public boolean equals(Object obj) {
- if (! (obj instanceof IRI)) {
- return false;
- }
- IRI other = (IRI) obj;
- return node.getValue().equals(other.getIRIString());
- }
}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/80ad999d/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdLiteral.java
----------------------------------------------------------------------
diff --git a/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdLiteral.java b/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdLiteral.java
index e492486..025128e 100644
--- a/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdLiteral.java
+++ b/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdLiteral.java
@@ -26,72 +26,74 @@ import org.apache.commons.rdf.simple.Types;
import com.github.jsonldjava.core.RDFDataset.Node;
-public class JsonLdLiteral extends JsonLdTerm implements Literal {
-
- JsonLdLiteral(Node node) {
- super(node);
- if (! node.isLiteral()) {
- throw new IllegalArgumentException("Node is not a Literal:" + node);
+public interface JsonLdLiteral extends JsonLdTerm, Literal {
+
+ class JsonLdLiteralImpl extends JsonLdTermImpl implements JsonLdLiteral {
+
+ JsonLdLiteralImpl(Node node) {
+ super(node);
+ if (! node.isLiteral()) {
+ throw new IllegalArgumentException("Node is not a Literal:" + node);
+ }
}
- }
-
- @Override
- public String ntriplesString() {
- StringBuilder sb = new StringBuilder();
- sb.append('"');
- // Escape special characters
- sb.append(getLexicalForm().replace("\\", "\\\\"). // escaped to \\
- replace("\"", "\\\""). // escaped to \"
- replace("\r", "\\r"). // escaped to \r
- replace("\n", "\\n")); // escaped to \n
- sb.append('"');
-
- if (getLanguageTag().isPresent()) {
- sb.append("@");
- sb.append(getLanguageTag().get());
- } else if (!getDatatype().equals(Types.XSD_STRING)) {
- sb.append("^^");
- sb.append(getDatatype().ntriplesString());
- }
- return sb.toString();
- }
-
- @Override
- public String getLexicalForm() {
- return node.getValue();
- }
-
- @Override
- public IRI getDatatype() {
- return new JsonLdIRI(node.getDatatype());
- }
-
- @Override
- public Optional<String> getLanguageTag() {
- return Optional.ofNullable(node.getLanguage());
- }
-
- @Override
- public int hashCode() {
- // Should be the same as
- // Objects.hash(getLexicalForm(), getDatatype(), getLanguageTag());
- return Objects.hash(node.getValue(), node.getDatatype(), node.getLanguage());
- }
- @Override
- public boolean equals(Object obj) {
- if (obj instanceof JsonLdLiteral) {
- JsonLdLiteral other = (JsonLdLiteral) obj;
- return asNode().compareTo(other.asNode()) == 0;
+ @Override
+ public String ntriplesString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append('"');
+ // Escape special characters
+ sb.append(getLexicalForm().replace("\\", "\\\\"). // escaped to \\
+ replace("\"", "\\\""). // escaped to \"
+ replace("\r", "\\r"). // escaped to \r
+ replace("\n", "\\n")); // escaped to \n
+ sb.append('"');
+
+ if (getLanguageTag().isPresent()) {
+ sb.append("@");
+ sb.append(getLanguageTag().get());
+ } else if (!getDatatype().equals(Types.XSD_STRING)) {
+ sb.append("^^");
+ sb.append(getDatatype().ntriplesString());
+ }
+ return sb.toString();
+ }
+
+ @Override
+ public String getLexicalForm() {
+ return node.getValue();
}
- if (obj instanceof Literal) {
- Literal other = (Literal) obj;
- return getLexicalForm().equals(other.getLexicalForm()) &&
- getDatatype().equals(other.getDatatype()) &&
- getLanguageTag().equals(other.getLanguageTag());
+
+ @Override
+ public IRI getDatatype() {
+ return new JsonLdIRI.JsonLdIRIImpl(node.getDatatype());
+ }
+
+ @Override
+ public Optional<String> getLanguageTag() {
+ return Optional.ofNullable(node.getLanguage());
+ }
+
+ @Override
+ public int hashCode() {
+ // Should be the same as
+ // Objects.hash(getLexicalForm(), getDatatype(), getLanguageTag());
+ return Objects.hash(node.getValue(), node.getDatatype(), node.getLanguage());
}
- return false;
+ @Override
+ public boolean equals(Object obj) {
+ if (obj instanceof JsonLdLiteral) {
+ JsonLdLiteral other = (JsonLdLiteral) obj;
+ return asNode().compareTo(other.asNode()) == 0;
+ }
+ if (obj instanceof Literal) {
+ Literal other = (Literal) obj;
+ return getLexicalForm().equals(other.getLexicalForm()) &&
+ getDatatype().equals(other.getDatatype()) &&
+ getLanguageTag().equals(other.getLanguageTag());
+ }
+ return false;
+
+ }
}
-
-}
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/80ad999d/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdQuad.java
----------------------------------------------------------------------
diff --git a/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdQuad.java b/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdQuad.java
index ce2cb09..524f43c 100644
--- a/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdQuad.java
+++ b/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdQuad.java
@@ -21,34 +21,45 @@ import java.util.Objects;
import org.apache.commons.rdf.api.BlankNodeOrIRI;
import org.apache.commons.rdf.api.IRI;
-import org.apache.commons.rdf.api.Quad;
import org.apache.commons.rdf.api.RDFTerm;
+// Note: To avoid confusion - don't import either Quad
+import org.apache.commons.rdf.jsonldjava.JsonLdQuadLike.JsonLdQuadLikeImpl;
-final class JsonLdQuad extends JsonLdQuadLike<BlankNodeOrIRI,IRI,RDFTerm,BlankNodeOrIRI>
- implements org.apache.commons.rdf.api.Quad {
-
- JsonLdQuad(com.github.jsonldjava.core.RDFDataset.Quad quad, String blankNodePrefix) {
- super(quad, blankNodePrefix);
- }
+public interface JsonLdQuad extends org.apache.commons.rdf.api.Quad {
- @Override
- public boolean equals(Object obj) {
- if (obj == this) {
- return true;
+ /**
+ * Return the underlying JsonLD {@link com.github.jsonldjava.core.RDFDataset.Quad}
+ *
+ * @return The JsonLD {@link com.github.jsonldjava.core.RDFDataset.Quad}
+ */
+ public com.github.jsonldjava.core.RDFDataset.Quad asJsonLdQuad();
+
+ final class JsonLdQuadImpl extends JsonLdQuadLikeImpl<BlankNodeOrIRI,IRI,RDFTerm,BlankNodeOrIRI>
+ implements JsonLdQuad {
+
+ JsonLdQuadImpl(com.github.jsonldjava.core.RDFDataset.Quad quad, String blankNodePrefix) {
+ super(quad, blankNodePrefix);
}
- if (! (obj instanceof Quad)) {
- return false;
+
+ @Override
+ public boolean equals(Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (! (obj instanceof org.apache.commons.rdf.api.Quad)) {
+ return false;
+ }
+ org.apache.commons.rdf.api.Quad other = (org.apache.commons.rdf.api.Quad) obj;
+ return getGraphName().equals(other.getGraphName()) &&
+ getSubject().equals(other.getSubject()) &&
+ getPredicate().equals(other.getPredicate()) &&
+ getObject().equals(other.getObject());
}
- Quad other = (Quad) obj;
- return getGraphName().equals(other.getGraphName()) &&
- getSubject().equals(other.getSubject()) &&
- getPredicate().equals(other.getPredicate()) &&
- getObject().equals(other.getObject());
- }
-
- @Override
- public int hashCode() {
- return Objects.hash(getGraphName(), getSubject(), getPredicate(), getObject());
- }
-
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(getGraphName(), getSubject(), getPredicate(), getObject());
+ }
+ }
+
}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/80ad999d/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdQuadLike.java
----------------------------------------------------------------------
diff --git a/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdQuadLike.java b/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdQuadLike.java
index 6290812..753e332 100644
--- a/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdQuadLike.java
+++ b/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdQuadLike.java
@@ -24,41 +24,50 @@ import org.apache.commons.rdf.api.RDFTerm;
import com.github.jsonldjava.core.RDFDataset.Quad;
-class JsonLdQuadLike<S extends RDFTerm, P extends RDFTerm, O extends RDFTerm, G extends RDFTerm> implements QuadLike<S,P,O,G> {
+public interface JsonLdQuadLike<S extends RDFTerm, P extends RDFTerm, O extends RDFTerm, G extends RDFTerm> extends QuadLike<S,P,O,G> {
- private final Quad quad;
- private String blankNodePrefix;
-
- private static JsonLdRDFTermFactory rdfTermFactory = new JsonLdRDFTermFactory();
+ public Quad asJsonLdQuad();
- JsonLdQuadLike(Quad jsonldQuad, String blankNodePrefix) {
- this.quad = jsonldQuad;
- this.blankNodePrefix = blankNodePrefix;
- }
-
- @SuppressWarnings("unchecked")
- @Override
- public Optional<G> getGraphName() {
- G g = (G) rdfTermFactory.asTerm(quad.getGraph(), blankNodePrefix);
- return Optional.ofNullable(g);
- }
+ class JsonLdQuadLikeImpl<S extends RDFTerm, P extends RDFTerm, O extends RDFTerm, G extends RDFTerm> implements JsonLdQuadLike<S,P,O,G> {
+
+ private static JsonLdRDFTermFactory rdfTermFactory = new JsonLdRDFTermFactory();
+
+ private final Quad quad;
+ private String blankNodePrefix;
+
+ JsonLdQuadLikeImpl(Quad jsonldQuad, String blankNodePrefix) {
+ this.quad = jsonldQuad;
+ this.blankNodePrefix = blankNodePrefix;
+ }
- @SuppressWarnings("unchecked")
- @Override
- public S getSubject() {
- return (S) rdfTermFactory.asTerm(quad.getSubject(), blankNodePrefix);
- }
-
- @SuppressWarnings("unchecked")
- @Override
- public P getPredicate() {
- return (P) rdfTermFactory.asTerm(quad.getPredicate(), blankNodePrefix);
- }
-
- @SuppressWarnings("unchecked")
- @Override
- public O getObject() {
- return (O) rdfTermFactory.asTerm(quad.getObject(), blankNodePrefix);
+ @SuppressWarnings("unchecked")
+ @Override
+ public Optional<G> getGraphName() {
+ G g = (G) rdfTermFactory.asTerm(quad.getGraph(), blankNodePrefix);
+ return Optional.ofNullable(g);
+ }
+
+ @SuppressWarnings("unchecked")
+ @Override
+ public S getSubject() {
+ return (S) rdfTermFactory.asTerm(quad.getSubject(), blankNodePrefix);
+ }
+
+ @SuppressWarnings("unchecked")
+ @Override
+ public P getPredicate() {
+ return (P) rdfTermFactory.asTerm(quad.getPredicate(), blankNodePrefix);
+ }
+
+ @SuppressWarnings("unchecked")
+ @Override
+ public O getObject() {
+ return (O) rdfTermFactory.asTerm(quad.getObject(), blankNodePrefix);
+ }
+
+ public Quad asJsonLdQuad() {
+ return quad;
+ }
}
}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/80ad999d/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdRDFTermFactory.java
----------------------------------------------------------------------
diff --git a/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdRDFTermFactory.java b/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdRDFTermFactory.java
index f57eb86..5ac360a 100644
--- a/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdRDFTermFactory.java
+++ b/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdRDFTermFactory.java
@@ -24,11 +24,9 @@ import org.apache.commons.rdf.api.BlankNodeOrIRI;
import org.apache.commons.rdf.api.Graph;
import org.apache.commons.rdf.api.IRI;
import org.apache.commons.rdf.api.Literal;
-import org.apache.commons.rdf.api.Quad;
import org.apache.commons.rdf.api.QuadLike;
import org.apache.commons.rdf.api.RDFTerm;
import org.apache.commons.rdf.api.RDFTermFactory;
-import org.apache.commons.rdf.api.Triple;
import org.apache.commons.rdf.api.TripleLike;
import org.apache.commons.rdf.simple.Types;
@@ -54,44 +52,44 @@ final class JsonLdRDFTermFactory implements RDFTermFactory {
}
@Override
- public IRI createIRI(String iri) {
- return new JsonLdIRI(iri);
+ public JsonLdIRI createIRI(String iri) {
+ return new JsonLdIRI.JsonLdIRIImpl(iri);
}
@Override
- public BlankNode createBlankNode() {
+ public JsonLdBlankNode createBlankNode() {
String id = "_:" + UUID.randomUUID().toString();
- return new JsonLdBlankNode(new RDFDataset.BlankNode(id), bnodePrefix);
+ return new JsonLdBlankNode.JsonLdBlankNodeImpl(new RDFDataset.BlankNode(id), bnodePrefix);
}
@Override
- public BlankNode createBlankNode(String name) {
+ public JsonLdBlankNode createBlankNode(String name) {
String id = "_:" + name;
// TODO: Check if name is valid JSON-LD BlankNode identifier
- return new JsonLdBlankNode(new RDFDataset.BlankNode(id), bnodePrefix);
+ return new JsonLdBlankNode.JsonLdBlankNodeImpl(new RDFDataset.BlankNode(id), bnodePrefix);
}
@Override
- public Triple createTriple(BlankNodeOrIRI subject, IRI predicate, RDFTerm object) {
- return new JsonLdTriple(asJsonLdQuad(subject, predicate, object), bnodePrefix);
+ public JsonLdTriple createTriple(BlankNodeOrIRI subject, IRI predicate, RDFTerm object) {
+ return new JsonLdTriple.JsonLdTripleImpl(asJsonLdQuad(subject, predicate, object), bnodePrefix);
}
@Override
- public Quad createQuad(BlankNodeOrIRI graphName, BlankNodeOrIRI subject, IRI predicate, RDFTerm object)
+ public JsonLdQuad createQuad(BlankNodeOrIRI graphName, BlankNodeOrIRI subject, IRI predicate, RDFTerm object)
throws IllegalArgumentException, UnsupportedOperationException {
- return new JsonLdQuad(asJsonLdQuad(graphName, subject, predicate, object), bnodePrefix);
+ return new JsonLdQuad.JsonLdQuadImpl(asJsonLdQuad(graphName, subject, predicate, object), bnodePrefix);
}
@Override
- public Literal createLiteral(String literal) {
- return new JsonLdLiteral(new RDFDataset.Literal(literal, null, null));
+ public JsonLdLiteral createLiteral(String literal) {
+ return new JsonLdLiteral.JsonLdLiteralImpl(new RDFDataset.Literal(literal, null, null));
}
@Override
- public Literal createLiteral(String literal, IRI dataType) {
- return new JsonLdLiteral(new RDFDataset.Literal(literal, dataType.getIRIString(), null)); }
+ public JsonLdLiteral createLiteral(String literal, IRI dataType) {
+ return new JsonLdLiteral.JsonLdLiteralImpl(new RDFDataset.Literal(literal, dataType.getIRIString(), null)); }
@Override
- public Literal createLiteral(String literal, String language) {
- return new JsonLdLiteral(new RDFDataset.Literal(literal, Types.RDF_LANGSTRING.getIRIString(), language));
+ public JsonLdLiteral createLiteral(String literal, String language) {
+ return new JsonLdLiteral.JsonLdLiteralImpl(new RDFDataset.Literal(literal, Types.RDF_LANGSTRING.getIRIString(), language));
}
@@ -131,7 +129,7 @@ final class JsonLdRDFTermFactory implements RDFTermFactory {
return new RDFDataset.Quad(asJsonLdNode(subject), asJsonLdNode(predicate), asJsonLdNode(object), graph);
}
- @SuppressWarnings("rawtypes")
+ @SuppressWarnings({ "rawtypes", "unchecked" })
public RDFDataset.Quad asJsonLdQuad(TripleLike tripleOrQuad) {
RDFTerm g = null;
if (tripleOrQuad instanceof QuadLike) {
@@ -141,14 +139,14 @@ final class JsonLdRDFTermFactory implements RDFTermFactory {
return asJsonLdQuad(g, tripleOrQuad.getSubject(), tripleOrQuad.getPredicate(), tripleOrQuad.getObject());
}
- RDFTerm asTerm(final Node node, String blankNodePrefix) {
+ JsonLdTerm asTerm(final Node node, String blankNodePrefix) {
if (node == null) {
return null; // e.g. default graph
}
if (node.isIRI()) {
- return new JsonLdIRI(node);
+ return new JsonLdIRI.JsonLdIRIImpl(node);
} else if (node.isBlankNode()) {
- return new JsonLdBlankNode(node, blankNodePrefix);
+ return new JsonLdBlankNode.JsonLdBlankNodeImpl(node, blankNodePrefix);
} else if (node.isLiteral()) {
// TODO: Our own JsonLdLiteral
if (node.getLanguage() != null) {
http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/80ad999d/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdTerm.java
----------------------------------------------------------------------
diff --git a/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdTerm.java b/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdTerm.java
index 39ef1a6..80a7b56 100644
--- a/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdTerm.java
+++ b/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdTerm.java
@@ -17,15 +17,27 @@
*/
package org.apache.commons.rdf.jsonldjava;
+import org.apache.commons.rdf.api.RDFTerm;
+
import com.github.jsonldjava.core.RDFDataset.Node;
-public abstract class JsonLdTerm {
- final Node node;
- JsonLdTerm(Node node) {
- this.node = node;
- }
- public Node asNode() {
- return node;
+public interface JsonLdTerm extends RDFTerm {
+
+ /**
+ * Return the underlying JsonLd {@link Node}.
+ *
+ * @return JsonLd {@link Node}
+ */
+ Node asNode();
+
+ abstract class JsonLdTermImpl implements JsonLdTerm {
+ final Node node;
+ JsonLdTermImpl(Node node) {
+ this.node = node;
+ }
+ public Node asNode() {
+ return node;
+ }
}
}
http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/80ad999d/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdTriple.java
----------------------------------------------------------------------
diff --git a/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdTriple.java b/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdTriple.java
index a14dbb4..18e271c 100644
--- a/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdTriple.java
+++ b/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdTriple.java
@@ -23,29 +23,40 @@ import org.apache.commons.rdf.api.BlankNodeOrIRI;
import org.apache.commons.rdf.api.IRI;
import org.apache.commons.rdf.api.RDFTerm;
import org.apache.commons.rdf.api.Triple;
+import org.apache.commons.rdf.jsonldjava.JsonLdQuadLike.JsonLdQuadLikeImpl;
import com.github.jsonldjava.core.RDFDataset.Quad;
-final class JsonLdTriple extends JsonLdQuadLike<BlankNodeOrIRI, IRI, RDFTerm, RDFTerm>
- implements Triple {
-
- JsonLdTriple(Quad quad, String blankNodePrefix) {
- super(quad, blankNodePrefix);
- }
+public interface JsonLdTriple extends Triple {
- @Override
- public boolean equals(Object obj) {
- if (! (obj instanceof Triple)) {
- return false;
- }
- Triple other = (Triple) obj;
- return getSubject().equals(other.getSubject()) &&
- getPredicate().equals(other.getPredicate()) &&
- getObject().equals(other.getObject());
- }
+ /**
+ * Return the underlying JsonLD {@link com.github.jsonldjava.core.RDFDataset.Quad}
+ *
+ * @return The JsonLD {@link com.github.jsonldjava.core.RDFDataset.Quad}
+ */
+ public com.github.jsonldjava.core.RDFDataset.Quad asJsonLdQuad();
- @Override
- public int hashCode() {
- return Objects.hash(getSubject(), getPredicate(), getObject());
+ final class JsonLdTripleImpl extends JsonLdQuadLikeImpl<BlankNodeOrIRI, IRI, RDFTerm, RDFTerm>
+ implements JsonLdTriple {
+
+ JsonLdTripleImpl(Quad quad, String blankNodePrefix) {
+ super(quad, blankNodePrefix);
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (! (obj instanceof Triple)) {
+ return false;
+ }
+ Triple other = (Triple) obj;
+ return getSubject().equals(other.getSubject()) &&
+ getPredicate().equals(other.getPredicate()) &&
+ getObject().equals(other.getObject());
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(getSubject(), getPredicate(), getObject());
+ }
}
}
\ No newline at end of file
[35/50] incubator-commonsrdf git commit: COMMONSRDF-37 Add Quad,
Dataset, TripleLike
Posted by st...@apache.org.
COMMONSRDF-37 Add Quad, Dataset, TripleLike
Also adds QuadLike, GraphLike
simple adds DatasetGraphView, DatsetImple, QuadImpl
TODO: Dataset tests
This closes #19
Project: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/commit/fc70462e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/tree/fc70462e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/diff/fc70462e
Branch: refs/heads/jsonld-java
Commit: fc70462ebf3462233a42f10a80c13040c6bb5a43
Parents: 6c673b7 a1d6554
Author: Stian Soiland-Reyes <st...@apache.org>
Authored: Mon Sep 5 16:39:35 2016 +0100
Committer: Stian Soiland-Reyes <st...@apache.org>
Committed: Mon Sep 5 16:39:56 2016 +0100
----------------------------------------------------------------------
.../org/apache/commons/rdf/api/Dataset.java | 338 +++++++++++++++++++
.../java/org/apache/commons/rdf/api/Graph.java | 40 ++-
.../org/apache/commons/rdf/api/GraphLike.java | 113 +++++++
.../java/org/apache/commons/rdf/api/Quad.java | 211 ++++++++++++
.../org/apache/commons/rdf/api/QuadLike.java | 67 ++++
.../apache/commons/rdf/api/RDFTermFactory.java | 40 +++
.../java/org/apache/commons/rdf/api/Triple.java | 2 +-
.../org/apache/commons/rdf/api/TripleLike.java | 69 ++++
.../commons/rdf/api/AbstractGraphTest.java | 24 +-
.../commons/rdf/simple/DatasetGraphView.java | 138 ++++++++
.../apache/commons/rdf/simple/DatasetImpl.java | 221 ++++++++++++
.../apache/commons/rdf/simple/GraphImpl.java | 12 +-
.../org/apache/commons/rdf/simple/QuadImpl.java | 109 ++++++
.../rdf/simple/SimpleRDFTermFactory.java | 13 +
.../commons/rdf/simple/TestWritingGraph.java | 8 +-
15 files changed, 1374 insertions(+), 31 deletions(-)
----------------------------------------------------------------------
[42/50] incubator-commonsrdf git commit: enable all report plugins
Posted by st...@apache.org.
enable all report plugins
(sadly this also mean enabling lots of "Project Information"
<reportSet> enabled in commons-parent )
Project: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/commit/d7e4cbe4
Tree: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/tree/d7e4cbe4
Diff: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/diff/d7e4cbe4
Branch: refs/heads/jsonld-java
Commit: d7e4cbe49aa56e515a5ae83f8e531a91e1c5c44c
Parents: 091f1d1
Author: Stian Soiland-Reyes <st...@apache.org>
Authored: Wed Sep 7 02:13:28 2016 +0100
Committer: Stian Soiland-Reyes <st...@apache.org>
Committed: Wed Sep 7 02:14:06 2016 +0100
----------------------------------------------------------------------
pom.xml | 305 +++++++++++++++++++++++++++++++++++++----------------------
1 file changed, 194 insertions(+), 111 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/d7e4cbe4/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 6ac78f3..f9b85fc 100644
--- a/pom.xml
+++ b/pom.xml
@@ -35,18 +35,10 @@
<name>Commons RDF</name>
<description>Commons Java API for RDF 1.1</description>
- <url>http://commonsrdf.incubator.apache.org</url>
+ <url>http://commonsrdf.incubator.apache.org/</url>
<inceptionYear>2015</inceptionYear>
- <licenses>
- <license>
- <name>The Apache Software License, Version 2.0</name>
- <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
- <distribution>repo</distribution>
- </license>
- </licenses>
-
<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
@@ -59,7 +51,9 @@
<commons.site.path>rdf</commons.site.path>
<commons.scmPubUrl>https://svn.apache.org/repos/infra/websites/production/commonsrdf/content/</commons.scmPubUrl>
<commons.scmPubCheckoutDirectory>${project.build.directory}/site-content</commons.scmPubCheckoutDirectory>
- <commons.javadoc.java.link>http://docs.oracle.com/javase/8/docs/api/</commons.javadoc.java.link>
+ <commons.javadoc.java.link>https://docs.oracle.com/javase/8/docs/api/</commons.javadoc.java.link>
+ <!-- upgrade from 0.8.0 -->
+ <commons.japicmp.version>0.9.0</commons.japicmp.version>
</properties>
<scm>
@@ -73,6 +67,10 @@
<system>Jira</system>
<url>https://issues.apache.org/jira/browse/COMMONSRDF</url>
</issueManagement>
+ <ciManagement>
+ <system>jenkins</system>
+ <url>https://builds.apache.org/</url>
+ </ciManagement>
<mailingLists>
<mailingList>
@@ -180,7 +178,7 @@
<contributor>
<name>Peter Ansell</name>
<email>ansell[at]apache[dot]org</email>
- <url>http://github.com/ansell</url>
+ <url>https://github.com/ansell</url>
<roles>
<role>Emeritus Committer</role>
<role>Emeritus PPMC Member</role>
@@ -280,26 +278,30 @@
<goals>
<goal>jar</goal>
</goals>
- <configuration>
- <additionalparam>-Xdoclint:none</additionalparam>
- </configuration>
</execution>
</executions>
+ <configuration>
+ <additionalparam>-Xdoclint:none</additionalparam>
+ </configuration>
</plugin>
+ <!--
<plugin>
<groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
+ <artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>${maven.compiler.source}</source>
<target>${maven.compiler.target}</target>
<encoding>${project.build.encoding}</encoding>
</configuration>
</plugin>
+-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<configuration>
- <useReleaseProfile>false</useReleaseProfile>
+ <useReleaseProfile>true</useReleaseProfile>
+ <!-- TODO: Use apache-parent's apache-release rather than common-parent's release? -->
+ <releaseProfiles>release</releaseProfiles>
<goals>deploy</goals>
<autoVersionSubmodules>true</autoVersionSubmodules>
<localCheckout>true</localCheckout>
@@ -309,25 +311,41 @@
<connectionUrl>scm:git:file://`pwd`/.git</connectionUrl>
</configuration>
</plugin>
- <!-- Create code coverage reports and submit them to coveralls.io. -->
+ <!-- Create code coverage reports and submit them to coveralls.io.
+ https://coveralls.io/github/apache/incubator-commonsrdf
+ -->
<plugin>
<groupId>org.eluder.coveralls</groupId>
<artifactId>coveralls-maven-plugin</artifactId>
- <version>3.1.0</version>
- </plugin>
- <plugin>
- <groupId>org.jacoco</groupId>
- <artifactId>jacoco-maven-plugin</artifactId>
- <version>0.7.2.201409121644</version>
- <executions>
- <execution>
- <id>prepare-agent</id>
- <goals>
- <goal>prepare-agent</goal>
- </goals>
- </execution>
- </executions>
+ <version>4.2.0</version>
</plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>jdepend-maven-plugin</artifactId>
+ <version>${commons.jdepend.version}</version>
+ <dependencies>
+ <!-- Forked jdepend https://github.com/nidi3/jdepend supports Java 8 -->
+ <dependency>
+ <groupId>guru.nidi</groupId>
+ <artifactId>jdepend</artifactId>
+ <version>2.9.5</version>
+ </dependency>
+ </dependencies>
+ </plugin>
+
+ <plugin>
+ <!-- Check if we broke compatibibility against previous release -->
+ <groupId>com.github.siom79.japicmp</groupId>
+ <artifactId>japicmp-maven-plugin</artifactId>
+ <version>${commons.japicmp.version}</version>
+ <configuration>
+ <parameter>
+ <!-- Tell japicmp about the -incubator suffix -->
+ <oldVersionPattern>\d+\.\d+\.\d+\-incubating</oldVersionPattern>
+ </parameter>
+ </configuration>
+ </plugin>
+
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
@@ -338,41 +356,20 @@
<version>1.6</version>
</dependency>
</dependencies>
+ <!--
<configuration>
- <siteDirectory>${basedir}/src/site</siteDirectory>
+ <siteDirectory>${project.basedir}/src/site</siteDirectory>
<outputDirectory>${project.build.directory}/site</outputDirectory>
- <inputEncoding>${project.build.encoding}</inputEncoding>
- <outputEncoding>${project.build.encoding}</outputEncoding>
<showAvatarImages>false</showAvatarImages>
- <reportPlugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-javadoc-plugin</artifactId>
- <configuration>
- <additionalparam>-Xdoclint:none</additionalparam>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-project-info-reports-plugin</artifactId>
- <version>2.7</version>
- <configuration>
- <dependencyLocationsEnabled>false</dependencyLocationsEnabled>
- </configuration>
- <reports>
- <report>project-team</report>
- <report>mailing-list</report>
- <report>scm</report>
- </reports>
- </plugin>
- </reportPlugins>
</configuration>
+ -->
</plugin>
</plugins>
<pluginManagement>
<plugins>
- <!--This plugin's configuration is used to store Eclipse m2e settings
+ <!--This plugin's configuration is used to store Eclipse m2e settings
only. It has no influence on the Maven build itself. -->
+
<plugin>
<groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId>
@@ -380,11 +377,12 @@
<configuration>
<lifecycleMappingMetadata>
<pluginExecutions>
+ <!-- No longer needed?
<pluginExecution>
<pluginExecutionFilter>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
- <versionRange>[0.7.2.201409121644,)</versionRange>
+ <versionRange>[${commons.jacoco.version},)</versionRange>
<goals>
<goal>prepare-agent</goal>
</goals>
@@ -393,6 +391,7 @@
<ignore />
</action>
</pluginExecution>
+ -->
<pluginExecution>
<pluginExecutionFilter>
<groupId>org.apache.maven.plugins</groupId>
@@ -410,6 +409,8 @@
</lifecycleMappingMetadata>
</configuration>
</plugin>
+
+ <!--
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>animal-sniffer-maven-plugin</artifactId>
@@ -417,7 +418,7 @@
<configuration>
<skip>true</skip>
</configuration>
- </plugin>
+ </plugin>-->
<plugin>
<groupId>org.apache.rat</groupId>
<artifactId>apache-rat-plugin</artifactId>
@@ -440,6 +441,93 @@
</plugins>
</pluginManagement>
</build>
+ <reporting>
+
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <configuration>
+ <additionalparam>-Xdoclint:none</additionalparam>
+ </configuration>
+ <reportSets>
+ <reportSet><!-- by default, id = "default" -->
+ <reports><!-- select non-aggregate reports -->
+ <report>javadoc</report>
+ <report>test-javadoc</report>
+ </reports>
+ </reportSet>
+ <reportSet><!-- aggregate reportSet, to define in poms having modules -->
+ <id>aggregate</id>
+ <inherited>false</inherited><!-- don't run aggregate in child modules -->
+ <reports>
+ <report>aggregate</report>
+ </reports>
+ </reportSet>
+ </reportSets>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-checkstyle-plugin</artifactId>
+ <version>${checkstyle.plugin.version}</version>
+ <configuration>
+ <configLocation>${project.basedir}/src/conf/checkstyle.xml</configLocation>
+ <!-- Needed to define config_loc -->
+ <propertyExpansion>config_loc=${project.basedir}</propertyExpansion>
+ <enableRulesSummary>false</enableRulesSummary>
+ </configuration>
+ <reportSets>
+ <reportSet>
+ <reports>
+ <report>checkstyle-aggregate</report>
+ </reports>
+ </reportSet>
+ </reportSets>
+ </plugin>
+
+<plugin>
+ <artifactId>maven-pmd-plugin</artifactId>
+ <version>3.6</version>
+ <configuration>
+ <targetJdk>${maven.compiler.target}</targetJdk>
+ <linkXref>true</linkXref>
+ </configuration>
+ <reportSets>
+ <reportSet>
+ <id>pmd-report</id>
+ <reports>
+ <report>pmd</report>
+ </reports>
+ </reportSet>
+ <reportSet>
+ <id>pmd-aggregate</id>
+ <inherited>false</inherited>
+ <reports>
+ <report>pmd</report>
+ </reports>
+ <configuration>
+ <aggregate>true</aggregate>
+ </configuration>
+ </reportSet>
+ </reportSets>
+ </plugin>
+
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>findbugs-maven-plugin</artifactId>
+ <version>${commons.findbugs.version}</version>
+ <configuration>
+ <threshold>Normal</threshold>
+ <effort>Default</effort>
+ <excludeFilterFile>src/conf/findbugs-exclude-filter.xml</excludeFilterFile>
+ <fork>true</fork>
+ <jvmArgs>-Duser.language=en</jvmArgs>
+ </configuration>
+ </plugin>
+
+</plugins>
+
+ </reporting>
<profiles>
<profile>
@@ -447,65 +535,60 @@
<!-- extends the release profile from commons -->
<build>
<plugins>
+ <!-- Generate convenience *.md5 *.sha1 files for dist puropses -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>default-cli</id>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <phase>package</phase>
+ <configuration>
+ <tasks>
+ <checksum algorithm="MD5" fileext=".md5">
+ <fileset dir="${project.build.directory}">
+ <include name="*.zip" />
+ <include name="*.tar.gz" />
+ </fileset>
+ </checksum>
+ <checksum algorithm="SHA1" fileext=".sha1">
+ <fileset dir="${project.build.directory}">
+ <include name="*.zip" />
+ <include name="*.tar.gz" />
+ </fileset>
+ </checksum>
+ </tasks>
+ </configuration>
+ </execution>
+ </executions>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.ant</groupId>
+ <artifactId>ant-nodeps</artifactId>
+ <version>1.8.1</version>
+ </dependency>
+ </dependencies>
+ </plugin>
+
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
- <executions>
- <execution>
- <id>sign-artifacts</id>
- <phase>verify</phase>
- <goals>
- <goal>sign</goal>
- </goals>
- <configuration>
- <excludes>
- <exclude>**/*.asc</exclude>
- <exclude>**/*.md5</exclude>
- <exclude>**/*.sha1</exclude>
- </excludes>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-antrun-plugin</artifactId>
- <executions>
- <execution>
- <id>default-cli</id>
- <goals>
- <goal>run</goal>
- </goals>
- <phase>package</phase>
- <configuration>
- <tasks>
- <checksum algorithm="MD5" fileext=".md5">
- <fileset dir="${project.build.directory}">
- <include name="*.zip" />
- <include name="*.tar.gz" />
- </fileset>
- </checksum>
- <checksum algorithm="SHA1" fileext=".sha1">
- <fileset dir="${project.build.directory}">
- <include name="*.zip" />
- <include name="*.tar.gz" />
- </fileset>
- </checksum>
- </tasks>
- </configuration>
- </execution>
- </executions>
- <dependencies>
- <dependency>
- <groupId>org.apache.ant</groupId>
- <artifactId>ant-nodeps</artifactId>
- <version>1.8.1</version>
- </dependency>
- </dependencies>
+ <configuration>
+ <excludes>
+ <exclude>**/*.asc</exclude>
+ <exclude>**/*.md5</exclude>
+ <exclude>**/*.sha1</exclude>
+ </excludes>
+ </configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
+
+
</project>
[34/50] incubator-commonsrdf git commit: updated to commons-parent 41
Posted by st...@apache.org.
updated to commons-parent 41
Project: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/commit/6c673b71
Tree: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/tree/6c673b71
Diff: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/diff/6c673b71
Branch: refs/heads/jsonld-java
Commit: 6c673b7190f22ca80b6555ca3028c167cef06a7a
Parents: c9dd974
Author: Sergio Fern�ndez <wi...@apache.org>
Authored: Thu Aug 11 16:58:49 2016 +0200
Committer: Sergio Fern�ndez <wi...@apache.org>
Committed: Thu Aug 11 16:58:49 2016 +0200
----------------------------------------------------------------------
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/6c673b71/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 5353db3..6ac78f3 100644
--- a/pom.xml
+++ b/pom.xml
@@ -24,7 +24,7 @@
<parent>
<groupId>org.apache.commons</groupId>
<artifactId>commons-parent</artifactId>
- <version>40</version>
+ <version>41</version>
</parent>
<groupId>org.apache.commons</groupId>
[22/50] incubator-commonsrdf git commit: Merge branch 'master' of
https://git-wip-us.apache.org/repos/asf/incubator-commonsrdf
Posted by st...@apache.org.
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/incubator-commonsrdf
Project: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/commit/42089a8b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/tree/42089a8b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/diff/42089a8b
Branch: refs/heads/jsonld-java
Commit: 42089a8b411bf8a8677a45c2a270ab4c185545f9
Parents: 658fc9b d6e610b
Author: Stian Soiland-Reyes <st...@apache.org>
Authored: Sun May 15 22:52:42 2016 +0100
Committer: Stian Soiland-Reyes <st...@apache.org>
Committed: Sun May 15 22:52:42 2016 +0100
----------------------------------------------------------------------
----------------------------------------------------------------------
[23/50] incubator-commonsrdf git commit: adapted release urls
Posted by st...@apache.org.
adapted release urls
Project: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/commit/e20c41b4
Tree: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/tree/e20c41b4
Diff: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/diff/e20c41b4
Branch: refs/heads/jsonld-java
Commit: e20c41b4c47970abf19cbc53d58cd377b849f8b1
Parents: 42089a8
Author: Sergio Fern�ndez <wi...@apache.org>
Authored: Tue May 24 09:58:47 2016 +0200
Committer: Sergio Fern�ndez <wi...@apache.org>
Committed: Tue May 24 09:58:57 2016 +0200
----------------------------------------------------------------------
src/site/markdown/download.md | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/e20c41b4/src/site/markdown/download.md
----------------------------------------------------------------------
diff --git a/src/site/markdown/download.md b/src/site/markdown/download.md
index f2617cb..117797c 100644
--- a/src/site/markdown/download.md
+++ b/src/site/markdown/download.md
@@ -71,14 +71,10 @@ which is also [mirrored to GitHub](http://github.com/apache/incubator-commonsrdf
from official mirrors of the
ASF Distribution Directory [incubator/commonsrdf](https://www.apache.org/dyn/closer.lua/incubator/commonsrdf/0.2.0-incubating/):
-* [apache-commons-rdf-0.2.0-incubating-src.zip](https://www.apache.org/dyn/closer.lua/incubator/commonsrdf/0.2.0-incubating/apache-commons-rdf-0.2.0-incubating-src.zip)
- ([asc](https://dist.apache.org/repos/dist/release/incubator/commonsrdf/0.2.0-incubating/apache-commons-rdf-0.2.0-incubating-src.zip.asc),
- [md5](https://dist.apache.org/repos/dist/release/incubator/commonsrdf/0.2.0-incubating/apache-commons-rdf-0.2.0-incubating-src.zip.md5),
- [sha1](https://dist.apache.org/repos/dist/release/incubator/commonsrdf/0.2.0-incubating/apache-commons-rdf-0.2.0-incubating-src.zip.sha1))
-* [apache-commons-rdf-0.2.0-incubating-src.tar.gz](https://www.apache.org/dyn/closer.lua/incubator/commonsrdf/0.2.0-incubating/apache-commons-rdf-0.2.0-incubating-src.tar.gz)
- ([asc](https://dist.apache.org/repos/dist/release/incubator/commonsrdf/0.2.0-incubating/apache-commons-rdf-0.2.0-incubating-src.tar.gz.asc),
- [md5](https://dist.apache.org/repos/dist/release/incubator/commonsrdf/0.2.0-incubating//apache-commons-rdf-0.2.0-incubating-src.tar.gz.md5),
- [sha1](https://dist.apache.org/repos/dist/release/incubator/commonsrdf/0.2.0-incubating/apache-commons-rdf-0.2.0-incubating-src.tar.gz.sha1))
+* [apache-commonsrdf-0.2.0-incubating-source-release.zip](https://www.apache.org/dyn/closer.lua/incubator/commonsrdf/0.2.0-incubating/apache-commonsrdf-0.2.0-incubating-source-release.zip)
+ ([asc](https://dist.apache.org/repos/dist/release/incubator/commonsrdf/0.2.0-incubating/apache-commonsrdf-0.2.0-incubating-source-release.zip.asc),
+ [md5](https://dist.apache.org/repos/dist/release/incubator/commonsrdf/0.2.0-incubating/apache-commonsrdf-0.2.0-incubating-source-release.zip.md5),
+ [sha1](https://dist.apache.org/repos/dist/release/incubator/commonsrdf/0.2.0-incubating/apache-commonsrdf-0.2.0-incubating-source-release.zip.sha1))
After downloading the files, check the signatures using the following [KEYS](https://dist.apache.org/repos/dist/release/incubator/commonsrdf/KEYS)
file. The [changelog](https://s.apache.org/0.2.0-incubating)
[49/50] incubator-commonsrdf git commit: Common superclass
JsonLdQuadLike
Posted by st...@apache.org.
Common superclass JsonLdQuadLike
Project: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/commit/44031f37
Tree: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/tree/44031f37
Diff: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/diff/44031f37
Branch: refs/heads/jsonld-java
Commit: 44031f3752ae41dd08e390ef180f851e9d62842e
Parents: a118697
Author: Stian Soiland-Reyes <st...@apache.org>
Authored: Thu Sep 8 16:03:40 2016 +0100
Committer: Stian Soiland-Reyes <st...@apache.org>
Committed: Thu Sep 8 16:04:08 2016 +0100
----------------------------------------------------------------------
.../commons/rdf/jsonldjava/JsonLdQuad.java | 33 +---------
.../commons/rdf/jsonldjava/JsonLdQuadLike.java | 64 ++++++++++++++++++++
.../commons/rdf/jsonldjava/JsonLdTriple.java | 25 +-------
3 files changed, 70 insertions(+), 52 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/44031f37/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdQuad.java
----------------------------------------------------------------------
diff --git a/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdQuad.java b/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdQuad.java
index e8dbfbd..ce2cb09 100644
--- a/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdQuad.java
+++ b/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdQuad.java
@@ -18,47 +18,20 @@
package org.apache.commons.rdf.jsonldjava;
import java.util.Objects;
-import java.util.Optional;
import org.apache.commons.rdf.api.BlankNodeOrIRI;
import org.apache.commons.rdf.api.IRI;
import org.apache.commons.rdf.api.Quad;
import org.apache.commons.rdf.api.RDFTerm;
-final class JsonLdQuad implements org.apache.commons.rdf.api.Quad {
- private final com.github.jsonldjava.core.RDFDataset.Quad quad;
- private String blankNodePrefix;
-
- private static JsonLdRDFTermFactory rdfTermFactory = new JsonLdRDFTermFactory();
+final class JsonLdQuad extends JsonLdQuadLike<BlankNodeOrIRI,IRI,RDFTerm,BlankNodeOrIRI>
+ implements org.apache.commons.rdf.api.Quad {
JsonLdQuad(com.github.jsonldjava.core.RDFDataset.Quad quad, String blankNodePrefix) {
- this.quad = quad;
- this.blankNodePrefix = blankNodePrefix;
- }
-
- @Override
- public BlankNodeOrIRI getSubject() {
- return (BlankNodeOrIRI) rdfTermFactory.asTerm(quad.getSubject(), blankNodePrefix);
- }
-
- @Override
- public IRI getPredicate() {
- return (IRI) rdfTermFactory.asTerm(quad.getPredicate(), blankNodePrefix);
+ super(quad, blankNodePrefix);
}
@Override
- public RDFTerm getObject() {
- return rdfTermFactory.asTerm(quad.getObject(), blankNodePrefix);
- }
-
- @Override
- public Optional<BlankNodeOrIRI> getGraphName() {
- BlankNodeOrIRI g = (BlankNodeOrIRI) rdfTermFactory.asTerm(quad.getGraph(),
- blankNodePrefix);
- return Optional.ofNullable(g);
- }
-
- @Override
public boolean equals(Object obj) {
if (obj == this) {
return true;
http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/44031f37/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdQuadLike.java
----------------------------------------------------------------------
diff --git a/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdQuadLike.java b/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdQuadLike.java
new file mode 100644
index 0000000..6290812
--- /dev/null
+++ b/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdQuadLike.java
@@ -0,0 +1,64 @@
+/**
+ * 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.
+ */
+package org.apache.commons.rdf.jsonldjava;
+
+import java.util.Optional;
+
+import org.apache.commons.rdf.api.QuadLike;
+import org.apache.commons.rdf.api.RDFTerm;
+
+import com.github.jsonldjava.core.RDFDataset.Quad;
+
+class JsonLdQuadLike<S extends RDFTerm, P extends RDFTerm, O extends RDFTerm, G extends RDFTerm> implements QuadLike<S,P,O,G> {
+
+ private final Quad quad;
+ private String blankNodePrefix;
+
+ private static JsonLdRDFTermFactory rdfTermFactory = new JsonLdRDFTermFactory();
+
+ JsonLdQuadLike(Quad jsonldQuad, String blankNodePrefix) {
+ this.quad = jsonldQuad;
+ this.blankNodePrefix = blankNodePrefix;
+ }
+
+ @SuppressWarnings("unchecked")
+ @Override
+ public Optional<G> getGraphName() {
+ G g = (G) rdfTermFactory.asTerm(quad.getGraph(), blankNodePrefix);
+ return Optional.ofNullable(g);
+ }
+
+ @SuppressWarnings("unchecked")
+ @Override
+ public S getSubject() {
+ return (S) rdfTermFactory.asTerm(quad.getSubject(), blankNodePrefix);
+ }
+
+ @SuppressWarnings("unchecked")
+ @Override
+ public P getPredicate() {
+ return (P) rdfTermFactory.asTerm(quad.getPredicate(), blankNodePrefix);
+ }
+
+ @SuppressWarnings("unchecked")
+ @Override
+ public O getObject() {
+ return (O) rdfTermFactory.asTerm(quad.getObject(), blankNodePrefix);
+ }
+
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/44031f37/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdTriple.java
----------------------------------------------------------------------
diff --git a/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdTriple.java b/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdTriple.java
index 49e95e3..a14dbb4 100644
--- a/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdTriple.java
+++ b/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdTriple.java
@@ -26,30 +26,11 @@ import org.apache.commons.rdf.api.Triple;
import com.github.jsonldjava.core.RDFDataset.Quad;
-final class JsonLdTriple implements Triple {
- private final Quad quad;
- private String blankNodePrefix;
-
- private static JsonLdRDFTermFactory rdfTermFactory = new JsonLdRDFTermFactory();
+final class JsonLdTriple extends JsonLdQuadLike<BlankNodeOrIRI, IRI, RDFTerm, RDFTerm>
+ implements Triple {
JsonLdTriple(Quad quad, String blankNodePrefix) {
- this.quad = quad;
- this.blankNodePrefix = blankNodePrefix;
- }
-
- @Override
- public BlankNodeOrIRI getSubject() {
- return (BlankNodeOrIRI) rdfTermFactory.asTerm(quad.getSubject(), blankNodePrefix);
- }
-
- @Override
- public IRI getPredicate() {
- return (IRI) rdfTermFactory.asTerm(quad.getPredicate(), blankNodePrefix);
- }
-
- @Override
- public RDFTerm getObject() {
- return rdfTermFactory.asTerm(quad.getObject(), blankNodePrefix);
+ super(quad, blankNodePrefix);
}
@Override
[45/50] incubator-commonsrdf git commit: Merge branch 'master' into
jsonld-java
Posted by st...@apache.org.
Merge branch 'master' into jsonld-java
Project: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/commit/06a44b9f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/tree/06a44b9f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/diff/06a44b9f
Branch: refs/heads/jsonld-java
Commit: 06a44b9fb1756f9670abc14d605255b6abd7ae52
Parents: a2e482f 9782a58
Author: Stian Soiland-Reyes <st...@apache.org>
Authored: Thu Sep 8 15:32:31 2016 +0100
Committer: Stian Soiland-Reyes <st...@apache.org>
Committed: Thu Sep 8 15:32:31 2016 +0100
----------------------------------------------------------------------
LICENSE-header.txt | 16 +
RELEASE-NOTES.txt | 39 ++
RELEASE-PROCESS.md | 36 ++
api/pom.xml | 7 +-
.../org/apache/commons/rdf/api/Dataset.java | 338 ++++++++++++++++
.../java/org/apache/commons/rdf/api/Graph.java | 40 +-
.../org/apache/commons/rdf/api/GraphLike.java | 113 ++++++
.../java/org/apache/commons/rdf/api/Quad.java | 213 ++++++++++
.../org/apache/commons/rdf/api/QuadLike.java | 69 ++++
.../apache/commons/rdf/api/RDFTermFactory.java | 41 ++
.../java/org/apache/commons/rdf/api/Triple.java | 4 +-
.../org/apache/commons/rdf/api/TripleLike.java | 71 ++++
api/src/site/resources/profile.jacoco | 0
api/src/site/resources/profile.japicmp | 0
.../commons/rdf/api/AbstractGraphTest.java | 192 ++++++++-
.../rdf/api/AbstractRDFTermFactoryTest.java | 29 ++
examples/pom.xml | 4 +-
examples/src/example/UserGuideTest.java | 1 +
pom.xml | 400 +++++++++++--------
simple/pom.xml | 3 +-
.../commons/rdf/simple/BlankNodeImpl.java | 3 +-
.../commons/rdf/simple/DatasetGraphView.java | 138 +++++++
.../apache/commons/rdf/simple/DatasetImpl.java | 221 ++++++++++
.../apache/commons/rdf/simple/GraphImpl.java | 30 +-
.../org/apache/commons/rdf/simple/IRIImpl.java | 2 +-
.../apache/commons/rdf/simple/LiteralImpl.java | 2 +-
.../org/apache/commons/rdf/simple/QuadImpl.java | 109 +++++
.../rdf/simple/SimpleRDFTermFactory.java | 25 ++
.../org/apache/commons/rdf/simple/Types.java | 2 +-
simple/src/site/resources/profile.jacoco | 0
simple/src/site/resources/profile.japicmp | 0
.../commons/rdf/simple/TestWritingGraph.java | 8 +-
src/assembly/src.xml | 45 +++
src/conf/checkstyle-suppressions.xml | 32 ++
src/conf/checkstyle.xml | 197 +++++++++
src/conf/findbugs-exclude-filter.xml | 27 ++
src/conf/pmd.xml | 25 ++
src/main/assembly/src.xml | 44 --
src/site/markdown/download.md | 34 +-
src/site/markdown/implementations.md | 63 ++-
src/site/markdown/index.md | 58 ++-
src/site/markdown/userguide.md | 60 ++-
src/site/resources/images/class-diagram.nomnoml | 49 ++-
src/site/resources/images/class-diagram.png | Bin 57632 -> 56161 bytes
src/site/site.xml | 3 +-
45 files changed, 2470 insertions(+), 323 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/06a44b9f/pom.xml
----------------------------------------------------------------------
[07/50] incubator-commonsrdf git commit: Set new development version
to 0.3.0-incubating
Posted by st...@apache.org.
Set new development version to 0.3.0-incubating
Project: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/commit/0d92cecb
Tree: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/tree/0d92cecb
Diff: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/diff/0d92cecb
Branch: refs/heads/jsonld-java
Commit: 0d92cecb383a1191f6e4eca4d292e3795d989273
Parents: 733359b
Author: Lewis John McGibbney <le...@gmail.com>
Authored: Thu Apr 28 16:39:18 2016 -0700
Committer: Lewis John McGibbney <le...@gmail.com>
Committed: Thu Apr 28 16:39:18 2016 -0700
----------------------------------------------------------------------
api/pom.xml | 2 +-
pom.xml | 2 +-
simple/pom.xml | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/0d92cecb/api/pom.xml
----------------------------------------------------------------------
diff --git a/api/pom.xml b/api/pom.xml
index bc8e506..42ad43b 100644
--- a/api/pom.xml
+++ b/api/pom.xml
@@ -24,7 +24,7 @@
<parent>
<groupId>org.apache.commons</groupId>
<artifactId>commons-rdf-parent</artifactId>
- <version>0.2.0-incubating</version>
+ <version>0.3.0-incubating</version>
</parent>
<artifactId>commons-rdf-api</artifactId>
http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/0d92cecb/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 76a24bb..31b80f1 100644
--- a/pom.xml
+++ b/pom.xml
@@ -29,7 +29,7 @@
<groupId>org.apache.commons</groupId>
<artifactId>commons-rdf-parent</artifactId>
- <version>0.2.0-incubating</version>
+ <version>0.3.0-incubating</version>
<packaging>pom</packaging>
<name>Commons RDF</name>
http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/0d92cecb/simple/pom.xml
----------------------------------------------------------------------
diff --git a/simple/pom.xml b/simple/pom.xml
index 170716a..773580d 100644
--- a/simple/pom.xml
+++ b/simple/pom.xml
@@ -24,7 +24,7 @@
<parent>
<groupId>org.apache.commons</groupId>
<artifactId>commons-rdf-parent</artifactId>
- <version>0.2.0-incubating</version>
+ <version>0.3.0-incubating</version>
</parent>
<artifactId>commons-rdf-simple</artifactId>
[03/50] incubator-commonsrdf git commit: Prepare Commons RDF for
0.2.0-incubating RC#1
Posted by st...@apache.org.
Prepare Commons RDF for 0.2.0-incubating RC#1
Project: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/commit/476b030d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/tree/476b030d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/diff/476b030d
Branch: refs/heads/jsonld-java
Commit: 476b030da801c273dc659fc39acececba1afe0dd
Parents: 144c362
Author: Lewis John McGibbney <le...@jpl.nasa.gov>
Authored: Thu Apr 28 15:58:33 2016 -0700
Committer: Lewis John McGibbney <le...@jpl.nasa.gov>
Committed: Thu Apr 28 15:58:33 2016 -0700
----------------------------------------------------------------------
src/site/markdown/download.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/476b030d/src/site/markdown/download.md
----------------------------------------------------------------------
diff --git a/src/site/markdown/download.md b/src/site/markdown/download.md
index 2eb2e32..f2617cb 100644
--- a/src/site/markdown/download.md
+++ b/src/site/markdown/download.md
@@ -81,7 +81,7 @@ ASF Distribution Directory [incubator/commonsrdf](https://www.apache.org/dyn/clo
[sha1](https://dist.apache.org/repos/dist/release/incubator/commonsrdf/0.2.0-incubating/apache-commons-rdf-0.2.0-incubating-src.tar.gz.sha1))
After downloading the files, check the signatures using the following [KEYS](https://dist.apache.org/repos/dist/release/incubator/commonsrdf/KEYS)
-file. The [changelog](https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=12316620&version=12332057)
+file. The [changelog](https://s.apache.org/0.2.0-incubating)
is available from the [Apache Commons RDF Jira](https://issues.apache.org/jira/browse/COMMONSRDF).
### Previous Releases
[30/50] incubator-commonsrdf git commit: Added DatasetGraphView
Posted by st...@apache.org.
Added DatasetGraphView
Project: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/commit/580484c9
Tree: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/tree/580484c9
Diff: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/diff/580484c9
Branch: refs/heads/jsonld-java
Commit: 580484c9d7d02d34b64e5276744c1f644dbbd2f2
Parents: 14e505e
Author: Stian Soiland-Reyes <st...@apache.org>
Authored: Tue Jun 14 16:44:24 2016 +0100
Committer: Stian Soiland-Reyes <st...@apache.org>
Committed: Tue Jun 14 16:44:24 2016 +0100
----------------------------------------------------------------------
.../commons/rdf/simple/DatasetGraphView.java | 138 +++++++++++++++++++
.../apache/commons/rdf/simple/DatasetImpl.java | 8 +-
2 files changed, 139 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/580484c9/simple/src/main/java/org/apache/commons/rdf/simple/DatasetGraphView.java
----------------------------------------------------------------------
diff --git a/simple/src/main/java/org/apache/commons/rdf/simple/DatasetGraphView.java b/simple/src/main/java/org/apache/commons/rdf/simple/DatasetGraphView.java
new file mode 100644
index 0000000..a347c3e
--- /dev/null
+++ b/simple/src/main/java/org/apache/commons/rdf/simple/DatasetGraphView.java
@@ -0,0 +1,138 @@
+/**
+ * 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.
+ */
+package org.apache.commons.rdf.simple;
+
+import java.util.Optional;
+import java.util.stream.Stream;
+
+import org.apache.commons.rdf.api.BlankNode;
+import org.apache.commons.rdf.api.BlankNodeOrIRI;
+import org.apache.commons.rdf.api.Dataset;
+import org.apache.commons.rdf.api.Graph;
+import org.apache.commons.rdf.api.IRI;
+import org.apache.commons.rdf.api.Quad;
+import org.apache.commons.rdf.api.RDFTerm;
+import org.apache.commons.rdf.api.Triple;
+
+/**
+ * A {@link Graph} view on a {@link Dataset}.
+ * <p>
+ * This view is backed by a {@link Dataset}, and can be constructed in two ways:
+ *
+ * <dl>
+ * <dt>{@link #DatasetGraphView(Dataset)}</dt>
+ * <dd>Expose a <em>union graph</em> view of the Dataset, where all the
+ * {@link Quad}s of the Dataset is represented as a {@link Triple}. Adding
+ * triples will add them to the <em>default graph</em>, while removing triples
+ * will remove from all graphs.</dd>
+*
+ * <dt>{@link #DatasetGraphView(Dataset, IRI)}</dt>
+ * <dd>Expose a particular graph of the Dataset, either named by an {@link IRI}, a
+ * {@link BlankNode}, or <code>null</code> for the <em>default graph</em>.</dd>
+ * </dl>
+ * <p>
+ * Changes in the Graph are reflected directly in the Dataset and vice versa.
+ * This class is thread-safe is the underlying Dataset is thread-safe.
+ */
+public class DatasetGraphView implements Graph {
+
+ private final boolean unionGraph;
+ private final BlankNodeOrIRI namedGraph;
+ private final Dataset dataset;
+
+ public DatasetGraphView(Dataset dataset) {
+ this.dataset = dataset;
+ this.namedGraph = null;
+ this.unionGraph = true;
+ }
+
+ public DatasetGraphView(Dataset dataset, BlankNodeOrIRI namedGraph) {
+ this.dataset = dataset;
+ this.namedGraph = namedGraph;
+ this.unionGraph = false;
+ }
+
+ @Override
+ public void close() throws Exception {
+ dataset.close();
+
+ }
+
+ @Override
+ public void add(Triple triple) {
+ dataset.add(namedGraph, triple.getSubject(), triple.getPredicate(), triple.getObject());
+ }
+
+ @Override
+ public void add(BlankNodeOrIRI subject, IRI predicate, RDFTerm object) {
+ dataset.add(namedGraph, subject, predicate, object);
+ }
+
+ @Override
+ public boolean contains(Triple triple) {
+ return dataset.contains(unionOrNamedGraph(), triple.getSubject(), triple.getPredicate(), triple.getObject());
+ }
+
+ private Optional<BlankNodeOrIRI> unionOrNamedGraph() {
+ if (unionGraph) {
+ return null;
+ }
+ return Optional.ofNullable(namedGraph);
+ }
+
+ @Override
+ public boolean contains(BlankNodeOrIRI subject, IRI predicate, RDFTerm object) {
+ return dataset.contains(unionOrNamedGraph(), subject, predicate, object);
+ }
+
+ @Override
+ public void remove(Triple triple) {
+ dataset.remove(unionOrNamedGraph(), triple.getSubject(), triple.getPredicate(), triple.getObject());
+ }
+
+ @Override
+ public void remove(BlankNodeOrIRI subject, IRI predicate, RDFTerm object) {
+ dataset.remove(unionOrNamedGraph(), subject, predicate, object);
+ }
+
+ @Override
+ public void clear() {
+ dataset.remove(unionOrNamedGraph(), null, null, null);
+ }
+
+ @Override
+ public long size() {
+ return stream().count();
+ }
+
+ @Override
+ public Stream<? extends Triple> stream() {
+ return stream(null, null, null);
+ }
+
+ @Override
+ public Stream<? extends Triple> stream(BlankNodeOrIRI subject, IRI predicate, RDFTerm object) {
+ Stream<Triple> stream = dataset.stream(unionOrNamedGraph(), subject, predicate, object).map(Quad::asTriple);
+ if (unionGraph) {
+ // remove duplicates
+ return stream.distinct();
+ }
+ return stream;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/580484c9/simple/src/main/java/org/apache/commons/rdf/simple/DatasetImpl.java
----------------------------------------------------------------------
diff --git a/simple/src/main/java/org/apache/commons/rdf/simple/DatasetImpl.java b/simple/src/main/java/org/apache/commons/rdf/simple/DatasetImpl.java
index 9de358f..c372012 100644
--- a/simple/src/main/java/org/apache/commons/rdf/simple/DatasetImpl.java
+++ b/simple/src/main/java/org/apache/commons/rdf/simple/DatasetImpl.java
@@ -204,13 +204,7 @@ final class DatasetImpl implements Dataset {
@Override
public Optional<Graph> getGraph(BlankNodeOrIRI graphName) {
- // NOTE: Always returns a new copy
- Graph g = new GraphImpl(factory);
- stream(Optional.ofNullable(graphName), null, null, null)
- .map(Quad::asTriple)
- .sequential()
- .forEach(g::add);
- return Optional.of(g);
+ return Optional.of(new DatasetGraphView(this, graphName));
}
@Override
[04/50] incubator-commonsrdf git commit: [maven-release-plugin]
prepare release 0.2.0-incubating
Posted by st...@apache.org.
[maven-release-plugin] prepare release 0.2.0-incubating
Project: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/commit/f02b6bdd
Tree: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/tree/f02b6bdd
Diff: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/diff/f02b6bdd
Branch: refs/heads/jsonld-java
Commit: f02b6bdd3ecd515542cd54c81f3639630ab85ff7
Parents: 476b030
Author: Lewis John McGibbney <le...@jpl.nasa.gov>
Authored: Thu Apr 28 16:04:46 2016 -0700
Committer: Lewis John McGibbney <le...@jpl.nasa.gov>
Committed: Thu Apr 28 16:04:46 2016 -0700
----------------------------------------------------------------------
api/pom.xml | 2 +-
pom.xml | 4 ++--
simple/pom.xml | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/f02b6bdd/api/pom.xml
----------------------------------------------------------------------
diff --git a/api/pom.xml b/api/pom.xml
index 31f4275..bc8e506 100644
--- a/api/pom.xml
+++ b/api/pom.xml
@@ -24,7 +24,7 @@
<parent>
<groupId>org.apache.commons</groupId>
<artifactId>commons-rdf-parent</artifactId>
- <version>0.2.0-incubating-SNAPSHOT</version>
+ <version>0.2.0-incubating</version>
</parent>
<artifactId>commons-rdf-api</artifactId>
http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/f02b6bdd/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 6ed249b..b1ee489 100644
--- a/pom.xml
+++ b/pom.xml
@@ -29,7 +29,7 @@
<groupId>org.apache.commons</groupId>
<artifactId>commons-rdf-parent</artifactId>
- <version>0.2.0-incubating-SNAPSHOT</version>
+ <version>0.2.0-incubating</version>
<packaging>pom</packaging>
<name>Commons RDF</name>
@@ -66,7 +66,7 @@
<url>https://git-wip-us.apache.org/repos/asf/incubator-commonsrdf.git</url>
<connection>scm:git:https://git-wip-us.apache.org/repos/asf/incubator-commonsrdf.git</connection>
<developerConnection>scm:git:https://git-wip-us.apache.org/repos/asf/incubator-commonsrdf.git</developerConnection>
- <tag>HEAD</tag>
+ <tag>0.2.0-incubating</tag>
</scm>
<issueManagement>
http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/f02b6bdd/simple/pom.xml
----------------------------------------------------------------------
diff --git a/simple/pom.xml b/simple/pom.xml
index ecd5cd3..170716a 100644
--- a/simple/pom.xml
+++ b/simple/pom.xml
@@ -24,7 +24,7 @@
<parent>
<groupId>org.apache.commons</groupId>
<artifactId>commons-rdf-parent</artifactId>
- <version>0.2.0-incubating-SNAPSHOT</version>
+ <version>0.2.0-incubating</version>
</parent>
<artifactId>commons-rdf-simple</artifactId>
[16/50] incubator-commonsrdf git commit: complemented release process
Posted by st...@apache.org.
complemented release process
Project: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/commit/471b80c2
Tree: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/tree/471b80c2
Diff: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/diff/471b80c2
Branch: refs/heads/jsonld-java
Commit: 471b80c232ef8aa52df691c8c7744be070c8844b
Parents: ae3103a
Author: Sergio Fern�ndez <wi...@apache.org>
Authored: Thu May 12 17:20:49 2016 -0700
Committer: Sergio Fern�ndez <wi...@apache.org>
Committed: Thu May 12 17:20:49 2016 -0700
----------------------------------------------------------------------
RELEASE-PROCESS.md | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/471b80c2/RELEASE-PROCESS.md
----------------------------------------------------------------------
diff --git a/RELEASE-PROCESS.md b/RELEASE-PROCESS.md
index 1aa08b1..9a96c25 100644
--- a/RELEASE-PROCESS.md
+++ b/RELEASE-PROCESS.md
@@ -3,7 +3,13 @@
1. Clean build: `mvn clean install`
2. RAT checking: `mvn apache-rat:check`
3. Prepare the release: `mvn release:prepare -DreleaseVersion=0.2.0-incubating -DdevelopmentVersion=0.3.0-incubating-SNAPSHOT -DautoVersionSubmodules=true`
-4. Perform the release: `mvn release:perform`
+4. Perform the release: `mvn release:perform -Prelease`
5. Close the staging repository at https://repository.apache.org/#stagingRepositories
6. Push the code: `git push` and tag `git push --tags`
-6. Cast the vote mail to dev@commonsrdf
+7. Cast the vote mail to dev@commonsrdf
+
+Notice that the `maven-release-plugin` is configured to use the local git repository as well as not push changes
+to `origin`. Therefore the process can be reverted (e.g., `git reset HEAD~1`) at any time before the sixth step.
+
+Acknowledgements to the [Marmotta's release process](https://wiki.apache.org/marmotta/ReleaseProcess) that heavily
+inspired this one.
[06/50] incubator-commonsrdf git commit: Update version numbers for
commonsrdf for release 0.2.0-incubating
Posted by st...@apache.org.
Update version numbers for commonsrdf for release 0.2.0-incubating
Project: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/commit/733359b9
Tree: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/tree/733359b9
Diff: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/diff/733359b9
Branch: refs/heads/jsonld-java
Commit: 733359b94b2f716a36c092e2fb05034ffdd0ba80
Parents: beaeea3
Author: Lewis John McGibbney <le...@jpl.nasa.gov>
Authored: Thu Apr 28 16:26:25 2016 -0700
Committer: Lewis John McGibbney <le...@jpl.nasa.gov>
Committed: Thu Apr 28 16:26:25 2016 -0700
----------------------------------------------------------------------
api/pom.xml | 2 +-
pom.xml | 2 +-
simple/pom.xml | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/733359b9/api/pom.xml
----------------------------------------------------------------------
diff --git a/api/pom.xml b/api/pom.xml
index 46564b6..bc8e506 100644
--- a/api/pom.xml
+++ b/api/pom.xml
@@ -24,7 +24,7 @@
<parent>
<groupId>org.apache.commons</groupId>
<artifactId>commons-rdf-parent</artifactId>
- <version>0.2.1-incubating-SNAPSHOT</version>
+ <version>0.2.0-incubating</version>
</parent>
<artifactId>commons-rdf-api</artifactId>
http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/733359b9/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 3b17b0d..76a24bb 100644
--- a/pom.xml
+++ b/pom.xml
@@ -29,7 +29,7 @@
<groupId>org.apache.commons</groupId>
<artifactId>commons-rdf-parent</artifactId>
- <version>0.2.1-incubating-SNAPSHOT</version>
+ <version>0.2.0-incubating</version>
<packaging>pom</packaging>
<name>Commons RDF</name>
http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/733359b9/simple/pom.xml
----------------------------------------------------------------------
diff --git a/simple/pom.xml b/simple/pom.xml
index e12c80a..170716a 100644
--- a/simple/pom.xml
+++ b/simple/pom.xml
@@ -24,7 +24,7 @@
<parent>
<groupId>org.apache.commons</groupId>
<artifactId>commons-rdf-parent</artifactId>
- <version>0.2.1-incubating-SNAPSHOT</version>
+ <version>0.2.0-incubating</version>
</parent>
<artifactId>commons-rdf-simple</artifactId>
[17/50] incubator-commonsrdf git commit: Use 0.2.0-incubating
Posted by st...@apache.org.
Use 0.2.0-incubating
Project: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/commit/5f9b27ce
Tree: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/tree/5f9b27ce
Diff: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/diff/5f9b27ce
Branch: refs/heads/jsonld-java
Commit: 5f9b27ce872d3bd85df25b257c85eac0c999b867
Parents: 471b80c
Author: Stian Soiland-Reyes <st...@apache.org>
Authored: Fri May 13 14:21:39 2016 +0100
Committer: Stian Soiland-Reyes <st...@apache.org>
Committed: Fri May 13 14:21:39 2016 +0100
----------------------------------------------------------------------
examples/pom.xml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/5f9b27ce/examples/pom.xml
----------------------------------------------------------------------
diff --git a/examples/pom.xml b/examples/pom.xml
index 9ed3b90..4b61cf7 100644
--- a/examples/pom.xml
+++ b/examples/pom.xml
@@ -50,13 +50,13 @@
<groupId>org.apache.commons</groupId>
<artifactId>commons-rdf-api</artifactId>
<!-- update to latest version -->
- <version>0.1-incubating-SNAPSHOT</version>
+ <version>0.2.0-incubating</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-rdf-simple</artifactId>
<!-- update to latest version -->
- <version>0.1.0-incubating-SNAPSHOT</version>
+ <version>0.2.0-incubating</version>
</dependency>
<dependency>
<groupId>junit</groupId>
[29/50] incubator-commonsrdf git commit: Include @Deprecated
getTriples()
Posted by st...@apache.org.
Include @Deprecated getTriples()
The default implementation calls .stream()
.. and @since for new Quad features
Project: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/commit/14e505e3
Tree: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/tree/14e505e3
Diff: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/diff/14e505e3
Branch: refs/heads/jsonld-java
Commit: 14e505e33d10b72fc22efd5c7952ad63f16f2393
Parents: 14f246e
Author: Stian Soiland-Reyes <st...@apache.org>
Authored: Thu Jun 2 17:30:50 2016 +0100
Committer: Stian Soiland-Reyes <st...@apache.org>
Committed: Thu Jun 2 17:31:05 2016 +0100
----------------------------------------------------------------------
.../java/org/apache/commons/rdf/api/Graph.java | 30 ++++++++++++++++++--
.../org/apache/commons/rdf/api/GraphLike.java | 1 +
.../java/org/apache/commons/rdf/api/Quad.java | 1 +
.../org/apache/commons/rdf/api/QuadLike.java | 1 +
.../org/apache/commons/rdf/api/TripleLike.java | 1 +
.../commons/rdf/api/AbstractGraphTest.java | 4 +--
6 files changed, 33 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/14e505e3/api/src/main/java/org/apache/commons/rdf/api/Graph.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/org/apache/commons/rdf/api/Graph.java b/api/src/main/java/org/apache/commons/rdf/api/Graph.java
index 42ced98..6106bab 100644
--- a/api/src/main/java/org/apache/commons/rdf/api/Graph.java
+++ b/api/src/main/java/org/apache/commons/rdf/api/Graph.java
@@ -125,11 +125,12 @@ public interface Graph extends AutoCloseable,GraphLike<Triple, BlankNodeOrIRI, I
* <p>
* Implementations may throw {@link ConcurrentModificationException} from Stream
* methods if they detect a conflict while the Stream is active.
- *
+ *
+ * @since 0.3.0-incubating
* @return A {@link Stream} over all of the triples in the graph
*/
Stream<? extends Triple> stream();
-
+
/**
* Get all triples contained by the graph matched with the pattern.
* <p>
@@ -142,7 +143,9 @@ public interface Graph extends AutoCloseable,GraphLike<Triple, BlankNodeOrIRI, I
* <p>
* Implementations may throw {@link ConcurrentModificationException} from Stream
* methods if they detect a conflict while the Stream is active.
- *
+ * <p>
+ *
+ * @since 0.3.0-incubating
* @param subject The triple subject (null is a wildcard)
* @param predicate The triple predicate (null is a wildcard)
* @param object The triple object (null is a wildcard)
@@ -152,6 +155,27 @@ public interface Graph extends AutoCloseable,GraphLike<Triple, BlankNodeOrIRI, I
RDFTerm object);
/**
+ * This method is deprecated, use the equivalent method
+ * {@link #stream()} instead.
+ *
+ */
+ @Deprecated
+ default Stream<? extends Triple> getTriples() {
+ return stream();
+ }
+
+ /**
+ * This method is deprecated, use the equivalent method
+ * {@link #stream(BlankNodeOrIRI, IRI, RDFTerm)} instead.
+ *
+ */
+ @Deprecated
+ default Stream<? extends Triple> getTriples(BlankNodeOrIRI subject, IRI predicate,
+ RDFTerm object) {
+ return stream(subject, predicate, object);
+ }
+
+ /**
* Get an Iterable for iterating over all triples in the graph.
* <p>
* This method is meant to be used with a Java for-each loop, e.g.:
http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/14e505e3/api/src/main/java/org/apache/commons/rdf/api/GraphLike.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/org/apache/commons/rdf/api/GraphLike.java b/api/src/main/java/org/apache/commons/rdf/api/GraphLike.java
index 28c2f10..c68278e 100644
--- a/api/src/main/java/org/apache/commons/rdf/api/GraphLike.java
+++ b/api/src/main/java/org/apache/commons/rdf/api/GraphLike.java
@@ -31,6 +31,7 @@ import java.util.stream.Stream;
* include semantics like {@link #size()} or the requirement of mapping
* {@link RDFTerm} instances from different implementations.
*
+ * @since 0.3.0-incubating
* @see Graph
* @see Dataset
* @see TripleLike
http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/14e505e3/api/src/main/java/org/apache/commons/rdf/api/Quad.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/org/apache/commons/rdf/api/Quad.java b/api/src/main/java/org/apache/commons/rdf/api/Quad.java
index 348595b..5a67571 100644
--- a/api/src/main/java/org/apache/commons/rdf/api/Quad.java
+++ b/api/src/main/java/org/apache/commons/rdf/api/Quad.java
@@ -28,6 +28,7 @@ import java.util.Optional;
* Concepts and Abstract Syntax</a>, a W3C Working Group Note published on 25
* February 2014.
*
+ * @since 0.3.0-incubating
* @see <a href="http://www.w3.org/TR/2014/NOTE-rdf11-datasets-20140225/">RDF
* 1.1: On Semantics of RDF Datasets</a>
* @see <a href="http://www.w3.org/TR/rdf11-concepts/#section-dataset"> </a>
http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/14e505e3/api/src/main/java/org/apache/commons/rdf/api/QuadLike.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/org/apache/commons/rdf/api/QuadLike.java b/api/src/main/java/org/apache/commons/rdf/api/QuadLike.java
index 7ed7255..9c42465 100644
--- a/api/src/main/java/org/apache/commons/rdf/api/QuadLike.java
+++ b/api/src/main/java/org/apache/commons/rdf/api/QuadLike.java
@@ -33,6 +33,7 @@ import java.util.Optional;
* name {@link G}.
* <p>
*
+ * @since 0.3.0-incubating
* @see Quad
*/
public interface QuadLike<S extends RDFTerm, P extends RDFTerm, O extends RDFTerm, G extends RDFTerm>
http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/14e505e3/api/src/main/java/org/apache/commons/rdf/api/TripleLike.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/org/apache/commons/rdf/api/TripleLike.java b/api/src/main/java/org/apache/commons/rdf/api/TripleLike.java
index c061cc7..2fbeb11 100644
--- a/api/src/main/java/org/apache/commons/rdf/api/TripleLike.java
+++ b/api/src/main/java/org/apache/commons/rdf/api/TripleLike.java
@@ -29,6 +29,7 @@ package org.apache.commons.rdf.api;
* Implementations should specialise which {@link RDFTerm} subclasses they
* return for subject {@link S}, predicate {@link P} and object {@link O}.
*
+ * @since 0.3.0-incubating
* @see Triple
* @see Quad
* @see QuadLike
http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/14e505e3/api/src/test/java/org/apache/commons/rdf/api/AbstractGraphTest.java
----------------------------------------------------------------------
diff --git a/api/src/test/java/org/apache/commons/rdf/api/AbstractGraphTest.java b/api/src/test/java/org/apache/commons/rdf/api/AbstractGraphTest.java
index 27b9ff4..67191de 100644
--- a/api/src/test/java/org/apache/commons/rdf/api/AbstractGraphTest.java
+++ b/api/src/test/java/org/apache/commons/rdf/api/AbstractGraphTest.java
@@ -296,7 +296,7 @@ public abstract class AbstractGraphTest {
// look up BlankNodes by name
IRI name = factory.createIRI("http://xmlns.com/foaf/0.1/name");
- g3.getTriples(null, name, null).parallel().forEach( t ->
+ g3.stream(null, name, null).parallel().forEach( t ->
whoIsWho.put( t.getObject().ntriplesString(), t.getSubject()));
assertEquals(4, whoIsWho.size());
@@ -361,7 +361,7 @@ public abstract class AbstractGraphTest {
// unordered() as we don't need to preserve triple order
// sequential() as we don't (currently) require target Graph to be thread-safe
- source.getTriples().unordered().sequential().forEach(t -> target.add(t));
+ source.stream().unordered().sequential().forEach(t -> target.add(t));
}
/**
[38/50] incubator-commonsrdf git commit: javadoc tweaks
Posted by st...@apache.org.
javadoc tweaks
Project: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/commit/4e7f2617
Tree: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/tree/4e7f2617
Diff: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/diff/4e7f2617
Branch: refs/heads/jsonld-java
Commit: 4e7f26179615ece7f0a3c38eb33d00309e430a8a
Parents: 7500084
Author: Stian Soiland-Reyes <st...@apache.org>
Authored: Tue Sep 6 16:07:19 2016 +0100
Committer: Stian Soiland-Reyes <st...@apache.org>
Committed: Tue Sep 6 16:07:19 2016 +0100
----------------------------------------------------------------------
api/src/main/java/org/apache/commons/rdf/api/GraphLike.java | 6 +++---
api/src/main/java/org/apache/commons/rdf/api/Quad.java | 2 ++
api/src/main/java/org/apache/commons/rdf/api/QuadLike.java | 6 ++++--
.../main/java/org/apache/commons/rdf/api/RDFTermFactory.java | 1 +
api/src/main/java/org/apache/commons/rdf/api/Triple.java | 2 ++
api/src/main/java/org/apache/commons/rdf/api/TripleLike.java | 6 ++++--
6 files changed, 16 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/4e7f2617/api/src/main/java/org/apache/commons/rdf/api/GraphLike.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/org/apache/commons/rdf/api/GraphLike.java b/api/src/main/java/org/apache/commons/rdf/api/GraphLike.java
index bd37510..f8d052f 100644
--- a/api/src/main/java/org/apache/commons/rdf/api/GraphLike.java
+++ b/api/src/main/java/org/apache/commons/rdf/api/GraphLike.java
@@ -26,9 +26,9 @@ import java.util.stream.Stream;
* Extended by {@link Graph} (for {@link Triple}) and {@link Dataset} (for
* {@link Quad}).
* <p>
- * Unlike {@link Graph} and {@link Dataset}, this interface can support with
- * generalised {@link TripleLike} or {@link QuadLike} statements, and does not
- * include semantics like {@link #size()} or the requirement of mapping
+ * Unlike {@link Graph} and {@link Dataset}, this interface can support
+ * generalised {@link TripleLike} or {@link QuadLike} statements, but does not
+ * imply semantics like {@link #size()} or the requirement of mapping
* {@link RDFTerm} instances from different implementations.
* <p>
* As {@link TripleLike} do not have a specific {@link Object#equals(Object)}
http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/4e7f2617/api/src/main/java/org/apache/commons/rdf/api/Quad.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/org/apache/commons/rdf/api/Quad.java b/api/src/main/java/org/apache/commons/rdf/api/Quad.java
index 679000b..951f593 100644
--- a/api/src/main/java/org/apache/commons/rdf/api/Quad.java
+++ b/api/src/main/java/org/apache/commons/rdf/api/Quad.java
@@ -29,6 +29,8 @@ import java.util.Optional;
* February 2014.
*
* @since 0.3.0-incubating
+ * @see Dataset
+ * @see RDFTermFactory#createQuad(BlankNodeOrIRI,BlankNodeOrIRI,IRI,RDFTerm)
* @see <a href="http://www.w3.org/TR/2014/NOTE-rdf11-datasets-20140225/">RDF
* 1.1: On Semantics of RDF Datasets</a>
* @see <a href="http://www.w3.org/TR/rdf11-concepts/#section-dataset"> </a>
http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/4e7f2617/api/src/main/java/org/apache/commons/rdf/api/QuadLike.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/org/apache/commons/rdf/api/QuadLike.java b/api/src/main/java/org/apache/commons/rdf/api/QuadLike.java
index 3f85862..8de180a 100644
--- a/api/src/main/java/org/apache/commons/rdf/api/QuadLike.java
+++ b/api/src/main/java/org/apache/commons/rdf/api/QuadLike.java
@@ -25,8 +25,10 @@ import java.util.Optional;
* A QuadLike statement has at least a {@link #getSubject()},
* {@link #getPredicate()}, {@link #getObject()} and {@link #getGraphName()},
* but unlike a {@link Quad} does not have a formalised
- * {@link Quad#equals(Object)} semantics, and can allow generalised quads (e.g.
- * a {@link BlankNode} as predicate).
+ * {@link Quad#equals(Object)}
+ * or {@link Quad#hashCode()}
+ * semantics. This interface can also be used for <em>generalised quads</em>
+ * (e.g. a {@link BlankNode} as predicate).
* <p>
* Implementations should specialise which specific {@link RDFTerm} types they
* return for {@link #getSubject()}, {@link #getPredicate()},
http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/4e7f2617/api/src/main/java/org/apache/commons/rdf/api/RDFTermFactory.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/org/apache/commons/rdf/api/RDFTermFactory.java b/api/src/main/java/org/apache/commons/rdf/api/RDFTermFactory.java
index 48605e7..17758b6 100644
--- a/api/src/main/java/org/apache/commons/rdf/api/RDFTermFactory.java
+++ b/api/src/main/java/org/apache/commons/rdf/api/RDFTermFactory.java
@@ -36,6 +36,7 @@ import java.util.Locale;
*
* @see RDFTerm
* @see Graph
+ * @see Quad
*/
public interface RDFTermFactory {
http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/4e7f2617/api/src/main/java/org/apache/commons/rdf/api/Triple.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/org/apache/commons/rdf/api/Triple.java b/api/src/main/java/org/apache/commons/rdf/api/Triple.java
index dcbb509..9375983 100644
--- a/api/src/main/java/org/apache/commons/rdf/api/Triple.java
+++ b/api/src/main/java/org/apache/commons/rdf/api/Triple.java
@@ -25,6 +25,8 @@ import java.util.Objects;
* >RDF-1.1 Concepts and Abstract Syntax</a>, a W3C Recommendation published on
* 25 February 2014.<br>
*
+ * @see Quad
+ * @see RDFTermFactory#createTriple(BlankNodeOrIRI,IRI,RDFTerm)
* @see <a href= "http://www.w3.org/TR/rdf11-concepts/#dfn-rdf-triple" >RDF-1.1
* Triple</a>
*/
http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/4e7f2617/api/src/main/java/org/apache/commons/rdf/api/TripleLike.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/org/apache/commons/rdf/api/TripleLike.java b/api/src/main/java/org/apache/commons/rdf/api/TripleLike.java
index 9bead97..55d0380 100644
--- a/api/src/main/java/org/apache/commons/rdf/api/TripleLike.java
+++ b/api/src/main/java/org/apache/commons/rdf/api/TripleLike.java
@@ -23,8 +23,10 @@ package org.apache.commons.rdf.api;
* <p>
* A TripleLike statement has at least a {@link #getSubject()},
* {@link #getPredicate()} and {@link #getObject()}, but unlike a {@link Triple}
- * does not have a formalised {@link Triple#equals(Object)} semantics, and can
- * allow generalised triples (e.g. a {@link BlankNode} as predicate).
+ * does not have a formalised
+ * {@link Triple#equals(Object)} or
+ * {@link Triple#hashCode()} semantics. This interfaced can also be
+ * used for <em>generalised triples</em> (e.g. a {@link BlankNode} as predicate).
* <p>
* Implementations should specialise which specific {@link RDFTerm} types they
* return for {@link #getSubject()}, {@link #getPredicate()} and
[48/50] incubator-commonsrdf git commit: Support for Quad
Posted by st...@apache.org.
Support for Quad
and somewhat generalized Quad
Project: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/commit/a1186976
Tree: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/tree/a1186976
Diff: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/diff/a1186976
Branch: refs/heads/jsonld-java
Commit: a1186976eee3d1a46028b9e80eea275ad56e2fea
Parents: e534598
Author: Stian Soiland-Reyes <st...@apache.org>
Authored: Thu Sep 8 15:53:50 2016 +0100
Committer: Stian Soiland-Reyes <st...@apache.org>
Committed: Thu Sep 8 15:53:50 2016 +0100
----------------------------------------------------------------------
.../commons/rdf/jsonldjava/JsonLdQuad.java | 81 ++++++++++++++++++++
.../rdf/jsonldjava/JsonLdRDFTermFactory.java | 38 ++++++---
2 files changed, 108 insertions(+), 11 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/a1186976/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdQuad.java
----------------------------------------------------------------------
diff --git a/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdQuad.java b/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdQuad.java
new file mode 100644
index 0000000..e8dbfbd
--- /dev/null
+++ b/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdQuad.java
@@ -0,0 +1,81 @@
+/**
+ * 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.
+ */
+package org.apache.commons.rdf.jsonldjava;
+
+import java.util.Objects;
+import java.util.Optional;
+
+import org.apache.commons.rdf.api.BlankNodeOrIRI;
+import org.apache.commons.rdf.api.IRI;
+import org.apache.commons.rdf.api.Quad;
+import org.apache.commons.rdf.api.RDFTerm;
+
+final class JsonLdQuad implements org.apache.commons.rdf.api.Quad {
+ private final com.github.jsonldjava.core.RDFDataset.Quad quad;
+ private String blankNodePrefix;
+
+ private static JsonLdRDFTermFactory rdfTermFactory = new JsonLdRDFTermFactory();
+
+ JsonLdQuad(com.github.jsonldjava.core.RDFDataset.Quad quad, String blankNodePrefix) {
+ this.quad = quad;
+ this.blankNodePrefix = blankNodePrefix;
+ }
+
+ @Override
+ public BlankNodeOrIRI getSubject() {
+ return (BlankNodeOrIRI) rdfTermFactory.asTerm(quad.getSubject(), blankNodePrefix);
+ }
+
+ @Override
+ public IRI getPredicate() {
+ return (IRI) rdfTermFactory.asTerm(quad.getPredicate(), blankNodePrefix);
+ }
+
+ @Override
+ public RDFTerm getObject() {
+ return rdfTermFactory.asTerm(quad.getObject(), blankNodePrefix);
+ }
+
+ @Override
+ public Optional<BlankNodeOrIRI> getGraphName() {
+ BlankNodeOrIRI g = (BlankNodeOrIRI) rdfTermFactory.asTerm(quad.getGraph(),
+ blankNodePrefix);
+ return Optional.ofNullable(g);
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (! (obj instanceof Quad)) {
+ return false;
+ }
+ Quad other = (Quad) obj;
+ return getGraphName().equals(other.getGraphName()) &&
+ getSubject().equals(other.getSubject()) &&
+ getPredicate().equals(other.getPredicate()) &&
+ getObject().equals(other.getObject());
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(getGraphName(), getSubject(), getPredicate(), getObject());
+ }
+
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/a1186976/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdRDFTermFactory.java
----------------------------------------------------------------------
diff --git a/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdRDFTermFactory.java b/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdRDFTermFactory.java
index e07cbae..f57eb86 100644
--- a/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdRDFTermFactory.java
+++ b/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdRDFTermFactory.java
@@ -24,9 +24,12 @@ import org.apache.commons.rdf.api.BlankNodeOrIRI;
import org.apache.commons.rdf.api.Graph;
import org.apache.commons.rdf.api.IRI;
import org.apache.commons.rdf.api.Literal;
+import org.apache.commons.rdf.api.Quad;
+import org.apache.commons.rdf.api.QuadLike;
import org.apache.commons.rdf.api.RDFTerm;
import org.apache.commons.rdf.api.RDFTermFactory;
import org.apache.commons.rdf.api.Triple;
+import org.apache.commons.rdf.api.TripleLike;
import org.apache.commons.rdf.simple.Types;
import com.github.jsonldjava.core.RDFDataset;
@@ -74,6 +77,12 @@ final class JsonLdRDFTermFactory implements RDFTermFactory {
}
@Override
+ public Quad createQuad(BlankNodeOrIRI graphName, BlankNodeOrIRI subject, IRI predicate, RDFTerm object)
+ throws IllegalArgumentException, UnsupportedOperationException {
+ return new JsonLdQuad(asJsonLdQuad(graphName, subject, predicate, object), bnodePrefix);
+ }
+
+ @Override
public Literal createLiteral(String literal) {
return new JsonLdLiteral(new RDFDataset.Literal(literal, null, null));
}
@@ -113,22 +122,29 @@ final class JsonLdRDFTermFactory implements RDFTermFactory {
}
- public RDFDataset.Quad asJsonLdQuad(BlankNodeOrIRI subject, IRI predicate, RDFTerm object) {
+ public RDFDataset.Quad asJsonLdQuad(RDFTerm subject, RDFTerm predicate, RDFTerm object) {
+ return asJsonLdQuad(null, subject, predicate, object);
+ }
+
+ public RDFDataset.Quad asJsonLdQuad(RDFTerm graphName, RDFTerm subject, RDFTerm predicate, RDFTerm object) {
String graph = null;
- // TODO: Add Quad to commons-rdf
-// if (triple instanceof Quad) {
-// String graph = triple.getGraph().getIRIString();
-// }
return new RDFDataset.Quad(asJsonLdNode(subject), asJsonLdNode(predicate), asJsonLdNode(object), graph);
}
-
-
- public RDFDataset.Quad asJsonLdQuad(Triple triple) {
- return asJsonLdQuad(triple.getSubject(), triple.getPredicate(), triple.getObject());
+ @SuppressWarnings("rawtypes")
+ public RDFDataset.Quad asJsonLdQuad(TripleLike tripleOrQuad) {
+ RDFTerm g = null;
+ if (tripleOrQuad instanceof QuadLike) {
+ QuadLike quadLike = (QuadLike) tripleOrQuad;
+ g = (RDFTerm) quadLike.getGraphName().orElse(null);
+ }
+ return asJsonLdQuad(g, tripleOrQuad.getSubject(), tripleOrQuad.getPredicate(), tripleOrQuad.getObject());
}
-
- RDFTerm asTerm(final Node node, String blankNodePrefix) {
+
+ RDFTerm asTerm(final Node node, String blankNodePrefix) {
+ if (node == null) {
+ return null; // e.g. default graph
+ }
if (node.isIRI()) {
return new JsonLdIRI(node);
} else if (node.isBlankNode()) {
[21/50] incubator-commonsrdf git commit: Release process: Remember to
update docs
Posted by st...@apache.org.
Release process: Remember to update docs
Project: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/commit/658fc9bc
Tree: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/tree/658fc9bc
Diff: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/diff/658fc9bc
Branch: refs/heads/jsonld-java
Commit: 658fc9bcbcdb42a7781d5d0199d16c0e857afd3b
Parents: 935cb7f
Author: Stian Soiland-Reyes <st...@apache.org>
Authored: Sun May 15 22:49:51 2016 +0100
Committer: Stian Soiland-Reyes <st...@apache.org>
Committed: Sun May 15 22:49:51 2016 +0100
----------------------------------------------------------------------
RELEASE-PROCESS.md | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/658fc9bc/RELEASE-PROCESS.md
----------------------------------------------------------------------
diff --git a/RELEASE-PROCESS.md b/RELEASE-PROCESS.md
index 9a96c25..22ce224 100644
--- a/RELEASE-PROCESS.md
+++ b/RELEASE-PROCESS.md
@@ -1,12 +1,13 @@
# Commons RDF (incubating) release process
-1. Clean build: `mvn clean install`
-2. RAT checking: `mvn apache-rat:check`
-3. Prepare the release: `mvn release:prepare -DreleaseVersion=0.2.0-incubating -DdevelopmentVersion=0.3.0-incubating-SNAPSHOT -DautoVersionSubmodules=true`
-4. Perform the release: `mvn release:perform -Prelease`
-5. Close the staging repository at https://repository.apache.org/#stagingRepositories
-6. Push the code: `git push` and tag `git push --tags`
-7. Cast the vote mail to dev@commonsrdf
+1. Update documentation (`RELEASE-NOTES.md`, `README.md`, version numbers in `src/site/`)
+2. Clean build: `mvn clean install`
+3. RAT checking: `mvn apache-rat:check`
+4. Prepare the release: `mvn release:prepare -DreleaseVersion=0.2.0-incubating -DdevelopmentVersion=0.3.0-incubating-SNAPSHOT -DautoVersionSubmodules=true`
+5. Perform the release: `mvn release:perform -Prelease`
+6. Close the staging repository at https://repository.apache.org/#stagingRepositories
+7. Push the code: `git push` and tag `git push --tags`
+8. Cast the vote mail to dev@commonsrdf
Notice that the `maven-release-plugin` is configured to use the local git repository as well as not push changes
to `origin`. Therefore the process can be reverted (e.g., `git reset HEAD~1`) at any time before the sixth step.
[25/50] incubator-commonsrdf git commit: TripleOrQuad -> TripleLike,
GraphLike
Posted by st...@apache.org.
TripleOrQuad -> TripleLike, GraphLike
TripleLike is a generalized Triple (e.g. as seen in Jena), supporting
any RDFTerm in any of the subject/predicate/object positions.
This can be useful for parsers, and also serves as a common
super-type for Quad and Triple.
Equivalently, QuadLike extends TripleLike as a generalized Quad, supporting
any RDFTerm as its graphName.
Project: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/commit/bc639bbd
Tree: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/tree/bc639bbd
Diff: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/diff/bc639bbd
Branch: refs/heads/jsonld-java
Commit: bc639bbd3b65ed6802dfdac14a53c9f96162bf32
Parents: 839a642
Author: Stian Soiland-Reyes <st...@apache.org>
Authored: Thu Jun 2 11:41:04 2016 +0100
Committer: Stian Soiland-Reyes <st...@apache.org>
Committed: Thu Jun 2 11:41:04 2016 +0100
----------------------------------------------------------------------
.../java/org/apache/commons/rdf/api/Quad.java | 2 +-
.../org/apache/commons/rdf/api/QuadLike.java | 63 +++++++++++++++++++
.../java/org/apache/commons/rdf/api/Triple.java | 2 +-
.../org/apache/commons/rdf/api/TripleLike.java | 65 ++++++++++++++++++++
.../apache/commons/rdf/api/TripleOrQuad.java | 64 -------------------
5 files changed, 130 insertions(+), 66 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/bc639bbd/api/src/main/java/org/apache/commons/rdf/api/Quad.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/org/apache/commons/rdf/api/Quad.java b/api/src/main/java/org/apache/commons/rdf/api/Quad.java
index 7ccd0d1..fa9298e 100644
--- a/api/src/main/java/org/apache/commons/rdf/api/Quad.java
+++ b/api/src/main/java/org/apache/commons/rdf/api/Quad.java
@@ -32,7 +32,7 @@ import java.util.Optional;
* 1.1: On Semantics of RDF Datasets</a>
* @see <a href="http://www.w3.org/TR/rdf11-concepts/#section-dataset"> </a>
*/
-public interface Quad extends TripleOrQuad {
+public interface Quad extends QuadLike<BlankNodeOrIRI,IRI,RDFTerm,BlankNodeOrIRI> {
/**
* The graph name (graph label) of this quad, if present.
http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/bc639bbd/api/src/main/java/org/apache/commons/rdf/api/QuadLike.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/org/apache/commons/rdf/api/QuadLike.java b/api/src/main/java/org/apache/commons/rdf/api/QuadLike.java
new file mode 100644
index 0000000..a47e32b
--- /dev/null
+++ b/api/src/main/java/org/apache/commons/rdf/api/QuadLike.java
@@ -0,0 +1,63 @@
+/**
+ * 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.
+ */
+package org.apache.commons.rdf.api;
+
+import java.util.Optional;
+
+/**
+ * A generalised "quad-like" interface, extended by {@link Quad}.
+ * <p>
+ * A QuadLike has at least a
+ * {@link #getSubject()}, {@link #getPredicate()} and
+ * {@link #getObject()}, and a {@link #getGraphName()},
+ * but unlike a {@link Quad} does not have a
+ * formalised {@link Quad#equals(Object)} semantics, and allow
+ * generalised quads (e.g. a BlankNode as predicate).
+ * <p>
+ * Implementations should specialise which RDFTerm
+ * subclasses they return for subject {@link S},
+ * predicate {@link P}, object {@link O} and graph name {@link G}.
+ * <p>
+ * @see Quad
+ */
+public interface QuadLike <S extends RDFTerm, P extends RDFTerm, O extends RDFTerm, G extends RDFTerm>
+ extends TripleLike<S,P,O> {
+
+
+ /**
+ * The graph name (graph label) of this quad, if present.
+ *
+ * If {@link Optional#isPresent()}, then the {@link Optional#get()}
+ * indicate the
+ * <a href="https://www.w3.org/TR/rdf11-concepts/#dfn-named-graph">graph
+ * name of this Quad. If the graph name is not present (e.g. the value is
+ * {@link Optional#empty()}), it indicates that this Quad is in the
+ * <a href="https://www.w3.org/TR/rdf11-concepts/#dfn-default-graph">default
+ * graph.
+ *
+ * @return If {@link Optional#isPresent()}, the graph name
+ * of this quad, otherwise. The graph name is typically an
+ * {@link IRI} or {@link BlankNode}.
+ * {@link Optional#empty()}, indicating the default graph.
+ *
+ * @see <a href="https://www.w3.org/TR/rdf11-concepts/#dfn-rdf-dataset">RDF-
+ * 1.1 Dataset</a>
+ */
+ Optional<G> getGraphName();
+
+}
http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/bc639bbd/api/src/main/java/org/apache/commons/rdf/api/Triple.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/org/apache/commons/rdf/api/Triple.java b/api/src/main/java/org/apache/commons/rdf/api/Triple.java
index 0725913..dcbb509 100644
--- a/api/src/main/java/org/apache/commons/rdf/api/Triple.java
+++ b/api/src/main/java/org/apache/commons/rdf/api/Triple.java
@@ -28,7 +28,7 @@ import java.util.Objects;
* @see <a href= "http://www.w3.org/TR/rdf11-concepts/#dfn-rdf-triple" >RDF-1.1
* Triple</a>
*/
-public interface Triple extends TripleOrQuad {
+public interface Triple extends TripleLike<BlankNodeOrIRI, IRI, RDFTerm> {
/**
* The subject of this triple, which may be either a {@link BlankNode} or an
http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/bc639bbd/api/src/main/java/org/apache/commons/rdf/api/TripleLike.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/org/apache/commons/rdf/api/TripleLike.java b/api/src/main/java/org/apache/commons/rdf/api/TripleLike.java
new file mode 100644
index 0000000..1ed75d0
--- /dev/null
+++ b/api/src/main/java/org/apache/commons/rdf/api/TripleLike.java
@@ -0,0 +1,65 @@
+/**
+ * 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.
+ */
+package org.apache.commons.rdf.api;
+
+/**
+ * A generalised "triple-like" interface, extended by {@link Triple} and {@link Quad}.
+ * <p>
+ * A TripleLike has at least a
+ * {@link #getSubject()}, {@link #getPredicate()} and
+ * {@link #getObject()}, but unlike a {@link Triple} does not have a
+ * formalised {@link Triple#equals(Object)} semantics, and allow
+ * generalised triples (e.g. a BlankNode as predicate).
+ * <p>
+ * Implementations should specialise which RDFTerms subclasses
+ * they return for subject, predicate and object.
+ * <p>
+ * @see Triple
+ * @see Quad
+ * @see QuadLike
+ *
+ */
+public interface TripleLike <S extends RDFTerm, P extends RDFTerm, O extends RDFTerm> {
+
+ /**
+ * The subject of this statement.
+ *
+ * @return The subject, typically an {@link IRI} or {@link BlankNode}.
+ * @see <a href="http://www.w3.org/TR/rdf11-concepts/#dfn-subject">RDF-1.1
+ * Triple subject</a>
+ */
+ S getSubject();
+
+ /**
+ * The predicate of this statement.
+ *
+ * @return The predicate, typically an {@link IRI}.
+ * @see <a href="http://www.w3.org/TR/rdf11-concepts/#dfn-predicate">RDF-1.1
+ * Triple predicate</a>
+ */
+ P getPredicate();
+
+ /**
+ * The object of this statement.
+ *
+ * @return The object, typically an {@link IRI}, {@link BlankNode} or {@link Literal}.
+ * @see <a href="http://www.w3.org/TR/rdf11-concepts/#dfn-object">RDF-1.1
+ * Triple object</a>
+ */
+ O getObject();
+}
http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/bc639bbd/api/src/main/java/org/apache/commons/rdf/api/TripleOrQuad.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/org/apache/commons/rdf/api/TripleOrQuad.java b/api/src/main/java/org/apache/commons/rdf/api/TripleOrQuad.java
deleted file mode 100644
index 6a86447..0000000
--- a/api/src/main/java/org/apache/commons/rdf/api/TripleOrQuad.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/**
- * 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.
- */
-package org.apache.commons.rdf.api;
-
-/**
- * Common "triple-like" interface for {@link Triple} and {@link Quad}
- * <p>
- * A TripleOrQuad has at least a
- * {@link #getSubject()}, {@link #getPredicate()} and
- * {@link #getObject()}, but unlike a {@link Triple} does not have a
- * formalised {@link Triple#equals(Object)} semantics, and does not
- * necessarily have a {@link Quad#getGraphName()}
- * <p>
- * Implementations of this interface SHOULD also implement {@link Triple}
- * or {@link Quad}, but MUST NOT implement both interfaces.
- */
-public interface TripleOrQuad {
-
- /**
- * The subject of this triple/quad, which may be either a {@link BlankNode} or an
- * {@link IRI}, which are represented in Commons RDF by the interface
- * {@link BlankNodeOrIRI}.
- *
- * @return The subject {@link BlankNodeOrIRI} of this triple/quad.
- * @see <a href="http://www.w3.org/TR/rdf11-concepts/#dfn-subject">RDF-1.1
- * Triple subject</a>
- */
- BlankNodeOrIRI getSubject();
-
- /**
- * The predicate {@link IRI} of this triple/quad.
- *
- * @return The predicate {@link IRI} of this triple/quad.
- * @see <a href="http://www.w3.org/TR/rdf11-concepts/#dfn-predicate">RDF-1.1
- * Triple predicate</a>
- */
- IRI getPredicate();
-
- /**
- * The object of this triple/quad, which may be either a {@link BlankNode}, an
- * {@link IRI}, or a {@link Literal}, which are represented in Commons RDF
- * by the interface {@link RDFTerm}.
- *
- * @return The object {@link RDFTerm} of this triple/quad.
- * @see <a href="http://www.w3.org/TR/rdf11-concepts/#dfn-object">RDF-1.1
- * Triple object</a>
- */
- RDFTerm getObject();
-}
[47/50] incubator-commonsrdf git commit: 0.3.0-incubating
Posted by st...@apache.org.
0.3.0-incubating
Project: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/commit/e5345984
Tree: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/tree/e5345984
Diff: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/diff/e5345984
Branch: refs/heads/jsonld-java
Commit: e5345984cded1e90dffd059307d776afa0747bb2
Parents: f8b6594
Author: Stian Soiland-Reyes <st...@apache.org>
Authored: Thu Sep 8 15:37:05 2016 +0100
Committer: Stian Soiland-Reyes <st...@apache.org>
Committed: Thu Sep 8 15:37:31 2016 +0100
----------------------------------------------------------------------
jsonld-java/pom.xml | 4 ++--
.../org/apache/commons/rdf/jsonldjava/JsonLdParserBuilder.java | 1 +
2 files changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/e5345984/jsonld-java/pom.xml
----------------------------------------------------------------------
diff --git a/jsonld-java/pom.xml b/jsonld-java/pom.xml
index 1c7ff41..6a4826c 100644
--- a/jsonld-java/pom.xml
+++ b/jsonld-java/pom.xml
@@ -24,7 +24,7 @@
<parent>
<groupId>org.apache.commons</groupId>
<artifactId>commons-rdf-parent</artifactId>
- <version>0.2.0-incubating-SNAPSHOT</version>
+ <version>0.3.0-incubating-SNAPSHOT</version>
</parent>
<artifactId>commons-rdf-jsonld-java</artifactId>
@@ -50,7 +50,7 @@
<groupId>${project.parent.groupId}</groupId>
<artifactId>commons-rdf-simple</artifactId>
<version>${project.version}</version>
- </dependency>
+ </dependency>
<dependency>
<groupId>com.github.jsonld-java</groupId>
<artifactId>jsonld-java</artifactId>
http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/e5345984/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdParserBuilder.java
----------------------------------------------------------------------
diff --git a/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdParserBuilder.java b/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdParserBuilder.java
index 4b6edfe..246e76e 100644
--- a/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdParserBuilder.java
+++ b/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdParserBuilder.java
@@ -32,6 +32,7 @@ import org.apache.commons.rdf.api.RDFParserBuilder;
import org.apache.commons.rdf.api.RDFSyntax;
import org.apache.commons.rdf.api.RDFTermFactory;
import org.apache.commons.rdf.simple.AbstractRDFParserBuilder;
+import org.apache.commons.rdf.simple.AbstractRDFParserBuilder.RDFParseException;
import com.github.jsonldjava.core.JsonLdError;
import com.github.jsonldjava.core.JsonLdOptions;
[28/50] incubator-commonsrdf git commit: Merge branch 'master' into
quad
Posted by st...@apache.org.
Merge branch 'master' into quad
Project: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/commit/14f246e7
Tree: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/tree/14f246e7
Diff: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/diff/14f246e7
Branch: refs/heads/jsonld-java
Commit: 14f246e74cf89ca37efad1360b2bcd142cb60759
Parents: c7e1a5b 058f781
Author: Stian Soiland-Reyes <st...@apache.org>
Authored: Thu Jun 2 17:24:33 2016 +0100
Committer: Stian Soiland-Reyes <st...@apache.org>
Committed: Thu Jun 2 17:24:33 2016 +0100
----------------------------------------------------------------------
RELEASE-NOTES.txt | 39 +++++
RELEASE-PROCESS.md | 16 ++
api/pom.xml | 2 +-
.../commons/rdf/api/AbstractGraphTest.java | 172 +++++++++++++++++++
.../rdf/api/AbstractRDFTermFactoryTest.java | 29 ++++
examples/pom.xml | 4 +-
examples/src/example/UserGuideTest.java | 1 +
pom.xml | 95 +++++-----
simple/pom.xml | 3 +-
src/assembly/src.xml | 45 +++++
src/main/assembly/src.xml | 44 -----
src/site/markdown/download.md | 34 ++--
src/site/markdown/userguide.md | 60 +++++--
13 files changed, 414 insertions(+), 130 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/14f246e7/api/src/test/java/org/apache/commons/rdf/api/AbstractGraphTest.java
----------------------------------------------------------------------
diff --cc api/src/test/java/org/apache/commons/rdf/api/AbstractGraphTest.java
index 15773df,5986958..27b9ff4
--- a/api/src/test/java/org/apache/commons/rdf/api/AbstractGraphTest.java
+++ b/api/src/test/java/org/apache/commons/rdf/api/AbstractGraphTest.java
@@@ -260,11 -266,177 +266,177 @@@ public abstract class AbstractGraphTes
assertEquals(3, aliceCount);
Assume.assumeNotNull(bnode1, bnode2, bobName, companyName, secretClubName);
- assertEquals(4, graph.getTriples(null, name, null).count());
+ assertEquals(4, graph.stream(null, name, null).count());
Assume.assumeNotNull(bnode1);
- assertEquals(3, graph.getTriples(null, member, null).count());
+ assertEquals(3, graph.stream(null, member, null).count());
}
+ @Test
+ public void addBlankNodesFromMultipleGraphs() {
+
+ try {
+ // Create two separate Graph instances
+ Graph g1 = createGraph1();
+ Graph g2 = createGraph2();
+
+ // and add them to a new Graph g3
+ Graph g3 = factory.createGraph();
+ addAllTriples(g1, g3);
+ addAllTriples(g2, g3);
+
+
+ // Let's make a map to find all those blank nodes after insertion
+ // (The Graph implementation is not currently required to
+ // keep supporting those BlankNodes with contains() - see COMMONSRDF-15)
+
+ final Map<String, BlankNodeOrIRI> whoIsWho = new ConcurrentHashMap<>();
+ // ConcurrentHashMap as we will try parallel forEach below,
+ // which should not give inconsistent results (it does with a
+ // HashMap!)
+
+ // look up BlankNodes by name
+ IRI name = factory.createIRI("http://xmlns.com/foaf/0.1/name");
+ g3.getTriples(null, name, null).parallel().forEach( t ->
+ whoIsWho.put( t.getObject().ntriplesString(), t.getSubject()));
+
+ assertEquals(4, whoIsWho.size());
+ // and contains 4 unique values
+ assertEquals(4, new HashSet<BlankNodeOrIRI>(whoIsWho.values()).size());
+
+ BlankNodeOrIRI b1Alice = whoIsWho.get("\"Alice\"");
+ assertNotNull(b1Alice);
+ BlankNodeOrIRI b2Bob = whoIsWho.get("\"Bob\"");
+ assertNotNull(b2Bob);
+ BlankNodeOrIRI b1Charlie = whoIsWho.get("\"Charlie\"");
+ assertNotNull(b1Charlie);
+ BlankNodeOrIRI b2Dave = whoIsWho.get("\"Dave\"");
+ assertNotNull(b2Dave);
+
+ // All blank nodes should differ
+ notEquals(b1Alice, b2Bob);
+ notEquals(b1Alice, b1Charlie);
+ notEquals(b1Alice, b2Dave);
+ notEquals(b2Bob, b1Charlie);
+ notEquals(b2Bob, b2Dave);
+ notEquals(b1Charlie, b2Dave);
+
+ // And we should be able to query with them again
+ // as we got them back from g3
+ IRI hasChild = factory.createIRI("http://example.com/hasChild");
+ assertTrue(g3.contains(b1Alice, hasChild, b2Bob));
+ assertTrue(g3.contains(b2Dave, hasChild, b1Charlie));
+ // But not
+ assertFalse(g3.contains(b1Alice, hasChild, b1Alice));
+ assertFalse(g3.contains(b1Alice, hasChild, b1Charlie));
+ assertFalse(g3.contains(b1Alice, hasChild, b2Dave));
+ // nor
+ assertFalse(g3.contains(b2Dave, hasChild, b1Alice));
+ assertFalse(g3.contains(b2Dave, hasChild, b1Alice));
+
+ // and these don't have any children (as far as we know)
+ assertFalse(g3.contains(b2Bob, hasChild, null));
+ assertFalse(g3.contains(b1Charlie, hasChild, null));
+ } catch (UnsupportedOperationException ex) {
+ Assume.assumeNoException(ex);
+ }
+ }
+
+ private void notEquals(BlankNodeOrIRI node1, BlankNodeOrIRI node2) {
+ assertFalse(node1.equals(node2));
+ // in which case we should be able to assume
+ // (as they are in the same graph)
+ assertFalse(node1.ntriplesString().equals(node2.ntriplesString()));
+ }
+
+ /**
+ * Add all triples from the source to the target.
+ * <p>
+ * The triples may be copied in any order.
+ * No special conversion or adaptation of {@link BlankNode}s are performed.
+ *
+ * @param source Source Graph to copy triples from
+ * @param target Target Graph where triples will be added
+ */
+ private void addAllTriples(Graph source, Graph target) {
+
+ // unordered() as we don't need to preserve triple order
+ // sequential() as we don't (currently) require target Graph to be thread-safe
+ source.getTriples().unordered().sequential().forEach(t -> target.add(t));
+ }
+
+ /**
+ * Make a new graph with two BlankNodes - each with a different uniqueReference
+ */
+ private Graph createGraph1() {
+ RDFTermFactory factory1 = createFactory();
+
+ IRI name = factory1.createIRI("http://xmlns.com/foaf/0.1/name");
+ Graph g1 = factory1.createGraph();
+ BlankNode b1 = createOwnBlankNode("b1", "0240eaaa-d33e-4fc0-a4f1-169d6ced3680");
+ g1.add(b1, name, factory1.createLiteral("Alice"));
+
+
+ BlankNode b2 = createOwnBlankNode("b2", "9de7db45-0ce7-4b0f-a1ce-c9680ffcfd9f");
+ g1.add(b2, name, factory1.createLiteral("Bob"));
+
+ IRI hasChild = factory1.createIRI("http://example.com/hasChild");
+ g1.add(b1, hasChild, b2);
+
+ return g1;
+ }
+
+ /**
+ * Create a different implementation of BlankNode to be tested with
+ * graph.add(a,b,c);
+ * (the implementation may or may not then choose to translate such to
+ * its own instances)
+ *
+ * @param name
+ * @return
+ */
+ private BlankNode createOwnBlankNode(String name, String uuid) {
+ return new BlankNode() {
+ @Override
+ public String ntriplesString() {
+ return "_: " + name;
+ }
+ @Override
+ public String uniqueReference() {
+ return uuid;
+ }
+ @Override
+ public int hashCode() {
+ return uuid.hashCode();
+ }
+ @Override
+ public boolean equals(Object obj) {
+ if (!( obj instanceof BlankNode)) {
+ return false;
+ }
+ BlankNode other = (BlankNode)obj;
+ return uuid.equals(other.uniqueReference());
+ }
+ };
+ }
+
+ private Graph createGraph2() {
+ RDFTermFactory factory2 = createFactory();
+ IRI name = factory2.createIRI("http://xmlns.com/foaf/0.1/name");
+
+ Graph g2 = factory2.createGraph();
+
+ BlankNode b1 = createOwnBlankNode("b1", "bc8d3e45-a08f-421d-85b3-c25b373abf87");
+ g2.add(b1, name, factory2.createLiteral("Charlie"));
+
+ BlankNode b2 = createOwnBlankNode("b2", "2209097a-5078-4b03-801a-6a2d2f50d739");
+ g2.add(b2, name, factory2.createLiteral("Dave"));
+
+ IRI hasChild = factory2.createIRI("http://example.com/hasChild");
+ // NOTE: Opposite direction of loadGraph1
+ g2.add(b2, hasChild, b1);
+ return g2;
+ }
+
/**
* An attempt to use the Java 8 streams to look up a more complicated query.
* <p>
[27/50] incubator-commonsrdf git commit: GraphLike javadoc tweaks
Posted by st...@apache.org.
GraphLike javadoc tweaks
Project: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/commit/c7e1a5bd
Tree: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/tree/c7e1a5bd
Diff: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/diff/c7e1a5bd
Branch: refs/heads/jsonld-java
Commit: c7e1a5bde5e3b8209cb15099a7ceaef6ced57e7f
Parents: b25af13
Author: Stian Soiland-Reyes <st...@apache.org>
Authored: Thu Jun 2 12:18:03 2016 +0100
Committer: Stian Soiland-Reyes <st...@apache.org>
Committed: Thu Jun 2 12:18:03 2016 +0100
----------------------------------------------------------------------
.../org/apache/commons/rdf/api/GraphLike.java | 20 +++----
.../java/org/apache/commons/rdf/api/Quad.java | 4 +-
.../org/apache/commons/rdf/api/QuadLike.java | 51 +++++++---------
.../org/apache/commons/rdf/api/TripleLike.java | 63 +++++++++-----------
4 files changed, 63 insertions(+), 75 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/c7e1a5bd/api/src/main/java/org/apache/commons/rdf/api/GraphLike.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/org/apache/commons/rdf/api/GraphLike.java b/api/src/main/java/org/apache/commons/rdf/api/GraphLike.java
index 57b55cb..28c2f10 100644
--- a/api/src/main/java/org/apache/commons/rdf/api/GraphLike.java
+++ b/api/src/main/java/org/apache/commons/rdf/api/GraphLike.java
@@ -26,10 +26,10 @@ import java.util.stream.Stream;
* Extended by {@link Graph} (for {@link Triple}) and {@link Dataset} (for
* {@link Quad}).
* <p>
- * Unlike {@link Graph} and {@link Dataset}, this interface can support
- * with generalised {@link TripleLike} or {@link QuadLike} statements, and
- * does not include semantics like {@link #size()} or the requirement of
- * mapping {@link RDFTerm} instances from different implementations.
+ * Unlike {@link Graph} and {@link Dataset}, this interface can support with
+ * generalised {@link TripleLike} or {@link QuadLike} statements, and does not
+ * include semantics like {@link #size()} or the requirement of mapping
+ * {@link RDFTerm} instances from different implementations.
*
* @see Graph
* @see Dataset
@@ -83,14 +83,14 @@ public interface GraphLike<T extends TripleLike<S, P, O>, S extends RDFTerm, P e
/**
* Iterate over contained statements.
- *
+ *
* @return An {@link Iterable} of {@link TripleLike} statements.
*
- * @throws IllegalStateException
- * if the {@link Iterable} has been reused
- * @throws ConcurrentModificationException
- * if a concurrency conflict occurs while the Iterator is
- * active.
+ * @throws IllegalStateException
+ * if the {@link Iterable} has been reused
+ * @throws ConcurrentModificationException
+ * if a concurrency conflict occurs while the Iterator is
+ * active.
*/
Iterable<T> iterate() throws ConcurrentModificationException, IllegalStateException;
http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/c7e1a5bd/api/src/main/java/org/apache/commons/rdf/api/Quad.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/org/apache/commons/rdf/api/Quad.java b/api/src/main/java/org/apache/commons/rdf/api/Quad.java
index fa9298e..348595b 100644
--- a/api/src/main/java/org/apache/commons/rdf/api/Quad.java
+++ b/api/src/main/java/org/apache/commons/rdf/api/Quad.java
@@ -40,8 +40,8 @@ public interface Quad extends QuadLike<BlankNodeOrIRI,IRI,RDFTerm,BlankNodeOrIRI
* If {@link Optional#isPresent()}, then the {@link Optional#get()} is
* either a {@link BlankNode} or an {@link IRI}, indicating the
* <a href="https://www.w3.org/TR/rdf11-concepts/#dfn-named-graph">graph
- * name of this Quad. If the graph name is not present (e.g. the value is
- * {@link Optional#empty()}), it indicates that this Quad is in the
+ * name of this Quad. If the graph name is not present, e.g. the value is
+ * {@link Optional#empty()}, it indicates that this Quad is in the
* <a href="https://www.w3.org/TR/rdf11-concepts/#dfn-default-graph">default
* graph.
*
http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/c7e1a5bd/api/src/main/java/org/apache/commons/rdf/api/QuadLike.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/org/apache/commons/rdf/api/QuadLike.java b/api/src/main/java/org/apache/commons/rdf/api/QuadLike.java
index a47e32b..7ed7255 100644
--- a/api/src/main/java/org/apache/commons/rdf/api/QuadLike.java
+++ b/api/src/main/java/org/apache/commons/rdf/api/QuadLike.java
@@ -22,42 +22,35 @@ import java.util.Optional;
/**
* A generalised "quad-like" interface, extended by {@link Quad}.
* <p>
- * A QuadLike has at least a
- * {@link #getSubject()}, {@link #getPredicate()} and
- * {@link #getObject()}, and a {@link #getGraphName()},
- * but unlike a {@link Quad} does not have a
- * formalised {@link Quad#equals(Object)} semantics, and allow
- * generalised quads (e.g. a BlankNode as predicate).
+ * A QuadLike statement has at least a {@link #getSubject()},
+ * {@link #getPredicate()}, {@link #getObject()} and {@link #getGraphName()},
+ * but unlike a {@link Quad} does not have a formalised
+ * {@link Quad#equals(Object)} semantics, and can allow generalised quads (e.g.
+ * a {@link BlankNode} as predicate).
* <p>
- * Implementations should specialise which RDFTerm
- * subclasses they return for subject {@link S},
- * predicate {@link P}, object {@link O} and graph name {@link G}.
+ * Implementations should specialise which {@link RDFTerm} subclasses they
+ * return for subject {@link S}, predicate {@link P}, object {@link O} and graph
+ * name {@link G}.
* <p>
+ *
* @see Quad
*/
-public interface QuadLike <S extends RDFTerm, P extends RDFTerm, O extends RDFTerm, G extends RDFTerm>
- extends TripleLike<S,P,O> {
-
+public interface QuadLike<S extends RDFTerm, P extends RDFTerm, O extends RDFTerm, G extends RDFTerm>
+ extends TripleLike<S, P, O> {
/**
- * The graph name (graph label) of this quad, if present.
- *
- * If {@link Optional#isPresent()}, then the {@link Optional#get()}
- * indicate the
- * <a href="https://www.w3.org/TR/rdf11-concepts/#dfn-named-graph">graph
- * name of this Quad. If the graph name is not present (e.g. the value is
- * {@link Optional#empty()}), it indicates that this Quad is in the
- * <a href="https://www.w3.org/TR/rdf11-concepts/#dfn-default-graph">default
- * graph.
+ * The graph name (graph label) of this statement, if present.
+ * <p>
+ * If {@link Optional#isPresent()}, then the {@link Optional#get()} indicate
+ * the graph name of this statement. If the graph name is not present,e.g.
+ * the value is {@link Optional#empty()}, it indicates that this Quad is in
+ * the default graph.
*
- * @return If {@link Optional#isPresent()}, the graph name
- * of this quad, otherwise. The graph name is typically an
- * {@link IRI} or {@link BlankNode}.
- * {@link Optional#empty()}, indicating the default graph.
- *
- * @see <a href="https://www.w3.org/TR/rdf11-concepts/#dfn-rdf-dataset">RDF-
- * 1.1 Dataset</a>
+ * @return If {@link Optional#isPresent()}, the graph name of this quad,
+ * otherwise {@link Optional#empty()}, indicating the default
+ * graph. The graph name is typically an {@link IRI} or
+ * {@link BlankNode}.
*/
Optional<G> getGraphName();
-
+
}
http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/c7e1a5bd/api/src/main/java/org/apache/commons/rdf/api/TripleLike.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/org/apache/commons/rdf/api/TripleLike.java b/api/src/main/java/org/apache/commons/rdf/api/TripleLike.java
index 1ed75d0..c061cc7 100644
--- a/api/src/main/java/org/apache/commons/rdf/api/TripleLike.java
+++ b/api/src/main/java/org/apache/commons/rdf/api/TripleLike.java
@@ -18,48 +18,43 @@
package org.apache.commons.rdf.api;
/**
- * A generalised "triple-like" interface, extended by {@link Triple} and {@link Quad}.
+ * A generalised "triple-like" interface, extended by {@link Triple} and
+ * {@link Quad}.
* <p>
- * A TripleLike has at least a
- * {@link #getSubject()}, {@link #getPredicate()} and
- * {@link #getObject()}, but unlike a {@link Triple} does not have a
- * formalised {@link Triple#equals(Object)} semantics, and allow
- * generalised triples (e.g. a BlankNode as predicate).
- * <p>
- * Implementations should specialise which RDFTerms subclasses
- * they return for subject, predicate and object.
+ * A TripleLike statement has at least a {@link #getSubject()},
+ * {@link #getPredicate()} and {@link #getObject()}, but unlike a {@link Triple}
+ * does not have a formalised {@link Triple#equals(Object)} semantics, and can
+ * allow generalised triples (e.g. a {@link BlankNode} as predicate).
* <p>
+ * Implementations should specialise which {@link RDFTerm} subclasses they
+ * return for subject {@link S}, predicate {@link P} and object {@link O}.
+ *
* @see Triple
* @see Quad
* @see QuadLike
*
*/
-public interface TripleLike <S extends RDFTerm, P extends RDFTerm, O extends RDFTerm> {
+public interface TripleLike<S extends RDFTerm, P extends RDFTerm, O extends RDFTerm> {
- /**
- * The subject of this statement.
- *
- * @return The subject, typically an {@link IRI} or {@link BlankNode}.
- * @see <a href="http://www.w3.org/TR/rdf11-concepts/#dfn-subject">RDF-1.1
- * Triple subject</a>
- */
- S getSubject();
+ /**
+ * The subject of this statement.
+ *
+ * @return The subject, typically an {@link IRI} or {@link BlankNode}.
+ */
+ S getSubject();
- /**
- * The predicate of this statement.
- *
- * @return The predicate, typically an {@link IRI}.
- * @see <a href="http://www.w3.org/TR/rdf11-concepts/#dfn-predicate">RDF-1.1
- * Triple predicate</a>
- */
- P getPredicate();
+ /**
+ * The predicate of this statement.
+ *
+ * @return The predicate, typically an {@link IRI}.
+ */
+ P getPredicate();
- /**
- * The object of this statement.
- *
- * @return The object, typically an {@link IRI}, {@link BlankNode} or {@link Literal}.
- * @see <a href="http://www.w3.org/TR/rdf11-concepts/#dfn-object">RDF-1.1
- * Triple object</a>
- */
- O getObject();
+ /**
+ * The object of this statement.
+ *
+ * @return The object, typically an {@link IRI}, {@link BlankNode} or
+ * {@link Literal}.
+ */
+ O getObject();
}
[32/50] incubator-commonsrdf git commit: quad: fixed typo in error
message
Posted by st...@apache.org.
quad: fixed typo in error message
Project: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/commit/53ef2282
Tree: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/tree/53ef2282
Diff: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/diff/53ef2282
Branch: refs/heads/jsonld-java
Commit: 53ef22820e750200b888d0ae93de438bfb4037d6
Parents: 580484c
Author: Stian Soiland-Reyes <st...@apache.org>
Authored: Mon Jun 20 18:18:46 2016 +0100
Committer: Stian Soiland-Reyes <st...@apache.org>
Committed: Mon Jun 20 18:18:46 2016 +0100
----------------------------------------------------------------------
api/src/main/java/org/apache/commons/rdf/api/RDFTermFactory.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/53ef2282/api/src/main/java/org/apache/commons/rdf/api/RDFTermFactory.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/org/apache/commons/rdf/api/RDFTermFactory.java b/api/src/main/java/org/apache/commons/rdf/api/RDFTermFactory.java
index f2a6f95..48605e7 100644
--- a/api/src/main/java/org/apache/commons/rdf/api/RDFTermFactory.java
+++ b/api/src/main/java/org/apache/commons/rdf/api/RDFTermFactory.java
@@ -271,7 +271,7 @@ public interface RDFTermFactory {
RDFTerm object) throws IllegalArgumentException,
UnsupportedOperationException {
throw new UnsupportedOperationException(
- "createTriple(BlankNodeOrIRI,IRI,RDFTerm) not supported");
+ "createQuad(BlankNodeOrIRI,BlankNodeOrIRI,IRI,RDFTerm) not supported");
}
}
[14/50] incubator-commonsrdf git commit: added some notes of the
release process
Posted by st...@apache.org.
added some notes of the release process
Project: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/commit/71e5855d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/tree/71e5855d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/diff/71e5855d
Branch: refs/heads/jsonld-java
Commit: 71e5855daee417e6211b7c6ccff79dcfb0468b8d
Parents: b39f800
Author: Sergio Fern�ndez <wi...@apache.org>
Authored: Thu May 12 15:22:18 2016 -0700
Committer: Sergio Fern�ndez <wi...@apache.org>
Committed: Thu May 12 15:22:18 2016 -0700
----------------------------------------------------------------------
RELEASE-PROCESS.md | 9 +++++++++
1 file changed, 9 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/71e5855d/RELEASE-PROCESS.md
----------------------------------------------------------------------
diff --git a/RELEASE-PROCESS.md b/RELEASE-PROCESS.md
new file mode 100644
index 0000000..1aa08b1
--- /dev/null
+++ b/RELEASE-PROCESS.md
@@ -0,0 +1,9 @@
+# Commons RDF (incubating) release process
+
+1. Clean build: `mvn clean install`
+2. RAT checking: `mvn apache-rat:check`
+3. Prepare the release: `mvn release:prepare -DreleaseVersion=0.2.0-incubating -DdevelopmentVersion=0.3.0-incubating-SNAPSHOT -DautoVersionSubmodules=true`
+4. Perform the release: `mvn release:perform`
+5. Close the staging repository at https://repository.apache.org/#stagingRepositories
+6. Push the code: `git push` and tag `git push --tags`
+6. Cast the vote mail to dev@commonsrdf
[19/50] incubator-commonsrdf git commit: fixed typo about the
.equals() method
Posted by st...@apache.org.
fixed typo about the .equals() method
Project: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/commit/d6e610b7
Tree: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/tree/d6e610b7
Diff: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/diff/d6e610b7
Branch: refs/heads/jsonld-java
Commit: d6e610b70c8f4e05c60c328c694ce7c730998b87
Parents: 297000a
Author: Sergio Fern�ndez <wi...@apache.org>
Authored: Sun May 15 14:17:27 2016 -0700
Committer: Sergio Fern�ndez <wi...@apache.org>
Committed: Sun May 15 14:17:27 2016 -0700
----------------------------------------------------------------------
src/site/markdown/userguide.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/d6e610b7/src/site/markdown/userguide.md
----------------------------------------------------------------------
diff --git a/src/site/markdown/userguide.md b/src/site/markdown/userguide.md
index 2a7a73d..a84fee3 100644
--- a/src/site/markdown/userguide.md
+++ b/src/site/markdown/userguide.md
@@ -830,7 +830,7 @@ not change, and so calling a method like
[IRI.getIRIString](apidocs/org/apache/commons/rdf/api/IRI.html#getIRIString--)
or
[Literal.getDatatype](apidocs/org/apache/commons/rdf/api/Literal.html#getDatatype--)
-will always have return values that are `.equal()` to any earlier return
+will always have return values that are `.equals()` to any earlier return
values. Being immutable, the `Triple` and `RDFTerm` types should be
considered thread-safe.
[20/50] incubator-commonsrdf git commit: Updated userguide for
0.2.0-incubating
Posted by st...@apache.org.
Updated userguide for 0.2.0-incubating
Project: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/commit/935cb7f8
Tree: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/tree/935cb7f8
Diff: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/diff/935cb7f8
Branch: refs/heads/jsonld-java
Commit: 935cb7f850c8776da974c4c611509161a12a657a
Parents: 297000a
Author: Stian Soiland-Reyes <st...@apache.org>
Authored: Sun May 15 22:49:32 2016 +0100
Committer: Stian Soiland-Reyes <st...@apache.org>
Committed: Sun May 15 22:49:32 2016 +0100
----------------------------------------------------------------------
src/site/markdown/userguide.md | 60 +++++++++++++++++++++++++------------
1 file changed, 41 insertions(+), 19 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/935cb7f8/src/site/markdown/userguide.md
----------------------------------------------------------------------
diff --git a/src/site/markdown/userguide.md b/src/site/markdown/userguide.md
index 2a7a73d..df8a277 100644
--- a/src/site/markdown/userguide.md
+++ b/src/site/markdown/userguide.md
@@ -21,13 +21,15 @@
# User Guide
This page shows some examples of a client using the Commons RDF API.
-It was last updated for version `0.1.0-incubating` of the
+It was last updated for version `0.2.0-incubating` of the
Commons RDF [API](apidocs/).
* [Introduction](#Introduction)
* [RDF concepts](#RDF_concepts)
* [Using Commons RDF from Maven](#Using_Commons_RDF_from_Maven)
* [Creating Commons RDF instances](#Creating_Commons_RDF_instances)
+ * [Creating a RDFTermFactory](#Creating_a_RDFTermFactory)
+ * [Using a RDFTermFactory](#Using_a_RDFTermFactory)
* [RDF terms](#RDF_terms)
* [N-Triples string](#N-Triples_string)
* [IRI](#IRI)
@@ -84,7 +86,7 @@ add the following dependency to your `pom.xml`:
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-rdf-api</artifactId>
- <version>0.1.0-incubating</version>
+ <version>0.2.0-incubating</version>
</dependency>
</dependencies>
```
@@ -128,7 +130,7 @@ _simple_ implementation, add to your `<dependencies>`:
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-rdf-simple</artifactId>
- <version>0.1.0-incubating</version>
+ <version>0.2.0-incubating</version>
</dependency>
```
@@ -143,7 +145,9 @@ To create instances of Commons RDF interfaces like
[`IRI`](apidocs/org/apache/commons/rdf/api/IRI.html) you will need a
[RDFTermFactory](apidocs/org/apache/commons/rdf/api/RDFTermFactory.html).
-How to get an instance of this factory is implementation specific, for the
+### Creating a RDFTermFactory
+
+How to get an instance of this factory is implementation-specific, for the
_simple_ implementation, you can construct the
[SimpleRDFTermFactory](apidocs/org/apache/commons/rdf/simple/SimpleRDFTermFactory.html):
@@ -170,6 +174,12 @@ Iterator<RDFTermFactory> iterator = loader.iterator();
RDFTermFactory factory = iterator.next();
```
+Note that the `ServiceLoader` approach above might not work well within
+split classloader systems like OSGi.
+
+
+### Using a RDFTermFactory
+
Using the factory you can construct
any [RDFTerm](apidocs/org/apache/commons/rdf/api/RDFTerm.html), e.g. to create a
[BlankNode](apidocs/org/apache/commons/rdf/api/BlankNode.html),
@@ -331,7 +341,7 @@ System.out.println(iri.equals(factory.createLiteral("http://example.com/alice"))
A [blank node](http://www.w3.org/TR/rdf11-concepts/#section-blank-nodes) is a
resource which, unlike an IRI, is not directly identified. Blank nodes can be
-used as _subject_ or _object_ of a `Triple`
+used as _subject_ or _object_ of a
[Triple](apidocs/org/apache/commons/rdf/api/Triple.html).
To create a new
@@ -395,6 +405,7 @@ System.out.println(b1.equals(new SimpleRDFTermFactory().createBlankNode("b1")));
>
> `false`
+
#### Blank node reference
While blank nodes are distinct from IRIs, and don't have inherent
@@ -688,7 +699,7 @@ graph.add(triple);
```
As an alternative to creating the `Triple` first, you can use the expanded
_subject/predicate/object_ form of
-[Graph.add](apidocs/org/apache/commons/rdf/api/Graph.html#add-org.apache.commons.rdf.api.BlankNodeOrIRI-org.apache.commons.rdf.api.IRI-org.apache.commons.rdf.api.RDFTerm-()):
+[Graph.add](apidocs/org/apache/commons/rdf/api/Graph.html#add-org.apache.commons.rdf.api.BlankNodeOrIRI-org.apache.commons.rdf.api.IRI-org.apache.commons.rdf.api.RDFTerm-):
```java
IRI bob = factory.createIRI("http://example.com/bob");
@@ -803,6 +814,8 @@ graph.remove(triple);
System.out.println(graph.contains(triple));
```
+> `false`
+
The expanded _subject/predicate/object_ form of
[remove()](apidocs/org/apache/commons/rdf/api/Graph.html#remove-org.apache.commons.rdf.api.BlankNodeOrIRI-org.apache.commons.rdf.api.IRI-org.apache.commons.rdf.api.RDFTerm-)
can be used without needing to construct a `Triple` first. It also
@@ -818,7 +831,7 @@ To remove all triples, use [clear](apidocs/org/apache/commons/rdf/api/Graph.html
graph.clear();
System.out.println(graph.contains(null, null, null));
```
-> false
+> `false`
## Mutability and thread safety
@@ -830,15 +843,22 @@ not change, and so calling a method like
[IRI.getIRIString](apidocs/org/apache/commons/rdf/api/IRI.html#getIRIString--)
or
[Literal.getDatatype](apidocs/org/apache/commons/rdf/api/Literal.html#getDatatype--)
-will always have return values that are `.equal()` to any earlier return
+will have a return value which `.equals()` any earlier return
values. Being immutable, the `Triple` and `RDFTerm` types should be
-considered thread-safe.
+considered thread-safe. Similarly their `hashCode()` should be
+considered stable, so any `RDFTerm` or `Triple` can be used
+in hashing collections like
+[HashMap](https://docs.oracle.com/javase/8/docs/api/java/util/HashMap.html).
A `Graph` may be _mutable_, particular if it supports methods like
[Graph.add](apidocs/org/apache/commons/rdf/api/Graph.html#add-org.apache.commons.rdf.api.BlankNodeOrIRI-org.apache.commons.rdf.api.IRI-org.apache.commons.rdf.api.RDFTerm-)
-and [Graph.remove](apidocs/org/apache/commons/rdf/api/Graph.html#remove-org.apache.commons.rdf.api.Triple-). That means that responses to methods like [size](apidocs/org/apache/commons/rdf/api/Graph.html#size--) and [contains](apidocs/org/apache/commons/rdf/api/Graph.html#contains-org.apache.commons.rdf.api.Triple-) might change during its lifetime.
+and [Graph.remove](apidocs/org/apache/commons/rdf/api/Graph.html#remove-org.apache.commons.rdf.api.Triple-). That means that responses to methods like [size](apidocs/org/apache/commons/rdf/api/Graph.html#size--) and [contains](apidocs/org/apache/commons/rdf/api/Graph.html#contains-org.apache.commons.rdf.api.Triple-) might change during its lifetime. A mutable `Graph`
+might also be modified by operations outside Commons RDF, e.g. because it is
+backed by a shared datastore with multiple clients.
-Implementations of Commons RDF may specify the (im)mutability of `Graph` in further details. If a graph is immutable, the methods `add` and `remove` may throw a `UnsupportedOperationException`.
+Implementations of Commons RDF may specify the (im)mutability of `Graph` in further details
+in their documentation. If a graph is immutable, the methods `add` and `remove`
+may throw a `UnsupportedOperationException`.
Commons RDF does not specify if methods on a `Graph` are thread-safe. Iterator
methods like [iterate](apidocs/org/apache/commons/rdf/api/Graph.html#iterate--)
@@ -868,7 +888,7 @@ synchronized(graph) {
## Implementations
The [Commons RDF API](apidocs/org/apache/commons/rdf/api/package-summary.html)
-is a set of Java interfaces, with implementations provided by several Java RDF
+is a set of Java interfaces, which can be implemented by several Java RDF
frameworks. See the [implementations](implementations.html) page for an
updated list of providers.
@@ -913,8 +933,14 @@ for (Triple t1: g1.getTriples(null, iri1, null)) {
```
_Note: Special care might need to be taken for cross-interoperability of
-`BlankNode` instances. This is currently under discussion. See
-[COMMONSRDF-15](https://issues.apache.org/jira/browse/COMMONSRDF-15)_
+`BlankNode` instances. While multiple triples with the same
+"foreign" `BlankNode` can be added without breaking their
+connections, the `Graph` is not required to
+return blank node instances that `.equals()` those
+inserted - specifically it is **not** required to persist the
+blank node [uniqueReference](apidocs/org/apache/commons/rdf/api/BlankNode.html#uniqueReference--).
+ See
+[COMMONSRDF-15](https://issues.apache.org/jira/browse/COMMONSRDF-15)._
The `.equals()` methods of `RDFTerm` interfaces are explicitly defined, so
their instances can be compared across implementations.
@@ -922,13 +948,9 @@ their instances can be compared across implementations.
_Note: The `Graph` implementation is not required to keep the JVM object
reference, e.g. after `g2.add(subj1, pred, obj)` it is not required to later
return the same `subj1` implementation in `g2.getTriples()`. Special care
-should be taken if returned values are needs to be casted to implementation
+should be taken if returned values needs to be casted to implementation
specific types._
-The `.hashCode()` is not currently explicitly defined, hence
-special care should be taken for cross-interoperability within hashing data
-structures like `HashMap`. See
-[COMMONSRDF-14](https://issues.apache.org/jira/browse/COMMONSRDF-14)
## Complete example
[46/50] incubator-commonsrdf git commit: getTriples() -> stream()
Posted by st...@apache.org.
getTriples() -> stream()
Project: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/commit/f8b6594d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/tree/f8b6594d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/diff/f8b6594d
Branch: refs/heads/jsonld-java
Commit: f8b6594d224bba664345c084bde8ca0c95069e95
Parents: 06a44b9
Author: Stian Soiland-Reyes <st...@apache.org>
Authored: Thu Sep 8 15:34:33 2016 +0100
Committer: Stian Soiland-Reyes <st...@apache.org>
Committed: Thu Sep 8 15:34:33 2016 +0100
----------------------------------------------------------------------
.../org/apache/commons/rdf/jsonldjava/JsonLdGraph.java | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/f8b6594d/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdGraph.java
----------------------------------------------------------------------
diff --git a/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdGraph.java b/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdGraph.java
index 0fe3690..c31ad71 100644
--- a/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdGraph.java
+++ b/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdGraph.java
@@ -126,12 +126,12 @@ public class JsonLdGraph implements Graph {
@Override
public boolean contains(BlankNodeOrIRI subject, IRI predicate, RDFTerm object) {
- return getTriples(subject, predicate, object).findAny().isPresent();
+ return stream(subject, predicate, object).findAny().isPresent();
}
@Override
public boolean contains(Triple triple) {
- return getTriples().anyMatch(Predicate.isEqual(triple));
+ return stream().anyMatch(Predicate.isEqual(triple));
}
public RDFTermFactory getContext() {
@@ -145,7 +145,7 @@ public class JsonLdGraph implements Graph {
}
@Override
- public Stream<? extends Triple> getTriples() {
+ public Stream<? extends Triple> stream() {
if (! unionGraph) {
return rdfDataSet.getQuads("@default").parallelStream().map(this::asTriple);
}
@@ -153,9 +153,9 @@ public class JsonLdGraph implements Graph {
}
@Override
- public Stream<? extends Triple> getTriples(BlankNodeOrIRI subject, IRI predicate, RDFTerm object) {
+ public Stream<? extends Triple> stream(BlankNodeOrIRI subject, IRI predicate, RDFTerm object) {
// RDFDataSet has no optimizations to help us, so we'll dispatch to filter()
- return getTriples().filter(t -> {
+ return stream().filter(t -> {
if (subject != null && !t.getSubject().equals(subject)) {
return false;
}
[10/50] incubator-commonsrdf git commit: Add SNAPSHOT prepping for
new 0.2.0-incubating release
Posted by st...@apache.org.
Add SNAPSHOT prepping for new 0.2.0-incubating release
Project: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/commit/1fdd553c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/tree/1fdd553c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/diff/1fdd553c
Branch: refs/heads/jsonld-java
Commit: 1fdd553c470f1a1b87034643f5a0f2bd5883697f
Parents: 20905e6
Author: Lewis John McGibbney <le...@gmail.com>
Authored: Thu May 5 19:13:57 2016 -0700
Committer: Lewis John McGibbney <le...@gmail.com>
Committed: Thu May 5 19:13:57 2016 -0700
----------------------------------------------------------------------
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/1fdd553c/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 5bf0180..c133d7c 100644
--- a/pom.xml
+++ b/pom.xml
@@ -29,7 +29,7 @@
<groupId>org.apache.commons</groupId>
<artifactId>commons-rdf-parent</artifactId>
- <version>0.3.0-incubating</version>
+ <version>0.2.0-incubating-SNAPSHOT</version>
<packaging>pom</packaging>
<name>Commons RDF</name>
[18/50] incubator-commonsrdf git commit: import StandardCharsets
Posted by st...@apache.org.
import StandardCharsets
Project: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/commit/297000aa
Tree: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/tree/297000aa
Diff: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/diff/297000aa
Branch: refs/heads/jsonld-java
Commit: 297000aa58ef7d0fb218be50f27356eac7bcfa64
Parents: 5f9b27c
Author: Stian Soiland-Reyes <st...@apache.org>
Authored: Fri May 13 14:21:43 2016 +0100
Committer: Stian Soiland-Reyes <st...@apache.org>
Committed: Fri May 13 14:21:43 2016 +0100
----------------------------------------------------------------------
examples/src/example/UserGuideTest.java | 1 +
1 file changed, 1 insertion(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/297000aa/examples/src/example/UserGuideTest.java
----------------------------------------------------------------------
diff --git a/examples/src/example/UserGuideTest.java b/examples/src/example/UserGuideTest.java
index eab6b0d..44cf587 100644
--- a/examples/src/example/UserGuideTest.java
+++ b/examples/src/example/UserGuideTest.java
@@ -18,6 +18,7 @@
package example;
import java.nio.charset.Charset;
+import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.Optional;
[02/50] incubator-commonsrdf git commit: Prepare Commons RDF for
0.2.0-incubating RC#1
Posted by st...@apache.org.
Prepare Commons RDF for 0.2.0-incubating RC#1
Project: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/commit/144c362f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/tree/144c362f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/diff/144c362f
Branch: refs/heads/jsonld-java
Commit: 144c362fb696f79f68ded6cdec522c440e487366
Parents: 4d229d7
Author: Lewis John McGibbney <le...@jpl.nasa.gov>
Authored: Thu Apr 28 15:55:03 2016 -0700
Committer: Lewis John McGibbney <le...@jpl.nasa.gov>
Committed: Thu Apr 28 15:55:03 2016 -0700
----------------------------------------------------------------------
pom.xml | 2 +-
src/site/markdown/download.md | 32 ++++++++++++++++++--------------
2 files changed, 19 insertions(+), 15 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/144c362f/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 269a39f..6ed249b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -53,7 +53,7 @@
<project.build.encoding>UTF-8</project.build.encoding>
<commons.encoding>UTF-8</commons.encoding>
<commons.componentid>rdf</commons.componentid>
- <commons.release.version>0.1.0</commons.release.version>
+ <commons.release.version>0.2.0</commons.release.version>
<commons.jira.id>COMMONSRDF</commons.jira.id>
<commons.jira.pid>12316620</commons.jira.pid>
<commons.site.path>rdf</commons.site.path>
http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/144c362f/src/site/markdown/download.md
----------------------------------------------------------------------
diff --git a/src/site/markdown/download.md b/src/site/markdown/download.md
index 792df3b..2eb2e32 100644
--- a/src/site/markdown/download.md
+++ b/src/site/markdown/download.md
@@ -39,13 +39,13 @@ To use Commons RDF with [Maven](https://maven.apache.org/), add to your `pom.xml
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-rdf-api</artifactId>
- <version>0.1.0-incubating</version>
+ <version>0.2.0-incubating</version>
</dependency>
<!-- and optionally: -->
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-rdf-simple</artifactId>
- <version>0.1.0-incubating</version>
+ <version>0.2.0-incubating</version>
<optional>true</optional>
</dependency>
</dependencies>
@@ -65,21 +65,25 @@ For the latest developments
you may also be interested in the [source code repository](source-repository.html),
which is also [mirrored to GitHub](http://github.com/apache/incubator-commonsrdf).
-### 0.1.0-incubating
+### 0.2.0-incubating
-**Apache Commons RDF 0.1.0-incubating** was published on 2015-05-15, and is available for download
+**Apache Commons RDF 0.2.0-incubating** was published on 2016-04-28, and is available for download
from official mirrors of the
-ASF Distribution Directory [incubator/commonsrdf](https://www.apache.org/dyn/closer.lua/incubator/commonsrdf/0.1.0-incubating/):
+ASF Distribution Directory [incubator/commonsrdf](https://www.apache.org/dyn/closer.lua/incubator/commonsrdf/0.2.0-incubating/):
-* [apache-commons-rdf-0.1.0-incubating-src.zip](https://www.apache.org/dyn/closer.lua/incubator/commonsrdf/0.1.0-incubating/apache-commons-rdf-0.1.0-incubating-src.zip)
- ([asc](https://dist.apache.org/repos/dist/release/incubator/commonsrdf/0.1.0-incubating/apache-commons-rdf-0.1.0-incubating-src.zip.asc),
- [md5](https://dist.apache.org/repos/dist/release/incubator/commonsrdf/0.1.0-incubating/apache-commons-rdf-0.1.0-incubating-src.zip.md5),
- [sha1](https://dist.apache.org/repos/dist/release/incubator/commonsrdf/0.1.0-incubating/apache-commons-rdf-0.1.0-incubating-src.zip.sha1))
-* [apache-commons-rdf-0.1.0-incubating-src.tar.gz](https://www.apache.org/dyn/closer.lua/incubator/commonsrdf/0.1.0-incubating/apache-commons-rdf-0.1.0-incubating-src.tar.gz)
- ([asc](https://dist.apache.org/repos/dist/release/incubator/commonsrdf/0.1.0-incubating/apache-commons-rdf-0.1.0-incubating-src.tar.gz.asc),
- [md5](https://dist.apache.org/repos/dist/release/incubator/commonsrdf/0.1.0-incubating//apache-commons-rdf-0.1.0-incubating-src.tar.gz.md5),
- [sha1](https://dist.apache.org/repos/dist/release/incubator/commonsrdf/0.1.0-incubating/apache-commons-rdf-0.1.0-incubating-src.tar.gz.sha1))
+* [apache-commons-rdf-0.2.0-incubating-src.zip](https://www.apache.org/dyn/closer.lua/incubator/commonsrdf/0.2.0-incubating/apache-commons-rdf-0.2.0-incubating-src.zip)
+ ([asc](https://dist.apache.org/repos/dist/release/incubator/commonsrdf/0.2.0-incubating/apache-commons-rdf-0.2.0-incubating-src.zip.asc),
+ [md5](https://dist.apache.org/repos/dist/release/incubator/commonsrdf/0.2.0-incubating/apache-commons-rdf-0.2.0-incubating-src.zip.md5),
+ [sha1](https://dist.apache.org/repos/dist/release/incubator/commonsrdf/0.2.0-incubating/apache-commons-rdf-0.2.0-incubating-src.zip.sha1))
+* [apache-commons-rdf-0.2.0-incubating-src.tar.gz](https://www.apache.org/dyn/closer.lua/incubator/commonsrdf/0.2.0-incubating/apache-commons-rdf-0.2.0-incubating-src.tar.gz)
+ ([asc](https://dist.apache.org/repos/dist/release/incubator/commonsrdf/0.2.0-incubating/apache-commons-rdf-0.2.0-incubating-src.tar.gz.asc),
+ [md5](https://dist.apache.org/repos/dist/release/incubator/commonsrdf/0.2.0-incubating//apache-commons-rdf-0.2.0-incubating-src.tar.gz.md5),
+ [sha1](https://dist.apache.org/repos/dist/release/incubator/commonsrdf/0.2.0-incubating/apache-commons-rdf-0.2.0-incubating-src.tar.gz.sha1))
After downloading the files, check the signatures using the following [KEYS](https://dist.apache.org/repos/dist/release/incubator/commonsrdf/KEYS)
-file. The [changelog](https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=12316620&version=12332056)
+file. The [changelog](https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=12316620&version=12332057)
is available from the [Apache Commons RDF Jira](https://issues.apache.org/jira/browse/COMMONSRDF).
+
+### Previous Releases
+
+Previous release are available from [archive.apache.org](http://archive.apache.org/dist/incubator/commonsrdf/).
[41/50] incubator-commonsrdf git commit: Move report plugins to
src/conf
Posted by st...@apache.org.
Move report plugins to src/conf
Project: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/commit/091f1d10
Tree: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/tree/091f1d10
Diff: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/diff/091f1d10
Branch: refs/heads/jsonld-java
Commit: 091f1d10e972d5a350a50502bfebb0326c258dcc
Parents: dd6e7fa
Author: Stian Soiland-Reyes <st...@apache.org>
Authored: Wed Sep 7 02:13:17 2016 +0100
Committer: Stian Soiland-Reyes <st...@apache.org>
Committed: Wed Sep 7 02:13:17 2016 +0100
----------------------------------------------------------------------
checkstyle-suppressions.xml | 27 ----
checkstyle.xml | 73 -----------
pmd.xml | 26 ----
src/conf/checkstyle-suppressions.xml | 32 +++++
src/conf/checkstyle.xml | 197 ++++++++++++++++++++++++++++++
src/conf/findbugs-exclude-filter.xml | 27 ++++
src/conf/pmd.xml | 25 ++++
7 files changed, 281 insertions(+), 126 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/091f1d10/checkstyle-suppressions.xml
----------------------------------------------------------------------
diff --git a/checkstyle-suppressions.xml b/checkstyle-suppressions.xml
deleted file mode 100644
index 4796ea0..0000000
--- a/checkstyle-suppressions.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
-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.
--->
-
-<!DOCTYPE suppressions PUBLIC
- "-//Puppy Crawl//DTD Suppressions 1.0//EN"
- "http://www.puppycrawl.com/dtds/suppressions_1_0.dtd">
-
-<suppressions>
- <suppress checks="Header" files="LICENSE.txt"/>
- <suppress checks="Header" files="NOTICE.txt"/>
-</suppressions>
http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/091f1d10/checkstyle.xml
----------------------------------------------------------------------
diff --git a/checkstyle.xml b/checkstyle.xml
deleted file mode 100644
index efc00c8..0000000
--- a/checkstyle.xml
+++ /dev/null
@@ -1,73 +0,0 @@
-<?xml version="1.0"?>
-<!--
-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.
--->
-
-<!DOCTYPE module PUBLIC
- "-//Puppy Crawl//DTD Check Configuration 1.1//EN"
- "http://www.puppycrawl.com/dtds/configuration_1_1.dtd">
-
-<!-- commons codec customization of default Checkstyle behavior -->
-<module name="Checker">
- <property name="localeLanguage" value="en" />
-
- <module name="SuppressionFilter">
- <property name="file" value="checkstyle-suppressions.xml"/>
- </module>
-
- <!-- Checks whether files end with a new line. -->
- <!-- See http://checkstyle.sf.net/config_misc.html#NewlineAtEndOfFile -->
- <module name="NewlineAtEndOfFile" />
-
- <!-- Verify that EVERY source file has the appropriate license -->
- <module name="Header">
- <property name="headerFile" value="${checkstyle.header.file}" />
- </module>
-
- <!-- Checks for Tab characters -->
- <!-- See http://checkstyle.sourceforge.net/config_whitespace.html#FileTabCharacter -->
- <module name="FileTabCharacter">
- <property name="fileExtensions" value="java" />
- </module>
-
- <!-- Checks for white space at the end of the line -->
- <!-- See http://checkstyle.sourceforge.net/config_regexp.html -->
- <module name="RegexpSingleline">
- <property name="format" value="\s+$" />
- <property name="message" value="Line has trailing spaces." />
- <property name="fileExtensions" value="java" />
- </module>
-
- <!-- @author tags are deprecated -->
- <module name="RegexpSingleline">
- <property name="format" value="^\s+\*\s+@author\s" />
- <property name="message" value="Deprecated @author tag" />
- <property name="fileExtensions" value="java" />
- <property name="severity" value="warning" />
- </module>
-
- <module name="TreeWalker">
- <property name="cacheFile" value="target/cachefile" />
- <module name="OperatorWrap">
- <property name="option" value="eol" />
- </module>
- <module name="LineLength">
- <property name="max" value="120"/>
- </module>
- </module>
-
-</module>
-
http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/091f1d10/pmd.xml
----------------------------------------------------------------------
diff --git a/pmd.xml b/pmd.xml
deleted file mode 100644
index d88cdbd..0000000
--- a/pmd.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0"?>
-<!--
-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.
--->
-<ruleset name="mybraces"
- xmlns="http://pmd.sourceforge.net/ruleset/2.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://pmd.sourceforge.net/ruleset/2.0.0 http://pmd.sourceforge.net/ruleset_2_0_0.xsd">
- <description>Excludes from default PMD rules.</description>
- <rule ref="rulesets/java/unnecessary.xml">
- <exclude name="UselessParentheses"/>
- </rule>
-</ruleset>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/091f1d10/src/conf/checkstyle-suppressions.xml
----------------------------------------------------------------------
diff --git a/src/conf/checkstyle-suppressions.xml b/src/conf/checkstyle-suppressions.xml
new file mode 100644
index 0000000..2494608
--- /dev/null
+++ b/src/conf/checkstyle-suppressions.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0"?>
+<!--
+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.
+-->
+
+<!DOCTYPE suppressions PUBLIC
+ "-//Puppy Crawl//DTD Suppressions 1.1//EN"
+ "http://www.puppycrawl.com/dtds/suppressions_1_1.dtd">
+<!-- SEE: http://checkstyle.sourceforge.net/config.html#Examples -->
+<suppressions>
+ <suppress checks="LineLength" files="InstructionFinder.java"/> <!-- TODO later -->
+
+ <suppress checks="MagicNumber" files="VerifierAppFrame.java"/> <!-- Swing files use lots of numbers -->
+ <suppress checks="MagicNumber" files="VerifyDialog.java"/> <!-- Swing files use lots of numbers -->
+ <suppress checks="MagicNumber" files="src[/\\]test[/\\]"/> <!-- test files need numbers -->
+
+ <!-- Maven generated code -->
+ <suppress checks=".*" files="[/\\]target[/\\]"/>
+</suppressions>
http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/091f1d10/src/conf/checkstyle.xml
----------------------------------------------------------------------
diff --git a/src/conf/checkstyle.xml b/src/conf/checkstyle.xml
new file mode 100644
index 0000000..f2ab194
--- /dev/null
+++ b/src/conf/checkstyle.xml
@@ -0,0 +1,197 @@
+<?xml version="1.0"?>
+<!--
+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.
+-->
+
+<!DOCTYPE module PUBLIC
+ "-//Puppy Crawl//DTD Check Configuration 1.1//EN"
+ "http://www.puppycrawl.com/dtds/configuration_1_1.dtd">
+
+<!-- commons codec customization of default Checkstyle behavior -->
+<module name="Checker">
+ <property name="localeLanguage" value="en" />
+
+ <!-- Checks whether files end with a new line. -->
+ <!-- See http://checkstyle.sf.net/config_misc.html#NewlineAtEndOfFile -->
+ <module name="NewlineAtEndOfFile" />
+
+ <!-- Checks for Tab characters -->
+ <!-- See http://checkstyle.sourceforge.net/config_whitespace.html#FileTabCharacter -->
+ <module name="FileTabCharacter">
+ <property name="fileExtensions" value="java" />
+ </module>
+
+ <!-- Checks for white space at the end of the line -->
+ <!-- See http://checkstyle.sourceforge.net/config_regexp.html -->
+ <!-- 706
+ <module name="RegexpSingleline">
+ <property name="format" value="\s+$" />
+ <property name="message" value="Line has trailing spaces." />
+ <property name="fileExtensions" value="java" />
+ </module>
+ -->
+
+ <!-- @author tags are deprecated -->
+ <module name="RegexpSingleline">
+ <property name="format" value="^\s+\*\s+@author\s" />
+ <property name="message" value="Deprecated @author tag" />
+ <property name="fileExtensions" value="java" />
+ <property name="severity" value="warning" />
+ </module>
+
+ <module name="TreeWalker">
+ <property name="cacheFile" value="target/cachefile" />
+ <!--
+ -->
+ <module name="LineLength">
+ <property name="max" value="160"/>
+ </module>
+
+ <!-- Checks for Naming Conventions. -->
+ <!-- See http://checkstyle.sf.net/config_naming.html -->
+ <!-- allow CONSTANT_Long etc -->
+ <!--
+ <module name="ConstantName">
+ <property name="format" value="^[A-Z][A-Z0-9]*(_[A-Za-z0-9]+)*$"/>
+ </module>
+ <module name="LocalFinalVariableName"/>
+ <module name="LocalVariableName"/>
+ <module name="MemberName">
+ <property name="format" value="^[a-z][a-zA-Z0-9_]*(_[a-zA-Z0-9]+)*$"/>
+ </module>
+ <module name="MethodName"/>
+ <module name="PackageName"/>
+ <module name="ParameterName"/>
+ <module name="StaticVariableName"/>
+ -->
+ <module name="TypeName">
+ <!-- Allow underscore in class names -->
+ <property name="format" value="^[A-Z][A-Za-z0-9]*(_[A-Za-z0-9]+)*$"/>
+ </module>
+
+ <!-- Checks for imports -->
+ <!-- See http://checkstyle.sf.net/config_imports.html -->
+ <module name="AvoidStarImport">
+ <property name="excludes" value="org.junit.Assert"/>
+ </module>
+ <module name="IllegalImport"/> <!-- defaults to sun.* packages -->
+ <module name="RedundantImport"/>
+ <module name="UnusedImports"/>
+
+ <!-- Checks for whitespace -->
+ <!-- See http://checkstyle.sf.net/config_whitespace.html -->
+ <module name="EmptyForIteratorPad"/>
+ <!-- Too many to fix at present
+ <module name="NoWhitespaceAfter"/>
+ <module name="NoWhitespaceBefore"/>
+ <module name="OperatorWrap">
+ <property name="option" value="nl" />
+ </module>
+ -->
+ <!-- Too many to fix at present
+ <module name="ParenPad"/>
+ <module name="WhitespaceAfter"/>
+ <module name="WhitespaceAround"/>
+ -->
+
+ <!-- Modifier Checks -->
+ <!-- See http://checkstyle.sf.net/config_modifiers.html -->
+ <module name="ModifierOrder"/>
+
+ <!--module name="RedundantModifier"/-->
+
+ <!-- Checks for blocks. You know, those {}'s -->
+ <!-- See http://checkstyle.sf.net/config_blocks.html -->
+ <!--module name="AvoidNestedBlocks"/-->
+ <module name="EmptyBlock">
+ <property name="option" value="text"/>
+ </module>
+ <!--
+ <module name="LeftCurly">
+ <property name="option" value="nl"/>
+ </module>
+ -->
+ <module name="NeedBraces"/>
+ <!--
+ <module name="RightCurly">
+ <property name="option" value="alone"/>
+ </module>
+ -->
+
+ <!-- Checks for common coding problems -->
+ <!-- See http://checkstyle.sf.net/config_coding.html -->
+ <module name="CovariantEquals"/>
+ <module name="EqualsHashCode"/>
+ <module name="IllegalInstantiation"/>
+ <!--module name="InnerAssignment"/--><!-- Inner assignments are OK -->
+ <!-- module name="MagicNumber">
+ <property name="ignoreNumbers" value="-1,0,1,2,3"/>
+ </module-->
+ <module name="SimplifyBooleanExpression"/>
+ <module name="SimplifyBooleanReturn"/>
+ <module name="StringLiteralEquality"/>
+ <!--module name="SuperClone"/-->
+ <module name="SuperFinalize"/>
+ <!--module name="DeclarationOrder"/-->
+ <!--module name="ExplicitInitialization"/-->
+ <module name="DefaultComesLast"/>
+ <module name="FallThrough">
+ <property name="reliefPattern" value="\$FALL-THROUGH\$"/><!-- to agree with Eclipse -->
+ </module>
+ <module name="MultipleVariableDeclarations"/>
+ <module name="UnnecessaryParentheses"/>
+
+ <!-- Checks for class design -->
+ <!-- See http://checkstyle.sf.net/config_design.html -->
+ <!--module name="FinalClass"/-->
+ <!--module name="HideUtilityClassConstructor"/-->
+ <!--module name="InterfaceIsType"/-->
+
+ <module name="VisibilityModifier">
+ <property name="ignoreAnnotationCanonicalNames" value="java.lang.Deprecated"/>
+ <property name="protectedAllowed" value="false"/>
+ <property name="packageAllowed" value="true"/>
+ </module>
+
+ <!-- Miscellaneous other checks. -->
+ <!-- See http://checkstyle.sf.net/config_misc.html -->
+ <module name="ArrayTypeStyle"/>
+ <!--module name="TodoComment"/-->
+ <module name="UpperEll"/>
+
+ <!-- Required for SuppressionCommentFilter below -->
+ <module name="FileContentsHolder"/>
+
+ </module>
+
+ <module name="SuppressionCommentFilter"/>
+
+ <module name="SuppressionFilter">
+ <!-- config_loc is used by Eclipse plugin -->
+ <property name="file" value="${config_loc}/src/conf/checkstyle-suppressions.xml"/>
+ </module>
+
+ <!--
+ Allow comment to suppress checkstyle for a single line
+ e.g. // CHECKSTYLE IGNORE MagicNumber
+ -->
+ <module name="SuppressWithNearbyCommentFilter">
+ <property name="commentFormat" value="CHECKSTYLE IGNORE (\w+)"/>
+ <property name="checkFormat" value="$1"/>
+ </module>
+
+</module>
+
http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/091f1d10/src/conf/findbugs-exclude-filter.xml
----------------------------------------------------------------------
diff --git a/src/conf/findbugs-exclude-filter.xml b/src/conf/findbugs-exclude-filter.xml
new file mode 100644
index 0000000..e681a70
--- /dev/null
+++ b/src/conf/findbugs-exclude-filter.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0"?>
+<!--
+ 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.
+-->
+
+<!--
+ Edit this file to add any false positive bugs detected by findbugs. Their
+ false positive nature should be analyzed individually and then added
+ here so findbugs will ignore them.
+-->
+<FindBugsFilter>
+
+
+</FindBugsFilter>
http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/091f1d10/src/conf/pmd.xml
----------------------------------------------------------------------
diff --git a/src/conf/pmd.xml b/src/conf/pmd.xml
new file mode 100644
index 0000000..d988308
--- /dev/null
+++ b/src/conf/pmd.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0"?>
+<!--
+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.
+-->
+<ruleset name="mybraces"
+ xmlns="http://pmd.sourceforge.net/ruleset/2.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://pmd.sourceforge.net/ruleset/2.0.0 http://pmd.sourceforge.net/ruleset_2_0_0.xsd">
+ <description>Excludes from default PMD rules.</description>
+ <rule ref="rulesets/java/unusedcode.xml">
+ </rule>
+</ruleset>
\ No newline at end of file
[44/50] incubator-commonsrdf git commit: about implementation branches
Posted by st...@apache.org.
about implementation branches
Project: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/commit/9782a586
Tree: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/tree/9782a586
Diff: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/diff/9782a586
Branch: refs/heads/jsonld-java
Commit: 9782a5860db860c6870620f8c16adf0afa511ec3
Parents: 2566399
Author: Stian Soiland-Reyes <st...@apache.org>
Authored: Wed Sep 7 03:23:36 2016 +0100
Committer: Stian Soiland-Reyes <st...@apache.org>
Committed: Wed Sep 7 03:23:36 2016 +0100
----------------------------------------------------------------------
src/site/markdown/implementations.md | 63 +++++++++++++++++++++++--------
1 file changed, 47 insertions(+), 16 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/9782a586/src/site/markdown/implementations.md
----------------------------------------------------------------------
diff --git a/src/site/markdown/implementations.md b/src/site/markdown/implementations.md
index 8ceba74..bf1b460 100644
--- a/src/site/markdown/implementations.md
+++ b/src/site/markdown/implementations.md
@@ -44,7 +44,7 @@ usage (e.g. prototyping).
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-rdf-simple</artifactId>
- <version>0.1.0-incubating-SNAPSHOT</version>
+ <version>0.2.0-incubating-SNAPSHOT</version>
</dependency>
```
@@ -57,10 +57,22 @@ RDFTermFactory rdfTermFactory = new SimpleRDFTermFactory();
Graph graph = rdfTermFactory.createGraph();
```
+### OWL API
+
+[OWL API](http://owlapi.sourceforge.net/) 5 extends Commons RDF
+directly for its family of
+[RDFNode](https://github.com/owlcs/owlapi/blob/version5/api/src/main/java/org/semanticweb/owlapi/io/RDFNode.java#L25)
+implementations.
+
+For details, see [pull request #446](https://github.com/owlcs/owlapi/pull/446),
+and [pull request #452](https://github.com/owlcs/owlapi/pull/452)).
+
+
+
## Planned implementations
The information in this section should not be considered updated or
-authoritative as it relies on external project planning.
+authoritative as it describes ongoing development.
Feel free to [suggest changes](http://commonsrdf.incubator.apache.org/contributing.html) to the
[source code for this page](https://github.com/apache/incubator-commonsrdf/blob/master/src/site/markdown/implementations.md).
@@ -69,15 +81,42 @@ Feel free to [suggest changes](http://commonsrdf.incubator.apache.org/contributi
### Apache Jena
-[Apache Jena](http://jena.apache.org/) is considering a compatibility interface
-that provides and consumes Commons RDF objects
-([JENA-1015](https://issues.apache.org/jira/browse/JENA-1015)).
+An implementation that maps [Apache Jena](http://jena.apache.org/) types
+to Commons RDF is being developed on
+the [`jena`](https://github.com/apache/incubator-commonsrdf/tree/jena)
+branch of Commons RDF.
+
+For details, see [COMMONSRDF-33](https://issues.apache.org/jira/browse/COMMONSRDF-33),
+[JENA-1015](https://issues.apache.org/jira/browse/JENA-1015) or contact
+[dev@commonsrdf](mail-lists.html).
+
+
+### Eclipse RDF4j (formerly Sesame)
+An implementation that maps [RDF4J 2.0](http://rdf4j.org/)
+to Commons RDF is being developed on
+the [`rdf4j`](https://github.com/apache/incubator-commonsrdf/tree/rdf4j)
+branch of Commons RDF.
-### RDF4j Sesame
-[Sesame](http://rdf4j.org/) is planning to support Commons RDF
-([SES-2091](https://openrdf.atlassian.net/browse/SES-2091)).
+For details, see [COMMONSRDF-35](https://issues.apache.org/jira/browse/COMMONSRDF-35),
+[SES-2091](https://openrdf.atlassian.net/browse/SES-2091) or contact
+[dev@commonsrdf](mail-lists.html).
+
+
+### Eclipse RDF4j (formerly Sesame)
+
+An implementation that maps [JSON-LD-Java](https://github.com/jsonld-java/jsonld-java)
+to Commons RDF is being developed on
+the [`jsonld-java`](https://github.com/apache/incubator-commonsrdf/tree/jsonld-java/jsonld-java)
+branch of Commons RDF.
+
+This aims to support [JSON-LD](http://json-ld.org/) parsing and writing by adding
+new interfaces like
+[RDFParserBuilder](https://github.com/apache/incubator-commonsrdf/pull/21).
+
+For details, see [COMMONSRDF-36](https://issues.apache.org/jira/browse/COMMONSRDF-36) or contact
+[dev@commonsrdf](mail-lists.html).
### Apache Clerezza
@@ -85,11 +124,3 @@ that provides and consumes Commons RDF objects
[Apache Clerezza](https://clerezza.apache.org/) is
aligning its [RDF core](https://github.com/apache/clerezza-rdf-core) module
with Commons RDF.
-
-
-### OWL API
-
-[OWL API](http://owlapi.sourceforge.net/) is considering the integration with
-Commons RDF in OWLAPI 5
-(<strike>[pull request #446](https://github.com/owlcs/owlapi/pull/446)</strike>,
-[pull request #452](https://github.com/owlcs/owlapi/pull/452)).
[37/50] incubator-commonsrdf git commit: Trying to enable reports
Posted by st...@apache.org.
Trying to enable reports
as on
https://commons.apache.org/proper/commons-codec/project-reports.html
Project: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/commit/7500084f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/tree/7500084f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/diff/7500084f
Branch: refs/heads/jsonld-java
Commit: 7500084f0cf8934c287bcb65cb61fc1697552a0f
Parents: 7fd7fae
Author: Stian Soiland-Reyes <st...@apache.org>
Authored: Mon Sep 5 17:52:14 2016 +0100
Committer: Stian Soiland-Reyes <st...@apache.org>
Committed: Mon Sep 5 17:52:14 2016 +0100
----------------------------------------------------------------------
LICENSE-header.txt | 16 +++++++++
checkstyle-suppressions.xml | 27 +++++++++++++++
checkstyle.xml | 73 ++++++++++++++++++++++++++++++++++++++++
pmd.xml | 26 ++++++++++++++
4 files changed, 142 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/7500084f/LICENSE-header.txt
----------------------------------------------------------------------
diff --git a/LICENSE-header.txt b/LICENSE-header.txt
new file mode 100644
index 0000000..ae6f28c
--- /dev/null
+++ b/LICENSE-header.txt
@@ -0,0 +1,16 @@
+/*
+ * 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.
+ */
http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/7500084f/checkstyle-suppressions.xml
----------------------------------------------------------------------
diff --git a/checkstyle-suppressions.xml b/checkstyle-suppressions.xml
new file mode 100644
index 0000000..4796ea0
--- /dev/null
+++ b/checkstyle-suppressions.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+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.
+-->
+
+<!DOCTYPE suppressions PUBLIC
+ "-//Puppy Crawl//DTD Suppressions 1.0//EN"
+ "http://www.puppycrawl.com/dtds/suppressions_1_0.dtd">
+
+<suppressions>
+ <suppress checks="Header" files="LICENSE.txt"/>
+ <suppress checks="Header" files="NOTICE.txt"/>
+</suppressions>
http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/7500084f/checkstyle.xml
----------------------------------------------------------------------
diff --git a/checkstyle.xml b/checkstyle.xml
new file mode 100644
index 0000000..efc00c8
--- /dev/null
+++ b/checkstyle.xml
@@ -0,0 +1,73 @@
+<?xml version="1.0"?>
+<!--
+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.
+-->
+
+<!DOCTYPE module PUBLIC
+ "-//Puppy Crawl//DTD Check Configuration 1.1//EN"
+ "http://www.puppycrawl.com/dtds/configuration_1_1.dtd">
+
+<!-- commons codec customization of default Checkstyle behavior -->
+<module name="Checker">
+ <property name="localeLanguage" value="en" />
+
+ <module name="SuppressionFilter">
+ <property name="file" value="checkstyle-suppressions.xml"/>
+ </module>
+
+ <!-- Checks whether files end with a new line. -->
+ <!-- See http://checkstyle.sf.net/config_misc.html#NewlineAtEndOfFile -->
+ <module name="NewlineAtEndOfFile" />
+
+ <!-- Verify that EVERY source file has the appropriate license -->
+ <module name="Header">
+ <property name="headerFile" value="${checkstyle.header.file}" />
+ </module>
+
+ <!-- Checks for Tab characters -->
+ <!-- See http://checkstyle.sourceforge.net/config_whitespace.html#FileTabCharacter -->
+ <module name="FileTabCharacter">
+ <property name="fileExtensions" value="java" />
+ </module>
+
+ <!-- Checks for white space at the end of the line -->
+ <!-- See http://checkstyle.sourceforge.net/config_regexp.html -->
+ <module name="RegexpSingleline">
+ <property name="format" value="\s+$" />
+ <property name="message" value="Line has trailing spaces." />
+ <property name="fileExtensions" value="java" />
+ </module>
+
+ <!-- @author tags are deprecated -->
+ <module name="RegexpSingleline">
+ <property name="format" value="^\s+\*\s+@author\s" />
+ <property name="message" value="Deprecated @author tag" />
+ <property name="fileExtensions" value="java" />
+ <property name="severity" value="warning" />
+ </module>
+
+ <module name="TreeWalker">
+ <property name="cacheFile" value="target/cachefile" />
+ <module name="OperatorWrap">
+ <property name="option" value="eol" />
+ </module>
+ <module name="LineLength">
+ <property name="max" value="120"/>
+ </module>
+ </module>
+
+</module>
+
http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/7500084f/pmd.xml
----------------------------------------------------------------------
diff --git a/pmd.xml b/pmd.xml
new file mode 100644
index 0000000..d88cdbd
--- /dev/null
+++ b/pmd.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0"?>
+<!--
+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.
+-->
+<ruleset name="mybraces"
+ xmlns="http://pmd.sourceforge.net/ruleset/2.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://pmd.sourceforge.net/ruleset/2.0.0 http://pmd.sourceforge.net/ruleset_2_0_0.xsd">
+ <description>Excludes from default PMD rules.</description>
+ <rule ref="rulesets/java/unnecessary.xml">
+ <exclude name="UselessParentheses"/>
+ </rule>
+</ruleset>
\ No newline at end of file
[43/50] incubator-commonsrdf git commit: COMMONSRDF-37 Describe
Quad/Dataset
Posted by st...@apache.org.
COMMONSRDF-37 Describe Quad/Dataset
updated UML diagram
Project: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/commit/25663998
Tree: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/tree/25663998
Diff: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/diff/25663998
Branch: refs/heads/jsonld-java
Commit: 25663998f086c802c76114b3bed8edb6dfdf0307
Parents: d7e4cbe
Author: Stian Soiland-Reyes <st...@apache.org>
Authored: Wed Sep 7 03:22:54 2016 +0100
Committer: Stian Soiland-Reyes <st...@apache.org>
Committed: Wed Sep 7 03:22:54 2016 +0100
----------------------------------------------------------------------
src/site/markdown/index.md | 58 ++++++++++++++-----
src/site/resources/images/class-diagram.nomnoml | 49 +++++++++++++---
src/site/resources/images/class-diagram.png | Bin 57632 -> 56161 bytes
3 files changed, 85 insertions(+), 22 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/25663998/src/site/markdown/index.md
----------------------------------------------------------------------
diff --git a/src/site/markdown/index.md b/src/site/markdown/index.md
index 4e01ed6..71b0b68 100644
--- a/src/site/markdown/index.md
+++ b/src/site/markdown/index.md
@@ -61,25 +61,58 @@ which may be included in Commons RDF, specifically:
* [Graph](apidocs/index.html?org/apache/commons/rdf/api/Graph.html): a graph,
a set of RDF triples.
* [Triple](apidocs/index.html?org/apache/commons/rdf/api/Triple.html): a
- `(subject, predicate, object)` RDF triple.
-* [RDFTerm](apidocs/index.html?org/apache/commons/rdf/api/RDFTerm.html): a RDF 1.1
- Term, where IRIs, literals and blank nodes are collectively known as RDF terms.
+ RDF triple with `getSubject()`, `getPredicate()`, `getObject()`.
+* [Dataset](apidocs/index.html?org/apache/commons/rdf/api/Dataset.html): a dataset,
+ of RDF quads (or if you like, a set of named graphs).
+* [Quad](apidocs/index.html?org/apache/commons/rdf/api/Quad.html): a
+ RDF quad with with `getGraphName()`, `getSubject()`, `getPredicate()`, `getObject()`.
+* [RDFTerm](apidocs/index.html?org/apache/commons/rdf/api/RDFTerm.html): any RDF 1.1
+ Term which can be part of a Triple or Quad.
+ IRIs, literals and blank nodes are collectively known as RDF terms.
* [IRI](apidocs/index.html?org/apache/commons/rdf/api/IRI.html): an
- Internationalized Resource Identifier.
+ Internationalized Resource Identifier (e.g. representing `<http://example.com/>`)
* [BlankNode](apidocs/index.html?org/apache/commons/rdf/api/BlankNode.html): a
- RDF-1.1 Blank Node, where they are disjoint from IRIs and literals.
+ RDF-1.1 Blank Node, e.g. representing `_:b1`. Disjoint from IRIs and literals.
* [BlankNodeOrIRI](apidocs/index.html?org/apache/commons/rdf/api/BlankNodeOrIRI.html):
this interface represents the RDF Terms that may be used in the subject position
of an RDF 1.1 `Triple`, including `BlankNode` and `IRI`.
-* [Literal](apidocs/index.html?org/apache/commons/rdf/api/Literal.html): a RDF-1.1 literal.
-* [RDFTermFactory](apidocs/index.html?org/apache/commons/rdf/api/RDFTermFactory.html):
- factory for creating `RDFTerm` and `Graph` instances.
+* [Literal](apidocs/index.html?org/apache/commons/rdf/api/Literal.html): a RDF-1.1 literal, e.g.
+ representing `"Hello there"@en`.
The design of the [API](apidocs/index.html?org/apache/commons/rdf/api/package-summary.html)
follows the terminology as defined by [RDF 1.1 Concepts and Abstract Syntax](http://www.w3.org/TR/rdf11-concepts/),
a W3C Recommendation published on 25 February 2014. The idea is that Commons RDF
-will provide a common library for RDF 1.1 that could be implemented by systems
-on the Java Virtual Machine, allowing the portability across different implementations.
+provide a common library for RDF 1.1 with multiple implementions for
+the Java Virtual Machine, allowing the portability across different
+Commons RDF implementations.
+
+
+Commons RDF is designed for compatibility between different
+[implementations](implementations.html), e.g. by defining
+strong equality and hash code semantics (e.g. for
+[triple](apidocs/org/apache/commons/rdf/api/Triple.html#equals-java.lang.Object-)
+and [literals](fapidocs/org/apache/commons/rdf/api/Literal.html#equals-java.lang.Object-) );
+this allows users of Commons RDF to "mix and match", for instance querying a `FooGraphImpl`
+and directly adding its `FooTripleImpl`s to a `BarGraphImpl` without any
+explicit convertion.
+
+To create such instances without hard-coding an implementation, one can use:
+
+* [RDFTermFactory](apidocs/index.html?org/apache/commons/rdf/api/RDFTermFactory.html):
+ factory interface for creating instances of the above types
+ (e.g. `LiteralImpl` and `GraphImpl`).
+
+
+The API also includes a couple of "upper" interfaces which do not have
+the above equality semantics and bridge the graph/quad duality:
+
+* [TripleLike](apidocs/index.html?org/apache/commons/rdf/api/TripleLike.html):
+ common super-interface of `Triple` and `Quad` (also a generalised triple).
+* [QuadLike](apidocs/index.html?org/apache/commons/rdf/api/QuadLike.html):
+ a `TripleLike` that also has `getGraphName()` (a generalized quad)
+* [GraphLike](apidocs/index.html?org/apache/commons/rdf/api/GraphLike.html):
+ common super-interface of `Graph` and `Dataset`.
+
See the the [user guide](userguide.html) for examples of how to interact with these interfaces.
@@ -98,9 +131,8 @@ where version `x.y.z` of `Simple` implements version `x.y` of
the `API`; i.e., the version `z` are backwards-compatible patches of the
implementation.
-External [implementations of the Commons RDF API](implementations.html) are
-being developed as part of their retrospective projects.
-[Contributions welcome!](contributing.html)
+[Implementations of the Commons RDF API](implementations.html) are
+being developed as additional modules. [Contributions welcome!](contributing.html)
## Contributing
http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/25663998/src/site/resources/images/class-diagram.nomnoml
----------------------------------------------------------------------
diff --git a/src/site/resources/images/class-diagram.nomnoml b/src/site/resources/images/class-diagram.nomnoml
index b309423..67278bf 100644
--- a/src/site/resources/images/class-diagram.nomnoml
+++ b/src/site/resources/images/class-diagram.nomnoml
@@ -17,12 +17,43 @@
// To render, see http://www.nomnoml.com
#fill: #bbccdd; #aabbcc
-[<abstract>RDFTermFactory]--[<abstract>Graph]
-[RDFTermFactory]--[<abstract>Triple]
-[RDFTermFactory]--[<abstract>RDFTerm]
-[Graph]->[Triple]
-[Triple]->[RDFTerm]
-[RDFTerm]<:-[<abstract>Literal]
-[RDFTerm]<:-[<abstract>BlankNodeOrIRI]
-[BlankNodeOrIRI]<:-[<abstract>BlankNode]
-[BlankNodeOrIRI]<:-[<abstract>IRI]
+#title: class-diagram
+
+#.like: fill=#fff italics
+
+
+[<like>GraphLike]
+[<like>TripleLike]
+[<like>QuadLike]
+
+[<like>RDFTerm]
+[<like>BlankNodeOrIRI]
+
+[<abstract>Graph]
+[<abstract>Dataset]
+[<abstract>Triple]
+[<abstract>Quad]
+[<abstract>Graph]
+
+
+[<abstract>Literal]
+[<abstract>IRI]
+[<abstract>BlankNode]
+
+[GraphLike] -> 0..* [TripleLike]
+[GraphLike]<:-[Graph]
+[GraphLike]<:-[Dataset]
+[Graph] -> 0..* [Triple]
+[Dataset] -> 0..* [Quad]
+[Triple] -> 3 [RDFTerm]
+[Quad]->4 [RDFTerm]
+[<abstract>TripleLike]<:-[Triple]
+[<abstract>QuadLike]<:-[Quad]
+[TripleLike]<:-[QuadLike]
+[RDFTerm]<:-[Literal]
+[RDFTerm]<:-[BlankNodeOrIRI]
+[BlankNodeOrIRI]<:-[BlankNode]
+[BlankNodeOrIRI]<:-[IRI]
+
+#.factory: fill=#ccbbdd italics
+[<factory>RDFTermFactory||createGraph()|createDataset()|createTriple(..)|createQuad(..)|..]
http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/25663998/src/site/resources/images/class-diagram.png
----------------------------------------------------------------------
diff --git a/src/site/resources/images/class-diagram.png b/src/site/resources/images/class-diagram.png
index 16b9c3b..b725b65 100644
Binary files a/src/site/resources/images/class-diagram.png and b/src/site/resources/images/class-diagram.png differ
[13/50] incubator-commonsrdf git commit: [maven-release-plugin]
prepare for next development iteration
Posted by st...@apache.org.
[maven-release-plugin] prepare for next development iteration
Project: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/commit/b39f8001
Tree: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/tree/b39f8001
Diff: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/diff/b39f8001
Branch: refs/heads/jsonld-java
Commit: b39f8001c3b06c08c461e7a81755761858779135
Parents: 433ffd9
Author: Sergio Fern�ndez <wi...@apache.org>
Authored: Thu May 12 15:13:03 2016 -0700
Committer: Sergio Fern�ndez <wi...@apache.org>
Committed: Thu May 12 15:13:03 2016 -0700
----------------------------------------------------------------------
api/pom.xml | 6 +-----
pom.xml | 4 ++--
simple/pom.xml | 7 +------
3 files changed, 4 insertions(+), 13 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/b39f8001/api/pom.xml
----------------------------------------------------------------------
diff --git a/api/pom.xml b/api/pom.xml
index b6e73ab..4b13406 100644
--- a/api/pom.xml
+++ b/api/pom.xml
@@ -24,7 +24,7 @@
<parent>
<groupId>org.apache.commons</groupId>
<artifactId>commons-rdf-parent</artifactId>
- <version>0.2.0-incubating</version>
+ <version>0.3.0-incubating-SNAPSHOT</version>
</parent>
<artifactId>commons-rdf-api</artifactId>
@@ -58,8 +58,4 @@
</plugin>
</plugins>
</build>
-
- <scm>
- <tag>0.2.0-incubating-RC3</tag>
- </scm>
</project>
http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/b39f8001/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 3c247a8..a782b5b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -29,7 +29,7 @@
<groupId>org.apache.commons</groupId>
<artifactId>commons-rdf-parent</artifactId>
- <version>0.2.0-incubating</version>
+ <version>0.3.0-incubating-SNAPSHOT</version>
<packaging>pom</packaging>
<name>Commons RDF</name>
@@ -66,7 +66,7 @@
<url>https://git-wip-us.apache.org/repos/asf/incubator-commonsrdf.git</url>
<connection>scm:git:https://git-wip-us.apache.org/repos/asf/incubator-commonsrdf.git</connection>
<developerConnection>scm:git:https://git-wip-us.apache.org/repos/asf/incubator-commonsrdf.git</developerConnection>
- <tag>0.2.0-incubating-RC3</tag>
+ <tag>HEAD</tag>
</scm>
<issueManagement>
http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/b39f8001/simple/pom.xml
----------------------------------------------------------------------
diff --git a/simple/pom.xml b/simple/pom.xml
index fea8e62..bc8a861 100644
--- a/simple/pom.xml
+++ b/simple/pom.xml
@@ -24,7 +24,7 @@
<parent>
<groupId>org.apache.commons</groupId>
<artifactId>commons-rdf-parent</artifactId>
- <version>0.2.0-incubating</version>
+ <version>0.3.0-incubating-SNAPSHOT</version>
</parent>
<artifactId>commons-rdf-simple</artifactId>
@@ -52,9 +52,4 @@
<scope>test</scope>
</dependency>
</dependencies>
-
-
- <scm>
- <tag>0.2.0-incubating-RC3</tag>
- </scm>
</project>
[09/50] incubator-commonsrdf git commit: newer Apache Commons parent
Posted by st...@apache.org.
newer Apache Commons parent
Project: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/commit/20905e64
Tree: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/tree/20905e64
Diff: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/diff/20905e64
Branch: refs/heads/jsonld-java
Commit: 20905e646df81e26e598fad613ccda67fd350a9d
Parents: 3bec6ed
Author: Stian Soiland-Reyes <st...@apache.org>
Authored: Mon May 2 17:47:32 2016 +0100
Committer: Stian Soiland-Reyes <st...@apache.org>
Committed: Mon May 2 17:47:32 2016 +0100
----------------------------------------------------------------------
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/20905e64/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index f1f28ba..5bf0180 100644
--- a/pom.xml
+++ b/pom.xml
@@ -24,7 +24,7 @@
<parent>
<groupId>org.apache.commons</groupId>
<artifactId>commons-parent</artifactId>
- <version>39</version>
+ <version>40</version>
</parent>
<groupId>org.apache.commons</groupId>
[11/50] incubator-commonsrdf git commit: fixed package name
Posted by st...@apache.org.
fixed package name
Project: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/commit/35d44228
Tree: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/tree/35d44228
Diff: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/diff/35d44228
Branch: refs/heads/jsonld-java
Commit: 35d442285dd9e229cb2dab8764c0b6bf789d101f
Parents: 1fdd553
Author: Sergio Fern�ndez <wi...@apache.org>
Authored: Thu May 12 15:09:56 2016 -0700
Committer: Sergio Fern�ndez <wi...@apache.org>
Committed: Thu May 12 15:09:56 2016 -0700
----------------------------------------------------------------------
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/35d44228/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index c133d7c..0703995 100644
--- a/pom.xml
+++ b/pom.xml
@@ -231,7 +231,7 @@
</dependencyManagement>
<build>
- <!--<finalName>apache-${project.artifactId}-${project.version}</finalName>-->
+ <finalName>apache-commonsrdf-${project.version}</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
[12/50] incubator-commonsrdf git commit: [maven-release-plugin]
prepare release 0.2.0-incubating-RC3
Posted by st...@apache.org.
[maven-release-plugin] prepare release 0.2.0-incubating-RC3
Project: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/commit/433ffd9d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/tree/433ffd9d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/diff/433ffd9d
Branch: refs/heads/jsonld-java
Commit: 433ffd9da203a86dfceba95765dbf90dc039ef24
Parents: 35d4422
Author: Sergio Fern�ndez <wi...@apache.org>
Authored: Thu May 12 15:12:53 2016 -0700
Committer: Sergio Fern�ndez <wi...@apache.org>
Committed: Thu May 12 15:12:53 2016 -0700
----------------------------------------------------------------------
api/pom.xml | 6 +++++-
pom.xml | 4 ++--
simple/pom.xml | 6 +++++-
3 files changed, 12 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/433ffd9d/api/pom.xml
----------------------------------------------------------------------
diff --git a/api/pom.xml b/api/pom.xml
index 42ad43b..b6e73ab 100644
--- a/api/pom.xml
+++ b/api/pom.xml
@@ -24,7 +24,7 @@
<parent>
<groupId>org.apache.commons</groupId>
<artifactId>commons-rdf-parent</artifactId>
- <version>0.3.0-incubating</version>
+ <version>0.2.0-incubating</version>
</parent>
<artifactId>commons-rdf-api</artifactId>
@@ -58,4 +58,8 @@
</plugin>
</plugins>
</build>
+
+ <scm>
+ <tag>0.2.0-incubating-RC3</tag>
+ </scm>
</project>
http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/433ffd9d/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 0703995..3c247a8 100644
--- a/pom.xml
+++ b/pom.xml
@@ -29,7 +29,7 @@
<groupId>org.apache.commons</groupId>
<artifactId>commons-rdf-parent</artifactId>
- <version>0.2.0-incubating-SNAPSHOT</version>
+ <version>0.2.0-incubating</version>
<packaging>pom</packaging>
<name>Commons RDF</name>
@@ -66,7 +66,7 @@
<url>https://git-wip-us.apache.org/repos/asf/incubator-commonsrdf.git</url>
<connection>scm:git:https://git-wip-us.apache.org/repos/asf/incubator-commonsrdf.git</connection>
<developerConnection>scm:git:https://git-wip-us.apache.org/repos/asf/incubator-commonsrdf.git</developerConnection>
- <tag>HEAD</tag>
+ <tag>0.2.0-incubating-RC3</tag>
</scm>
<issueManagement>
http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/433ffd9d/simple/pom.xml
----------------------------------------------------------------------
diff --git a/simple/pom.xml b/simple/pom.xml
index 773580d..fea8e62 100644
--- a/simple/pom.xml
+++ b/simple/pom.xml
@@ -24,7 +24,7 @@
<parent>
<groupId>org.apache.commons</groupId>
<artifactId>commons-rdf-parent</artifactId>
- <version>0.3.0-incubating</version>
+ <version>0.2.0-incubating</version>
</parent>
<artifactId>commons-rdf-simple</artifactId>
@@ -53,4 +53,8 @@
</dependency>
</dependencies>
+
+ <scm>
+ <tag>0.2.0-incubating-RC3</tag>
+ </scm>
</project>
[08/50] incubator-commonsrdf git commit: Rob Vesse moved to emeritus
Posted by st...@apache.org.
Rob Vesse moved to emeritus <contributor>
Project: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/commit/3bec6ed5
Tree: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/tree/3bec6ed5
Diff: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/diff/3bec6ed5
Branch: refs/heads/jsonld-java
Commit: 3bec6ed5676aeb78519d82221ea14d9abf7bbd6a
Parents: 0d92cec
Author: Stian Soiland-Reyes <st...@apache.org>
Authored: Mon May 2 17:46:42 2016 +0100
Committer: Stian Soiland-Reyes <st...@apache.org>
Committed: Mon May 2 17:47:07 2016 +0100
----------------------------------------------------------------------
pom.xml | 19 ++++++++-----------
1 file changed, 8 insertions(+), 11 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/3bec6ed5/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 31b80f1..f1f28ba 100644
--- a/pom.xml
+++ b/pom.xml
@@ -110,17 +110,6 @@
<timezone>+1</timezone>
</developer>
<developer>
- <id>rvesse</id>
- <name>Rob Vesse</name>
- <email>rvesse[at]apache[dot]org</email>
- <roles>
- <role>Committer</role>
- <role>PPMC Member</role>
- <role>Emeritus Mentor</role>
- </roles>
- <timezone>+0</timezone>
- </developer>
- <developer>
<id>johndament</id>
<name>John D Ament</name>
<email>johndament[at]apache[dot]org</email>
@@ -215,6 +204,14 @@
</roles>
<timezone>+0</timezone>
</contributor>
+ <contributor>
+ <name>Rob Vesse</name>
+ <email>rvesse[at]apache[dot]org</email>
+ <roles>
+ <role>Emeritus Mentor</role>
+ </roles>
+ <timezone>+0</timezone>
+ </contributor>
</contributors>
<modules>
[40/50] incubator-commonsrdf git commit: Enable jacoco and japicmp
Posted by st...@apache.org.
Enable jacoco and japicmp
both for api and simple
Project: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/commit/dd6e7fa4
Tree: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/tree/dd6e7fa4
Diff: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/diff/dd6e7fa4
Branch: refs/heads/jsonld-java
Commit: dd6e7fa4e9894d859b7ddd7336c92d6a2e8dc1af
Parents: 1a3e291
Author: Stian Soiland-Reyes <st...@apache.org>
Authored: Wed Sep 7 02:12:28 2016 +0100
Committer: Stian Soiland-Reyes <st...@apache.org>
Committed: Wed Sep 7 02:12:28 2016 +0100
----------------------------------------------------------------------
api/src/site/resources/profile.jacoco | 0
api/src/site/resources/profile.japicmp | 0
simple/src/site/resources/profile.jacoco | 0
simple/src/site/resources/profile.japicmp | 0
4 files changed, 0 insertions(+), 0 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/dd6e7fa4/api/src/site/resources/profile.jacoco
----------------------------------------------------------------------
diff --git a/api/src/site/resources/profile.jacoco b/api/src/site/resources/profile.jacoco
new file mode 100644
index 0000000..e69de29
http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/dd6e7fa4/api/src/site/resources/profile.japicmp
----------------------------------------------------------------------
diff --git a/api/src/site/resources/profile.japicmp b/api/src/site/resources/profile.japicmp
new file mode 100644
index 0000000..e69de29
http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/dd6e7fa4/simple/src/site/resources/profile.jacoco
----------------------------------------------------------------------
diff --git a/simple/src/site/resources/profile.jacoco b/simple/src/site/resources/profile.jacoco
new file mode 100644
index 0000000..e69de29
http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/dd6e7fa4/simple/src/site/resources/profile.japicmp
----------------------------------------------------------------------
diff --git a/simple/src/site/resources/profile.japicmp b/simple/src/site/resources/profile.japicmp
new file mode 100644
index 0000000..e69de29
[39/50] incubator-commonsrdf git commit: link to github
Posted by st...@apache.org.
link to github
Project: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/commit/1a3e291b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/tree/1a3e291b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/diff/1a3e291b
Branch: refs/heads/jsonld-java
Commit: 1a3e291ba9214ed71c69ae968400ac427ffaa18f
Parents: 4e7f261
Author: Stian Soiland-Reyes <st...@apache.org>
Authored: Wed Sep 7 02:12:05 2016 +0100
Committer: Stian Soiland-Reyes <st...@apache.org>
Committed: Wed Sep 7 02:12:05 2016 +0100
----------------------------------------------------------------------
src/site/site.xml | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/1a3e291b/src/site/site.xml
----------------------------------------------------------------------
diff --git a/src/site/site.xml b/src/site/site.xml
index f6586d8..ee7edca 100644
--- a/src/site/site.xml
+++ b/src/site/site.xml
@@ -56,7 +56,7 @@
<item name="Home" href="/index.html" />
<item name="API" href="/apidocs/index.html?org/apache/commons/rdf/api/package-summary.html" />
<item name="Implementations" href="/implementations.html" />
- <item name="User Guide" href="/userguide.html" />
+ <item name="User Guide" href="/userguide.html" />
<item name="Download" href="/download.html" />
<item name="Contributing" href="/contributing.html" />
<item name="Team" href="/team-list.html" />
@@ -64,6 +64,7 @@
<menu name="Tools">
<item name="Mailing Lists" href="/mail-lists.html" />
<item name="Source (Git)" href="https://git-wip-us.apache.org/repos/asf/incubator-commonsrdf.git" />
+ <item name="Source (GitHub mirror)" href="https://github.com/apache/incubator-commonsrdf/" />
<item name="Issues (Jira)" href="https://issues.apache.org/jira/browse/COMMONSRDF" />
</menu>
</body>
[31/50] incubator-commonsrdf git commit: ASF license header for *.md
Posted by st...@apache.org.
ASF license header for *.md
Project: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/commit/c9dd9746
Tree: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/tree/c9dd9746
Diff: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/diff/c9dd9746
Branch: refs/heads/jsonld-java
Commit: c9dd974656d1e430f9572a80c86de8a93ddc642c
Parents: 058f781
Author: Stian Soiland-Reyes <st...@apache.org>
Authored: Mon Jun 20 10:05:09 2016 +0100
Committer: Stian Soiland-Reyes <st...@apache.org>
Committed: Mon Jun 20 10:05:09 2016 +0100
----------------------------------------------------------------------
RELEASE-PROCESS.md | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/c9dd9746/RELEASE-PROCESS.md
----------------------------------------------------------------------
diff --git a/RELEASE-PROCESS.md b/RELEASE-PROCESS.md
index 22ce224..2d628d7 100644
--- a/RELEASE-PROCESS.md
+++ b/RELEASE-PROCESS.md
@@ -1,3 +1,23 @@
+<!--
+
+ 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.
+
+-->
+
# Commons RDF (incubating) release process
1. Update documentation (`RELEASE-NOTES.md`, `README.md`, version numbers in `src/site/`)
[36/50] incubator-commonsrdf git commit: avoid maven-jar-plugin error
Posted by st...@apache.org.
avoid maven-jar-plugin error
... by running <goal>jar</goal> again
Project: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/commit/7fd7faeb
Tree: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/tree/7fd7faeb
Diff: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/diff/7fd7faeb
Branch: refs/heads/jsonld-java
Commit: 7fd7faeb0556f1544de18201bec8886fdf40dbc5
Parents: fc70462
Author: Stian Soiland-Reyes <st...@apache.org>
Authored: Mon Sep 5 17:45:58 2016 +0100
Committer: Stian Soiland-Reyes <st...@apache.org>
Committed: Mon Sep 5 17:47:00 2016 +0100
----------------------------------------------------------------------
api/pom.xml | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/7fd7faeb/api/pom.xml
----------------------------------------------------------------------
diff --git a/api/pom.xml b/api/pom.xml
index 4b13406..14278d6 100644
--- a/api/pom.xml
+++ b/api/pom.xml
@@ -47,10 +47,9 @@
<artifactId>maven-jar-plugin</artifactId>
<executions>
<execution>
- <id>jar-and-test-jar</id>
- <!-- Expose abstract test classes -->
+ <id>test-jar</id>
+ <!-- Also expose abstract test classes -->
<goals>
- <goal>jar</goal>
<goal>test-jar</goal>
</goals>
</execution>