Reference¶
servicecatalogtordf.service¶
Module for mapping a service to rdf.
This module contains methods for mapping a service object to rdf according to the dcat-ap-no v.2 standard
Example
>>> from servicecatalogtordf import Service
>>>
>>> service = Service("http://example.com/services/1")
>>> service.title = {"en": "Title of service"}
>>>
>>> bool(service.to_rdf())
True
- class servicecatalogtordf.service.Service(identifier)¶
A class representing a cpsv:PublicService.
Ref: cpsv:PublicService. # noqa
- identifier¶
A URI uniquely identifying the service
- Type
URI
- title¶
A name given to the service. key is langauge code.
- Type
dict
- description¶
A description given to the service. key is langauge code.
- Type
dict
- dct_identifier¶
A formal identifier of the service.
- Type
str
- has_competent_authority¶
the organization responsible for the service
- Type
- has_legal_resources¶
a legal resource that the service is related to
- Type
List[LegalResource]
- processing_time¶
the (estimated) time needed for executing a Public
- Type
str
- has_criterion¶
(List[CriterionRequirement]): a list of criterial for needing or using the service
- property dct_identifier: str¶
Dct_identifier attribute.
- Return type
str
- property description: dict¶
Description attribute.
- Return type
dict
- property has_competent_authority: servicecatalogtordf.public_organization.PublicOrganization¶
Has_competent_authority attribute.
- Return type
- property has_criterion: List[servicecatalogtordf.criterion_requirement.CriterionRequirement]¶
Has_input attribute.
- Return type
List[CriterionRequirement]
- property has_input: List[servicecatalogtordf.evidence.Evidence]¶
Has_input attribute.
- Return type
List[Evidence]
- property has_legal_resources: List[servicecatalogtordf.legal_resource.LegalResource]¶
Follows attribute.
- Return type
List[LegalResource]
- property identifier: str¶
Get/set for identifier.
- Return type
str
- property is_grouped_by: List[servicecatalogtordf.event.Event]¶
Has_input attribute.
- Return type
List[Event]
- property processing_time: str¶
processing_time attribute.
- Return type
str
- property title: dict¶
Title attribute.
- Return type
dict
- to_rdf(format='turtle', encoding='utf-8')¶
Maps the service to rdf.
- Available formats:
turtle (default)
xml
json-ld
- Parameters
format (str) – a valid format.
encoding (str) – the encoding to serialize into
- Return type
Union[bytes,str]- Returns
a rdf serialization as a string literal according to format.
servicecatalogtordf.legal_resource¶
Module for mapping a LegalResource to rdf.
This module contains methods for mapping a LegalResource object to rdf according to the dcat-ap-no v.2 standard # noqa
Example
>>> from servicecatalogtordf import LegalResource, ResourceType
>>>
>>> # Create the legal_resource:
>>> legal_resource = LegalResource("http://example.com/legal_resources/1")
>>> resource_type = ResourceType("http://example.com/types/1")
>>> legal_resource.types.append(resource_type)
>>>
>>> bool(legal_resource.to_rdf())
True
- class servicecatalogtordf.legal_resource.LegalResource(identifier=None)¶
A class representing a eli:LegalResource.
Ref: eli:LegalResource. # noqa
- identifier¶
A URI uniquely identifying the legal_resource
- Type
URI
- dct_identifier¶
A formal identifier of the legal_resource.
- Type
str
- types¶
A name given to the legal_resource. key is language code.
- Type
List[ResourceType]
- description¶
A description given to the legal_resource. key is language code.
- Type
dict
- references¶
References to other resources
- Type
List[URI]
References to other resources
- Type
List[LegalResource]
- property dct_identifier: str¶
dct_identifier attribute.
- Return type
str
- property description: dict¶
Description attribute.
- Return type
dict
- property identifier: str¶
Get/set for identifier.
- Return type
str
- property references: List[str]¶
Title attribute.
- Return type
List[str]
- property related: List[servicecatalogtordf.legal_resource.LegalResource]¶
Title attribute.
- Return type
List[LegalResource]
- to_rdf(format='turtle', encoding='utf-8')¶
Maps the legal_resource to rdf.
- Available formats:
turtle (default)
xml
json-ld
- Parameters
format (str) – a valid format.
encoding (str) – the encoding to serialize into
- Return type
Union[bytes,str]- Returns
a rdf serialization as a bytes literal according to format.
- property types: List[servicecatalogtordf.legal_resource.ResourceType]¶
Title attribute.
- Return type
List[ResourceType]
- class servicecatalogtordf.legal_resource.ResourceType(identifier=None)¶
A class representing a eli:ResourceType.
Ref: eli:LegalResource. # noqa
- identifier¶
A URI uniquely identifying the legal_resource
- Type
URI
- property identifier: str¶
Get/set for identifier.
- Return type
str
servicecatalogtordf.rule¶
Module for mapping a Rule to rdf.
This module contains methods for mapping a Rule object to rdf according to the dcat-ap-no v.2 standard # noqa
Example
>>> from servicecatalogtordf import Rule
>>>
>>> # Create the rule:
>>> rule = Rule("http://example.com/rules/1")
>>> rule.title = {"en": "Title of rule"}
>>>
>>> bool(rule.to_rdf())
True
- class servicecatalogtordf.rule.Rule(identifier=None)¶
A class representing a cv:Rule.
Ref: cv:Rule. # noqa
- identifier¶
A URI uniquely identifying the rule
- Type
URI
- dct_identifier¶
A formal identifier of the rule.
- Type
str
- title¶
A name given to the rule. key is language code.
- Type
dict
- description¶
A description given to the rule. key is language code.
- Type
dict
- implements¶
A legal resource under which the rule is defined
- Type
List[LegalResource]
- languages¶
A list of languages the rules is accessible in
- Type
List[URI]
- types¶
A link to concepts describing the type of the rule
- Type
List[URI]
- property dct_identifier: str¶
dct_identifier attribute.
- Return type
str
- property description: dict¶
Description attribute.
- Return type
dict
- property identifier: str¶
Get/set for identifier.
- Return type
str
- property implements: List[servicecatalogtordf.legal_resource.LegalResource]¶
Implements attribute.
- Return type
List[LegalResource]
- property languages: List[str]¶
Languages attribute.
- Return type
List[str]
- property title: dict¶
Title attribute.
- Return type
dict
- to_rdf(format='turtle', encoding='utf-8')¶
Maps the rule to rdf.
- Available formats:
turtle (default)
xml
json-ld
- Parameters
format (str) – a valid format.
encoding (str) – the encoding to serialize into
- Return type
Union[bytes,str]- Returns
a rdf serialization as a string literal according to format.
- property types: List[str]¶
Types attribute.
- Return type
List[str]
servicecatalogtordf.evidence¶
Module for mapping a Evidence to rdf.
This module contains methods for mapping a Evidence object to rdf according to the cpsv-ap specification # noqa
Example
>>> from servicecatalogtordf import Evidence
>>>
>>> # Create the evidence:
>>> evidence = Evidence("http://example.com/evidences/1")
>>> evidence.dct_identifier = "1"
>>> evidence.name = {"nb": "Mitt bevis"}
>>>
>>> bool(evidence.to_rdf())
True
- class servicecatalogtordf.evidence.Evidence(identifier=None)¶
A class representing a cpsv:Evidence.
Ref: cpsv:Evidence. # noqa
- identifier¶
A URI uniquely identifying the evidence
- Type
URI
- dct_identifier¶
A formal identifier of the evidence.
- Type
str
- name¶
The official name of the piece of evidence. key is language code.
- Type
dict
- description¶
A description given to the evidence. key is language code.
- Type
dict
- type¶
the type of evidence as described in a controlled vocabulary.
- Type
URI
References to other information resources
- Type
List[URI]
- languages¶
A list of languages in which the evidence must be provided
- Type
List[URI]
- property dct_identifier: str¶
dct_identifier attribute.
- Return type
str
- property description: dict¶
Description attribute.
- Return type
dict
- property identifier: str¶
Get/set for identifier.
- Return type
str
- property languages: List[str]¶
Languages attribute.
- Return type
List[str]
- property name: dict¶
Title attribute.
- Return type
dict
- property related_documentation: List[str]¶
Implements attribute.
- Return type
List[str]
- to_rdf(format='turtle', encoding='utf-8')¶
Maps the evidence to rdf.
- Available formats:
turtle (default)
xml
json-ld
- Parameters
format (str) – a valid format.
encoding (str) – the encoding to serialize into
- Return type
Union[bytes,str]- Returns
a rdf serialization as a bytes literal according to format.
- property type: str¶
Types attribute.
- Return type
str
servicecatalogtordf.event¶
Module for mapping a Event to rdf.
This module contains methods for mapping a Event object to rdf according to the cpsv-ap specification # noqa
Example
>>> from servicecatalogtordf import Event
>>>
>>> # Create the event:
>>> event = Event("http://example.com/events/1")
>>> event.dct_identifier = "1"
>>> event.name = {"nb": "Mitt bevis"}
>>>
>>> bool(event.to_rdf())
True
- class servicecatalogtordf.event.Event(identifier=None)¶
A class representing a cpsv:Event.
Ref: cpsv:Event. # noqa
- identifier¶
A URI uniquely identifying the event
- Type
URI
- dct_identifier¶
A formal identifier of the event.
- Type
str
- name¶
The official name of the piece of event. key is language code.
- Type
dict
- description¶
A description given to the event. key is language code.
- Type
dict
- type¶
the type of event as described in a controlled vocabulary.
- Type
URI
References to other information resources
- Type
List[URI]
- property dct_identifier: str¶
dct_identifier attribute.
- Return type
str
- property description: dict¶
Description attribute.
- Return type
dict
- property identifier: str¶
Get/set for identifier.
- Return type
str
- property name: dict¶
Title attribute.
- Return type
dict
- property related_service: List[str]¶
Related_service attribute.
- Return type
List[str]
- to_rdf(format='turtle', encoding='utf-8')¶
Maps the event to rdf.
- Available formats:
turtle (default)
xml
json-ld
- Parameters
format (str) – a valid format.
encoding (str) – the encoding to serialize into
- Return type
Union[bytes,str]- Returns
a rdf serialization as a bytes literal according to format.
- property type: str¶
Types attribute.
- Return type
str
servicecatalogtordf.public_organization¶
Module for mapping a PublicOrganization to rdf.
This module contains methods for mapping a PublicOrganization object to rdf according to the dcat-ap-no v.2 standard # noqa
Example
>>> from datacatalogtordf import Location
>>> from servicecatalogtordf import PublicOrganization
>>>
>>> # Create the public organization:
>>> public_organization = PublicOrganization("http://example.com/public-organizations/1")
>>> public_organization.title = {"en": "Title of public organization"}
>>> # Create and add a location to the spatial_coverage property:
>>> location = Location()
>>> location.identifier = "http://publications.europa.eu/resource/authority/country/NOR"
>>> public_organization.spatial_coverage = location
>>>
>>> bool(public_organization.to_rdf())
True
- class servicecatalogtordf.public_organization.PublicOrganization(identifier=None)¶
A class representing a cv:PublicOrganization.
Ref: cv:PublicOrganization. # noqa
- identifier¶
A URI uniquely identifying the organization
- Type
URI
- spatial_coverage¶
The geographical area covered by the organization.
- Type
Location
- dct_identifier¶
A formal identifier of the organization.
- Type
str
- pref_label¶
The preferred name given to the organization. key is language code.
- Type
dict
- title¶
A name given to the organization. key is language code.
- Type
dict
- property dct_identifier: str¶
dct_identifier attribute.
- Return type
str
- property identifier: str¶
Get/set for identifier.
- Return type
str
- property pref_label: dict¶
pref_label attribute.
- Return type
dict
- property spatial_coverage: datacatalogtordf.location.Location¶
spatial_coverage attribute.
- Return type
Location
- property title: dict¶
Title attribute.
- Return type
dict
- to_rdf(format='turtle', encoding='utf-8')¶
Maps the public_organization to rdf.
- Available formats:
turtle (default)
xml
json-ld
- Parameters
format (str) – a valid format.
encoding (str) – the encoding to serialize into
- Return type
Union[bytes,str]- Returns
a rdf serialization as a bytes literal according to format.