Hi all
I've been using Pinto for some time now but I'm not really sure if I'm doing things the right way, mainly because I still don't know how to do certain things and need to resort to workarounds.
== Background ==
1. Java/Jersey web application
2. Sesame-compatible triple store
3. For getting a list of things, run SELECT query for returning relevant fields, selectively build the POJO (determining what attributes get set), and return
4. For creating something new, use Pinto, and additionally place the new triples in a named graph
5. For deleting something, delete the named graph
6. For getting a single object, run CONSTRUCT query, get main subject type, use Pinto, return
I am having some prblems with (3) and (4), especially because of nesting of objects that already exist (does not need to be created, they are referenced objects). Consider the example:
House
--| hasMember <Person>
------| hasName <String>
------| hasDependent <Person>
----------| hasName
If I want to return a list of houses and want to include full object details of every house (including Persons who were created in different named graphs), I can't do it, unless I really have a complex SELECT query and accompanying complex processing to recursively set nested objects and propertis. Even if I run a CONSTRUCT query akin to (6), getting the main type will fail because there are multiple different individuals in the results.
I will describe the problm with (4) later, as (3) is a more pressing concern. So once again, in one sentence: I would like to know how I should go about serializing a collection of a thing from a triple store.