Quantcast

"Anonymous" object property assertions

classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

"Anonymous" object property assertions

Marcelino Borges
I would like to assert that an individual has a relationship with some individual of a given type, but I would like to not specify which individual.

For example, let us consider that we have the classes Person and Animal. i would like to say that Peter has some cat. But I`m not interested in considering the specific individual cat that Peter has. That is, I would like something like this:

Peter hasAnimal some Cat

Is it possible in OWL? How can I do this in Protege?


Best regards.

_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: "Anonymous" object property assertions

Adila Alfa Krisnadhi
Hi Marcelino,

You can insert a general subclass axiom as follows:

{ peter } SubClassOf hasAnimal some Cat


—adila

> On May 15, 2017, at 9:18 AM, Marcelino Borges <[hidden email]> wrote:
>
> I would like to assert that an individual has a relationship with some individual of a given type, but I would like to not specify which individual.
>
> For example, let us consider that we have the classes Person and Animal. i would like to say that Peter has some cat. But I`m not interested in considering the specific individual cat that Peter has. That is, I would like something like this:
>
> Peter hasAnimal some Cat
>
> Is it possible in OWL? How can I do this in Protege?
>
>
> Best regards.
> _______________________________________________
> protege-user mailing list
> [hidden email]
> https://mailman.stanford.edu/mailman/listinfo/protege-user

_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: "Anonymous" object property assertions

Marcelino Borges
It seems that this work.
So, the idea is to consider an anonymous subclass.

2017-05-15 10:58 GMT-03:00 Adila Alfa Krisnadhi <[hidden email]>:
Hi Marcelino,

You can insert a general subclass axiom as follows:

{ peter } SubClassOf hasAnimal some Cat


—adila

> On May 15, 2017, at 9:18 AM, Marcelino Borges <[hidden email]> wrote:
>
> I would like to assert that an individual has a relationship with some individual of a given type, but I would like to not specify which individual.
>
> For example, let us consider that we have the classes Person and Animal. i would like to say that Peter has some cat. But I`m not interested in considering the specific individual cat that Peter has. That is, I would like something like this:
>
> Peter hasAnimal some Cat
>
> Is it possible in OWL? How can I do this in Protege?
>
>
> Best regards.
> _______________________________________________
> protege-user mailing list
> [hidden email]
> https://mailman.stanford.edu/mailman/listinfo/protege-user

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


_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: "Anonymous" object property assertions

Michael DeBellis-2
In reply to this post by Adila Alfa Krisnadhi
You can also say this directly on  the definition of Peter. Edit the "Types" description of Peter. Where you would normally just select a class, instead use the "Object Restriction Creator" and you can add the restriction: "hasAnimal some Cat" or use the "Class Expression Editor" and add: "Human and hasAnimal some Cat". 

Michael

On Mon, May 15, 2017 at 6:58 AM, Adila Alfa Krisnadhi <[hidden email]> wrote:
Hi Marcelino,

You can insert a general subclass axiom as follows:

{ peter } SubClassOf hasAnimal some Cat


—adila

> On May 15, 2017, at 9:18 AM, Marcelino Borges <[hidden email]> wrote:
>
> I would like to assert that an individual has a relationship with some individual of a given type, but I would like to not specify which individual.
>
> For example, let us consider that we have the classes Person and Animal. i would like to say that Peter has some cat. But I`m not interested in considering the specific individual cat that Peter has. That is, I would like something like this:
>
> Peter hasAnimal some Cat
>
> Is it possible in OWL? How can I do this in Protege?
>
>
> Best regards.
> _______________________________________________
> protege-user mailing list
> [hidden email]
> https://mailman.stanford.edu/mailman/listinfo/protege-user

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


_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: "Anonymous" object property assertions

Marcelino Borges
OK.

So, let us consider that I define Peter, using the class expression editor, in the following way:
Person and hasAnimal some Cat

How can I write a query for recovering all the person that have cats? I would like to recover Peter in this query.

Best regards.

2017-05-15 11:20 GMT-03:00 Michael DeBellis <[hidden email]>:
You can also say this directly on  the definition of Peter. Edit the "Types" description of Peter. Where you would normally just select a class, instead use the "Object Restriction Creator" and you can add the restriction: "hasAnimal some Cat" or use the "Class Expression Editor" and add: "Human and hasAnimal some Cat". 

