clerezza-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Reto Bachmann-Gmür <>
Subject Re: Name aware graphs
Date Fri, 19 Apr 2013 13:22:25 GMT
Hi Giuseppe

I would suggest to add such a method to TcManager/TcProvider. For MGraphs
this can efficiently be implemented.

Having object which are in fact distinguishable (by its name) to be equals
is imho an antipattern. Imagine someone putting two graph-instances with
different names in the same (java.util.)Set but then there's only one graph
in the set and one of the names got lost forever.


On Fri, Apr 19, 2013 at 9:51 AM, Giuseppe Miscione <> wrote:

> Hi Reto,
> TcManager has only this method:
> public Set<UriRef> getNames(Graph graph) {
>     return super.getNames(graph);
> }
> That works only on graphs, not on triple collections. Moreover, this
> method delegates names retrieval to WeightedTcProvider.getNames(**Graph
> graph), which isn't implemented in a lot of concrete classes or isn't
> efficient like in org.apache.clerezza.rdf.jena.**
> For the identity criterion, I think you can just skip the name field when
> checking for identity, keeping the current comparison algorithm and you can
> just add another equalsWithName() method that makes also a name check, if
> someone needs it.
> Regards,
> Giuseppe
> Il 19/04/2013 06:31, Reto Bachmann-Gmür ha scritto:
>  Hi Giuseppe
>> Hasan knows more abut the Sparql related parts.
>> Adding a name to the graph (subclass of TripleCollection) interface if
>> problematic as it would seem to affect the identity criterion. The RDF
>> Abstract Syntax and Semantics define the concept of graphs and specify
>> when
>> they are identical the Clerezza API tries to stick to this.
>> However TcManager provided method to return the name(s) of
>> TripleCollection. Isn't this good enough?
>> Cheers,
>> Reto
>> On Thu, Apr 18, 2013 at 11:40 AM, Giuseppe Miscione <
>> g.miscione@**<>>
>> wrote:
>>  Hi all,
>>> I'm developing an enhanced SparqlEngine that allows to use Jena LARQL
>>> extension to make full text queries inside sparql.
>>> LARQL requires that a Lucene index is created for the graph on which the
>>> full text query is executed and I'm storing these indexes in folders
>>> whose
>>> name is the same name of the corresponding Clerezza graph.
>>> Currently, SparqlEngine.execute method receives only a TripleCollection,
>>> which isn't aware of the name with which it has been loaded by the
>>> TcManager and so I can't easily figure out which is the Lucene index
>>> that I
>>> have to bind to Jena query execution context to make LARQL work properly.
>>> What do you think of adding a pair of getName() and setName(String name)
>>> methods to the TripleCollection interface so that the TcManager can bind
>>> the name used to load the triples to the collection?
>>> Regards,
>>> Giuseppe

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message