Open SvenLieber opened 4 years ago
Hi @SvenLieber , sorry for the late reply. https://schema.org/image accepts as value both schema:URL and schema:ImageObject. The latter would be a (potentially) name resource, I believe this to be the better approach as it allows the image to be the subject of additional triples.
@prefix ex: <https://example.org/ns#> .
@prefix dct: <http://purl.org/dc/terms/> .
@prefix schema: <https://schema.org/> .
ex:myDataset a dct:Dataset ;
schema:image ex:imageURL .
ex:imageURL schema:caption "An awesome image"@en.
Hi @retog thanks for your reply.
Indeed, the use of schema:ImageObject
allows to add more provenance information.
But in case a data portal uses the schema:URL
variant (or both) the snippet below would be compliant to the intended meaning of schema.org.
However, I also just saw now on a more detailed look that in your readme you actually mention that schema:URL
is used as a class instead of a datatype because of the underlying eCH-0200 specification. Sorry, I didn't see that remark when opening the issue.
Thus, feel free to close the issue :-)
sh:property [
sh:path schema:image ;
sh:maxCount 3 ;
sh:severity sh:Violation ;
sh:or (
[
sh:datatype schema:URL ;
]
[
sh:class schema:ImageObject ;
]
)
] ;
I think the lines 227 and 363 of the SHACL shape are incorrect.
According to the shape how it is now the following data would be valid:
However, according to schema.org schema:URL is a datatype hence data using it should look like this:
Thus the shape should state the constraint
sh:datatype
instead ofsh:class
in the mentioned lines.