Closed eroux closed 5 years ago
I agree that the convention should be to require triples be present for these sorts of properties regardless of known values.
I think rdf:nil
usage in lists probably should rule out using it for this purpose.
All of the various :workLocation...
have range of :IntegerOrString
and so "0"xsd:integer
can work if it is sufficiently easy to check for or maybe "NaN"^^xsd:string
(for Not a Number).
Probably a triple like:
bdr:SomeWork :isRootWork true .
and others in similar situations would also be a good convention rather than testing for the non presence of :workHasPart
I was sort of hoping that "NaN"^^xsd:integer
could be valid but it doesn't seem to be ("NaN"^^xsd:float
is)... Maybe 0
is a good option then, let's use that.
sparql is pretty bad at checking things that don't exist. I tried to make a query for https://github.com/buda-base/library-issues/issues/25 with a sparql query but it's just too complex and the naive approach would take way too much time. One way to make this kind of query easy to write and very performant would be to replace some mandatory values by a placeholder when we don't have them.
This would include the values of
:workLocationVolume
,:workLocationPage
and:workLocationEndPage
.I'm not sure what the best placeholder value would be. Maybe
0^^xsd:integer
would be reasonable, otherwiserdf:nil
is a possibility too maybe?