Michael

On Mon, May 15, 2017 at 6:58 AM, Adila Alfa Krisnadhi <[hidden email]> wrote:
Hi Marcelino,

You can insert a general subclass axiom as follows:

{ peter } SubClassOf hasAnimal some Cat


—adila

> On May 15, 2017, at 9:18 AM, Marcelino Borges <[hidden email]> wrote:
>
> I would like to assert that an individual has a relationship with some individual of a given type, but I would like to not specify which individual.
>
> For example, let us consider that we have the classes Person and Animal. i would like to say that Peter has some cat. But I`m not interested in considering the specific individual cat that Peter has. That is, I would like something like this:
>
> Peter hasAnimal some Cat
>
> Is it possible in OWL? How can I do this in Protege?
>
>
> Best regards.
> _______________________________________________
> protege-user mailing list
> [hidden email]
> https://mailman.stanford.edu/mailman/listinfo/protege-user

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


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



_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: "Anonymous" object property assertions

Michael DeBellis-2
Go the the DL Query Window. Type "Person and hasAnimal some Cat" in the "Query (class expression)" field. Make sure you have Instances checked in the "Query for" box at the right. You should see Peter show up.

On Mon, May 15, 2017 at 7:48 AM, Marcelino Borges <[hidden email]> wrote:
OK.

So, let us consider that I define Peter, using the class expression editor, in the following way:
Person and hasAnimal some Cat

How can I write a query for recovering all the person that have cats? I would like to recover Peter in this query.

Best regards.

2017-05-15 11:20 GMT-03:00 Michael DeBellis <[hidden email]>:
You can also say this directly on  the definition of Peter. Edit the "Types" description of Peter. Where you would normally just select a class, instead use the "Object Restriction Creator" and you can add the restriction: "hasAnimal some Cat" or use the "Class Expression Editor" and add: "Human and hasAnimal some Cat". 

Michael

On Mon, May 15, 2017 at 6:58 AM, Adila Alfa Krisnadhi <[hidden email]> wrote:
Hi Marcelino,

You can insert a general subclass axiom as follows:

{ peter } SubClassOf hasAnimal some Cat


—adila

> On May 15, 2017, at 9:18 AM, Marcelino Borges <[hidden email]> wrote:
>
> I would like to assert that an individual has a relationship with some individual of a given type, but I would like to not specify which individual.
>
> For example, let us consider that we have the classes Person and Animal. i would like to say that Peter has some cat. But I`m not interested in considering the specific individual cat that Peter has. That is, I would like something like this:
>
> Peter hasAnimal some Cat
>
> Is it possible in OWL? How can I do this in Protege?
>
>
> Best regards.
> _______________________________________________
> protege-user mailing list
> [hidden email]
> https://mailman.stanford.edu/mailman/listinfo/protege-user

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


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



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



_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: "Anonymous" object property assertions

Marcelino Borges
OK. Maybe this could work in Protege, with DL query.
But can I do this with SPARQL?

Is it possible to perform this DL query in triplestores, like allegrograph?

2017-05-15 12:08 GMT-03:00 Michael DeBellis <[hidden email]>:
Go the the DL Query Window. Type "Person and hasAnimal some Cat" in the "Query (class expression)" field. Make sure you have Instances checked in the "Query for" box at the right. You should see Peter show up.

On Mon, May 15, 2017 at 7:48 AM, Marcelino Borges <[hidden email]> wrote:
OK.

So, let us consider that I define Peter, using the class expression editor, in the following way:
Person and hasAnimal some Cat

How can I write a query for recovering all the person that have cats? I would like to recover Peter in this query.

Best regards.

2017-05-15 11:20 GMT-03:00 Michael DeBellis <[hidden email]>:
You can also say this directly on  the definition of Peter. Edit the "Types" description of Peter. Where you would normally just select a class, instead use the "Object Restriction Creator" and you can add the restriction: "hasAnimal some Cat" or use the "Class Expression Editor" and add: "Human and hasAnimal some Cat". 

Michael

On Mon, May 15, 2017 at 6:58 AM, Adila Alfa Krisnadhi <[hidden email]> wrote:
Hi Marcelino,

You can insert a general subclass axiom as follows:

{ peter } SubClassOf hasAnimal some Cat


—adila

