tdwg / bdq

Biodiversity Data Quality (BDQ) Interest Group
https://github.com/tdwg/bdq
43 stars 7 forks source link

TG2-VALIDATION_PREPARATIONS_STANDARD #279

Open ArthurChapman opened 5 months ago

ArthurChapman commented 5 months ago
TestField Value
GUID 4758ea74-d2d3-4656-b17b-4b30147af4dc
Label VALIDATION_PREPARATIONS_STANDARD
Description Does the value of dwc:preparations occur in bdq:sourceAuthority?
TestType Validation
Darwin Core Class MaterialEntity
Information Elements ActedUpon dwc:preparations
Information Elements Consulted
Expected Response EXTERNAL_PREREQUISITES_NOT_MET if the bdq:sourceAuthority is not available; INTERNAL_PREREQUISITES_NOT_MET if dwc:preparations is EMPTY; COMPLIANT if the value of each element in the list of elements in dwc:preparations is in the bdq:sourceAuthority; otherwise NOT_COMPLIANT.
Data Quality Dimension Conformance
Term-Actions PREPARATIONS_STANDARD
Parameter(s) bdq:sourceAuthority
Source Authority bdq:sourceAuthority default = "Darwin Core Preparations {[https://dwc.tdwg.org/list/#dwc_preparations]} {dwc:preparations vocabulary API [NO CURRENT API EXISTS]}
Specification Last Updated 2024-02-08
Examples [dwc:preparations="photograph": Response.status=RUN_HAS_RESULT, Response.result=COMPLIANT, Response.comment="dwc:preparations has an equivalent in the bdq:sourceAuthority"]
[dwc:preparations="tree": Response.status=RUN_HAS_RESULT, Response.result=NOT_COMPLIANT, Response.comment="dwc:preparations does not have an equivalent in the bdq:sourceAuthority"]
Source TG2
References
Example Implementations (Mechanisms)
Link to Specification Source Code
Notes Currently, it appears that no full Vocabulary exists for dwc:preparations making this test difficult to implement. Best practice for dwc:preparations is a pipe delimited list, implementations should split the list into elements and test each element against the source authority. This bdq:Supplementary test is not regarded as CORE (cf. bdq:CORE) because of one or more of the reasons: not being widely applicable; not informative; not straightforward to implement or likely to return a high percentage of either bdq:COMPLIANT or bdq:NOT_COMPLIANT results (cf bdq:Response.result). A Supplementary test may be implemented as CORE when a suitable use case exists.
ArthurChapman commented 5 months ago

@tucotuco There doesn't appear to be a vocabulary API on GBIF for this one - following format of others it would be at https://api.gbif.org/v1/vocabularies/Preparations/concepts. Do you know if one is on the way? if not what should we put in the Source Authority? Also required for #280

chicoreus commented 5 months ago

Note that the definition of dwc:preparations expects delimited list, and the best practice is to have a pipe separated list, definition of this test needs to split on the pipe character (or attempt to detect a separator, or take potential separators as a parameter)and test each element of the list against the source authority separately. "A list (concatenated and separated) of preparations and preservation methods for a dwc:MaterialEntity."

tucotuco commented 5 months ago

@tucotuco There doesn't appear to be a vocabulary API on GBIF for this one - following format of others it would be at https://api.gbif.org/v1/vocabularies/Preparations/concepts. Do you know if one is on the way? if not what should we put in the Source Authority? Also required for #280

No, there isn't one. I don't see it on the horizon either. It is complicated by relationships for preservation methods, counts or material entities and so on.

chicoreus commented 4 months ago

No vocabulary exists at this time. Whether there is an API is irrelevant for short vocabularies, an API is important for larger rapidly changing vocabularies such as taxon names, but for short relatively static vocabularies all we need to reference is the vocabulary, no API needed. The phrasing of the sourceAuthority implies that a vocabulary exists, while it is actually just a reference to the term that to which the vocabulary would be applied.

bdq:sourceAuthority default = "Darwin Core Preparations {[No Current Vocabulary Exists]}"

We only need to specify vocabulary and API when an API is relevant to consult. This form of phrasing needs to be examined in multiple other tests as well.

Tasilee commented 4 months ago

Given the discussion, I've set this to Immature/Incomplete.