Hi,
This is my RDF for the restriction.

<owl:Class rdf:about="&ProductKnowledge;SmallCan">
        <rdfs:subClassOf rdf:resource="&ProductKnowledge;Can"/>
        <rdfs:subClassOf>
            <owl:Restriction>
                <owl:onProperty rdf:resource="&ShapesOntology;height"/>
                <owl:hasValue rdf:datatype="&xsd;double">0.3</owl:hasValue>
            </owl:Restriction>
        </rdfs:subClassOf>
        <rdfs:subClassOf>
            <owl:Restriction>
                <owl:onProperty rdf:resource="&ShapesOntology;radius"/>
                <owl:hasValue rdf:datatype="&xsd;double">0.1</owl:hasValue>
            </owl:Restriction>
        </rdfs:subClassOf>
    </owl:Class>

I want the individual to also somehow get the radius and length values as
per the restriction.
Please suggest suitable sparql query to do the same.

Cheers

On Wed, Mar 7, 2018 at 3:02 PM, Martynas Jusevičius <marty...@atomgraph.com>
wrote:

> First of all, your class example is not valid OWL and not even RDF.
>
> I think you can model this using owl:hasValue restrictions:
> https://www.w3.org/TR/owl-ref/#hasValue-def
>
> On Wed, Mar 7, 2018 at 10:28 AM, Amar Banerjee <amarbanerje...@gmail.com>
> wrote:
>
>> Hi folks !!
>>
>> I have been trying to create a sparql query to get the restrictions
>> imposed
>> on a class for the individuals of that class.
>> However, I am not sure what exactly has to be done.
>>
>> I have a :
>>
>> Class SmallCan:
>>           subClass Of : radius value 0.1
>>           subClassOf : height value 1
>>
>> Now for this class, I have an individual -
>>
>> Coke-Can :
>>      type: SmallCan
>>
>> I want a query which could automatically tell me that the Coke-Can has
>> radius 0.1 and height 1
>>
>> Something like this  :-
>>
>> SELECT ?property ?value WHERE {
>> Coke-Can ...........
>> }
>>
>> and I get a result like :-
>> ----------------------------------
>> Property      |       Value
>> -----------------------------------
>> radius          |     0.3
>> height          |      1
>> ------------------------------------
>>
>> Looking for your help.
>>
>> Cheers.
>>
>
>

Reply via email to