> On May 15, 2017, at 9:18 AM, Marcelino Borges <[hidden email]> wrote:
>
> I would like to assert that an individual has a relationship with some individual of a given type, but I would like to not specify which individual.
>
> For example, let us consider that we have the classes Person and Animal. i would like to say that Peter has some cat. But I`m not interested in considering the specific individual cat that Peter has. That is, I would like something like this:
>
> Peter hasAnimal some Cat
>
> Is it possible in OWL? How can I do this in Protege?
>
>
> Best regards.
> _______________________________________________
> protege-user mailing list
> [hidden email]
> https://mailman.stanford.edu/mailman/listinfo/protege-user

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


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



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



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



_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: "Anonymous" object property assertions

Adila Alfa Krisnadhi
A SPARQL query that approximates the DL query below is:

SELECT ?p
WHERE {
  ?p a :Person ; 
       :hasAnimal [ a :Cat ] .
}

It is an approximation in the sense that it finds “all persons who has a known cat”, i.e., the corresponding instance of Cat exists in the graph.
Note that when an instance of Person that satisfies “hasAnimal some Cat”, the corresponding instance of Cat may be unknown (or not in the data).


—adila


On May 15, 2017, at 12:57 PM, Marcelino Borges <[hidden email]> wrote:

OK. Maybe this could work in Protege, with DL query.
But can I do this with SPARQL?

Is it possible to perform this DL query in triplestores, like allegrograph?

2017-05-15 12:08 GMT-03:00 Michael DeBellis <[hidden email]>:
Go the the DL Query Window. Type "Person and hasAnimal some Cat" in the "Query (class expression)" field. Make sure you have Instances checked in the "Query for" box at the right. You should see Peter show up.

On Mon, May 15, 2017 at 7:48 AM, Marcelino Borges <[hidden email]> wrote:
OK.

So, let us consider that I define Peter, using the class expression editor, in the following way:
Person and hasAnimal some Cat

How can I write a query for recovering all the person that have cats? I would like to recover Peter in this query.

Best regards.

2017-05-15 11:20 GMT-03:00 Michael DeBellis <[hidden email]>:
You can also say this directly on  the definition of Peter. Edit the "Types" description of Peter. Where you would normally just select a class, instead use the "Object Restriction Creator" and you can add the restriction: "hasAnimal some Cat" or use the "Class Expression Editor" and add: "Human and hasAnimal some Cat". 

Michael

On Mon, May 15, 2017 at 6:58 AM, Adila Alfa Krisnadhi <[hidden email]> wrote:
Hi Marcelino,

You can insert a general subclass axiom as follows:

{ peter } SubClassOf hasAnimal some Cat


—adila

> On May 15, 2017, at 9:18 AM, Marcelino Borges <[hidden email]> wrote:
>
> I would like to assert that an individual has a relationship with some individual of a given type, but I would like to not specify which individual.
>
> For example, let us consider that we have the classes Person and Animal. i would like to say that Peter has some cat. But I`m not interested in considering the specific individual cat that Peter has. That is, I would like something like this:
>
> Peter hasAnimal some Cat
>
> Is it possible in OWL? How can I do this in Protege?
>
>
> Best regards.
> _______________________________________________
> protege-user mailing list
> [hidden email]
> https://mailman.stanford.edu/mailman/listinfo/protege-user

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


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



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



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


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


_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: "Anonymous" object property assertions

Marcelino Borges
Hi Adila.

Yes...It would be my first try. But, unfortunately, I would like to retrieve persons that have unknown cats, as considered in my emails. Is it just possible using DL queries?

Best regards. 

2017-05-15 14:06 GMT-03:00 Adila Alfa Krisnadhi <[hidden email]>:
A SPARQL query that approximates the DL query below is:

SELECT ?p
WHERE {
  ?p a :Person ; 
       :hasAnimal [ a :Cat ] .
}

It is an approximation in the sense that it finds “all persons who has a known cat”, i.e., the corresponding instance of Cat exists in the graph.
Note that when an instance of Person that satisfies “hasAnimal some Cat”, the corresponding instance of Cat may be unknown (or not in the data).


—adila


On May 15, 2017, at 12:57 PM, Marcelino Borges <[hidden email]> wrote:

OK. Maybe this could work in Protege, with DL query.
But can I do this with SPARQL?

Is it possible to perform this DL query in triplestores, like allegrograph?

