Feature request: RDF Schema DSL
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
ActiveRDF |
Invalid
|
Undecided
|
Benjamin Heitmann |
Bug Description
Rails tries to make it as easy as possible to create a web application using only ruby idioms.
It currently is possible to express HTML, XML, Java Script, and SQL (possibly a lot more)
using not the original syntax of these languages, but instead just ruby symbols denoting the keywords from
the original language. (good example are RoR migrations, which allow to write the data base schema without
taking into account the pecculiarities of SQL in MySQL or Postgres or SQLite. write once, use with each db. )
It could be nice for the novice user to have the possibility to define all his namespaces, triple stores,
and RDF schemas and fragments in one place.
The advanced solution would be to implement a N3 like DSL for ruby.
The quick and easy solution, would be to allow here doc style inclusion of RDF schema n3 fragments in a file.
-------- implementation sketch:
the use writes:
adapter.use_schema <<EOS
N3 syntax here
EOS
and we do:
def use_schema
# this has to be done every time rails / active rdf is initialized
# convert the n3 fragment into ntriples
# check if the fragment is already included in the store, because we dont want stale duplicate triples
# use NTriplesParser to put the ntriples into the store
end
wont fix it right now (I dont understand the value of it) but feel free to look at it when you have time.