Skip to content

Commit

Permalink
Merge pull request #57 from DiSSCo/feature/add-agent-to-opends
Browse files Browse the repository at this point in the history
Add agents to openDS model
  • Loading branch information
samleeflang authored Feb 26, 2024
2 parents cd7e2ac + 0c8dff8 commit bfdfe55
Show file tree
Hide file tree
Showing 10 changed files with 87 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,12 @@
"items": {
"$ref": "https://schemas.dissco.tech/schemas/digitalobjects/0.1.0/shared-models/entity-relationships.json"
}
},
"agents": {
"type": "array",
"items": {
"$ref": "https://schemas.dissco.tech/schemas/digitalobjects/0.1.0/shared-models/agent.json"
}
}
},
"required": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,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 @@ -234,7 +235,7 @@
]
},
"???:recordedByAgent": {
"$ref": "https://schemas.dissco.tech/schemas/digitalobjects/0.1.0/shared-models/agent.json",
"$ref": "agent.json",
"$comment": "Is this an option for the agent instead of adding a list?"
},
"dwc:recordedById": {
Expand Down Expand Up @@ -312,6 +313,12 @@
"items": {
"$ref": "https://schemas.dissco.tech/schemas/digitalobjects/0.1.0/digital-specimens/chronometric-age.json"
}
},
"agents": {
"type": "array",
"items": {
"$ref": "https://schemas.dissco.tech/schemas/digitalobjects/0.1.0/shared-models/agent.json"
}
}
},
"required": [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$id": "https://schemas.dissco.tech/schemas/digitalobjects/0.1.0/digital-specimens/events.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$comment":"DigitalObject Version 0.1.0",
"$comment": "DigitalObject Version 0.1.0",
"type": "object",
"properties": {
"???:eventName": {
Expand Down Expand Up @@ -97,6 +97,12 @@
},
"location": {
"$ref": "https://schemas.dissco.tech/schemas/digitalobjects/0.1.0/digital-specimens/location.json"
},
"agents": {
"type": "array",
"items": {
"$ref": "https://schemas.dissco.tech/schemas/digitalobjects/0.1.0/shared-models/agent.json"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$id": "https://schemas.dissco.tech/schemas/digitalobjects/0.1.0/digital-specimens/identifications.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$comment":"DigitalObject Version 0.1.0",
"$comment": "DigitalObject Version 0.1.0",
"type": "object",
"properties": {
"dwc:identificationID": {
Expand Down Expand Up @@ -99,6 +99,12 @@
"$ref": "https://schemas.dissco.tech/schemas/digitalobjects/0.1.0/shared-models/citations.json"
}
},
"agents": {
"type": "array",
"items": {
"$ref": "https://schemas.dissco.tech/schemas/digitalobjects/0.1.0/shared-models/agent.json"
}
},
"taxonIdentifications": {
"type": "array",
"items": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,12 @@
"???:preferredSpatialRepresentation": {
"type": "string",
"$comment": "Not part of DWC"
},
"agents": {
"type": "array",
"items": {
"$ref": "https://schemas.dissco.tech/schemas/digitalobjects/0.1.0/shared-models/agent.json"
}
}
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,12 @@
"items": {
"$ref": "https://schemas.dissco.tech/schemas/digitalobjects/0.1.0/digital-specimens/events.json"
}
},
"agents": {
"type": "array",
"items": {
"$ref": "https://schemas.dissco.tech/schemas/digitalobjects/0.1.0/shared-models/agent.json"
}
}
}
}
33 changes: 29 additions & 4 deletions data-model/digitalobjects/0.1.0/shared-models/schema/agent.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,35 +6,59 @@
"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",
Expand All @@ -44,6 +68,7 @@
}
},
"required": [
"agentRole",
"agentType",
"agentName"
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@
},
"???:assertionRemarks": {
"type": "string"
},
"agents": {
"type": "array",
"items": {
"$ref": "https://schemas.dissco.tech/schemas/digitalobjects/0.1.0/shared-models/agent.json"
}
}
},
"required": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,12 @@
"type": "boolean",
"description": "Unclear yet",
"$comment": "Unknown what this field should be"
},
"agents": {
"type": "array",
"items": {
"$ref": "https://schemas.dissco.tech/schemas/digitalobjects/0.1.0/shared-models/agent.json"
}
}
}
}
Original file line number Diff line number Diff line change
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": "https://schemas.dissco.tech/schemas/digitalobjects/0.1.0/shared-models/agent.json"
}
}
},
"required": [
Expand Down

0 comments on commit bfdfe55

Please sign in to comment.