Files that you need to work with:
rules_override.json
check_messages_override.json
Steps:
- Create a unique rule_id for your rule. Make it meaningful. Something like
doi_missing_reason_explanation
(no spaces). - Make an entry to the json files with the same rule_id.
- In
rules_override.json
, add in thefields_to_apply
,data
andcheck_id
. Add in theecho10
anddif10
fields corresponding to the rule.check_id
should be one of the availablecheck_id
s (listed below). The format ofdata
corresponding to each of thesecheck_id
s are given in the specifications below.
Compares the given two dates based on the relationship specified.
Relationship supported: lt
, lte
, gt
, gte
, eq
and neq
.
Specify the two field in fields
and the corresponding relation
.
Specify the field in fields
. Add the date and relation in data
in the format [{time}, {relation}]
. eg: ["now", "gte"]
Currently only now
is supported as a date
Checks whether the datetime is in the ISO format.
Checks if the url is correct, resolves to a webpage and gives a 200 OK status.
Compares the two strings based on the relationship specified.
Relationship supported: lt
, lte
, gt
, gte
, eq
and neq
.
Specify the two field in fields
and the corresponding relation
.
Specify the field in fields
. Add the date and relation in data
in the format [{string}, {relation}]
. eg: ["FTP", "eq"]
Checks if the legth of the field value adheres to the relationship specified.
data format
: [{length}, {relation}]
. eg: [100, "gte"]
.
Checks the rule: if the first field is provided, the second field has to be provided.
fields: (ordered) [ {first_field}, {second_field} ]
Checks if the field value is boolean, either true
or false
or any case combination of those.
Checks if the field value is one of the controlled keywords; provide the controlled keywords as data
in the format:
[["keyword1", "keyword2",...]]
Checks if the doi provided resolves to a valid document.
Checks if one of the given fields is populated.
Checks if the field values are unique.
Checks if the field value that is a count of fields matches the actual count of the fields.
Check that the North bounding coordinate is always larger than the South bounding coordinate and the East bounding coordinate is always larger than the West bounding coordinate.
fields
: the parent field
(eg. Collection/Spatial/HorizontalSpatialDomain/Geometry/BoundingRectangle
)
If multiple Charasteristics are provided, checks to see whether each of those names are unique.
There are a few fields pertaining to the status of the collection as either active or complete whose values should align with one another. This check looks across these related fields to make sure the values are logically consistent.
For ACTIVE
collections:
CollectionProgress = ACTIVE
No EndingDateTime
should be provided
EndsAtPresentFlag
= true
For COMPLETE
collections:
CollectionProgress = COMPLETE
An EndingDateTime
should be provided
EndsAtPresentFlag
= false
OR no EndsAtPresentFlag
provided
If http://dx.doi.org
is provided, recommend updating it to https://doi.org
If no DOI is provided, and the DOI/MissingReason
field is populated, recommend adding an explanation for why there is no DOI.
Checks the logic as follows:
If EndsAtPresentFlag
is populated:
true
-> check EndingDateTime
, if there is no ending date time passes check; if there is an EndingDateTime
display a warning
true
-> check CollectionState/CollectionProgress
, if CollectionState/CollectionProgress = ACTIVE
passes check; if CollectionState/CollectionProgress = COMPLETE
display a warning
false
-> check EndingDateTime
, if there is an ending date time passes check; if there is not an EndingDateTime
display a warning
false
-> check CollectionState/CollectionProgress
, if CollectionState/CollectionProgress = COMPLETE
passes check; if CollectionState/CollectionProgress = ACTIVE
display a warning
If EndsAtPresentFlag
is not populated:
If no EndingDateTime
is provided, print a warning that it might be necessary to add an EndsAtPresentFlag
of true
If an EndingDateTime
is provided, passes check (no message needed)
If CollectionState
= ACTIVE
, print a warning that it might be necessary to add an EndsAtPresentFlag
of true
If CollectionState
= COMPLETE
, passes check (no message needed)
Checks for "GET DATA"
links (at least 1 should be provided). If no GET DATA links are provided this check will throw an error.
Checks whether a Mime Type
is provided for 'USE SERVICE API'
URLs (i.e. when the URL Type
= 'USE SERVICE API'
).
Check to make sure that an OPeNDAP access URL is not provided in the Online Access URL
field.
Check to make sure the fields aren't populated like this:
Collection/Contacts/Contact/ContactPersons/ContactPerson/FirstName: "User"
Collection/Contacts/Contact/ContactPersons/ContactPerson/MiddleName: "null"
Collection/Contacts/Contact/ContactPersons/ContactPerson/LastName: "Services"
Checks whether the beginning date time matches the beginning date time of the first granule in the collection (if granules exist.)
Checks whether the ending date time matches the ending date time of the last granule in the collection (if granules exist.)
Check to determine if the provided science keyword matches a value from the GCMD controlled vocabulary list.
Check to determine if the provided spatial keyword matches a value from the GCMD controlled vocabulary list.
Check to determine if the provided long name matches a value from the platform GCMD controlled vocabulary list.
Check to determine if the provided short name matches a value from the platform GCMD controlled vocabulary list.
Check to determine if the provided platform type matches a value from the GCMD controlled vocabulary list.
Check to determine if the provided long name matches a value from the GCMD controlled vocabulary list.
Check to determine if the provided short name matches a value from the GCMD controlled vocabulary list.
Checks if the provided instrument short name and long name are consistent across the GCMD keywords list.
Checks whether the value adheres to GCMD, specifically the project list long name column.
Checks whether the value adheres to GCMD, specifically the project list short name column.
Checks whether the campaign (project) short name and long name GCMD keywords are consistent: basically that they belong to the same row.
Checks whether the value adheres to GCMD, specifically the provider list short name column.
Checks whether the value adheres to GCMD, specifically the data format short name/long name column.
Check that the Online Resource Type
is included in the rucontenttype
GCMD list under the Type
or Subtype
column.