Thank you Scott , much appreciated

On Jan 7, 5:59 pm, Scott Henninger <[email protected]> wrote:
> Hello John; This is best accomplished using SPARQL.  Open your model
> and add the following query to the SPARQL view:
>
> CONSTRUCT
> {  ?inst :hasSource :object1}
>
> WHERE
> { ?inst a :MyClass .
>
> }
>
> The WHERE clause finds all members (instances) of the class.  The
> CONSTRUCT clause returns a triple for each match.  Run the query and
> the results are displayed in the result view to the right of the query
> editor.  Choose all results and use the context menu (triangle in
> upper-right of SPARQL View) to select "Assert selected constructed
> triples".  The triples are asserted to your model.  Save the file to
> save the changes to the model.
>
> If you need to do this programmatically (i.e. via Ensemble, a Web
> service call, et.) then use can write a SPARQLMotion script the
> imports your model, use ApplyConstruct to apply the above query, then
> save to a text serialization (.ttl, .rdf, .owl, .nt) or a RDF back-
> end.
>
> -- Scott
>
> On Jan 7, 11:36 am, John Perdoni <[email protected]> wrote:
>
>
>
> > Hi, still being very newbie, I wonder if you could help with the
> > following.
>
> > If I have multiple instance of a class, what is the best way to add
> > the same property to each instance with  the same value.
>
> > ie if I have 100 instances and want to add an object property
> > "hasSource"   to each of the instances with an object value the same
> > for all to end up with the following
>
> > instance 1 hasSource object 1
> > instance 2 hasSource object 1
> > ....
> > instance100 hasSource object 1
>
> > Any actual examples of how to achieve this would be much apprieciated.
>
> > Thanks in advance
>
> > John- Hide quoted text -
>
> - Show quoted text -

-- 
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