Skip to content

Latest commit

 

History

History
521 lines (440 loc) · 26.6 KB

WebResource.md

File metadata and controls

521 lines (440 loc) · 26.6 KB

Shapes definitions for edm:WebResource class

This document was generated from the shapes file using this software

This shape gathers all constraints that apply to a edm:WebResource class

The following constraints apply to shape or are not restricted to a specific property:

Constraintsclosure

The following table shows an overview of the constraints divided per property:

Property Cardinality Value Type Constraints
dc:creator 0..* range-class
dc:description 0..* datatype
dc:format 0..*
dc:rights 0..* redundancy
dc:source 0..*
dct:conformsTo 0..*
dct:created 0..* correlation_1, correlation_2, range-values
dct:extent 0..*
dct:hasPart 0..* IRI range-class
dct:isFormatOf 0..*
dct:isPartOf 0..* IRI range-class
dct:issued 0..* correlation, range-class, range-values
edm:isNextInSequence 0..* IRI correlation, range-class
edm:rights 1..? IRI values
owl:sameAs 0..* IRI

Shape Body


Shape body in Turtle syntax:

<http://www.europeana.eu/schemas/edm/shapes/external/WebResource#base>
  a sh:Shape ;
  rdfs:subClassOf rdfs:Resource ;
  sh:description """This shape gathers all constraints that apply to a 
                    edm:WebResource class""" ;

  sh:scopeClass edm:WebResource ;

  # class level constraints
  sh:constraint      <WebResource#closure> ;

  # DC properties
  sh:property        <WebResource/dc_creator#range-class> ;
  sh:property        <WebResource/dc_rights#redundancy> ;

  # DCTERMS properties
  sh:property        <WebResource/dct_created#range-values> ;
  sh:property        <WebResource/dct_created#correlation_1> ;
  sh:property        <WebResource/dct_created#correlation_2> ;
  sh:property        <WebResource/dc_description#datatype> ;
  sh:property        <WebResource/dct_hasPart#type> ;
  sh:property        <WebResource/dct_hasPart#range-class> ;
  sh:property        <WebResource/dct_isPartOf#type> ;
  sh:property        <WebResource/dct_isPartOf#range-class> ;
  sh:property        <WebResource/dct_issued#range-values> ;
  sh:property        <WebResource/dct_issued#range-class> ;
  sh:property        <WebResource/dct_issued#correlation> ;

  # EDM properties
  sh:property        <WebResource/edm_isNextInSequence#type> ;
  sh:property        <WebResource/edm_isNextInSequence#range-class> ;
  sh:property        <WebResource/edm_isNextInSequence#correlation> ;
  sh:property        <WebResource/edm_rights#type> ;
  sh:property        <WebResource/edm_rights#cardinality> ;
  sh:property        <WebResource/edm_rights#values> ;

  # OWL properties
  sh:property        <WebResource/owl_sameAs#type> ;
.

Shape level constraints


descriptionAn edm:WebResource resource must be defined using only the properties defined in EDM for WebResources
subjectR-206-DEFINE-ALLOWED-NAMESPACES
typehttp://www.europeana.eu/schemas/edm/shapes/categories#closure
_Shape definition in Turtle syntax:_
<http://www.europeana.eu/schemas/edm/shapes/external/WebResource#closure>
  sh:description """An edm:WebResource resource must be defined using only the 
                    properties defined in EDM for WebResources""" ;
  dc:type esc:closure ;
  dc:relation "R-206-DEFINE-ALLOWED-NAMESPACES" ;
  sh:closed true ;
  sh:ignoredProperties (
    rdf:type 
    dc:creator dc:description dc:format dc:rights dc:source
    dct:conformsTo dct:created dct:extent 
    dct:hasPart dct:isFormatOf dct:isPartOf dct:issued
    edm:isNextInSequence edm:rights
    owl:sameAs
  ) ;
.

description
subject
type
_Shape definition in Turtle syntax:_
description
subject
type
_Shape definition in Turtle syntax:_

description
subject
type
_Shape definition in Turtle syntax:_


description
subject
type
_Shape definition in Turtle syntax:_
description
subject
type
_Shape definition in Turtle syntax:_
description
subject
type
_Shape definition in Turtle syntax:_

descriptiondcterms:hasPart must refer to a valid edm:WebResource
subjectR-225-VALIDATION-OF-CLASS-ASSOCIATION
typehttp://www.europeana.eu/schemas/edm/shapes/categories#range-class
_Shape definition in Turtle syntax:_
<http://www.europeana.eu/schemas/edm/shapes/external/WebResource/dct_hasPart#range-class>
  a sh:PropertyConstraint ;
  sh:description "dcterms:hasPart must refer to a valid edm:WebResource" ;
  dc:type esc:range-class ;
  dc:relation "R-225-VALIDATION-OF-CLASS-ASSOCIATION" ;
  sh:predicate dct:hasPart ;
  sh:valueShape WebResource: ;
  sh:class edm:WebResource ;
