Prez Manifest Model
A Prez Manifest is an RDF file that describes and links to a set of resources that can be loaded into an RDF database for Prez to provide access to.
This page defines the Prez Manifest specification and links to relevant tools.
Model
Overview
graph LR
style Manifest fill:#FF90BB,stroke:#666,stroke-width:2px
Manifest --1:1-N--> ResourceDescriptor;
style ResourceDescriptor fill:#FFC1DA,stroke:#666,stroke-width:2px
style artifact fill:#F8F8E1,stroke:#666,stroke-width:2px
ResourceDescriptor --1:1-N--> artifact;
ResourceDescriptor --1:1--> hasRole;
ResourceDescriptor --1:0-N--> conformsTo;
ResourceDescriptor --1:0-1--> additionalType;
ResourceDescriptor --1:0-1--> sync;
style artifact fill:#F8F8E1,stroke:#666,stroke-width:2px
artifact --1:0-N--> conformsTo;
artifact --1:0-1--> additionalType;
artifact --1:0-1--> sync;
artifact --1:0-1--> mainEntity;
artifact --1:0-1--> contentLocation;
style artifact fill:#F8F8E1,stroke:#666,stroke-width:2px
artifact --1:0-1--> dateModified;
artifact --1:0-1--> versionIRI;
artifact --1:0-1--> version;
See Annex A: Diagram Breakdown below for a part-by-part explanation of this diagram.
Rules
-
An instance of the Manifest class,
prez:Manifest
, MUST have 1 or more Resource Descriptors,prof:ResourceDescriptor
instances, indicated by theprof:hasResource
predicate. The Manifest instance can be identified by an IRI or a Blank Node. -
Each Resource Descriptor MUST have at least one
prof:hasArtifact
predicate indicating either an RDF literal resource (a string) containing the location of the artifact or a Blank Node containing the location of the artifacts indicated by theschema:contentLocation
predicate and the main artifact IRI within that content location indicated byschema:mainEntity
.- See the Main Entity details below
-
Where content location is indicated, it MUST be a file path or path pattern relative to the manifest or a URL.
-
Each Resource Descriptor MUST also have exactly one
prof:hasRole
predicate indicating a Concept from the Manifest Resource Roles Vocabulary. -
Each Resource Descriptor MAY have a
schema:name
and/or aschema:description
predicate indicating literal resources naming and describing it. -
A Resource, or an Artifact, MAY indicate that it (if an Artifact) or the Artifacts within it (if a Resource) conform to any number of defined Standards or Profiles of Standards, using the predicate
dcterms:conformsTo
.- Validators can be indicated either by using "well known" validator IRIs or by directly indicating the validator RDF file
- current "well known" are listed below and can be indicated using an IRI like this:
dcterms:conformsTo <WELL-KNONW-VALIDATOR-IRI> ;
- other validators, such as
my-local-validator.ttl
orhttp://online-validator.com/val.ttl
should be indicated using a literal, like this:dcterms:conformsTo "path/from/manifest/root/to/my-local-validator.ttl" ;
- current "well known" are listed below and can be indicated using an IRI like this:
- See the Known Validators list below
- Validators can be indicated either by using "well known" validator IRIs or by directly indicating the validator RDF file
-
A Resource, or an Artifact, MAY indicate that it (if an Artifact) or the Artifacts within it (if a Resource) is of a specific class, using the predicate
schema:additionalType
- See the Known Classes list below
- A Resource, or an Artifact, MAY indicate that it should not be ignored by synchronisation tooling by setting a predicate
prez:sync
tofalse
- See the Indicating no action section below
- An Artifact may have "versioning information" about it indicated by use of a number of known versioning predicates
- see the Artifact Versioning section below
Known Validators
The following validators can be referred to by IRI, as described above:
Validator | IRI | Scope |
---|---|---|
GeoSPARQL | <http://www.opengis.net/def/geosparql/validator> |
Spatial Objects |
IDN Catalogue Profile | <https://data.idnau.org/pid/cp/validator> |
Catalogued resources containing Indigenous metadata |
VocPub | <https://linked.data.gov.au/def/vocpub> |
Vocabularies |
Known Classes
Some classes of resource are commonly catalogued and, when they are, their class does not need to be indicated within a Manifest. These classes are:
dcat:Resource
dcat:Dataset
dcat:Catalog
owl:Ontology
schema:CreativeWork
schema:Dataset
schema:DataCatalog
skos:ConceptScheme
If an Artifact, or all the Artifacts within a Resource, are not one of these types, then they can be indicated as being so by use of schema:additionalType
like this:
[]
a prez:Manifest ;
prof:hasResource
# ...
[
prof:hasArtifact "resources/*.ttl" ;
prof:hasRole mrr:ResourceData ;
schema:additionalType <{A-CLASS-IRI}> ;
] ,
# ...
.
This will allow the Manifest to communicate the class of the object software should be looking for within the resource.
Main Entity
If, for some reason, a resource is neither of one of the Known Classes nore it its class able to be indicated with schema:additionalType
, the specific IRI of the resource can be indicated using schema:mainEntity
. This may be needed in situations where an RDF file containing a resource also contains multiple other instance of the same class.
[]
a prez:Manifest ;
prof:hasResource
# ...
[
prof:hasArtifact "resources/file1.ttl" ;
prof:hasRole mrr:ResourceData ;
schema:mainEntity <{RESOURCE-IRI}> ;
] ,
# ...
.
Indicating no action
If a Manifest wishes to list a resource but indicate it not for automatic handling by manifest tooling - perhaps it's too large to synchronise with an RDF DB - then the predicate prez:sync
with the value false
should be set.
Here is an example of a Manifest indicating 4 spatial datasets, one of which is too large to sync:
[]
a prez:Manifest ;
prof:hasResource
[
prof:hasArtifact "resources/*.ttl" ; # datset1.ttl, dataset2.ttl & dataset3.ttl
prof:hasRole mrr:ResourceData ;
] ,
[
prof:hasArtifact "resources/large/dataset4.ttl" ;
prof:hasRole mrr:ResourceData ;
prez:sync false ;
] ;
.
Artifact versioning
An Artifact's version may be indicated by use of any or all of the following predicates:
owl:versionIRI
schema:version
orowl:versionInfo
schema:dateModified
ordcterms:modified
If this is done, then tools, such as prezmanifest that load and sync Manifest-described data, can obtain versioning information from a Manifest file, rather than by inspecting Artifacts' contents.
Validation
The validator - a file containing rules - for Manifests is given in Annex B: Manifest Validator below.
A manifest and all its content can also be validated using the prezmanifest tool's validate function which both validates a Manifest file using the validator below and also any content for which a conformance claim is given.
See the Tools section below for info on the prezmanifest tool.
Additionally, any stand-alon SHACL validator can also be used to validate a Manifest. Again, see the tools section below.
Examples
Valid
A simple, valid, Manifest.
PREFIX mrr: <https://prez.dev/ManifestResourceRoles/>
PREFIX prez: <https://prez.dev/>
PREFIX prof: <http://www.w3.org/ns/dx/prof/>
PREFIX schema: <https://schema.org/>
[]
a prez:Manifest ;
prof:hasResource
[
prof:hasArtifact "catalogue.ttl" ;
prof:hasRole mrr:CatalogueData ;
schema:description "The definition of, and medata for, the container which here is a dcat:Catalog object" ;
schema:name "Catalogue Definition"
] ,
[
prof:hasArtifact "vocabs/*.ttl" ;
prof:hasRole mrr:ResourceData ;
schema:description "skos:ConceptsScheme objects in RDF (Turtle) files in the vocabs/ folder" ;
schema:name "Resource Data"
] ,
[
prof:hasArtifact "https://github.com/RDFLib/prez/blob/main/prez/reference_data/profiles/ogc_records_profile.ttl" ;
prof:hasRole mrr:CatalogueAndResourceModel ;
schema:description "The default Prez profile for Records API" ;
schema:name "Profile Definition"
] ,
[
prof:hasArtifact "_background/labels.ttl" ;
prof:hasRole mrr:CompleteCatalogueAndResourceLabels ;
schema:description "An RDF file containing all the labels for the container content" ;
schema:name "Labels" ;
] ;
.
Invalid - no role
The second Resource Descriptor does not indicate a role as it is commented out.
PREFIX mrr: <https://prez.dev/ManifestResourceRoles/>
PREFIX prez: <https://prez.dev/>
PREFIX prof: <http://www.w3.org/ns/dx/prof/>
PREFIX schema: <https://schema.org/>
[]
a prez:Manifest ;
prof:hasResource
[
prof:hasArtifact "catalogue.ttl" ;
prof:hasRole mrr:CatalogueData ;
schema:description "The definition of, and medata for, the container which here is a dcat:Catalog object" ;
schema:name "Catalogue Definition"
] ,
[
prof:hasArtifact "vocabs/*.ttl" ;
# prof:hasRole mrr:ResourceData ;
schema:description "skos:ConceptsScheme objects in RDF (Turtle) files in the vocabs/ folder" ;
schema:name "Content Data"
] ,
[
prof:hasArtifact "https://github.com/RDFLib/prez/blob/main/prez/reference_data/profiles/ogc_records_profile.ttl" ;
prof:hasRole mrr:CatalogueAndResourceModel ;
schema:description "The default Prez profile for Records API" ;
schema:name "Profile Definition"
] ,
[
prof:hasArtifact "_background/labels.ttl" ;
prof:hasRole mrr:CompleteCatalogueAndResourceLabels ;
schema:description "An RDF file containing all the labels for the container content" ;
schema:name "Labels" ;
] ;
.
Invalid - bad location
The third resource specifies an invalid location, the non-existent web address of https://github.com/RDFLib/prez/blob/main/prez/reference_data/profiles/ogc_records_profile.ttlx which has had an extra 'x' added at the end.
PREFIX mrr: <https://prez.dev/ManifestResourceRoles/>
PREFIX prez: <https://prez.dev/>
PREFIX prof: <http://www.w3.org/ns/dx/prof/>
PREFIX schema: <https://schema.org/>
[]
a prez:Manifest ;
prof:hasResource
[
prof:hasArtifact "catalogue.ttl" ;
prof:hasRole mrr:CatalogueData ;
schema:description "The definition of, and medata for, the container which here is a dcat:Catalog object" ;
schema:name "Catalogue Definition"
] ,
[
prof:hasArtifact "vocabs/*.ttl" ;
prof:hasRole mrr:ResourceData ;
schema:description "skos:ConceptsScheme objects in RDF (Turtle) files in the vocabs/ folder" ;
schema:name "Content Data"
] ,
[
prof:hasArtifact "https://github.com/RDFLib/prez/blob/main/prez/reference_data/profiles/ogc_records_profile.ttlx" ;
prof:hasRole mrr:CatalogueAndResourceModel ;
schema:description "The default Prez profile for Records API" ;
schema:name "Profile Definition"
] ,
[
prof:hasArtifact "_background/labels.ttl" ;
prof:hasRole mrr:CompleteCatalogueAndResourceLabels ;
schema:description "An RDF file containing all the labels for the container content" ;
schema:name "Labels" ;
] ;
.
mainEntity
use
A snippet of a Manifest - just one value for hasResource
- showing use of mainEntity
and contentLocation
instead of just a literal file path.
[
prof:hasArtifact
[
schema:contentLocation "vocabs/image-test.ttl" ;
schema:mainEntity <https://example.com/demo-vocabs/image-test> ;
] ,
"vocabs/language-test.ttl" ;
prof:hasRole mrr:ResourceData ;
schema:description "skos:ConceptScheme objects in RDF (Turtle) files in the vocabs/ folder" ;
schema:name "Resource Data"
] ,
conformance claim - single
A single artifact claiming conformance to the VocPub Profile of SKOS.
prof:hasArtifact
[
schema:contentLocation "vocabs/image-test.ttl" ;
schema:mainEntity <https://example.com/demo-vocabs/image-test> ;
dcterms:conformsTo <https://linked.data.gov.au/def/vocpub> ;
] ,
conformance claim - all
A single Resource in a Manifest claiming conformance to the VocPub Profile of SKOS for all artifacts (there are 3 given).
[
prof:hasArtifact
[
schema:contentLocation "vocabs/image-test.ttl" ;
schema:mainEntity <https://example.com/demo-vocabs/image-test> ;
] ,
"vocabs/language-test.ttl" ;
"vocabs/other-vocab.ttl" ;
prof:hasRole mrr:ResourceData ;
# ...
dcterms:conformsTo <https://linked.data.gov.au/def/vocpub> ;
] ,
conformance claim - supplied validator
To indicate a validator stored in a local file, my-local-validator.ttl
:
[
prof:hasArtifact
[
schema:contentLocation "vocabs/image-test.ttl" ;
schema:mainEntity <https://example.com/demo-vocabs/image-test> ;
] ,
"vocabs/language-test.ttl" ;
"vocabs/other-vocab.ttl" ;
prof:hasRole mrr:ResourceData ;
# ...
dcterms:conformsTo "path/to/my-local-validator.ttl" ;
] ,
additionalType
Where a
Tools
prezmanifest - GitHub, PyPI
The prezmanifest command line tool and Python package, available on GitHub and on PyPI, provides a number of functions to work with Prez Manifests. The functions provided are:
- validate - validate a Manifest file and contents
- label - check Manifest contents for unlabelled elements
- document - create certain forms of documentation
- load - load a Manifest's content into a file or DB
- sync - synchronise a Manifest's contents with a DB
See the package's repository for installation and use details.
SHACL validation
The preferred way to perform validation of a Prez Manifest file is to use the prezmanifest tool's validate function, as listed above. Hoever, you can also perform validation of a manifest - the manifest file only, not the content it refers to, using any one of a number of SHACL validators.
See these notes for a listing of general-purpose SHACL validation tools:
Annex A: Diagram Breakdown
Manifest
& ResourceDescriptor
graph LR
style Manifest fill:#FF90BB,stroke:#666,stroke-width:2px
Manifest --1:1-N--> ResourceDescriptor;
style ResourceDescriptor fill:#FFC1DA,stroke:#666,stroke-width:2px
style artifact fill:#F8F8E1,stroke:#666,stroke-width:2px
ResourceDescriptor --1:1-N--> artifact;
subgraph main
ResourceDescriptor --1:1--> hasRole;
ResourceDescriptor --1:0-N--> conformsTo;
ResourceDescriptor --1:0-1--> additionalType;
ResourceDescriptor --1:0-1--> sync;
end
A Manifest
must indicate at least one ResourceDescriptor
.
ResourceDescriptor
instances MUST have the predicates of:
hasRole
- exactly 1hasArtifact
- at least 1
ResourceDescriptor
instances MAY have the predicates of:
conformsTo
- at most 1additionalType
- at most 1sync
- at most 1. If present, value must befalse
, e.g.true
is default
Artifact
- description
graph LR
style artifact fill:#F8F8E1,stroke:#666,stroke-width:2px
graph LR
style artifact fill:#F8F8E1,stroke:#666,stroke-width:2px
subgraph main
artifact --1:0-N--> conformsTo;
artifact --1:0-1--> additionalType;
artifact --1:0-1--> sync;
end
subgraph artifact-only
artifact --1:0-1--> mainEntity;
artifact --1:0-1--> contentLocation;
end
The value for the hasArtifact
predicate can be either:
- a literal, with no further predicates of its own
- a node (likely a Blank Node)
If a node, it MUST have:
contentLocation
- exactly 1mainEntity
- exactly 1
If a node, it MAY have:
conformsTo
- at most 1additionalType
- at most 1sync
- at most 1. If present, value must befalse
, e.g.true
is default
Artifact
- versioning
If a node, an Artifact
MAY have:
dateModified
- at most 1versionIRI
- at most 1version
- at most 1
graph LR
style artifact fill:#F8F8E1,stroke:#666,stroke-width:2px
subgraph versioning
artifact --1:0-1--> dateModified;
artifact --1:0-1--> versionIRI;
artifact --1:0-1--> version;
end
Annex B: Manifest Validator
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX prez: <https://prez.dev/>
PREFIX prof: <http://www.w3.org/ns/dx/prof/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX schema: <https://schema.org/>
PREFIX sh: <http://www.w3.org/ns/shacl#>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX val: <https://prez.dev/manifest-validator/>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
<https://prez.dev/manifest-validator>
a owl:Ontology ;
owl:versionIRI val:0.5.0 ;
owl:versionInfo """0.5.0: Handles artifacts as objects with predicates, not just literals (file paths)
0.4.0: First public version""" ;
schema:creator <https://orcid.org/0000-0002-8742-7730> ;
schema:dateCreated "2024-11-29"^^xsd:date ;
schema:dateModified "2025-01-26"^^xsd:date ;
schema:definition "The SHACL Shapes Validator for the Prez Ontology Manifest Model"@en ;
schema:name "Prez Manifest Validator" ;
schema:publisher <https://kurrawong.ai> ;
.
val:ShapeN01
a sh:NodeShape ;
sh:property val:ShapeP01 ;
sh:targetClass prez:Manifest ;
.
val:ShapeN02
a sh:NodeShape ;
sh:property
val:ShapeP02 ,
val:ShapeP03 ,
val:ShapeP04 ,
val:ShapeP05 ;
sh:targetObjectsOf prof:hasResource ;
.
val:ShapeP01
a sh:PropertyShape ;
sh:nodeKind sh:BlankNodeOrIRI ;
sh:message "ShapeP01: You must supply at least one value for prof:hasResource for a prez:Manifest and it must be either a Blank Node or an IRI" ;
sh:minCount 1 ;
sh:path prof:hasResource ;
.
val:ShapeP02
a sh:PropertyShape ;
sh:message "ShapeP02: You must supply at least one value for prof:hasArtifact for a prez:Manifest's Resource Descriptors and each must be a string that can be interpreted as a file path, either relative to the manifest file, or an absolute system path or a URL or a Blank Node with a schema:contentLocation and schema:mainEntity predicates" ;
sh:minCount 1 ;
sh:or (
[ sh:nodeKind sh:Literal ]
[ sh:nodeKind sh:BlankNode ]
) ;
sh:path prof:hasArtifact ;
.
val:ShapeN04
a sh:NodeShape ;
sh:message "ShapeN04: If you supplied a prof:hasArtifact for a prez:Manifest's Resource Descriptors that indicated a Blank Node, the Blank Node must contain exactly one schema:contentLocation and exactly one schema:mainEntity predicates" ;
sh:targetObjectsOf prof:hasArtifact ;
sh:or (
[ sh:nodeKind sh:Literal ]
[
sh:nodeKind sh:BlankNode ;
sh:property [
sh:path schema:contentLocation ;
sh:nodeKind sh:Literal ;
sh:minCount 1 ;
sh:maxCount 1 ;
sh:message "ShapeN04 P01: You supplied a prof:hasArtifact value as Blank Node, the Blank Node so it must contain exactly exactly one schema:contentLocation predicate" ;
] ,
[
sh:path schema:mainEntity ;
sh:nodeKind sh:IRI ;
sh:minCount 1 ;
sh:maxCount 1 ;
sh:message "ShapeN04 P02: You supplied a prof:hasArtifact value as Blank Node, the Blank Node so it must contain exactly exactly one schema:mainEntity predicate" ;
] ;
]
) ;
.
val:ShapeP03
a sh:PropertyShape ;
sh:maxCount 1 ;
sh:message "ShapeP03: You must supply exactly one value for prof:hasRole for a prez:Manifest's Resource Descriptors with the value selected from the Prez Manifest Resource Roles Vocabulary" ;
sh:minCount 1 ;
sh:nodeKind sh:IRI ;
sh:path prof:hasRole ;
.
val:ShapeP04
a sh:PropertyShape ;
sh:maxCount 1 ;
sh:message "ShapeP04: If you supply a schema:description for a prez:Manifest's Resource Descriptors, it must be either a plain string or a langString literal" ;
sh:or (
[ sh:datatype xsd:string ]
[ sh:datatype rdf:langString ]
) ;
sh:path schema:description ;
.
val:ShapeP05
a sh:PropertyShape ;
sh:maxCount 1 ;
sh:message "ShapeP05: If you supply a schema:name for a prez:Manifest's Resource Descriptors, it must be either a plain string or a langString literal" ;
sh:or (
[ sh:datatype xsd:string ]
[ sh:datatype rdf:langString ]
) ;
sh:path schema:name ;
.
val:ShapeN03
a sh:NodeShape ;
sh:targetObjectsOf prof:hasRole ;
sh:property [
a sh:PropertyShape ;
sh:minCount 1 ;
sh:maxCount 1 ;
sh:path skos:inScheme ;
] ;
.
val:0.5.0
schema:name "0.5.0" ;
.
<https://orcid.org/0000-0002-8742-7730>
a schema:Person ;
schema:email "nick@kurrawong.ai"^^xsd:anyURI ;
schema:identifier "https://orcid.org/0000-0002-8742-7730"^^xsd:anyURI ;
schema:memberOf <https://kurrawong.ai> ;
schema:name "Nicholas J. Car" ;
.
<https://kurrawong.ai>
a schema:Organization ;
schema:name "KurrawongAI" ;
schema:url "https://kurrawong.ai"^^xsd:anyURI ;
.