Skip to content

Commit

Permalink
Sync with openDS schemas
Browse files Browse the repository at this point in the history
  • Loading branch information
samleeflang committed May 14, 2024
1 parent 92e6613 commit 7350f65
Show file tree
Hide file tree
Showing 13 changed files with 150 additions and 45 deletions.
37 changes: 31 additions & 6 deletions src/main/resources/json-schema/agent.json
Original file line number Diff line number Diff line change
@@ -1,49 +1,74 @@
{
"$id": "agent",
"$id": "https://schemas.dissco.tech/schemas/digitalobjects/0.1.0/shared-models/agent.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"$comment": "",
"properties": {
"agentRole": {
"type": "string",
"description": "Indicates the role of the agent",
"examples": [
"collector"
"collector",
"preparer",
"identifier",
"recorder"
]
},
"agentType": {
"type": "string",
"description": "Indicates the type of agent",
"examples": [
"machine",
"human",
"organisation"
]
},
"agentId":{
"type": "string",
"description": "Primary identifier of the agent, additional identifiers can go in the identifiers array",
"examples": [
"https://orcid.org/0000-0002-1825-0097"
]
},
"agentName": {
"type": "string",
"description": "Full name of the agent",
"examples": [
"John Smith"
]
},
"agentRoleBegan": {
"type": "string",
"format": "date-time"
"description": "Date the agent began the role",
"examples": [
"2023-10-02T12:31:34.806Z"
]
},
"agentRoleEnded": {
"type": "string",
"format": "date-time"
"description": "Date the agent ended the role",
"examples": [
"2023-09-02T12:31:34.806Z"
]
},
"agentRoleOrder": {
"type": "integer",
"minimum": 0
"description": "Order of the agent in the role. Can be used to indicate the order of importance",
"minimum": 1,
"examples": [
1,
2
]
},
"identifiers": {
"type": "array",
"items": {
"$ref": "identifications.json"
"$ref": "./identifiers.json"
}
}
},
"required": [
"agentRole",
"agentType",
"agentName"
]
Expand Down
8 changes: 7 additions & 1 deletion src/main/resources/json-schema/assertions.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$id": "assertion",
"$id": "https://schemas.dissco.tech/schemas/digitalobjects/0.1.0/shared-models/assertions.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"$comment": "Looks like Measurement or Fact but terminology is different, no ontology yet?",
Expand Down Expand Up @@ -36,6 +36,12 @@
},
"???:assertionRemarks": {
"type": "string"
},
"agents": {
"type": "array",
"items": {
"$ref": "./agent.json"
}
}
},
"required": [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"$id": "chronometric_age",
"$id": "https://schemas.dissco.tech/schemas/digitalobjects/0.1.0/digital-specimens/chronometric-age.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$comment":"DigitalObject Version 0.1.0",
"type": "object",
"properties": {
"chrono:verbatimChronometricAge": {
Expand Down
8 changes: 7 additions & 1 deletion src/main/resources/json-schema/citations.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$id": "root",
"$id": "https://schemas.dissco.tech/schemas/digitalobjects/0.1.0/shared-models/citations.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
Expand Down Expand Up @@ -56,6 +56,12 @@
"type": "boolean",
"description": "Unclear yet",
"$comment": "Unknown what this field should be"
},
"agents": {
"type": "array",
"items": {
"$ref": "./agent.json"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"$id": "digitalEntity",
"$id": "https://schemas.dissco.tech/schemas/digitalobjects/0.1.0/digital-media-objects/digital-entity.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$comment":"DigitalObject Version 0.1.0",
"type": "object",
"properties": {
"ods:id": {
Expand Down Expand Up @@ -136,25 +137,31 @@
"assertions": {
"type": "array",
"items": {
"$ref": "assertions.json"
"$ref": "./assertions.json"
}
},
"citations": {
"type": "array",
"items": {
"$ref": "citations.json"
"$ref": "./citations.json"
}
},
"identifiers": {
"type": "array",
"items": {
"$ref": "identifiers.json"
"$ref": "./identifiers.json"
}
},
"entityRelationships": {
"type": "array",
"items": {
"$ref": "entity_relationships.json"
"$ref": "./entity-relationships.json"
}
},
"agents": {
"type": "array",
"items": {
"$ref": "./agent.json"
}
}
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"$id": "root",
"$id": "https://schemas.dissco.tech/schemas/digitalobjects/0.2.0/digital-specimens/digital-specimen.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$comment":"DigitalObject Version 0.2.0",
"type": "object",
"properties": {
"ods:id": {
Expand All @@ -24,6 +25,7 @@
"description": "The timestamp that the object version was created in DiSSCo",
"format": "date-time",
"examples": [
"2023-10-02T12:31:34.806Z"
]
},
"ods:type": {
Expand Down Expand Up @@ -232,17 +234,17 @@
"José E. Crespo"
]
},
"???:recordedByAgent": {
"$ref": "agent.json",
"$comment": "Is this an option for the agent instead of adding a list?"
},
"dwc:recordedById": {
"type": "string",
"description": "https://rs.tdwg.org/dwc/terms/recordedByID",
"examples": [
"https://orcid.org/0000-0002-1825-0097"
]
},
"???:recordedByAgent": {
"$ref": "./agent.json",
"$comment": "Is this an option for the agent instead of adding a list?"
},
"dwc:datasetName": {
"type": "string",
"description": "https://rs.tdwg.org/dwc/terms/datasetName",
Expand Down Expand Up @@ -274,49 +276,55 @@
"materialEntity": {
"type": "array",
"items": {
"$ref": "material_entity.json"
"$ref": "./material-entity.json"
}
},
"dwc:identification": {
"type": "array",
"items": {
"$ref": "identifications.json"
"$ref": "./identifications.json"
}
},
"assertions": {
"type": "array",
"items": {
"$ref": "assertions.json"
"$ref": "./assertions.json"
}
},
"occurrences": {
"type": "array",
"items": {
"$ref": "occurrences.json"
"$ref": "./occurrences.json"
}
},
"entityRelationships": {
"type": "array",
"items": {
"$ref": "entity_relationships.json"
"$ref": "./entity-relationships.json"
}
},
"citations": {
"type": "array",
"items": {
"$ref": "citations.json"
"$ref": "./citations.json"
}
},
"identifiers": {
"type": "array",
"items": {
"$ref": "identifiers.json"
"$ref": "./identifiers.json"
}
},
"chronometricAge": {
"type": "array",
"items": {
"$ref": "chronometric_age.json"
"$ref": "./chronometric-age.json"
}
},
"agents": {
"type": "array",
"items": {
"$ref": "./agent.json"
}
}
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$id": "entityRelationship",
"$id": "https://schemas.dissco.tech/schemas/digitalobjects/0.1.0/shared-models/entity-relationships.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
Expand Down Expand Up @@ -29,6 +29,12 @@
"type": "string",
"description": "The PID of the creator, this could be a Orcid(user), PID(machine) or ROR(organisation)",
"$comment": "Not available in GBIF UM"
},
"agents": {
"type": "array",
"items": {
"$ref": "./agent.json"
}
}
},
"required": [
Expand Down
23 changes: 22 additions & 1 deletion src/main/resources/json-schema/events.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"$id": "events",
"$id": "https://schemas.dissco.tech/schemas/digitalobjects/0.2.0/digital-specimens/events.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$comment": "DigitalObject Version 0.2.0",
"type": "object",
"properties": {
"???:eventName": {
Expand All @@ -14,13 +15,27 @@
"RV Sol 87-03-08"
]
},
"dwc:recordNumber": {
"type": "string",
"description": "https://rs.tdwg.org/dwc/terms/recordNumber",
"examples": [
"OPP 7101"
]
},
"dwc:eventDate": {
"type": "string",
"description": "https://rs.tdwg.org/dwc/terms/eventDate",
"examples": [
"1963-03-08T14:07-0600"
]
},
"dwc:verbatimEventDate": {
"type": "string",
"description": "https://rs.tdwg.org/dwc/terms/verbatimEventDate",
"examples": [
"Marzo 2002"
]
},
"dwc:year": {
"type": "integer",
"description": "https://rs.tdwg.org/dwc/terms/year",
Expand Down Expand Up @@ -96,6 +111,12 @@
},
"location": {
"$ref": "./location.json"
},
"agents": {
"type": "array",
"items": {
"$ref": "./agent.json"
}
}
}
}
18 changes: 14 additions & 4 deletions src/main/resources/json-schema/identifications.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
{
"$id": "identifications",
"$id": "https://schemas.dissco.tech/schemas/digitalobjects/0.2.0/digital-specimens/identifications.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$comment": "DigitalObject Version 0.2.0",
"type": "object",
"properties": {
"dwc:identificationID": {
"type": "string",
"description": "Check DWC terms"
"description": "https://rs.tdwg.org/dwc/terms/identificationID",
"examples": [
"9992"
]
},
"???:identificationType": {
"type": "string",
Expand Down Expand Up @@ -79,7 +83,7 @@
"type": "string",
"description": "https://rs.tdwg.org/dwc/terms/identificationQualifier",
"examples": [
"cf. var. oxyadenia "
"cf. var. oxyadenia"
]
},
"???:typeDesignationType": {
Expand All @@ -95,7 +99,13 @@
"citations": {
"type": "array",
"items": {
"$ref": "citations.json"
"$ref": "./citations.json"
}
},
"agents": {
"type": "array",
"items": {
"$ref": "./agent.json"
}
},
"taxonIdentifications": {
Expand Down
Loading

0 comments on commit 7350f65

Please sign in to comment.