Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle rdf:plainliteral in the exported SHACL #219

Open
cristianvasquez opened this issue Sep 25, 2024 · 1 comment
Open

Handle rdf:plainliteral in the exported SHACL #219

cristianvasquez opened this issue Sep 25, 2024 · 1 comment
Labels
type: feature request something requested to be implemented in a future release
Milestone

Comments

@cristianvasquez
Copy link

cristianvasquez commented Sep 25, 2024

The ePO ontology produces SHACL with references to rdf:plainliteral, that is either a xsd:string or rdf:langString like in this example

core-shape:org-Organization-epo-hasLegalFormType a sh:PropertyShape ;
    rdfs:isDefinedBy core-shape:core-shape ;
    sh:datatype rdf:PlainLiteral ;
    sh:maxCount 1 ;
    sh:name "Has legal form type" ;
    sh:path :hasLegalFormType .

However, this is not recognized by most SHACL engines

A mechanism is needed to export SHACL that can be used by such engines.

One option is to export something like this:

core-shape:org-Organization-epo-hasLegalFormType a sh:PropertyShape ;
    rdfs:isDefinedBy core-shape:core-shape ;
    sh:maxCount 1 ;
    sh:name "Has legal form type" ;
    sh:path :hasLegalFormType ;
    sh:or (
        [ sh:datatype xsd:string ]
        [ sh:datatype rdf:langString ]
    ) .

Alternatively declare a sh:NodeShape, in this case, the a a4g_shape:PlainLiteral

a4g_shape:PlainLiteral a sh:NodeShape ;
    sh:or (
        [ sh:datatype xsd:string ]
        [ sh:datatype rdf:langString ]
    ) .

So it can be used as

sh:node a4g_shape:PlainLiteral

Related: OP-TED/ted-rdf-mapping-eforms#20

@cristianvasquez cristianvasquez added the type: feature request something requested to be implemented in a future release label Sep 25, 2024
@cristianvasquez
Copy link
Author

related: OP-TED/ted-rdf-mapping#407

@rousso rousso added this to the 3.0.0 milestone Oct 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature request something requested to be implemented in a future release
Projects
None yet
Development

No branches or pull requests

2 participants