It's pretty common to see "RDF-to-X" or "X-to-Y" bridges that address the problem of converting one data structure to another, for instance, you have a Java object and serialize it to RDF or you have RDF data and you populate a Java class with it. If you consider just "Java" of course you can find XML to Java bridges, Relational to Java bridges, JSON to Java bridges, etc.
What is not so common are "meta object facilities", in the sense of https://en.wikipedia.org/wiki/Meta-Object_Facility which can do three things with an object, (i) set a property, (ii) get a property, and (iii) call a method the third one is usually missing in most kinds of mapping frameworks. The OMG's MOF is rightfully obscure because it makes the mistake of being way too general, in that it wants to be able to do everything for every language which means it ends up not doing enough for any language. If you look at the problem of RDF to Java, it comes down to having, say, a function with a signature like String f(Integer x,Integer y) and being able to call it as a function that is RDFNode f(RDFNode x,RDFNode y) and to do that call using RDF-world constructs instead of Java code. The UDF mechanism that is built into Jena's SPARQL implementation and the parallel UDF mechanism built into the rules engine is one way of accomplishing this but there is the minus with both of those that (at least without extra tooling) you need to write Java class that implement a special interface rather than just say "I want to use this Java function". Another concern is class vs. instance, global scope, etc. Overall you do not want to be adding UDFs to the global scope (i.e. all query engines) but you do want to add them to a specific query execution or instance of a rules engine. In that case you will particularly want to refer to functions that are defined by an object, not by a class, because you may want to have configuration for the function. (i.e. if it is looking up data from a file you need to know what file) There is also the angle that if you are setting properties on a Java object, one of those properties might also be a function reference, thus you want at the very least to be able to instantiate a Java function using RDF configuration and assign it to a Java object and also be able to define function in ways that are more RDFish (i.e. turn a SPARQL query into a function) On Sun, Aug 21, 2016 at 2:19 PM, A. Soroka <[email protected]> wrote: > > I just want to have the semantics of my software platform expressed in > linked data and SPARQL seems to be a way to do that. > > Well, sort of. {grin} SPARQL is about RDF: graphs and tuples. You can use > SPARQL to operate over data without a single HTTP URI in it, and while you > would certainly be dealing in RDF, I don't think you could say you were > dealing in Linked Data. Linked Data is as much about choosing identifiers > and distributing knowledge bases as anything else. > > Using SPARQL makes sense as part of an API that deals in RDF, but if you > are specifically interested in Linked Data, I would think you might want to > start with something like the Linked Data Platform: > > https://www.w3.org/TR/ldp > > rather than SPARQL. > > I can tell you that the query you described may be easy for you to read, > but it will be pretty opaque to other SPARQL users who are not familiar > with your system. It seems basically to be an encoding of your service > design in SPARQL syntax. > > --- > A. Soroka > The University of Virginia Library > > > On Aug 21, 2016, at 1:58 PM, Simon Schäfer <[email protected]> wrote: > > > > > > > > > > ---- On Sun, 21 Aug 2016 19:34:10 +0200 A. Soroka <[email protected]> > wrote ---- > >> Just for information, you might want to look at SSWAP: > >> > >> http://sswap.info/ > >> http://bmcbioinformatics.biomedcentral.com/articles/10. > 1186/1471-2105-10-309 > >> > >> They used OWL to assemble web services, and you might find useful ideas > there. > > > > Thanks, I'll have a look. > >> > >> Using SPARQL this way seems like an awful lot of overhead. Is there > something particular about your data or services that lends interest to > using SPARQL in particular? > > > > Not sure where the overhead is in your eyes. On the one side SPARQL > queries can be generated if one doesn't want to write them manually and on > the other side it is just one query that is easy to read in my eyes. I > don't have any particular need for SPARQL. I just want to have the > semantics of my software platform expressed in linked data and SPARQL seems > to be a way to do that. > > > > -- Paul Houle (607) 539 6254 paul.houle on Skype [email protected] Ontology2 Edition of DBpedia 2015-10 https://aws.amazon.com/marketplace/pp/B01HMUNH4Q/ <http://basekb.com/gold/> http://ontology2.com/the-book/o2dbpedia-info.html http://ontology2.com/book/chapter2/part1/dbpedia-examples.html RDF: A new Slant http://ontology2.com/the-book/rdf-a-new-slant.html <https://www.linkedin.com/grp/home?gid=8267275> Data Lakes, Data Ponds, and Data Droplets http://ontology2.com/the-book/data-lakes-ponds-and-droplets.html
