PREFIX api: <https://onerecord.iata.org/ns/api#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>

api:Notification a rdfs:Class ;
  rdfs:label "Notification"@en ;
  rdfs:comment "Notification sent by the publisher to the subscriber"@en .

api:hasEventType a rdf:Property ;
  rdfs:label "has Event Type"@en ;
  rdfs:domain api:Notification ;
  rdfs:range api:NotificationEventType .

api:hasLogisticsObject a rdf:Property ;
  rdfs:label "has Logistics Object"@en ;
  rdfs:comment "A reference to a cargo:LogisticsObject." ;
  rdfs:range <https://onerecord.iata.org/ns/cargo#LogisticsObject> .

api:isTriggeredBy a rdf:Property ;
  rdfs:label "is triggered by"@en ;
  rdfs:comment "Optional URI to the ChangeRequest that triggered a Notification if the eventType is one of CHANGE_REQUEST_ACCEPTED, CHANGE_REQUEST_REJECT, or CHANGE_REQUEST_FAILED"@en ;
  rdfs:domain api:Notification ;
  rdfs:range api:ActionRequest .

api:hasLogisticsObjectType a rdf:Property ;
  rdfs:label "has Logistics Object Type"@en ;
  rdfs:comment "The type of cargo:LogisticsObject in the notification e.g. https://onerecord.iata.org/ns/cargo#Piece" ;
  rdfs:domain api:Notification ;
  rdfs:range xsd:anyURI .

api:hasChangedProperty a rdf:Property ;
  rdfs:label "Changed property"@en ;
  rdfs:comment "List of all changed properties as IRIs after a ChangeRequest was successfully applied, e.g. [https://onerecord.iata.org/ns/cargo#hasVolumetricWeight, https://onerecord.iata.org/ns/cargo/#hasGoodsDescription]"@en ;
  rdfs:domain api:Notification ;
  rdfs:range xsd:anyURI .

api:hasTopic a rdf:Property ;
  rdfs:label "Topic"@en ;
  rdfs:comment "The Logistics Object type or specific Logistics Object to which the subscription belongs to e.g. https://onerecord.iata.org/Piece or https://1r.example.com/7f01363f-0c6a-4414-be48-d3692e219b91"@en ;
  rdfs:range xsd:anyURI .

api:ActionRequest a rdfs:Class ;
  rdfs:label "Action Request"@en ;
  rdfs:comment "Superclass for all kinds of requests (i.e someone requsted something (e.g. subscription, access, etc.) at a publisher/holder of a logistics object)"@en .

api:isRevokedAt a rdf:Property ;
  rdfs:label "Revoked at"@en ;
  rdfs:comment "The datetime when the action request was revoked."@en ;
  rdfs:domain api:ActionRequest ;
  rdfs:range xsd:dateTime .

api:isRevokedBy a rdf:Property ;
  rdfs:label "is revoked by"@en ;
  rdfs:domain api:ActionRequest ;
  rdfs:range <https://onerecord.iata.org/ns/cargo#Organization> .

api:hasRequestStatus a rdf:Property ;
  rdfs:label "has Request Status" ;
  rdfs:domain api:ActionRequest ;
  rdfs:range api:RequestStatus .

api:hasError a rdf:Property ;
  rdfs:label "has Error"@en ;
  rdfs:comment "Error object(s) if the processing was not successful"@en ;
  rdfs:domain api:ActionRequest ;
  rdfs:range api:Error .

api:isRequestedAt a rdf:Property ;
  rdfs:label "Requested at"@en ;
  rdfs:comment "Datetime when the request was created"@en ;
  rdfs:domain api:ActionRequest ;
  rdfs:range xsd:dateTime .

api:isRequestedBy a rdf:Property ;
  rdfs:label "is Requested By"@en ;
  rdfs:comment "Organization Identifier that represents the Organization that has requested the action"@en ;
  rdfs:domain api:ActionRequest ;
  rdfs:range <https://onerecord.iata.org/ns/cargo#Organization> .

