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

capture a piece of JSON/XML as a literal #126

Open
VladimirAlexiev opened this issue Apr 1, 2024 · 4 comments
Open

capture a piece of JSON/XML as a literal #126

VladimirAlexiev opened this issue Apr 1, 2024 · 4 comments
Assignees
Labels
test-cases Test cases need to be updated working-group?

Comments

@VladimirAlexiev
Copy link

An important case in GeoSPARQL is to capture fragments of the input XML (GML) or JSON (GeoJSON) as literals with custom datatypes: geo:gmlLiteral, geo:geoJSONLiteral.
This happens when converting eg GML, CityGML; and JSON-FG, CityJSON to RDF.

I think this is easy with RML, but I just want to be sure. Is it possible to add test cases for it?

I faced that problem recently, so I wrote some issues for different tools:

@DylanVanAssche DylanVanAssche added the documentation Improvements or additions to documentation label Jun 19, 2024
@DylanVanAssche
Copy link
Collaborator

Hi @VladimirAlexiev !

I had a look at this issue and I also think it will just work because you can specify the data type with rml:datatype in the mapping. Then you use a rml:reference to capture the part of the file you want as Literal.

However, I'm a bit puzzled how it looks exactly if we want to add a test case for it. Do you have an example of input and expected RDF output? The referenced issues give only a faulty output as an example. I tried to reconstruct from those what you want, but please confirm or give another example:

INPUT

<plu:geometry>
        <gml:Polygon srsName="http://www.opengis.net/def/crs/EPSG/0/25833" srsDimension="2">
          <gml:exterior>
            <gml:LinearRing>
              <gml:posList>385919.31860777 5824690.697477636 ...</gml:posList>
            </gml:LinearRing>
          </gml:exterior>
        </gml:Polygon>
      </plu:geometry>

OUTPUT

<ex:somethign> <ex:polygon> <gml:Polygon srsName=\"http://www.opengis.net/def/crs/EPSG/0/25833\" srsDimension=\"2\">\n                   <gml:exterior>\n                        <gml:LinearRing>\n                            <gml:posList>385919.31860777 5824690.697477636</gml:posList>\n                        </gml:LinearRing>\n                    </gml:exterior>\n                </gml:Polygon>\n            " ^^geo:gmlLiteral;

Moreover, this is RML-Core thing as we only deal in RML-IO with access to Sources and Targets, I moved this issue to the right repository.

@DylanVanAssche DylanVanAssche transferred this issue from kg-construct/rml-io Jun 20, 2024
@pmaria pmaria added the test-cases Test cases need to be updated label Jun 25, 2024
@dachafra
Copy link
Member

dachafra commented Jul 4, 2024

However, I'm a bit puzzled how it looks exactly if we want to add a test case for it. Do you have an example of input and expected RDF output? The referenced issues give only a faulty output as an example.

@VladimirAlexiev could you help us to define this test-case?

@dachafra dachafra added working-group? and removed documentation Improvements or additions to documentation labels Jul 11, 2024
@VladimirAlexiev
Copy link
Author

Sorry forvthe delay @DylanVanAssche and @dachafra , I'll do this

@VladimirAlexiev
Copy link
Author

Sorry for the delay @DylanVanAssche and @dachafra , I'll do this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
test-cases Test cases need to be updated working-group?
Projects
None yet
Development

No branches or pull requests

4 participants