2017-05-15 12:08 GMT-03:00 Michael DeBellis <[hidden email]>:
Go the the DL Query Window. Type "Person and hasAnimal some Cat" in the "Query (class expression)" field. Make sure you have Instances checked in the "Query for" box at the right. You should see Peter show up.

On Mon, May 15, 2017 at 7:48 AM, Marcelino Borges <[hidden email]> wrote:
OK.

So, let us consider that I define Peter, using the class expression editor, in the following way:
Person and hasAnimal some Cat

How can I write a query for recovering all the person that have cats? I would like to recover Peter in this query.

Best regards.

2017-05-15 11:20 GMT-03:00 Michael DeBellis <[hidden email]>:
You can also say this directly on  the definition of Peter. Edit the "Types" description of Peter. Where you would normally just select a class, instead use the "Object Restriction Creator" and you can add the restriction: "hasAnimal some Cat" or use the "Class Expression Editor" and add: "Human and hasAnimal some Cat". 

Michael

On Mon, May 15, 2017 at 6:58 AM, Adila Alfa Krisnadhi <[hidden email]> wrote:
Hi Marcelino,

You can insert a general subclass axiom as follows:

{ peter } SubClassOf hasAnimal some Cat


—adila

> On May 15, 2017, at 9:18 AM, Marcelino Borges <[hidden email]> wrote:
>
> I would like to assert that an individual has a relationship with some individual of a given type, but I would like to not specify which individual.
>
> For example, let us consider that we have the classes Person and Animal. i would like to say that Peter has some cat. But I`m not interested in considering the specific individual cat that Peter has. That is, I would like something like this:
>
> Peter hasAnimal some Cat
>
> Is it possible in OWL? How can I do this in Protege?
>
>
> Best regards.
> _______________________________________________
> protege-user mailing list
> [hidden email]
> https://mailman.stanford.edu/mailman/listinfo/protege-user

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


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



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



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


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


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



_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: "Anonymous" object property assertions

Adila Alfa Krisnadhi
It would be possible if the SPARQL engine enables OWL entailment regime (https://www.w3.org/TR/sparql11-entailment/).
How to enable such an entailment regime or whether it is even supported depend on which SPARQL engine you’re using.

—adila


On May 15, 2017, at 1:09 PM, Marcelino Borges <[hidden email]> wrote:

Hi Adila.

Yes...It would be my first try. But, unfortunately, I would like to retrieve persons that have unknown cats, as considered in my emails. Is it just possible using DL queries?

Best regards. 

2017-05-15 14:06 GMT-03:00 Adila Alfa Krisnadhi <[hidden email]>:
A SPARQL query that approximates the DL query below is:

SELECT ?p
WHERE {
  ?p a :Person ; 
       :hasAnimal [ a :Cat ] .
}

It is an approximation in the sense that it finds “all persons who has a known cat”, i.e., the corresponding instance of Cat exists in the graph.
Note that when an instance of Person that satisfies “hasAnimal some Cat”, the corresponding instance of Cat may be unknown (or not in the data).


—adila


On May 15, 2017, at 12:57 PM, Marcelino Borges <[hidden email]> wrote:

OK. Maybe this could work in Protege, with DL query.
But can I do this with SPARQL?

Is it possible to perform this DL query in triplestores, like allegrograph?

2017-05-15 12:08 GMT-03:00 Michael DeBellis <[hidden email]>:
Go the the DL Query Window. Type "Person and hasAnimal some Cat" in the "Query (class expression)" field. Make sure you have Instances checked in the "Query for" box at the right. You should see Peter show up.

On Mon, May 15, 2017 at 7:48 AM, Marcelino Borges <[hidden email]> wrote:
OK.

So, let us consider that I define Peter, using the class expression editor, in the following way:
Person and hasAnimal some Cat

How can I write a query for recovering all the person that have cats? I would like to recover Peter in this query.

Best regards.

2017-05-15 11:20 GMT-03:00 Michael DeBellis <[hidden email]>:
You can also say this directly on  the definition of Peter. Edit the "Types" description of Peter. Where you would normally just select a class, instead use the "Object Restriction Creator" and you can add the restriction: "hasAnimal some Cat" or use the "Class Expression Editor" and add: "Human and hasAnimal some Cat". 

Michael

On Mon, May 15, 2017 at 6:58 AM, Adila Alfa Krisnadhi <[hidden email]> wrote:
Hi Marcelino,

You can insert a general subclass axiom as follows:

{ peter } SubClassOf hasAnimal some Cat


—adila

> On May 15, 2017, at 9:18 AM, Marcelino Borges <[hidden email]> wrote:
>
> I would like to assert that an individual has a relationship with some individual of a given type, but I would like to not specify which individual.
>
> For example, let us consider that we have the classes Person and Animal. i would like to say that Peter has some cat. But I`m not interested in considering the specific individual cat that Peter has. That is, I would like something like this:
>
> Peter hasAnimal some Cat
>
> Is it possible in OWL? How can I do this in Protege?
>
>
> Best regards.
> _______________________________________________
> protege-user mailing list
> [hidden email]
> https://mailman.stanford.edu/mailman/listinfo/protege-user

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


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



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



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


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


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


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


