|
From: Rob V. <rv...@do...> - 2013-02-07 18:39:11
|
Hi Yossi Answers inline: From: Yossi Cohen <yos...@li...> Reply-To: dotNetRDF User Help and Support <dot...@li...> Date: Tuesday, February 5, 2013 10:30 AM To: DotNetRDF mailing-list <dot...@li...> Subject: [dotNetRDF-Support] OntologyResource(INode resource, IGraph graph) > Hi, > > Couple of (related?) questions: > > 1. Should an OntologyResource (represented by an INode) have a different > graph then its representative resource? No but that is not forbidden per se, may just lead to unexpected behavior though. If you have a specific example where this can happen that would be useful > > 2. When working with StoreGraphPersistenceWrapper (that implements IGraph) one > could do something like this: > IGraph g = new StoreGraphPersistenceWrapper(...) > INode resource = g.CreateUriNode(some uri) > ... > do somthing like: make a query which returns SparqlResult > than, do: > INode node2 = result[0].CopyNode(g) --> (which copies a node with the > underlining graph and not with the wrapper.) > > Leading to tow nodes (resource & node2) which have a different graph! > > When I'm working with a wrapper graph it is an IGraph and I expect the > xxx.CopyNode(g) to return a node > within the graph (g) supplied in the argument. The problem is the way CopyNode() works is slightly funky, its not really a bug per se because it has to work the way it does or we run into all sorts of problems trying to do SPARQL updates properly. Ultimately the problem boils down to a somewhat ill-advised design decision to scope nodes to graphs 4 years ago when I originally started the project which then necessitates this CopyNode() behavior. Eventually in 2.0 this will be removed so the whole CopyNode() functionality will become defunct and nodes can be freely moved around wherever you want. Rob > > Thanks, > Yossi. > > > ------------------------------------------------------------------------------ > Free Next-Gen Firewall Hardware Offer Buy your Sophos next-gen firewall before > the end March 2013 and get the hardware for free! Learn more. > http://p.sf.net/sfu/sophos-d2d-feb____________________________________________ > ___ dotNetRDF-Support mailing list dot...@li... > https://lists.sourceforge.net/lists/listinfo/dotnetrdf-support |