.
description
subject
typehttp://www.europeana.eu/schemas/edm/shapes/categories#type
_Shape definition in Turtle syntax:_
<http://www.europeana.eu/schemas/edm/shapes/external/WebResource/dct_hasPart#type>
  a sh:PropertyConstraint ;
  dc:type esc:type ;
  sh:predicate dct:hasPart ;
  sh:nodeKind sh:IRI ;
.


descriptiondcterms:isPartOf must refer to a valid edm:WebResource
subjectR-225-VALIDATION-OF-CLASS-ASSOCIATION
typehttp://www.europeana.eu/schemas/edm/shapes/categories#range-class
_Shape definition in Turtle syntax:_
<http://www.europeana.eu/schemas/edm/shapes/external/WebResource/dct_isPartOf#range-class>
  a sh:PropertyConstraint ;
  sh:description "dcterms:isPartOf must refer to a valid edm:WebResource" ;
  dc:type esc:range-class ;
  dc:relation "R-225-VALIDATION-OF-CLASS-ASSOCIATION" ;
  sh:predicate dct:isPartOf ;
  sh:valueShape WebResource: ;
  sh:class edm:WebResource ;
.
description
subject
typehttp://www.europeana.eu/schemas/edm/shapes/categories#type
_Shape definition in Turtle syntax:_
<http://www.europeana.eu/schemas/edm/shapes/external/WebResource/dct_isPartOf#type>
  a sh:PropertyConstraint ;
  dc:type esc:type ;
  sh:predicate dct:isPartOf ;
  sh:nodeKind sh:IRI ;
.

descriptiondcterms:issued must be equal or later than dcterms:created and dcterms:issued of the ProvidedCHO
subjectR-43-LITERAL-VALUE-COMPARISON
typehttp://www.europeana.eu/schemas/edm/shapes/categories#correlation
_Shape definition in Turtle syntax:_
<http://www.europeana.eu/schemas/edm/shapes/external/WebResource/dct_issued#correlation>
  a sh:PropertyConstraint ;
  dc:type esc:correlation ;
  sh:description """dcterms:issued must be equal or later than dcterms:created 
                    and dcterms:issued of the ProvidedCHO""" ;
  dc:type esc:correlation ;
  dc:relation "R-43-LITERAL-VALUE-COMPARISON" ;
  sh:predicate dct:issued ;

  #requires a second focus node (ie. ProvidedCHO)
  #can though be implemented using SPARQL
.
descriptionthe reference should be one to a TimeSpan (the access to the data and the data itself should be formatted according to the TimeSpan specifications.)
subjectR-171-VALIDATION-OF-URIS-BY-DEREFERENCING
typehttp://www.europeana.eu/schemas/edm/shapes/categories#range-class
_Shape definition in Turtle syntax:_
<http://www.europeana.eu/schemas/edm/shapes/external/WebResource/dct_issued#range-class>
  a sh:PropertyConstraint ;
  sh:description """the reference should be one to a TimeSpan (the access to 
                    the data and the data itself should be formatted according 
                    to the TimeSpan specifications.)""" ;
  dc:type esc:range-class ;
  dc:relation "R-171-VALIDATION-OF-URIS-BY-DEREFERENCING" ;  
  sh:predicate dct:issued ;
  sh:filterShape [
      sh:property [
          sh:predicate dct:issued ;
          sh:nodeKind sh:IRI ;
      ]
  ] ;
  sh:valueShape TimeSpan: ;
  sh:class edm:TimeSpan ;
.
descriptionCheck that the value for date matches ISO 8601 starting with the year and hyphenating the day and month parts: YYYY-MM-DD
subjectR-44-PATTERN-MATCHING-ON-RDF-LITERALS
typehttp://www.europeana.eu/schemas/edm/shapes/categories#range-value
_Shape definition in Turtle syntax:_
<http://www.europeana.eu/schemas/edm/shapes/external/WebResource/dct_issued#range-values>
  a sh:PropertyConstraint ;
  sh:description """Check that the value for date matches ISO 8601 starting with
                    the year and hyphenating the day and month parts: 
                    YYYY-MM-DD""" ;
  dc:type esc:range-value ;
  dc:relation "R-44-PATTERN-MATCHING-ON-RDF-LITERALS" ;
  sh:predicate dct:issued ;
  sh:filterShape [ #restrict only to Literals
    sh:property [
      sh:predicate dct:issued ;
      sh:nodeKind sh:Literal ;
    ]
  ] ;
  #does not check for valid dates but could be expanded
  sh:pattern "^[0-9]{4}[-][0-9]{2}[-][0-9]{2}$" ;
.

descriptionBoth WebResources referred to and subject of this property must share the same parent, if present
subject?
typehttp://www.europeana.eu/schemas/edm/shapes/categories#correlation
_Shape definition in Turtle syntax:_
<http://www.europeana.eu/schemas/edm/shapes/external/WebResource/edm_isNextInSequence#correlation>
  a sh:PropertyConstraint ;
  dc:type esc:correlation ;
  sh:description """Both WebResources referred to and subject of this property 
                    must share the same parent, if present""" ;
