Hi Andriy,

You can use a couple of functions on the dynamicConfigGraph to
retrieve triples containing the configNode; I am specifically thinking
of Graph.apply() and Graph.addMatchListener().  Each of those takes a
TripleMatch to query the server for matching triples, so in your case
you would use GraphFactory.createTripleMatch using the configNode and
the propertly you need.  Please see the documentation for further
information on the Graph functions.

In order to restore the information when a K is created in the
application, I would suggest calling whichever Graph you use in ether
the constructor of K or in createChildren().

On Apr 16, 5:43 pm, Andriy Sokolov <[email protected]> wrote:
> Hello Irene,
>
> thanks for your detailed answer. I'll specify my intention a little.
>
> I'm creating acomponentK, that has multiple elements (HBox) in a
> certain order, and each of them contains somedata.
> I want that the application which I create will be able to contain
> multiple K's, and each of them should contain multiple HBoxes. This
> configuration should be saved in the application, so I can restore
> every K with their own HBox'es in a correct order. I achieved all this
> already (I'm working with dynamicConfigGraph). The only problem is the
> dependency on the K's label.
>
> I take the configNode object, and it contains the label-property. The
> issue is, the configNode, as I have mentioned above, is of type
> BlankNode, which contains its ID and label only. So, every other
> property I save to it in dynamicConfigGraph (which will be saved to
> the App.n3) cannot be retrieved from the configNode. I can establish
> the relation between the particular instance of my K and its
> description in the dynamicConfigGraph (read from  App.n3) only over
> the label-property.
>
> Or is there an another way to do it?
>
> Best regards,
> Andriy
>
> On 16 Apr., 04:50, Irene Polikoff <[email protected]> wrote:
>
>
>
>
>
>
>
> > When TBE application runs it works with 2 graphs - <tb-session> has
> > all the sessiondata, <tb-dag> has applicationdata. In 3.5, there
> > will be a third graph called auxiliary. <tb-dag> stands for dynamic
> > application graph. At any given time it contains the state of the
> > application components reflecting any changes that happen as the
> > result of events being posted and listen to.
>
> > You could use the label field to identify acomponent. This will work
> > only if thecomponentyou are trying to identify is not set to
> > dynamically change its label in response to events. And, as you noted,
> > this will only work if no other components have the same label. So,
> > depending on the application this may not be a very reliable method.
> > You could use some other field, for example, rdfs:comment is shown in
> > the config form for eachcomponent. You could have a convention where
> > you are using this field to hold some identifier value.
>
> > Could you be a bit more specific about what you are trying to do?
>
> > Regards,
>
> > Irene
>
> > On Apr 13, 5:09 am, Andriy Sokolov <[email protected]> wrote:
>
> > > Hello Scott,
>
> > > thank you for your answer! But what do you mean with the <http://tb-
> > > dag>?
>
> > > Andriy
>
> > > On 12 Apr., 20:09, Scott Henninger <[email protected]> wrote:
>
> > > > Andriy; The label will be a problem for identifying thecomponent,
> > > > particularly if the "Update Label Automatically"  attribute is set to
> > > > true. A suggestion is to create a property for uniquely identifying
> > > > thecomponent.  The property can be defined in <http://tb-dag> so it
> > > > is not displayed in your application. Assign the unique value when
> > > > creating acomponentand query for it when you need to uniquely
> > > > identify thecomponent.
>
> > > > -- Scott
>
> > > > On Apr 12, 8:56 am, Andriy Sokolov <[email protected]> wrote:
>
> > > > > One option I've found is to use the rdfs:label property of the
> > > > >componentinstance. Then on load I use a SPARQL-select query with
> > > > > FILTER on label. But if multiple instances of acomponenthave equal
> > > > > labels, all instances will be retrieved from configGraph. Is there
> > > > > another way to distinguish between them?
>
> > > > > On 12 Apr., 14:30, Andriy Sokolov <[email protected]> wrote:
>
> > > > > > Hallo TB-Team,
> > > > > > I want to store in the configGraph of a TB-Application configdataof
> > > > > > mycomponent. How can I manage multiple components in the 
> > > > > > configGraph?
> > > > > > As I know, everycomponentinstance becomes random anonymous URI. How
> > > > > > do I identify and differenciate them?
> > > > > > Regards,
> > > > > > Andriy

-- 
You received this message because you are subscribed to the Google
Group "TopBraid Suite Users", the topics of which include TopBraid Composer,
TopBraid Live, TopBraid Ensemble, SPARQLMotion and SPIN.
To post to this group, send email to
[email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/topbraid-users?hl=en

Reply via email to