api:ServerInformation a rdfs:Class ;
  rdfs:label "Server Information"@en ;
  rdfs:comment "Information about the ONE Record server"@en .

api:hasSupportedEncoding a rdf:Property ;
  rdfs:label "Supported encoding"@en ;
  rdfs:comment "Optional list of supported encodings of the ONE Record server, e.g. gzip"@en ;
  rdfs:domain api:ServerInformation ;
  rdfs:range xsd:string .

api:hasSupportedLanguage a rdf:Property ;
  rdfs:label "Supported language"@en ;
  rdfs:comment "Supported languages of the ONE Record API, minimum is en-US (American English)"@en ;
  rdfs:domain api:ServerInformation ;
  rdfs:range xsd:string .

api:hasSupportedOntology a rdf:Property ;
  rdfs:label "Supported ontology"@en ;
  rdfs:comment "Supported ontologies on the server, MUST be non-versioned IRIs"@en ;
  rdfs:domain api:ServerInformation ;
  rdfs:range xsd:anyURI .

api:hasServerEndpoint a rdf:Property ;
  rdfs:label "Server endpoint"@en ;
  rdfs:comment "ONE Record API endpoint"@en ;
  rdfs:domain api:ServerInformation ;
  rdfs:range xsd:anyURI .

api:hasSupportedApiVersion a rdf:Property ;
  rdfs:label "Supported API version"@en ;
  rdfs:comment "Supported ONE Record API versions by the server, MUST include at least one supported version."@en ;
  rdfs:domain api:ServerInformation ;
  rdfs:range xsd:string .

api:hasSupportedOntologyVersion a rdf:Property ;
  rdfs:label "Supported ontology version"@en ;
  rdfs:comment "Supported ontology versions on the server, MUST be versioned IRIs"@en ;
  rdfs:domain api:ServerInformation ;
  rdfs:range xsd:anyURI .

api:hasSupportedContentType a rdf:Property ;
  rdfs:label "Supported content type"@en ;
  rdfs:comment "Supported content types of the server, MUST contain at least application/ld+json"@en ;
  rdfs:domain api:ServerInformation ;
  rdfs:range xsd:string .

api:hasDataHolder a rdf:Property ;
  rdfs:label "has Data Holder"@en ;
  rdfs:comment "The data holder of the servers data."@en ;
  rdfs:domain api:ServerInformation ;
  rdfs:range <https://onerecord.iata.org/ns/cargo#Organization> .

<https://onerecord.iata.org/ns/cargo#LogisticsObject> a rdfs:Class .

api:Change a rdfs:Class ;
  rdfs:label "Change"@en .

api:hasVerificationRequest a rdf:Property ;
  rdfs:label "has Verification Request" ;
  rdfs:comment "Link to the Verification Request" ;
  rdfs:domain api:ChangeRequest ;
  rdfs:range api:VerificationRequest .

api:hasDescription a rdf:Property ;
  rdfs:label "Description"@en ;
  rdfs:comment "Reason for the request (optional)"@en ;
  rdfs:range xsd:string .

api:hasOperation a rdf:Property ;
  rdfs:label "has Operation"@en ;
  rdfs:comment "Operation(s) to apply as PATCH on a Logistics Object"@en ;
  rdfs:domain api:Change ;
  rdfs:range api:Operation .

api:hasRevision a rdf:Property ;
  rdfs:label "Revision"@en ;
  rdfs:comment "Revision number of the Logistics Object, starting with 0 for changing the initial revision of a Logistics Object"@en ;
  rdfs:domain api:ChangeRequest ;
  rdfs:range xsd:positiveInteger .

api:notifyRequestStatusChange a rdf:Property ;
  rdfs:label "notify RequestStatus Change"@en ;
  rdfs:comment "Flag specifying if the requestor wants to receive Notification from the publisher when the status of an action request changed, default=FALSE"@en ;
  rdfs:range xsd:boolean .

api:Verification a rdfs:Class ;
  rdfs:label "Verification" ;
  rdfs:comment "Verification encapulates any anomalies or errors related to logistics objects" .

