Re: [dxwg] Are PROF roles misplaced in resourceDescription? (#769)

@rob-metalinkage Thanks for answering my question. So now I have another example, kind of the opposite of the previous one. In this case I have two artifacts that have the same role. An easy example would be a SHACL document and a ShEx document, both of which have a role of "validation".

A:
```
<https://example.com/prof1>
    a prof:Profile ;
    prof:hasResource :dcat-ap-guidance-pdf1 ;
    prof:hasResource :dcat-ap-guidance-pdf2 ;

:dcat-ap-guidance-pdf1
    a prof:ResourceDescriptor;
    rdfs:label "ShEx Json" ;
    prof:hasRole roles:validation ;
    dct:format <https://www.iana.org/assignments/media-types/application/json> ;
    prof:hasArtifact <https://example.Shex/myValidation.js> .

:dcat-ap-guidance-pdf2
    a prof:ResourceDescriptor;
    rdfs:label "SHACL" ;
    prof:hasRole roles:validation ;
    dct:format <https://www.iana.org/assignments/media-types/text/turtle> ;
    prof:hasArtifact
        <http://example.com/mySHACL.ttl> .
```
In this case I don't think that there is a way to have a single resource descriptor for the role because the two artifacts are different formats. While repeating the resource descriptor is not a big deal, this does point out that the resource descriptor graph as it is now has a dependency on the file format of the artifact. Then again, one could leave off dct:format and let people use the file name extensions to discover the roles. Then you could have:
```
:dcat-ap-guidance-pdf1
    a prof:ResourceDescriptor;
    rdfs:label "ShEx Json" ;
    prof:hasRole roles:validation ;
    prof:hasArtifact <https://example.Shex/myValidation.js> ;
    prof:hasArtifact <http://example.com/mySHACL.ttl> .
```

In fact, that's what we've being saying about the use of dct:format - it's on the wrong graph, so removing it would be more correct. Anyone could add information about the artifacts because they are URIs and can be the subjects of any triple.

As for leaving off roles, there is nothing in the vocabulary itself that would prevent that. It would not be possible if the roles were defined as properties linking the profile and the resource although it would not be difficult (and was suggested in one [comment](https://github.com/w3c/dxwg/issues/747)) to have a generic role for those odd cases where one doesn't want to be more specific. But as defined there could be a resource descriptor with an artifact but no role, or a role but no artifact, or neither. If any of those would be considered invalid, a validation implementation file would be needed for profiles.

The main point is that if you want consistency then it would be good to make some modeling decisions that go beyond the RDF, since RDF does not constrain usage. That could be a short primer, I suppose.


-- 
GitHub Notification of comment by kcoyle
Please view or discuss this issue at https://github.com/w3c/dxwg/issues/769#issuecomment-470635702 using your GitHub account

Received on Thursday, 7 March 2019 18:14:52 UTC