Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [rdf4j-dev] Projecting a graph

That worked really well. I made a little map function over the iterator from getStatements to remove the context.

SPARQL and Java api both seems to work as expected.

Thank you Jeen!

I can make a little PR for that map function and make it optional/configurable.

Cheers,
Håvard


On 18 Jul 2018, at 03:09, Jeen Broekstra <jeen.broekstra@xxxxxxxxx> wrote:

Sounds more like a RepositoryWrapper kind of thing to me, although you could also do it as a sail, possibly.

The ContextAwareRepository comes close to what you're after I think, although it doesn't hide/remove the graph identifier from the returned statements. Perhaps you can riff off that code?

Cheers,

Jeen

On Wed, Jul 18, 2018 at 1:43 AM, Håvard Ottestad <hmottestad@xxxxxxxxx> wrote:
Managed to hit send there a bit early. Sorry.

Has anyone developed a sail or anything like this? Or anyone got any ideas on which level I should develop this on? 

Cheers,
Håvard M. Ottestad




On 17 Jul 2018, at 17:41, Håvard Ottestad <hmottestad@xxxxxxxxx> wrote:

Hi,

I’ve come upon a requirement for “projecting” a graph, so that all operations like get/delete/insert/update/query run against a single graph in the store without them knowing. 

Example.

<http://example1> rdf:type rdfs:Resource <http://graph1>

When you specify <http://graph1> as the current graph, then getStatement(null, null, null) will return "<http://example1> rdf:type rdfs:Resource” without the graph part.


_______________________________________________
rdf4j-dev mailing list
rdf4j-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/rdf4j-dev


_______________________________________________
rdf4j-dev mailing list
rdf4j-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/rdf4j-dev


Back to the top