api:AuditTrail a rdfs:Class ;
  rdfs:label "Audit Trail"@en ;
  rdfs:comment "Audit trail of a Logistics Object"@en .

api:hasActionRequest a rdf:Property ;
  rdfs:label "has Action Request" ;
  rdfs:comment "Link any type of Action Request" ;
  rdfs:domain api:AuditTrail ;
  rdfs:range api:ActionRequest .

api:hasLatestRevision a rdf:Property ;
  rdfs:label "Latest revision"@en ;
  rdfs:comment "Latest revision of the Logistics Object. Starting with revision 0"@en ;
  rdfs:domain api:AuditTrail ;
  rdfs:range xsd:positiveInteger .

api:hasChangeRequest a rdf:Property ;
  rdfs:label "has Change Request"@en ;
  rdfs:comment "Recorded change requests in the Audit Trail of a Logistics Object"@en ;
  rdfs:domain api:AuditTrail ;
  rdfs:range api:ChangeRequest .

api:Operation a rdfs:Class ;
  rdfs:label "Operation"@en ;
  rdfs:comment "Operation Request contained in the PATCH body"@en .

api:o a rdf:Property ;
  rdfs:domain api:Operation ;
  rdfs:range api:OperationObject .

api:p a rdf:Property ;
  rdfs:label "p"@en ;
  rdfs:comment "Operations objects must have exactly one p, predicate, member. The value of this member must be an URI, e.g. https://onerecord.iata.org/ns/cargo#hasGoodsDescription"@en ;
  rdfs:domain api:Operation ;
  rdfs:range xsd:anyURI .

api:s a rdf:Property ;
  rdfs:label "s"@en ;
  rdfs:comment "Operation objects MUST have exactly one \"s\", subject, member. The value of this member MUST be one of IRI or blank node."@en ;
  rdfs:domain api:Operation ;
  rdfs:range xsd:string .

api:op a rdf:Property ;
  rdfs:domain api:Operation ;
  rdfs:range api:PatchOperation .

api:ChangeRequest a rdfs:Class ;
  rdfs:label "Change Request"@en ;
  rdfs:comment "Change Request containing updates on a Logistics Object"@en ;
  rdfs:subClassOf api:ActionRequest .

api:hasChange a rdf:Property ;
  rdfs:label "has Change"@en ;
  rdfs:comment "Contains submitted Change object"@en ;
  rdfs:domain api:ChangeRequest ;
  rdfs:range api:Change .

api:AccessPermissions a rdfs:Class ;
  rdfs:label "Access Permissions"@en ;
  rdfs:comment "Access permissions granted to a logistics agent for a logistics object"@en .

api:hasPermission a rdf:Property ;
  rdfs:label "has Permission"@en ;
  rdfs:domain api:AccessDelegation ;
  rdfs:range api:Permission .

api:hasLogisticsAgent a rdf:Property ;
  rdfs:label "has Logistics Agent" ;
  rdfs:domain api:AccessPermissions ;
  rdfs:range <https://onerecord.iata.org/ns/cargo#LogisticsAgent> .

api:AccessDelegationRequest a rdfs:Class ;
  rdfs:label "Access Delegation Request"@en ;
  rdfs:comment "Delegation Request to 3rd parties"@en ;
  rdfs:subClassOf api:ActionRequest .

api:hasAccessDelegation a rdf:Property ;
  rdfs:label "has Access Delegation"@en ;
  rdfs:domain api:AccessDelegationRequest ;
  rdfs:range api:AccessDelegation .

<https://onerecord.iata.org/ns/cargo#Organization> a rdfs:Class .

api:OperationObject a rdfs:Class ;
  rdfs:label "Operation Object"@en ;
  rdfs:comment "Object to modify in the PATCH request"@en .

api:hasDatatype a rdf:Property ;
  rdfs:label "Datatype"@en ;
  rdfs:comment "Data type of the field to update, must be a valid URI, e.g. http://www.w3.org/2001/XMLSchema#int"@en ;
  rdfs:domain api:OperationObject ;
  rdfs:range xsd:anyURI .

