zazuko / xrm

A friendly language for mappings to RDF
MIT License
1 stars 0 forks source link

Explicit choice of the output format in the DSL #48

Closed mchlrch closed 4 years ago

mchlrch commented 4 years ago

Currently, the three output formats r2rml, rml and csvw are generated opportunistically. The user cannot choose the desired output.

There is interdependence of the output format with the source and the mapping, for example:

The DSL user currently has no guidance and needs to rely on (inexistant) documentation to handle the variability. Instead of that, the DSL should support the user with code-assist and validation that is aware of the output format.

Solution proposal:

output r2rml

map Profession from easygov_professions {
    ...

    properties      
        skos.notation template "{0}" with CODE as Literal;
    ...
}
nnamtug commented 4 years ago

@mchlrch ready to play with.

what about SourceType.RDB? see InputOutputCompatibility:37

deeplink: https://github.com/zazuko/rdf-mapping-dsl/blob/issue_48_specify_output/com.zazuko.rdfmapping.dsl.parent/com.zazuko.rdfmapping.dsl/src/com/zazuko/rdfmapping/dsl/services/InputOutputCompatibility.java#L37

mchlrch commented 4 years ago

InputOutputCompatibility is now configured as follows:

@ktk What do you think, does that make sense to you or should the rules be different?

mchlrch commented 4 years ago

I tested this feature manually, it works as requested. The comments in the mapping files of runtime-EclipseXtext/editor-test were helpful for doing the manual testing.

I will keep this issue open until we have also added unit-tests for the new validations (see RdfMappingValidator.xtend)

nnamtug commented 4 years ago

I tested this feature manually, it works as requested. The comments in the mapping files of runtime-EclipseXtext/editor-test were helpful for doing the manual testing.

I will keep this issue open until we have also added unit-tests for the new validations (see RdfMappingValidator.xtend)

added missing tests validations for these issues:

15 https://github.com/zazuko/rdf-mapping-dsl/commit/0c5f0ece893f8f3866286d4c7d33f715ad4146d4

39 https://github.com/zazuko/rdf-mapping-dsl/commit/248d09f45fe88c1bdd1636ec3f44557c1ec3d465

48 https://github.com/zazuko/rdf-mapping-dsl/commit/4bcbb04bb53636a46ffb5bed74a98a2ed1bddb96

all validations seems to be covered by tests now.