Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 8A1EE200BC2 for ; Thu, 17 Nov 2016 15:31:41 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 88F29160B0F; Thu, 17 Nov 2016 14:31:41 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 43126160AFF for ; Thu, 17 Nov 2016 15:31:39 +0100 (CET) Received: (qmail 65277 invoked by uid 500); 17 Nov 2016 14:31:38 -0000 Mailing-List: contact commits-help@commonsrdf.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@commonsrdf.incubator.apache.org Delivered-To: mailing list commits@commonsrdf.incubator.apache.org Received: (qmail 65268 invoked by uid 99); 17 Nov 2016 14:31:38 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 17 Nov 2016 14:31:38 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 96BE7C0670 for ; Thu, 17 Nov 2016 14:31:37 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -1.198 X-Spam-Level: X-Spam-Status: No, score=-1.198 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RP_MATCHES_RCVD=-2.999, URIBL_BLOCKED=0.001] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id QzNOcGpPEn7Y for ; Thu, 17 Nov 2016 14:31:31 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 9A1E85FCD7 for ; Thu, 17 Nov 2016 14:31:30 +0000 (UTC) Received: from svn01-us-west.apache.org (svn.apache.org [10.41.0.6]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id DB605E8EA4 for ; Thu, 17 Nov 2016 14:31:23 +0000 (UTC) Received: from svn01-us-west.apache.org (localhost [127.0.0.1]) by svn01-us-west.apache.org (ASF Mail Server at svn01-us-west.apache.org) with ESMTP id CAA3F3A27EE for ; Thu, 17 Nov 2016 14:31:23 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1001276 [14/25] - in /websites/staging/commonsrdf/trunk: ./ apidocs/ apidocs/org/apache/commons/rdf/api/ apidocs/org/apache/commons/rdf/api/class-use/ apidocs/org/apache/commons/rdf/experimental/ apidocs/org/apache/commons/rdf/experimental... Date: Thu, 17 Nov 2016 14:31:22 -0000 To: commits@commonsrdf.incubator.apache.org From: stain@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20161117143123.CAA3F3A27EE@svn01-us-west.apache.org> archived-at: Thu, 17 Nov 2016 14:31:41 -0000 Modified: websites/staging/commonsrdf/trunk/dependency-info.html ============================================================================== --- websites/staging/commonsrdf/trunk/dependency-info.html (original) +++ websites/staging/commonsrdf/trunk/dependency-info.html Thu Nov 17 14:31:21 2016 @@ -9,7 +9,7 @@ - Commons RDF API – Dependency Information + Apache Commons RDF – Dependency Information @@ -30,14 +30,14 @@ - Apache Commons RDF logo + Apache Commons RDF logo

Scala SBT

-
libraryDependencies += "org.apache.commons" % "commons-rdf-api" % "0.4.0-incubating-SNAPSHOT"
+
libraryDependencies += "org.apache.commons" % "commons-rdf-parent" % "0.4.0-incubating-SNAPSHOT"

Leiningen

-
[org.apache.commons/commons-rdf-api "0.4.0-incubating-SNAPSHOT"]
+
[org.apache.commons/commons-rdf-parent "0.4.0-incubating-SNAPSHOT"]
Modified: websites/staging/commonsrdf/trunk/distribution-management.html ============================================================================== --- websites/staging/commonsrdf/trunk/distribution-management.html (original) +++ websites/staging/commonsrdf/trunk/distribution-management.html Thu Nov 17 14:31:21 2016 @@ -9,7 +9,7 @@ - Commons RDF API – Project Distribution Management + Apache Commons RDF – Project Distribution Management @@ -30,14 +30,14 @@ - Apache Commons RDF logo + Apache Commons RDF logo
Added: websites/staging/commonsrdf/trunk/download.html ============================================================================== --- websites/staging/commonsrdf/trunk/download.html (added) +++ websites/staging/commonsrdf/trunk/download.html Thu Nov 17 14:31:21 2016 @@ -0,0 +1,331 @@ + + + + + + + + + Apache Commons RDF – Download Commons RDF + + + + + + + + + + + + + + + + + + + Apache Commons RDF logo + +
+ + + +
+ + + + + +
+

Download Commons RDF

+
+

Maven

+

Apache Commons RDF (incubating) is available from Maven Central, mirrored from ASF’s Maven repository. For convenience of IDE users, the Maven artifacts include -javadoc.jar and -sources.jar, however you might prefer the online API javadoc and the source code releases (see below).

+

To use Commons RDF with Maven, add to your pom.xml:

+ +
+
+
<dependencies>
+  <dependency>
+      <groupId>org.apache.commons</groupId>
+      <artifactId>commons-rdf-api</artifactId>
+      <version>0.3.0-incubating</version>
+  </dependency>
+
+  <!-- and at least one of the implementations: -->
+
+  <dependency>
+      <groupId>org.apache.commons</groupId>
+      <artifactId>commons-rdf-simple</artifactId>
+      <version>0.3.0-incubating</version>
+  </dependency>
+  <dependency>
+      <groupId>org.apache.commons</groupId>
+      <artifactId>commons-rdf-jsonld-java</artifactId>
+      <version>0.3.0-incubating</version>
+  </dependency>
+  <dependency>
+      <groupId>org.apache.commons</groupId>
+      <artifactId>commons-rdf-jena</artifactId>
+      <version>0.3.0-incubating</version>
+  </dependency>
+  <dependency>
+      <groupId>org.apache.commons</groupId>
+      <artifactId>commons-rdf-rdf4j</artifactId>
+      <version>0.3.0-incubating</version>
+  </dependency>
+
+</dependencies>
+
+

The <version> above might not be up to date, see the source code releases below to find the latest version.

+

See the user guide for documentation of the Apache Commons RDF API, and the implementations for details on each of the bindings.

+
+

Source code

+

Here you can find all source releases published by Apache Commons RDF (incubating).

+

For the latest developments you may also be interested in the source code repository, which is also mirrored to GitHub.

+
+

0.3.0-incubating

+

Apache Commons RDF 0.3.0-incubating was published on 2016-11-15, and is available for download from official mirrors of the ASF Distribution Directory incubator/commonsrdf:

+ + +

After downloading the files, check the signatures using the following KEYS file. The changelog is available from the Apache Commons RDF Jira.

+
+

Previous Releases

+

Previous release are available from archive.apache.org.

+
+
+ + + + + \ No newline at end of file Added: websites/staging/commonsrdf/trunk/images/apache-incubator-logo.png ============================================================================== Binary file - no diff available. Propchange: websites/staging/commonsrdf/trunk/images/apache-incubator-logo.png ------------------------------------------------------------------------------ svn:mime-type = application/octet-stream Added: websites/staging/commonsrdf/trunk/images/class-diagram.nomnoml ============================================================================== --- websites/staging/commonsrdf/trunk/images/class-diagram.nomnoml (added) +++ websites/staging/commonsrdf/trunk/images/class-diagram.nomnoml Thu Nov 17 14:31:21 2016 @@ -0,0 +1,66 @@ +// 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. + +// To render, see http://www.nomnoml.com + +#fill: #bbccdd; #aabbcc +#title: class-diagram + +#.like: fill=#fff italics + + +[GraphLike] +[TripleLike] +[QuadLike] + +[RDFTerm] +[BlankNodeOrIRI] + +[Graph] +[Dataset] +[Triple] +[Quad] +[Graph] + + +[Literal] +[IRI] +[BlankNode] + +[GraphLike] -> 0..* [TripleLike] +[GraphLike]<:-[Graph] +[GraphLike]<:-[Dataset] +[Graph] -> 0..* [Triple] +[Dataset] -> 0..* [Quad] +[Triple] -> 3 [RDFTerm] +[Quad]->4 [RDFTerm] +[TripleLike]<:-[Triple] +[QuadLike]<:-[Quad] +[TripleLike]<:-[QuadLike] +[RDFTerm]<:-[Literal] +[RDFTerm]<:-[BlankNodeOrIRI] +[BlankNodeOrIRI]<:-[BlankNode] +[BlankNodeOrIRI]<:-[IRI] + +#.factory: fill=#ccbbdd italics +[RDF||createGraph()|createDataset()|createTriple(..)|createQuad(..)|..] + +// [RDF]<:-[Simple] +// [RDF]<:-[JenaRDF] +// [RDF]<:-[RDF4J] +// [RDF]<:-[JsonLdRDF] + + Added: websites/staging/commonsrdf/trunk/images/class-diagram.png ============================================================================== Binary file - no diff available. Propchange: websites/staging/commonsrdf/trunk/images/class-diagram.png ------------------------------------------------------------------------------ svn:mime-type = application/octet-stream Added: websites/staging/commonsrdf/trunk/images/commonsrdf-logo.png ============================================================================== Binary file - no diff available. Propchange: websites/staging/commonsrdf/trunk/images/commonsrdf-logo.png ------------------------------------------------------------------------------ svn:mime-type = application/octet-stream Added: websites/staging/commonsrdf/trunk/images/commonsrdf-logo.xcf ============================================================================== Binary file - no diff available. Propchange: websites/staging/commonsrdf/trunk/images/commonsrdf-logo.xcf ------------------------------------------------------------------------------ svn:mime-type = application/octet-stream Added: websites/staging/commonsrdf/trunk/images/rss.png ============================================================================== Binary file - no diff available. Propchange: websites/staging/commonsrdf/trunk/images/rss.png ------------------------------------------------------------------------------ svn:mime-type = application/octet-stream Added: websites/staging/commonsrdf/trunk/implementations.html ============================================================================== --- websites/staging/commonsrdf/trunk/implementations.html (added) +++ websites/staging/commonsrdf/trunk/implementations.html Thu Nov 17 14:31:21 2016 @@ -0,0 +1,439 @@ + + + + + + + + + Apache Commons RDF – Implementations + + + + + + + + + + + + + + + + + + + Apache Commons RDF logo + +
+ + + +
+ + + + + +
+

Implementations

+

The Commons RDF API must be used with one or more implementations.

+

The Apache Commons RDF distribution includes bindings for the implementations:

+ + +

In addition there can be External implementations which are released separately by their respective projects.

+

One goal of the Commons RDF API is to enable runtime cross-compatibility of its implementations, therefore it is perfectly valid to combine them and for instance do:

+ +
    + +
  • Copy triples from a Jena Model to an RDF4J Repository (e.g. copying between two Common RDF Graphs)
  • + +
  • Create an RDF4J-backed Quad that use a Jena-backed BlankNode
  • + +
  • Read an RDF file with Jena’s parsers into an RDF4J-backed Dataset
  • +
+
+
+

Commons RDF Simple

+

org.apache.commons.rdf.simple is part of Commons RDF, and its main purpose is to verify and clarify the test harness. It is backed by simple (if not naive) in-memory POJO objects and have no external dependencies.

+

Note that although this module fully implements the commons-rdf API, it should not be considered as a reference implementation. It is not thread-safe and probably not scalable, however it may be useful for testing and simple usage (e.g. prototyping and creating graph fragments).

+

Usage:

+ +
+
+
<dependency>
+    <groupId>org.apache.commons</groupId>
+    <artifactId>commons-rdf-simple</artifactId>
+    <version>0.3.0-incubating</version>
+</dependency>
+
+ +
+
+
import org.apache.commons.rdf.api.Graph;
+import org.apache.commons.rdf.api.RDF;
+import org.apache.commons.rdf.simple.SimpleRDF;
+
+RDF rdf = new SimpleRDF();
+Graph graph = rdf.createGraph();
+
+
+

Apache Jena

+

org.apache.commons.rdf.jena is an implementation of the Commons RDF API backed by Apache Jena, including converters from/to Jena and Commons RDF.

+

Usage:

+ +
+
+
<dependency>
+    <groupId>org.apache.commons</groupId>
+    <artifactId>commons-rdf-jena</artifactId>
+    <version>0.3.0-incubating</version>
+</dependency>
+
+ +
+
+
import org.apache.commons.rdf.api.Graph;
+import org.apache.commons.rdf.api.RDFTermFactory;
+import org.apache.commons.rdf.jena.JenaRDF;
+
+RDF rdf = new JenaRDF();
+Graph graph = rdf.createGraph();
+
+

Objects created with JenaRDF implement interfaces like JenaQuad and JenaLiteral which give access to the underlying Jena objects through methods like asJenaNode() and asJenaGraph().

+

JenaRDF includes additional methods for converting from/to Apache Jena and Commons RDF, like asRDFTerm(Node) and asJenaNode(RDFTerm).

+
+

Generalized RDF

+

Apache Jena can support generalized RDF, e.g.:

+ +
+

A generalized RDF triple is a triple having a subject, a predicate, and object, where each can be an IRI, a blank node or a literal.

+
+

Within Commons RDF it is possible to create generalized triples and quads using JenaRDF - however note that the returned JenaGeneralizedTripleLike and JenaGeneralizedQuadLike do not have the equality semantics of Triple or Quad and thu s can’t be used with the regular Graph or Dataset methods.

+

The generalized triples/quads can be accessed as org.apache.jena.graph.Triple and org.apache.jena.sparql.core.Quad - but can’t currently be used with an equivalent generalized graph or generalized dataset within Commons RDF (see COMMONSRDF-42).

+
+

Eclipse RDF4J

+

org.apache.commons.rdf.rdf4j is an implementation of the Commons RDF API backed by Eclispe RDF4J 2.0 (formerly Sesame), including converters from/to RDF4J and Commons RDF.

+

Usage:

+ +
+
+
<dependency>
+    <groupId>org.apache.commons</groupId>
+    <artifactId>commons-rdf-rdf4j</artifactId>
+    <version>0.3.0-incubating</version>
+</dependency>
+
+ +
+
+
import org.apache.commons.rdf.api.Graph;
+import org.apache.commons.rdf.api.RDF;
+import org.apache.commons.rdf.rdf4j.RDF4J;
+
+RDF rdf = new RDF4J();
+Graph graph = rdf.createGraph();
+
+

Objects created with RDF4J implement interfaces like RDF4JTerm and RDF4JGraph which give access to the underlying Jena objects through methods like asValue() and asRepository().

+

RDF4J includes additional methods for converting from/to RDF4J and Commons RDF, like asTriple(Statement) and asRDFTerm(Value).

+
+

Closing RDF4J resources

+

When using RDF4J with an RDF4J Repository, e.g. from asRDFTermGraph(Repository), care must be taken to close underlying resources when using the methods stream() and iterate() for both Graphs and Datasets.

+

This can generally achieved using a try-with-resources block, e.g.:

+ +
+
+
int subjects;
+try (Stream<RDF4JTriple> s : graph.stream(s,p,o)) {
+  subjects = s.map(RDF4JTriple::getSubject).distinct().count()
+}
+
+

This will ensure that the underlying RDF4J RepositoryConnection and RepositoryResult are closed after use.

+

Methods that return directly, like Graph.add() and Dataset.size() will use and close separate transactions per method calls and therefore do not need any special handling; however this will come with a performance hit when doing multiple graph/dataset modifications. (See COMMONSRDF-45)

+

Java’s java.util.Iteratable and java.util.Iterator does not extend AutoClosable, and as there are many ways that a for-each loop may not run to exhaustion, Commons RDF introduces ClosableIterable, which can be used with RDF4J as:

+ +
+
+
RDF4JGraph graph; // ...
+try (ClosableIterable<Triple> s : graph.iterate()) {
+ for (Triple t : triples) {
+     return t; // OK to terminate for-loop early
+ }
+}
+
+
+

JSONLD-Java

+

org.apache.commons.rdf.jsonld is an implementation of the Commons RDF API backed by JSON-LD-Java.

+

This is primarily intended to support JSON-LD parsing and writing.

+

Usage:

+ +
+
+
<dependency>
+    <groupId>org.apache.commons</groupId>
+    <artifactId>commons-rdf-jsonld</artifactId>
+    <version>0.3.0-incubating</version>
+</dependency>
+
+ +
+
+
import org.apache.commons.rdf.api.Graph;
+import org.apache.commons.rdf.api.RDFTermFactory;
+import org.apache.commons.rdf.jsonld.JsonLdFactory;
+
+RDF rdf = new JsonLdRDF();
+Graph graph = rdfTermFactory.createGraph();
+
+
+

External implementations

+
+

OWL API

+

OWL API 5 extends Commons RDF directly for its family of RDFNode implementations. It is a partial compatibility implementation without its own RDFTermFactory, Graph or Dataset.

+
+

Related implementations

+
+

Apache Clerezza

+

Apache Clerezza is aligning its RDF core module with Commons RDF.

+
+
+ + + + + \ No newline at end of file Modified: websites/staging/commonsrdf/trunk/index.html ============================================================================== --- websites/staging/commonsrdf/trunk/index.html (original) +++ websites/staging/commonsrdf/trunk/index.html Thu Nov 17 14:31:21 2016 @@ -9,7 +9,7 @@ - Commons RDF API – About + Apache Commons RDF – Apache Commons RDF (incubating) @@ -30,14 +30,14 @@ - Apache Commons RDF logo + Apache Commons RDF logo