Shaclgen takes either a data graph(s) or schema(s) as input and generates a basic shape file based on the classes and properties present.
Shape files from data graphs: By default, the input graph is processed as a data graph (instance triples). Three formats are possible for data graphs: simple, nested, and extended.
Simple: Each class and property generate individual Node- and PropertyShapes.
Nested: Property shapes will be nested in nodeshapes iif they occur with one class.
Extended: Expands nested shapes to create individual property shapes for each property, in addition to nesting them when appropriate.
Shape files from ontologies: If the input is a schema or ontology, shaclgen generates a nested shape file: properties with rdfs:domain defined in the ontology will be nested within the appropriate NodeShape. rdfs:range definitions for XML and rdfs datatypes are included.
Added support for OWL constructions is planned.
Installation
Using pip:
pip install shaclgen
From source:
Command line use:
$ shaclgen graph [optional arguments]
Example usage:
$ shaclgen https://www.lib.washington.edu/static/public/cams/data/datasets/uwSemWebParts/webResource-1-0-0.nt
Command line arguments:
positional arguments: graph The data graph(s).
optional arguments:
-h, --help show this help message and exit
-nf, --nested generates a nested shape file
-ef, --extended generates an expanded shape file
-o, --ontology input file(s) or URL(s) is a schema or ontology
-s SERIALIZATION, --serialization SERIALIZATION
result graph serialization, default is turtle
This project is still in development. Comments, questions, and issues are welcome!
Contact alexiskm at uw dot edu.
Release files for shaclgen 0.2.5.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| shaclgen-0.2.5.2.tar.gz | 43.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| shaclgen-0.2.5.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 88.9 kB
Release files / shaclgen-0.2.5.2.tar.gz
| Download URL | shaclgen-0.2.5.2.tar.gz |
|---|---|
| Size | 43.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0707cabd68ee1f5665484c2005b41910ed49f333ff192e54e90c412e1bfdcf97
|
|
BLAKE2b-256 checksum How to use checksums |
889a532e94d50f852ae84f4b9f0671f5a045248c889999557b608e4e0fa90f0b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.1
|
Release files / shaclgen-0.2.5.2-py3-none-any.whl
| Download URL | shaclgen-0.2.5.2-py3-none-any.whl |
|---|---|
| Size | 45.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
758eb4b7b17f1029f699000b22562261fea3ebc2cb194e22feab04dea115821c
|
|
BLAKE2b-256 checksum How to use checksums |
9e034b119f36d4c2572fbe5bcf812abcce0240d17d221c477ee401136d253452
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.1
|