You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jena.apache.org by an...@apache.org on 2020/08/11 21:00:10 UTC
[jena-site] branch shaclc updated (1583a20 -> 3a4f0ec)
This is an automated email from the ASF dual-hosted git repository.
andy pushed a change to branch shaclc
in repository https://gitbox.apache.org/repos/asf/jena-site.git.
discard 1583a20 SHACL-C writer information
new 3a4f0ec SHACL-C writer information
This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version. This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:
* -- * -- B -- O -- O -- O (1583a20)
\
N -- N -- N refs/heads/shaclc (3a4f0ec)
You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.
Any revisions marked "omit" are not gone; other references still
refer to them. Any revisions marked "discard" are gone forever.
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
source/documentation/shacl/__index.md | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
[jena-site] 01/01: SHACL-C writer information
Posted by an...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
andy pushed a commit to branch shaclc
in repository https://gitbox.apache.org/repos/asf/jena-site.git
commit 3a4f0ec4b96f3c51e88202e3bea60c488a0b1546
Author: Andy Seaborne <an...@apache.org>
AuthorDate: Tue Aug 11 21:55:25 2020 +0100
SHACL-C writer information
---
source/documentation/shacl/__index.md | 36 +++++++++++++++++++++++++++--------
1 file changed, 28 insertions(+), 8 deletions(-)
diff --git a/source/documentation/shacl/__index.md b/source/documentation/shacl/__index.md
index 8445f65..1b2b52a 100644
--- a/source/documentation/shacl/__index.md
+++ b/source/documentation/shacl/__index.md
@@ -1,16 +1,18 @@
---
-title: Apache Jena Shacl
+title: Apache Jena SHACL
slug: index
---
-jena-shacl is an implementation of the
+`jena-shacl` is an implementation of the
W3C [Shapes Constraint Language (SHACL)](https://www.w3.org/TR/shacl/).
It implements SHACL Core and SHACL SPARQL Constraints.
+It also provides a reader and writer for
+[SHACL Compact Syntax](https://w3c.github.io/shacl/shacl-compact-syntax/).
## Command line
The command `shacl` introduces shacl operations; it takes a sub-command
-argument.
+argument.
To validate:
@@ -18,16 +20,21 @@ To validate:
<pre>shacl v -s <i>SHAPES.ttl</i> -d <i>DATA.ttl</i></pre>
The shapes and data files can be the same; the `--shapes` is optional and
-default to the same as `--data`. This includes running individual W3C Working
+defaults to the same as `--data`. This includes running individual W3C Working
Group tests.
-To parse a file
+To parse a file:
<pre>shacl parse <i>FILE</i></pre>
<pre>shacl p <i>FILE</i></pre>
which writes out a text format.
+<pre>shacl p <i>--out=FMT</i> <i>FILE</i></pre>
+
+writes out in `text`(`t`), `compact`(`c`), `rdf`(`r`) formats. Multiple formats can be given,
+separated by "," and format `all` outputs all 3 formats.
+
## Integration with Apache Jena Fuseki
Fuseki has a new service operation `fuseki:shacl`:
@@ -60,6 +67,8 @@ is the URI of a named graph, `default` for the unnamed, default graph (and
this is the assumed value of `?graph` if not present), or `union` for union of
all named graphs in the dataset.
+Further, an argument <tt>target=<i>uri</i></tt> validates a specific node in the data.
+
Upload data in file `fu-data.ttl`:
curl -XPOST --data-binary @fu-data.ttl \
@@ -110,11 +119,22 @@ according to the shapes provided.
## SHACL Compact Syntax
-Jena can read
-[SHACL Compact Syntax](https://w3c.github.io/shacl/shacl-compact-syntax/).
-The file extensions are `.shc` and `.shaclc` and there is a registered language
+Apache Jena supports
+[SHACL Compact Syntax (SHACL-C)](https://w3c.github.io/shacl/shacl-compact-syntax/)
+for both reading and writing.
+
+The file extensions for SHACL-C are `.shc` and `.shaclc` and there is a registered language
constant `Lang.SHACLC`.
RDFDataMgr.load("shapes.shc");
RDFDataMgr.read("file:compactShapes", Lang.SHACLC);
+
+ RDFDataMgr.write(System.out, shapesGraph, Lang.SHACLC);
+
+SHACL-C is managed by the SHACL Community Group. It does not cover all possible shapes.
+When outputing SHACL-C, SHACL shapes not expressible in SHACL-C will cause an
+exception and data in the RDF graph that is not relevant will not be output. In
+other words, SHACL-C is a lossy format for RDF.
+
+The Jena SHACL-C writer will output any valid SHACL-C document.