api:hasValue a rdf:Property ;
  rdfs:label "Value"@en ;
  rdfs:comment "Updated value for the field"@en ;
  rdfs:domain api:OperationObject ;
  rdfs:range xsd:string .

api:Collection a rdfs:Class ;
  rdfs:label "Collection"@en ;
  rdfs:comment "Used as response of endpoints returning a collection of more than one graph, i.e. more than one not linked subjects."@en .

api:hasTotalItems a rdf:Property ;
  rdfs:label "Total items"@en ;
  rdfs:comment "The number of total items contained in a collection"@en ;
  rdfs:domain api:Collection ;
  rdfs:range xsd:nonNegativeInteger .

api:hasItem a rdf:Property ;
  rdfs:label "has Item"@en ;
  rdfs:comment "Item that is contained in a collection"@en ;
  rdfs:domain api:Collection ;
  rdfs:range <https://w3id.org/linkml/Any> .

api:Error a rdfs:Class ;
  rdfs:label "Error"@en ;
  rdfs:comment "Error model"@en .

api:hasErrorDetail a rdf:Property ;
  rdfs:label "has Error Detail"@en ;
  rdfs:comment "Error details"@en ;
  rdfs:domain api:Error ;
  rdfs:range api:ErrorDetail .

api:hasTitle a rdf:Property ;
  rdfs:label "Title"@en ;
  rdfs:comment "Short summary of the error"@en ;
  rdfs:domain api:Error ;
  rdfs:range xsd:string .

api:ErrorDetail a rdfs:Class ;
  rdfs:label "Error Detail"@en ;
  rdfs:comment "Error details that belong to an error"@en .

api:hasMessage a rdf:Property ;
  rdfs:label "Message"@en ;
  rdfs:comment "Message that describes the error"@en ;
  rdfs:domain api:ErrorDetail ;
  rdfs:range xsd:string .

api:hasProperty a rdf:Property ;
  rdfs:label "Property"@en ;
  rdfs:comment "Property of the object for which the error applies in IRI format, i.e. https://onerecord.iata.org/ns/cargo#hasVolumetricWeight"@en ;
  rdfs:domain api:ErrorDetail ;
  rdfs:range xsd:anyURI .

api:hasCode a rdf:Property ;
  rdfs:label "Code"@en ;
  rdfs:comment "Error code is a numeric or alphanumeric code that can be used to determine the source of the error and why it occured."@en ;
  rdfs:domain api:ErrorDetail ;
  rdfs:range xsd:string .

api:hasResource a rdf:Property ;
  rdfs:label "Resource"@en ;
  rdfs:comment "URI of the object where the error occurred"@en ;
  rdfs:domain api:ErrorDetail ;
  rdfs:range xsd:anyURI .

<https://onerecord.iata.org/ns/cargo#LogisticsAgent> a rdfs:Class .

api:AccessDelegation a rdfs:Class ;
  rdfs:label "Access Delegation"@en ;
  rdfs:comment "Access to a Logistics Object delegated to an Organization"@en .

api:isRequestedFor a rdf:Property ;
  rdfs:label "is requested for"@en ;
  rdfs:domain api:AccessDelegation ;
  rdfs:range <https://onerecord.iata.org/ns/cargo#Organization> .

api:SubscriptionRequest a rdfs:Class ;
  rdfs:label "Subscription Request"@en ;
  rdfs:comment "SubscriptionRequest initiated by subscribers to publisher (data holder) for themselves or for a third party subscriber."@en ;
  rdfs:subClassOf api:ActionRequest .

api:hasSubscription a rdf:Property ;
  rdfs:label "has Subscription"@en ;
  rdfs:comment "Link to the requestors Subscription object with all subscription information"@en ;
  rdfs:domain api:SubscriptionRequest ;
  rdfs:range api:Subscription .

api:Subscription a rdfs:Class ;
  rdfs:label "Subscription"@en ;
  rdfs:comment "Subscription information sent to the publisher"@en .