_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: "Anonymous" object property assertions

Marcelino Borges
Hi Adila.
But how can I write a query that do what I want, assuming that the SPARQL engime enables OWL entailment regime?

Best regards

2017-05-15 19:24 GMT-03:00 Adila Alfa Krisnadhi <[hidden email]>:
It would be possible if the SPARQL engine enables OWL entailment regime (https://www.w3.org/TR/sparql11-entailment/).
How to enable such an entailment regime or whether it is even supported depend on which SPARQL engine you’re using.

—adila


On May 15, 2017, at 1:09 PM, Marcelino Borges <[hidden email]> wrote:

Hi Adila.

Yes...It would be my first try. But, unfortunately, I would like to retrieve persons that have unknown cats, as considered in my emails. Is it just possible using DL queries?

Best regards. 

2017-05-15 14:06 GMT-03:00 Adila Alfa Krisnadhi <[hidden email]>:
A SPARQL query that approximates the DL query below is:

SELECT ?p
WHERE {
  ?p a :Person ; 
       :hasAnimal [ a :Cat ] .
}

It is an approximation in the sense that it finds “all persons who has a known cat”, i.e., the corresponding instance of Cat exists in the graph.
Note that when an instance of Person that satisfies “hasAnimal some Cat”, the corresponding instance of Cat may be unknown (or not in the data).


—adila


On May 15, 2017, at 12:57 PM, Marcelino Borges <[hidden email]> wrote:

OK. Maybe this could work in Protege, with DL query.
But can I do this with SPARQL?

Is it possible to perform this DL query in triplestores, like allegrograph?

2017-05-15 12:08 GMT-03:00 Michael DeBellis <[hidden email]>:
Go the the DL Query Window. Type "Person and hasAnimal some Cat" in the "Query (class expression)" field. Make sure you have Instances checked in the "Query for" box at the right. You should see Peter show up.

On Mon, May 15, 2017 at 7:48 AM, Marcelino Borges <[hidden email]> wrote:
OK.

So, let us consider that I define Peter, using the class expression editor, in the following way:
Person and hasAnimal some Cat

How can I write a query for recovering all the person that have cats? I would like to recover Peter in this query.

Best regards.

2017-05-15 11:20 GMT-03:00 Michael DeBellis <[hidden email]>:
You can also say this directly on  the definition of Peter. Edit the "Types" description of Peter. Where you would normally just select a class, instead use the "Object Restriction Creator" and you can add the restriction: "hasAnimal some Cat" or use the "Class Expression Editor" and add: "Human and hasAnimal some Cat". 

Michael

On Mon, May 15, 2017 at 6:58 AM, Adila Alfa Krisnadhi <[hidden email]> wrote:
Hi Marcelino,

You can insert a general subclass axiom as follows:

{ peter } SubClassOf hasAnimal some Cat


—adila

> On May 15, 2017, at 9:18 AM, Marcelino Borges <[hidden email]> wrote:
>
> I would like to assert that an individual has a relationship with some individual of a given type, but I would like to not specify which individual.
>
> For example, let us consider that we have the classes Person and Animal. i would like to say that Peter has some cat. But I`m not interested in considering the specific individual cat that Peter has. That is, I would like something like this:
>
> Peter hasAnimal some Cat
>
> Is it possible in OWL? How can I do this in Protege?
>
>
> Best regards.
> _______________________________________________
> protege-user mailing list
> [hidden email]
> https://mailman.stanford.edu/mailman/listinfo/protege-user

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


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



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



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


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


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


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


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



_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: "Anonymous" object property assertions

Adila Alfa Krisnadhi
Afaik, you cannot write a SPARQL query that directly express what you need even if the SPARQL engine enables OWL entailment regime.
What you can do, however, is adding one additional axiom to the ontology:   
   Person and hasAnimal some Cat SubClassOf PersonWithSomeCat

and then query using SPARQL on the SPARQL engine that enables OWL entailment regime:

SELECT ?p
WHERE { ?p a :PersonWithSomeCat }

—adila


On May 15, 2017, at 11:40 PM, Marcelino Borges <[hidden email]> wrote:

Hi Adila.
But how can I write a query that do what I want, assuming that the SPARQL engime enables OWL entailment regime?

Best regards

2017-05-15 19:24 GMT-03:00 Adila Alfa Krisnadhi <[hidden email]>:
It would be possible if the SPARQL engine enables OWL entailment regime (https://www.w3.org/TR/sparql11-entailment/).
How to enable such an entailment regime or whether it is even supported depend on which SPARQL engine you’re using.

—adila


On May 15, 2017, at 1:09 PM, Marcelino Borges <[hidden email]> wrote:

Hi Adila.

Yes...It would be my first try. But, unfortunately, I would like to retrieve persons that have unknown cats, as considered in my emails. Is it just possible using DL queries?

Best regards. 

2017-05-15 14:06 GMT-03:00 Adila Alfa Krisnadhi <[hidden email]>:
A SPARQL query that approximates the DL query below is:

SELECT ?p
WHERE {
  ?p a :Person ; 
       :hasAnimal [ a :Cat ] .
}

It is an approximation in the sense that it finds “all persons who has a known cat”, i.e., the corresponding instance of Cat exists in the graph.
Note that when an instance of Person that satisfies “hasAnimal some Cat”, the corresponding instance of Cat may be unknown (or not in the data).


—adila


On May 15, 2017, at 12:57 PM, Marcelino Borges <[hidden email]> wrote:

OK. Maybe this could work in Protege, with DL query.
But can I do this with SPARQL?

Is it possible to perform this DL query in triplestores, like allegrograph?

2017-05-15 12:08 GMT-03:00 Michael DeBellis <[hidden email]>:
Go the the DL Query Window. Type "Person and hasAnimal some Cat" in the "Query (class expression)" field. Make sure you have Instances checked in the "Query for" box at the right. You should see Peter show up.

On Mon, May 15, 2017 at 7:48 AM, Marcelino Borges <[hidden email]> wrote:
OK.

So, let us consider that I define Peter, using the class expression editor, in the following way:
Person and hasAnimal some Cat

How can I write a query for recovering all the person that have cats? I would like to recover Peter in this query.

Best regards.

2017-05-15 11:20 GMT-03:00 Michael DeBellis <[hidden email]>:
You can also say this directly on  the definition of Peter. Edit the "Types" description of Peter. Where you would normally just select a class, instead use the "Object Restriction Creator" and you can add the restriction: "hasAnimal some Cat" or use the "Class Expression Editor" and add: "Human and hasAnimal some Cat". 

Michael

On Mon, May 15, 2017 at 6:58 AM, Adila Alfa Krisnadhi <[hidden email]> wrote:
Hi Marcelino,

You can insert a general subclass axiom as follows:

{ peter } SubClassOf hasAnimal some Cat


—adila

> On May 15, 2017, at 9:18 AM, Marcelino Borges <[hidden email]> wrote:
>
> I would like to assert that an individual has a relationship with some individual of a given type, but I would like to not specify which individual.
>
> For example, let us consider that we have the classes Person and Animal. i would like to say that Peter has some cat. But I`m not interested in considering the specific individual cat that Peter has. That is, I would like something like this:
>
> Peter hasAnimal some Cat
>
> Is it possible in OWL? How can I do this in Protege?
>
>
> Best regards.
> _______________________________________________
> protege-user mailing list
> [hidden email]
> https://mailman.stanford.edu/mailman/listinfo/protege-user

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


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



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



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


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


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


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


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


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


_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: "Anonymous" object property assertions

Marcelino Borges
Hi Adila.

Indeed, we considered this. But it involves increasing the complexity of the ontology.

We have considered also including singleton instances. So, when we need to represent that some person has some cat, we assert that that person has that singleton cat. But this involves some non intended use of individuals.

So, it seems that we don't have a good and straight forward solution for the problem.

But thank you for your attention.

Best regards.

2017-05-16 11:47 GMT-03:00 Adila Alfa Krisnadhi <[hidden email]>:
Afaik, you cannot write a SPARQL query that directly express what you need even if the SPARQL engine enables OWL entailment regime.
What you can do, however, is adding one additional axiom to the ontology:   
   Person and hasAnimal some Cat SubClassOf PersonWithSomeCat

and then query using SPARQL on the SPARQL engine that enables OWL entailment regime:

SELECT ?p
WHERE { ?p a :PersonWithSomeCat }

—adila


On May 15, 2017, at 11:40 PM, Marcelino Borges <[hidden email]> wrote:

Hi Adila.
But how can I write a query that do what I want, assuming that the SPARQL engime enables OWL entailment regime?

Best regards

2017-05-15 19:24 GMT-03:00 Adila Alfa Krisnadhi <[hidden email]>:
It would be possible if the SPARQL engine enables OWL entailment regime (https://www.w3.org/TR/sparql11-entailment/).
How to enable such an entailment regime or whether it is even supported depend on which SPARQL engine you’re using.

—adila


On May 15, 2017, at 1:09 PM, Marcelino Borges <[hidden email]> wrote:

Hi Adila.

Yes...It would be my first try. But, unfortunately, I would like to retrieve persons that have unknown cats, as considered in my emails. Is it just possible using DL queries?

Best regards. 

2017-05-15 14:06 GMT-03:00 Adila Alfa Krisnadhi <[hidden email]>:
A SPARQL query that approximates the DL query below is:

SELECT ?p
WHERE {
  ?p a :Person ; 
       :hasAnimal [ a :Cat ] .
}

It is an approximation in the sense that it finds “all persons who has a known cat”, i.e., the corresponding instance of Cat exists in the graph.
Note that when an instance of Person that satisfies “hasAnimal some Cat”, the corresponding instance of Cat may be unknown (or not in the data).


—adila


On May 15, 2017, at 12:57 PM, Marcelino Borges <[hidden email]> wrote:

OK. Maybe this could work in Protege, with DL query.
But can I do this with SPARQL?

Is it possible to perform this DL query in triplestores, like allegrograph?

2017-05-15 12:08 GMT-03:00 Michael DeBellis <[hidden email]>:
Go the the DL Query Window. Type "Person and hasAnimal some Cat" in the "Query (class expression)" field. Make sure you have Instances checked in the "Query for" box at the right. You should see Peter show up.

On Mon, May 15, 2017 at 7:48 AM, Marcelino Borges <[hidden email]> wrote:
OK.

So, let us consider that I define Peter, using the class expression editor, in the following way:
Person and hasAnimal some Cat

How can I write a query for recovering all the person that have cats? I would like to recover Peter in this query.

Best regards.

2017-05-15 11:20 GMT-03:00 Michael DeBellis <[hidden email]>:
You can also say this directly on  the definition of Peter. Edit the "Types" description of Peter. Where you would normally just select a class, instead use the "Object Restriction Creator" and you can add the restriction: "hasAnimal some Cat" or use the "Class Expression Editor" and add: "Human and hasAnimal some Cat". 

Michael

On Mon, May 15, 2017 at 6:58 AM, Adila Alfa Krisnadhi <[hidden email]> wrote:
Hi Marcelino,

You can insert a general subclass axiom as follows:

{ peter } SubClassOf hasAnimal some Cat


—adila

> On May 15, 2017, at 9:18 AM, Marcelino Borges <[hidden email]> wrote:
>
> I would like to assert that an individual has a relationship with some individual of a given type, but I would like to not specify which individual.
>
> For example, let us consider that we have the classes Person and Animal. i would like to say that Peter has some cat. But I`m not interested in considering the specific individual cat that Peter has. That is, I would like something like this:
>
> Peter hasAnimal some Cat
>
> Is it possible in OWL? How can I do this in Protege?
>
>
> Best regards.
> _______________________________________________
> protege-user mailing list
> [hidden email]
> https://mailman.stanford.edu/mailman/listinfo/protege-user

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


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



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



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


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


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


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


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


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


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



_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
Loading...