From: Rob V. <rv...@do...> - 2013-01-21 10:18:54
|
That is perfectly doable but you would have to write all the code for that yourself, it is too niche a feature to consider adding directly to the library Also as I said in an earlier email the current Context property will go away in the future versions of the API so you are better to do this with named graphs directly as realistically that is how you will have to persist all this information to a backing store anyway Rob From: Yossi Cohen <yos...@li...> Reply-To: dotNetRDF User Help and Support <dot...@li...> Date: Thursday, January 17, 2013 10:56 AM To: DotNetRDF mailing-list <dot...@li...> Subject: Re: [dotNetRDF-Support] Adding Context to Triples > I was thinking somthing like this: > > Individual i1 = some individual > Triple t = i1.AddResourceProperty(...) or i1.AddLiteralProperty(...); > > t.Context.Add(Predicate1, Object1) ; > t.Context.Add(Predicate2, Object2) ; > > Graph.Save() ; > > resulting with the following triples adding tobackend store: > > (i1, rdf:type, someclass, ctx1) // ctx1 auto-generted (globally unique) > (ctx1, Predicate1, Object1, ctx2) // ctx2 auto-generted > (ctx1, Predicate2, Object2, ctx3) // ctx3 auto-generted > > When saving the graph to the backend store, the context triples should also be > added. > > What do you think? > Best, > Yossi > > > From: yos...@li... > To: dot...@li... > Date: Thu, 17 Jan 2013 12:37:36 +0200 > Subject: Re: [dotNetRDF-Support] Adding Context to Triples > > > Hey Rob, > > In my case, I use the context slot for what is called 'direct reification'. > This means that each and every triple has a unique context. > All my triples are held on the same (default) graph (including triples that > describe them). > > For example: > s1: (s1, p1, o1, ctx1) > s2: (s2, p2, o2, ctx2) > s3: (ctx1, :createdby o3, ctx3) // s3 describing s1 > s4: (ctx1, :score "0.7", ctx4) // s4 describing s1 > s5: (ctx2, :createdby o4, ctx5) // s5 describing s2 > > I need to be able to attach context to triples such that when saving the > triples to the backend store, > I'll be able to save also triples that describe them > (i.e., assert triple-context entries as triples with the context slot as a > subject) > > Is there a way to extend dotNetRDF in order to achieve this? > (I use SesameHttpProtocolConnection over BigData backend) > > Best, > Yossi. > > > Date: Thu, 17 Jan 2013 10:04:56 +0000 > From: rv...@do... > To: dot...@li... > Subject: Re: [dotNetRDF-Support] Adding Context to Triples > > Hey Yossi > > Yes the Context property of the Triple class is not persisted, also that will > eventually be removed in future versions of the library as that is somewhat > defunct. > > To do what you want to do with dotNetRDF you will essentially have to create > named graphs, and then store statements about those named graphs in some other > graph e.g. > > Graph g = new Graph(); > g.BaseUri = context; > g.Assert(s, p, o); > > Graph h = new Graph(); > h.Assert(context, p1, o1); > h.Assert(context, p2, o2); > > You can then persist all your graphs to your Sesame store. > > Hope this helps, > > Rob > > From: Yossi Cohen <yos...@li...> > Reply-To: dotNetRDF User Help and Support > <dot...@li...> > Date: Tuesday, January 15, 2013 7:37 PM > To: DotNetRDF mailing-list <dot...@li...> > Subject: [dotNetRDF-Support] Adding Context to Triples > >> Hi, >> >> Is there a way to attach a context uri to triples such that it would be >> stored in the triple (quad) store? >> I need to use the context slot for what is called 'direct reification': >> assert (s, p, o, c) // mother statement >> assert (c, p1, o1) // statement about mother statement >> assert (c, p2, o2) // another one >> ... >> I'm using the Ontology API as well as the Grpah/Node/Triple API >> I've noticed the context of the Triple class, but this is not saved to the >> underline graph. >> (I should note that I'm using BigData store using SesameHttpConnector.) >> >> Thanks, >> Yossi. >> >> ----------------------------------------------------------------------------- >> - Master SQL Server Development, Administration, T-SQL, SSAS, SSIS, SSRS and >> more. Get SQL Server skills now (including 2012) with LearnDevNow - 200+ >> hours of step-by-step video tutorials by Microsoft MVPs and experts. SALE >> $99.99 this month only - learn more at: >> http://p.sf.net/sfu/learnmore_122512_________________________________________ >> ______ dotNetRDF-Support mailing list >> dot...@li...https://lists.sourceforge.net/lists/li >> stinfo/dotnetrdf-support > > ------------------------------------------------------------------------------ > Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, MVC, > Windows 8 Apps, JavaScript and much more. Keep your skills current with > LearnDevNow - 3,200 step-by-step video tutorials by Microsoft MVPs and > experts. ON SALE this month only -- learn more at: > http://p.sf.net/sfu/learnmore_122712 > _______________________________________________ dotNetRDF-Support mailing list > dot...@li... > https://lists.sourceforge.net/lists/listinfo/dotnetrdf-support > > > ------------------------------------------------------------------------------ > Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, MVC, > Windows 8 Apps, JavaScript and much more. Keep your skills current with > LearnDevNow - 3,200 step-by-step video tutorials by Microsoft MVPs and > experts. ON SALE this month only -- learn more at: > http://p.sf.net/sfu/learnmore_122712 > _______________________________________________ dotNetRDF-Support mailing list > dot...@li... > https://lists.sourceforge.net/lists/listinfo/dotnetrdf-support > > ------------------------------------------------------------------------------ > Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, MVC, > Windows 8 Apps, JavaScript and much more. Keep your skills current with > LearnDevNow - 3,200 step-by-step video tutorials by Microsoft MVPs and > experts. ON SALE this month only -- learn more at: > http://p.sf.net/sfu/learnmore_122712__________________________________________ > _____ dotNetRDF-Support mailing list dot...@li... > https://lists.sourceforge.net/lists/listinfo/dotnetrdf-support |