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 (R2)RML graph maps #135

Closed
tpluscode opened this issue Jul 20, 2020 · 1 comment
Closed

Support (R2)RML graph maps #135

tpluscode opened this issue Jul 20, 2020 · 1 comment

Comments

@tpluscode
Copy link
Contributor

R2RML can output triples to specific named graph defined using rr:graphMap property.

Either as template

[] rr:subjectMap [
  rr:graphMap [ rr:template "http://www.example.com/{@type}" ];
].

or constant

[] rr:subjectMap [
  rr:graphMap [ rr:constant ex:StopsGraph ];
].

I propose to add this as a language feature in the map block. Multiple should be allowed

map Subject from source {
  graph template "http://www.example.com/{0}" with Type

  graph constant "http://www.example.com/StopsGraph"

  # Also using prefixed names if possible
  graph constant ex.StopsGraph
}
@mchlrch
Copy link
Member

mchlrch commented Jul 27, 2022

XRM version 1.2.0 now supports declaring target named graph(s)

Declaring graphs is only supported for R2RML, RML and CARML output. It's not supported for CSVW output.

Sample XRM:

output r2rml

map ThingIntoGraphmapsMapping from ThingIntoGraphmapsSource {
	subject template "http://example.org/thing/{0}" with id;

	graphs
		constant "http://example.org/graph/omnigraph";          // constant IRI as string
		template "http://example.org/graph/thing-{0}" with id;  // templated IRI with variable(s)
		
		constant thing.Thing;              // IRI from Class
		constant thing.color;              // IRI from Property
		constant employee.myDatatype;      // IRI from Datatype
}

@mchlrch mchlrch closed this as completed Jul 27, 2022
@mchlrch mchlrch transferred this issue from zazuko/expressive-rdf-mapper Dec 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants