Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for labels and comments #40

Open
costezki opened this issue Nov 11, 2022 · 6 comments
Open

Support for labels and comments #40

costezki opened this issue Nov 11, 2022 · 6 comments
Assignees
Labels
new-feature petition for new feature support ppds Requirements for using it in PPDS project to-do For implementing in the future
Milestone

Comments

@costezki
Copy link

It would be very useful to support RDFS lexicalisation or SKOs lexicalisation.

We need to leave editorial comments and label mappings with references to "fields in a conceptual model".
In RML/RDF is done like this:

tedm:AdditionalOrganisation a rr:TripleMap ;
    rr:subjectMap
        [
            rr:template "http://data.europa.eu/a4g/resource/AdditionalOrganisation/{replace(replace(/TED_EXPORT/CODED_DATA_SECTION/NOTICE_DATA/NO_DOC_OJS, ' ', '-' ), '/' , '-')}/{unparsed-text('https://digest-api.ted-data.eu/api/v1/hashing/fn/uuid/' || encode-for-uri(path()) || '?response_type=raw')}" ;
            rr:class org:Organization

        ] ;
    rml:logicalSource
    [
        rml:source "data/source.xml" ;
        rml:iterator "/TED_EXPORT/FORM_SECTION/F06_2014/CONTRACTING_BODY/ADDRESS_CONTRACTING_BODY_ADDITIONAL" ;
        rml:referenceFormulation ql:XPath
    ] ;
    rr:predicateObjectMap
        [
            rr:predicate epo:hasLegalName ;
            rr:objectMap
                [
                    rdfs:label "I.1.1	Official name	(BT-500	Organisation Name)" ;
                    rdfs:comment "This is a language dependent mapping. The way to access it is specific to each Form as it depends on the Root element." ;
                    rml:reference "OFFICIALNAME";
                    rml:languageMap [
                         rml:reference "lower-case(ancestor::F06_2014/@LG)"
                    ]
                ] ;
        ] .
@dachafra dachafra self-assigned this Nov 11, 2022
@dachafra dachafra added the enhancement New feature or request label Nov 11, 2022
@dachafra dachafra added this to the v1.0 milestone Nov 11, 2022
@dachafra dachafra added the new-feature petition for new feature support label Nov 11, 2022
@dachafra dachafra added the ppds Requirements for using it in PPDS project label Nov 25, 2022
@dachafra
Copy link
Member

dachafra commented Jan 13, 2023

So, my suggestion for this would be something like (cc @anaigmo @andimou):

prefixes:
  foaf: http://xmlns.com/foaf/0.1/

mappings:
  AdditionalOrganisation:
    sources:
      - ['data.xml~XPath', '/Iterator']
    s: http://data.europa.eu/a4g/resource/AdditionalOrganisation/$(PATH_EXPRESION)
    po:
      - [epo:hasLegalName, $(OFFICIALNAME), $(lower-case(ancestor::F06_2014/@LG))~lang] # TITLE: I.1.1 [..] | COMMENT: This is a language [...]

@dachafra
Copy link
Member

Supporting this feature would require a refractor of the whole code to support the parsing of the YAML file with the structure prosed by Ruamel.yaml instead of primitive Python structures.

Before implementing it, pros&cons must be analyzed to avoid dependence on a specific lib.

Considering this is not "a must" right now, I would suggest not including it in the v1.0

@dachafra dachafra modified the milestones: v1.0, v2.0 Jan 30, 2023
@dachafra dachafra added to-do For implementing in the future and removed enhancement New feature or request labels Feb 7, 2023
@Schabalabab
Copy link

Schabalabab commented May 11, 2023

Are there any updates on whether this feature will be implemented and if yes, when can we expect the update?

@dachafra
Copy link
Member

dachafra commented May 11, 2023

Hi @Schabalabab,
It will be incorporated in the v2.0 of the engine, hopefully at the end of this month :-)

@dachafra
Copy link
Member

dachafra commented Oct 13, 2023

@costezki what is the main difference between the use of Label and Comment in the mapping? We would like to know what is the reason for using Label here, as it seems that it's not describing the mapping but describing the data which is coming from the reference value.

@costezki
Copy link
Author

Indeed, it describes the business field corresponding to the mapping source.
The comment may extend that or may be anything else (such an editorial note).
However used, documenting technical constructs have never been a bad practice and is worth supporting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new-feature petition for new feature support ppds Requirements for using it in PPDS project to-do For implementing in the future
Projects
None yet
Development

No branches or pull requests

3 participants