httk.serve.dsp.serializers¶
JSON projections for the DSP/DCAT catalogue and its process records.
Functions¶
|
Serialize the unconditional ODRL |
|
Serialize a DSP data service embedded in a distribution. |
|
Serialize the DSP distribution with its embedded service and access URL. |
|
Serialize one dataset in its DSP catalogue projection. |
|
Serialize the fixed catalogue under the protected official DSP context. |
|
Serialize one dataset as a DSP root response document. |
|
Serialize the context-substituted DCAT-AP projection. |
|
Serialize an immutable agreement record as a fresh JSON policy. |
|
Serialize a negotiation process at its acknowledged state. |
|
Serialize a transfer process at its acknowledged state. |
|
Serialize the DSP HTTPS version-discovery response. |
Module Contents¶
- httk.serve.dsp.serializers.offer_policy(offer, *, include_target)[source]¶
Serialize the unconditional ODRL
useoffer.- Parameters:
offer (httk.serve.dsp.models.OfferProfile) – Fixed offer profile to serialize.
include_target (bool) – Whether to add the message-only dataset target.
- Returns:
Fresh JSON policy object.
- Return type:
- httk.serve.dsp.serializers.serialize_data_service(service)[source]¶
Serialize a DSP data service embedded in a distribution.
- Parameters:
service (httk.serve.dsp.models.DataServiceProfile) – Data-service profile to serialize.
- Returns:
Fresh DSP data-service object.
- Return type:
- httk.serve.dsp.serializers.serialize_distribution(distribution)[source]¶
Serialize the DSP distribution with its embedded service and access URL.
- Parameters:
distribution (httk.serve.dsp.models.DistributionProfile) – Distribution profile to serialize.
- Returns:
Fresh DSP distribution object.
- Return type:
- httk.serve.dsp.serializers.serialize_dsp_dataset(profile)[source]¶
Serialize one dataset in its DSP catalogue projection.
- Parameters:
profile (httk.serve.dsp.models.DatasetProfile) – Fixed provider catalogue profile.
- Returns:
Fresh DSP dataset object.
- Return type:
- httk.serve.dsp.serializers.serialize_dsp_catalogue(profile)[source]¶
Serialize the fixed catalogue under the protected official DSP context.
- Parameters:
profile (httk.serve.dsp.models.CatalogueProfile) – Fixed provider catalogue profile.
- Returns:
Fresh DSP catalogue document.
- Return type:
- httk.serve.dsp.serializers.serialize_dsp_dataset_document(profile)[source]¶
Serialize one dataset as a DSP root response document.
- Parameters:
profile (httk.serve.dsp.models.DatasetProfile) – Fixed provider catalogue profile.
- Returns:
Fresh DSP dataset document.
- Return type:
- httk.serve.dsp.serializers.serialize_dcat_catalogue(profile)[source]¶
Serialize the context-substituted DCAT-AP projection.
The common catalogue value is byte-for-byte derived from the DSP value; only the top-level context is replaced. The owned context changes every
endpointURLstring from an RDF literal to an RDF IRI.- Parameters:
profile (httk.serve.dsp.models.CatalogueProfile) – Fixed provider catalogue profile.
- Returns:
Fresh DCAT-AP-compatible JSON-LD catalogue document.
- Return type:
- httk.serve.dsp.serializers.serialize_agreement(agreement)[source]¶
Serialize an immutable agreement record as a fresh JSON policy.
- Parameters:
agreement (httk.serve.dsp.models.AgreementRecord) – Agreement record to serialize.
- Returns:
Fresh agreement policy object.
- Return type:
- httk.serve.dsp.serializers.serialize_negotiation(record)[source]¶
Serialize a negotiation process at its acknowledged state.
- Parameters:
record (httk.serve.dsp.models.NegotiationRecord) – Negotiation snapshot to serialize.
- Returns:
Fresh DSP contract-negotiation document.
- Return type:
- httk.serve.dsp.serializers.serialize_transfer(record)[source]¶
Serialize a transfer process at its acknowledged state.
- Parameters:
record (httk.serve.dsp.models.TransferRecord) – Transfer snapshot to serialize.
- Returns:
Fresh DSP transfer-process document.
- Return type: