A simplification of this is:

CONSTRUCT {?x owl:sameAs ?y)
WHERE {
    ?x a sioc:UserAccount .
    ?y a sioc:UserAccount .
    ?x sioc:last_name ?y .
    ?y sioc:last_name ?z
    FILTER (?x != ?y)
}

Run this in the SPARQL view, assert or infer the resulting triples,
then run OWL inferences.  All of this can be automated in a
SPARQLMotion script.

There are many advantages of using SPARQL over SWRL, including that
the language is more expressive and is a W3C standard.

-- Scott

On May 14, 7:29 am, Kevin <[email protected]> wrote:
> Scott,
>
> Thank you for your reply. I am using Composer and I was doing what you
> mentioned above. I cant seem to get composer's sparql to acknowledge
> the sameas link.
>
> here are my steps.
>
> I've created the following rule on the Rules view:
> Body:
> sioc:UserAccount(?x) sioc:UserAccount(?y) (?x sioc:last_name ?z) (?y
> sioc:last_name ?z) notEqual(?x, ?y)
> Head:
> (?x owl:sameAs ?y)
>
> I run the inferencing and see that there are 5 updated triples in the
> Inferences view all with the predicate "owl:sameAs"
> I see that my target IRI is the subject and has an object pointing to
> another IRI
>
> I go to the SPARQL view and type in the following query: (I have the
> "Use Currently Configured Inferences" enabled)
> SELECT *
> WHERE {
>     ?owner sioc:owner_of ?owns
>
> }
>
> now when I review the triples that result from this I see that my
> target IRI displays its explicit "owner_of" objects but it does not
> show the "owner_of" objects for the IRI that it has as its object in
> the owl:sameAs relationship.
>
> Any thoughts?
>
> Thanks.
>
> On May 13, 5:17 pm, Scott Henninger <[email protected]>
> wrote:
>
>
>
> > Kevin; There are two parts to OWL, the vocabulary and inference.
> > You're already familiar with the vocabulary - e.g. you can assert that
> > "?something owl:sameAs ?somethignelse".  But to make the inferences
> > from that statement you need to run an inference engine that creates
> > the triples you can query against.
>
> > Assuming you are running in Composer in the SPARQL View with your
> > model open, you have two choices.  The first is to run inferences on
> > the model.  From the top the menu, choose "Inference > Run
> > Inference".  Then your query will be applied to all asserted and
> > inferred triples.
>
> > The second choice is to turn on inferences in the SPARQL View.
> > Queries will be executed against the union of asserted and inferred
> > triples (i.e. clicking Run will run inferences, execute the query,
> > display results, and discard the inferences).  This is accomplished by
> > clicking on the "Use Currently Configured Inferences" mode button in
> > the top-right of the SPARQL View.
>
> > -- Scott
>
> > On May 13, 9:08 am, Kevin <[email protected]> wrote:
>
> > > Hello,
>
> > > I've created to sioc:UserAccounts in topbraid and given them
> > > properties. One of the properties is "sioc:owner_of". I've identified
> > > two sioc:UserAccounts to hold the relationship owl:sameAs.
>
> > > When I run a sparql query on one of the sioc:UserAccounts it only
> > > returns the "sioc:owner_of" resources that are explicitly defined on
> > > that object and does not also include the "sioc:owner_of" resources
> > > associated to the other sioc:UserAccount defined in the sameas
> > > relationship.
>
> > > Any thoughts?
>
> > > SELECT *
> > > WHERE {
> > >    <http://genericsite.com/owl#sampleowner> sioc:owner_of ?website
>
> > > }

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