api:hasContentType a rdf:Property ;
  rdfs:label "Content type"@en ;
  rdfs:comment "Content types that the subscriber wants to receive in the notifications, e.g. application/ld+json"@en ;
  rdfs:domain api:Subscription ;
  rdfs:range xsd:string .

api:hasSubscriber a rdf:Property ;
  rdfs:label "has Subscriber"@en ;
  rdfs:domain api:Subscription ;
  rdfs:range <https://onerecord.iata.org/ns/cargo#Organization> .

api:hasTopicType a rdf:Property ;
  rdfs:domain api:Subscription ;
  rdfs:range api:TopicType .

api:sendLogisticsObjectBody a rdf:Property ;
  rdfs:label "Send LogisticsObject body"@en ;
  rdfs:comment "Flag specifying if the publisher should send the whole logistics object or not in the notification object"@en ;
  rdfs:domain api:Subscription ;
  rdfs:range xsd:boolean .

api:expiresAt a rdf:Property ;
  rdfs:label "Expires at"@en ;
  rdfs:comment "Expiry date as date time of the subscription information that supports caching but does not require the ONE Record client to store the datetime when the Subscription object was received; if not given: the information does not expire"@en ;
  rdfs:domain api:Subscription ;
  rdfs:range xsd:dateTime .

api:includeSubscriptionEventType a rdf:Property ;
  rdfs:label "Include Subscription Event Type"@en ;
  rdfs:comment "An array used to indicate the specific types of notifications that the subscriber desires to receive from the publisher. The subscriber is required to specify their preferences on a per-type basis"@en ;
  rdfs:domain api:Subscription ;
  rdfs:range api:SubscriptionEventType .

<https://w3id.org/linkml/Any> a rdfs:Class ;
  rdfs:comment "An unconstrained type or object" .

api:VerificationRequest a rdfs:Class ;
  rdfs:label "Verification Request" ;
  rdfs:comment "Verification Request allows third parties to signal errors and anomalies on logisitcs objects" ;
  rdfs:subClassOf api:ActionRequest .

api:hasVerification a rdf:Property ;
  rdfs:label "has Verification" ;
  rdfs:comment "Links to the Verification class" ;
  rdfs:domain api:VerificationRequest ;
  rdfs:range api:Verification .

api:RequestStatus a rdfs:Class ;
  rdfs:label "RequestStatus"@en .

api:REQUEST_ACCEPTED a api:RequestStatus ;
  rdfs:label "REQUEST_ACCEPTED"@en .

api:REQUEST_FAILED a api:RequestStatus ;
  rdfs:label "REQUEST_FAILED"@en .

api:REQUEST_PENDING a api:RequestStatus ;
  rdfs:label "REQUEST_PENDING"@en .

api:REQUEST_REJECTED a api:RequestStatus ;
  rdfs:label "REQUEST_REJECTED"@en .

api:REQUEST_REVOKED a api:RequestStatus ;
  rdfs:label "REQUEST_REVOKED"@en .

api:SubscriptionEventType a rdfs:Class ;
  rdfs:label "Subscription Event Type"@en .

api:LOGISTICS_EVENT_RECEIVED a api:SubscriptionEventType , api:NotificationEventType ;
  rdfs:label "LOGISTICS_EVENT_RECEIVED"@en .

api:LOGISTICS_OBJECT_CREATED a api:SubscriptionEventType , api:NotificationEventType ;
  rdfs:label "LOGISTICS_OBJECT_CREATED"@en .

api:LOGISTICS_OBJECT_UPDATED a api:SubscriptionEventType , api:NotificationEventType ;
  rdfs:label "LOGISTICS_OBJECT_UPDATED"@en .

api:Permission a rdfs:Class ;
  rdfs:label "Permission"@en .

api:GET_LOGISTICS_EVENT a api:Permission ;
  rdfs:label "GET_LOGISTICS_EVENT"@en ;
  rdfs:comment ":Permission to get a :LogisticsEvent"@en .

api:GET_LOGISTICS_OBJECT a api:Permission ;
  rdfs:label "GET_LOGISTICS_OBJECT"@en ;
  rdfs:comment ":Permission to get a :LogisticsObject"@en .

