hiscom / hispid

HISPID Terms
6 stars 1 forks source link

Add a data type for each element in terms.rdf #35

Open ben3000 opened 9 years ago

ben3000 commented 9 years ago

Each term should have a data type, perhaps from http://www.w3.org/TR/swbp-xsch-datatypes/, but need to work out how to do this correctly.

ben3000 commented 9 years ago

Or http://www.w3.org/TR/rdf11-concepts/?

ben3000 commented 9 years ago

The usual approach is to use rdf:datatype.

nielsklazenga commented 8 years ago

We've been overlooking this. Still needs to be actioned. I've reassigned this to Aaron. Feel free to handball back to me.

I am not sure if I am in favour of doing this for all elements actually as rdf:datatype can only be used for literals. If we deliver as CSV or XML, the values for all terms are literals, but if delivered in RDF they are – or can be – IRIs. We'll be safe if we only do this for terms whose values should not be strings, i.e. dates, integers etc. These are literals no matter what. There are not too many of those.

Also, we can only do this for terms that are defined in HISPID.

AaronWilton commented 8 years ago

I agree using rdf:datatype may have interesting consequences.... e.g., dateTime would mean we have to omit zones or convert all to UTC!

the only one I found that fits the mark is numberOfSheets

<rdf:Description rdf:about="http://hiscom.chah.org.au/hispid/terms/numberOfSheets">
        <rdfs:label xml:lang="en">Number of Sheets</rdfs:label>
        <rdf:type rdf:resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#Property"/>
        <rdf:datatype rdf:resource="http://www.w3.org/2001/XMLSchema#int"/>
        <skos:definition xml:lang="en">The number of sheets or parts included in the transaction.</skos:definition>
        <dwcattributes:status>recommended</dwcattributes:status>
        <rdfs:isDefinedBy rdf:resource="http://hiscom.chah.org.au/hispid/terms/"/>
        <dcterms:modified rdf:datatype="http://www.w3.org/2001/XMLSchema#date">2015-10-23</dcterms:modified>
        <dcterms:hasVersion rdf:resource="http://hiscom.chah.org.au/hispid/terms/http://hiscom.chah.org.au/hispid/terms/numshe-hispid5"/>
        <dwcattributes:abcdEquivalence>//Unit/HerbariumUnit/LoanReturnDate</dwcattributes:abcdEquivalence>
        <dcterms:replaces rdf:resource="http://hiscom.chah.org.au/hispid/terms/numshe-hispid5"/>
        <dwcattributes:organizedInClass rdf:resource="http://hiscom.chah.org.au/hispid/terms/Transaction"/>
    </rdf:Description>

I have that implemented in the rdf, do we want to go further with this?
I think we should probably consider this more fully for the next version....

nielsklazenga commented 8 years ago

Actually, I read the Darwin Core RDF Guide again and contra to what I said before, terms in the dwc namespace are always literals. If you want to use a non-literal, you use the same term in the dwciri namespace (similar, but not exactly the analogous, to the dc and dcterms distinction). Also, everyone can make any assertions about a resource, so we could assign an rdf:dataType to Darwin Core terms. I am not sure if I am comfortable doing so, but that is another matter. As Aaron said: manjana.