Update AccessDelegation model to latest API ontology
According to the API spec, AccessDelegation's property hasDescription is an optional xsd:string
Current implementation in AccessDelegation model parses this property into a Set. see https://git.openlogisticsfoundation.org/wg-digitalaircargo/ne-one/-/blob/da53bb366434dfe572a04bbc247da0eb577ec4c9/src/main/java/org/openlogisticsfoundation/neone/model/AccessDelegation.java#L21
In addition, the conversion from String to Set seems to lead to incorrect results.
The following AccessDelegation
{
"@context": {
"cargo": "https://onerecord.iata.org/ns/cargo#",
"api": "https://onerecord.iata.org/ns/api#"
},
"@type": "api:AccessDelegation",
"api:hasDescription": "Require access to Piece for handling",
"api:hasPermission": [{
"@id": "api:GET_LOGISTICS_OBJECT"
}
],
"api:isRequestedFor": [{
"@id": "http://www.w3.org/ns/auth/acl#AuthenticatedAgent"
},
{
"@id": "http://localhost:8080/logistics-objects/_data-holder"
}],
"api:notifyRequestStatusChange": false,
"api:hasLogisticsObject": [{
"@id": "http://localhost:8080/logistics-objects/a50d0a65-c0ec-4183-be4e-bac3fec4023a"
}]
}
leads to
{
"@graph": [
{
"@id": "http://localhost:8080/action-requests/73452e6c-bb60-4a38-bf90-bd9fe3a32f2b",
"@type": "https://onerecord.iata.org/ns/api#AccessDelegationRequest",
"https://onerecord.iata.org/ns/api#hasAccessDelegation": {
"@id": "neone:b8a4eb3c-a12a-4bfb-a3fa-e58d3a7fc2de"
},
"https://onerecord.iata.org/ns/api#hasRequestStatus": {
"@id": "https://onerecord.iata.org/ns/api#REQUEST_ACCEPTED"
},
"https://onerecord.iata.org/ns/api#isRequestedAt": {
"@type": "xsd:dateTime",
"@value": "2023-11-08T16:03:06.804947Z"
},
"https://onerecord.iata.org/ns/api#isRequestedBy": {
"@id": "http://localhost:8080/logistics-objects/_data-holder"
}
},
{
"@id": "neone:b8a4eb3c-a12a-4bfb-a3fa-e58d3a7fc2de",
"@type": "https://onerecord.iata.org/ns/api#AccessDelegation",
"https://onerecord.iata.org/ns/api#hasDescription": "[[Require access to Piece for handling]]",
"https://onerecord.iata.org/ns/api#hasLogisticsObject": {
"@id": "http://localhost:8080/logistics-objects/a50d0a65-c0ec-4183-be4e-bac3fec4023a"
},
"https://onerecord.iata.org/ns/api#hasPermission": {
"@id": "https://onerecord.iata.org/ns/api#GET_LOGISTICS_OBJECT"
},
"https://onerecord.iata.org/ns/api#isRequestedFor": {
"@id": "http://www.w3.org/ns/auth/acl#AuthenticatedAgent"
},
"https://onerecord.iata.org/ns/api#notifyRequestStatusChange": {
"@type": "xsd:boolean",
"@value": "false"
}
}
],
"@context": {
"xsd": "http://www.w3.org/2001/XMLSchema#"
}
}
Edited by Daniel A. Doeppner