api:PATCH_LOGISTICS_OBJECT a api:Permission ;
  rdfs:label "PATCH_LOGISTICS_OBJECT"@en .

api:POST_LOGISTICS_EVENT a api:Permission ;
  rdfs:label "POST_LOGISTICS_EVENT" ;
  rdfs:comment ":Permission to add a logistics event."@en .

api:TopicType a rdfs:Class .

api:LOGISTICS_OBJECT_IDENTIFIER a api:TopicType ;
  rdfs:label "LOGISTICS_OBJECT_IDENTIFIER"@en .

api:LOGISTICS_OBJECT_TYPE a api:TopicType ;
  rdfs:label "LOGISTICS_OBJECT_TYPE"@en .

api:NotificationEventType a rdfs:Class ;
  rdfs:label "Notification Event Type"@en .

api:ACCESS_DELEGATION_REQUEST_ACCEPTED a api:NotificationEventType ;
  rdfs:label "ACCESS_DELEGATION_REQUEST_ACCEPTED"@en .

api:ACCESS_DELEGATION_REQUEST_FAILED a api:NotificationEventType ;
  rdfs:label "ACCESS_DELEGATION_REQUEST_FAILED"@en .

api:ACCESS_DELEGATION_REQUEST_PENDING a api:NotificationEventType ;
  rdfs:label "ACCESS_DELEGATION_REQUEST_PENDING"@en .

api:ACCESS_DELEGATION_REQUEST_REJECTED a api:NotificationEventType ;
  rdfs:label "ACCESS_DELEGATION_REQUEST_REJECTED"@en .

api:ACCESS_DELEGATION_REQUEST_REVOKED a api:NotificationEventType ;
  rdfs:label "ACCESS_DELEGATION_REQUEST_REVOKED"@en .

api:CHANGE_REQUEST_ACCEPTED a api:NotificationEventType ;
  rdfs:label "CHANGE_REQUEST_ACCEPTED"@en ;
  rdfs:comment ":EventType for accepted :ChangeRequests"@en .

api:CHANGE_REQUEST_FAILED a api:NotificationEventType ;
  rdfs:label "CHANGE_REQUEST_FAILED"@en ;
  rdfs:comment ":EventType for failed :ChangeRequests." .

api:CHANGE_REQUEST_PENDING a api:NotificationEventType ;
  rdfs:label "CHANGE_REQUEST_PENDING" ;
  rdfs:comment ":EventType for pending :ChangeRequests." .

api:CHANGE_REQUEST_REJECTED a api:NotificationEventType ;
  rdfs:label "CHANGE_REQUEST_PENDING" .

api:CHANGE_REQUEST_REVOKED a api:NotificationEventType ;
  rdfs:label "CHANGE_REQUEST_REVOKED"@en .

api:SUBSCRIPTION_REQUEST_ACCEPTED a api:NotificationEventType ;
  rdfs:label "SUBSCRIPTION_REQUEST_ACCEPTED"@en .

api:SUBSCRIPTION_REQUEST_FAILED a api:NotificationEventType ;
  rdfs:label "SUBSCRIPTION_REQUEST_FAILED"@en .

api:SUBSCRIPTION_REQUEST_PENDING a api:NotificationEventType ;
  rdfs:label "SUBSCRIPTION_REQUEST_PENDING"@en .

api:SUBSCRIPTION_REQUEST_REJECTED a api:NotificationEventType ;
  rdfs:label "SUBSCRIPTION_REQUEST_REJECTED"@en .

api:SUBSCRIPTION_REQUEST_REVOKED a api:NotificationEventType ;
  rdfs:label "SUBSCRIPTION_REQUEST_REVOKED"@en .

api:PatchOperation a rdfs:Class ;
  rdfs:label "Patch Operation" .

api:ADD a api:PatchOperation ;
  rdfs:label "ADD"@en ;
  rdfs:comment "Defines a :PatchOperation to be an operation that adds new triples."@en .

api:DELETE a api:PatchOperation ;
  rdfs:label "DELETE"@en .
