- From: Felix Sasaki <felix@sasakiatcf.com>
- Date: Tue, 18 Jun 2019 08:31:58 +0200
- To: Holger Knublauch <holger@topquadrant.com>, public-shacl@w3.org
- Message-ID: <CAL58czq4Mk4588p36rrhjV0s0dYTJ_9qOgVarzXFfHvTsBm-3Q@mail.gmail.com>
Hi Holger, the rules applies to subjects that are instance of a given Class, e.g. skos:Concepts. - Felix On Tue, 18 Jun 2019 at 07:55, Holger Knublauch <holger@topquadrant.com> wrote: > Hi Felix, > > could you clarify one thing please: how do you define "subject" in these > graphs. Does the rule apply to all subjects in the whole data graph, > including for example owl:Ontology resources or classes, or is there a > relation that you only want to apply to sh:targetSubjectsOf <p> ? > Holger > > > On 18/06/2019 3:31 pm, Felix Sasaki wrote: > > Hi all, > > I have a dataset with URIs in the subject position of triples as follows: > > <http://example.com/mydata/1> p o > <http://example.com/mydata/2> p o > <http://example.com/mydata/3> p o > ... > > I would like to express the following constraints on all subject URIs: > > 1) The value of the URI pattern after "<http://example.com/mydata/" must > always be an integer (in the example 1, 2 or 3 > 2) The integer must be more than zero and less than the number of the > subject URIs. That is, the third triple from the below would be invald: > <http://example.com/mydata/1> p o > <http://example.com/mydata/2> p o > <http://example.com/mydata/4> p o # this should have been 3 > > I tried to express this via SPARQL constraint, but did not succeed. Any > hints on how to express via SHACL would be nice - thanks. > > As some background for the use case: I am generating the URIs in an > automated fashion and want to assure that the generation always follows the > above constraints, to assure that after the generation no existing URI is > "lost" and to assure that new URis follow the pattern described above. > > Regards, > > Felix > >
Received on Tuesday, 18 June 2019 06:32:36 UTC