retrieval of all individual of a class complaying with a restriction class

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

retrieval of all individual of a class complaying with a restriction class

mchukans
Hello everybody,

I'm looking for a query (SPARQL or SPIN, I don't know which one is suitable), that can retrieve all the individuals of a class that meet restrictions described in an OWL-Restriction class.
i.e.:
Axioms: Name of the OWl-Restrictionclass: Task
Class: rdfs:subClassOf
EquivalentClass: involvesSteelpart exactley 1
EquivalentClass: involvesAttempts exactley 1
Intersection: (hasConstraintRestriction only owl:Restriction) and (hasConstraintRestriction min 1)


Unfortunately this one doesn't work:

SELECT ?x
WHERE {
    ?x rdfs:subClassOf :Task.
}

Thank you in advanced for your help!

My very best Mariana

_______________________________________________
p4-feedback mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/p4-feedback
Reply | Threaded
Open this post in threaded view
|

Re: retrieval of all individual of a class complaying with a restriction class

Timothy Redmond

The best way to do this, if you can afford inference, is to use the DLQuery tab in Protege 4.  To do this query perform the following steps:
  1. start the reasoner,
  2. make sure that the instances checkbox is selected,
  3. put your restriction in the Query (class expression) textbox and
  4. Execute

-Timothy




On 01/20/2014 09:40 AM, Mariana Hebborn wrote:
Hello everybody,

I'm looking for a query (SPARQL or SPIN, I don't know which one is suitable), that can retrieve all the individuals of a class that meet restrictions described in an OWL-Restriction class.
i.e.:
Axioms: Name of the OWl-Restrictionclass: Task
Class: rdfs:subClassOf
EquivalentClass: involvesSteelpart exactley 1
EquivalentClass: involvesAttempts exactley 1
Intersection: (hasConstraintRestriction only owl:Restriction) and (hasConstraintRestriction min 1)


Unfortunately this one doesn't work:

SELECT ?x
WHERE {
    ?x rdfs:subClassOf :Task.
}

Thank you in advanced for your help!

My very best Mariana


_______________________________________________
p4-feedback mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/p4-feedback


_______________________________________________
p4-feedback mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/p4-feedback