# sh:description """Check that if WebResource 2 is PartOf WebResource X and 
#                   IsNextInSequence WebResource 1 and WebResource 2 are part of
#                   WebResource X""" ;
  dc:relation "?" ;
  sh:predicate edm:isNextInSequence ;

# Implement using a SPARQL query
.
descriptionThe reference should be a valid edm:WebResource
subjectR-225-VALIDATION-OF-CLASS-ASSOCIATION, R-171-VALIDATION-OF-URIS-BY-DEREFERENCING
typehttp://www.europeana.eu/schemas/edm/shapes/categories#range-class
_Shape definition in Turtle syntax:_
<http://www.europeana.eu/schemas/edm/shapes/external/WebResource/edm_isNextInSequence#range-class>
  a sh:PropertyConstraint ;
  sh:description """The reference should be a valid edm:WebResource""" ;
  dc:type esc:range-class ;
  dc:relation "R-171-VALIDATION-OF-URIS-BY-DEREFERENCING"
           , "R-225-VALIDATION-OF-CLASS-ASSOCIATION" ;
  sh:predicate edm:isNextInSequence ;
  sh:valueShape WebResource: ;
  sh:class edm:WebResource ;
.
description
subject
typehttp://www.europeana.eu/schemas/edm/shapes/categories#type
_Shape definition in Turtle syntax:_
<http://www.europeana.eu/schemas/edm/shapes/external/WebResource/edm_isNextInSequence#type>
  a sh:PropertyConstraint ;
  dc:type esc:type ;
  sh:predicate edm:isNextInSequence ;
  sh:nodeKind sh:IRI ;
.

description
subjectR-211-CARDINALITY-CONSTRAINTS
typehttp://www.europeana.eu/schemas/edm/shapes/categories#cardinality
_Shape definition in Turtle syntax:_
<http://www.europeana.eu/schemas/edm/shapes/external/WebResource/edm_rights#cardinality>
  a sh:PropertyConstraint ;
  dc:type esc:cardinality ;
  dc:relation "R-211-CARDINALITY-CONSTRAINTS" ;
  sh:predicate edm:rights;
  sh:minCount 0 ;
  sh:minCount 1 ;
.
description
subject
typehttp://www.europeana.eu/schemas/edm/shapes/categories#type
_Shape definition in Turtle syntax:_
<http://www.europeana.eu/schemas/edm/shapes/external/WebResource/edm_rights#type>
  a sh:PropertyConstraint ;
  dc:type esc:type ;
  sh:predicate edm:rights ;
  sh:nodeKind sh:IRI ;
.
descriptionCheck the value is one of the controlled values: http://pro.europeana.eu/web/guest/available-rights-statements
subjectR-30-DEFINE-VALUE-LISTS, R-210-DEFINE-EXCLUSIVELY-ALLOWED-PROPERTIES
typehttp://www.europeana.eu/schemas/edm/shapes/categories#values
_Shape definition in Turtle syntax:_
<http://www.europeana.eu/schemas/edm/shapes/external/WebResource/edm_rights#values>
  a sh:PropertyConstraint ;
  dc:type esc:values ;
  sh:description """Check the value is one of the controlled values: 
             http://pro.europeana.eu/web/guest/available-rights-statements """ ;
  dc:relation "R-210-DEFINE-EXCLUSIVELY-ALLOWED-PROPERTIES"
            , "R-30-DEFINE-VALUE-LISTS" ;
  sh:predicate edm:rights ;
  sh:in ( <http://creativecommons.org/publicdomain/mark/1.0/> 
          <http://www.europeana.eu/rights/out-of-copyright-non-commercial/>
          <http://creativecommons.org/publicdomain/zero/1.0/>
          <http://creativecommons.org/licenses/by/4.0/>
          <http://creativecommons.org/licenses/by-sa/4.0/>
          <http://creativecommons.org/licenses/by-nd/4.0/>
          <http://creativecommons.org/licenses/by-nc/4.0/>
          <http://creativecommons.org/licenses/by-nc-sa/4.0/>
          <http://creativecommons.org/licenses/by-nc-nd/4.0/>
          <http://www.europeana.eu/rights/rr-f/>
          <http://www.europeana.eu/rights/rr-p/> 
          <http://www.europeana.eu/rights/orphan-work-eu/>
          <http://www.europeana.eu/rights/unknown/> ) ;
.

description
subject
typehttp://www.europeana.eu/schemas/edm/shapes/categories#type
_Shape definition in Turtle syntax:_
<http://www.europeana.eu/schemas/edm/shapes/external/WebResource/owl_sameAs#type>
  a sh:PropertyConstraint ;
  dc:type esc:type ;
  sh:predicate owl:sameAs ;
  sh:nodeKind sh:IRI ;
.