Instances vs classes in owl/skos

2 views
Skip to first unread message

Brad Cox

unread,
Jun 22, 2014, 2:30:09 PM6/22/14
to sta...@clarkparsia.com

I'm working with a location ontology that defines cities, states and countries as classes. I'm trying to define instances of each and then retrieve them with { ?entity a my:Location } in place of my:City and the union clauses below.

When
I try my:Location, I only get classes but no instances, which makes me think the instances are really defined as classes. But that doesn't explain why I do retrieve the City/County/State etc classes but no instances with { ?location a my:Location } (with reasoning enabled).

This makes me think I'
m missing something about the integration of owl and skos, since the w3c skos documentation goes dark on how instances are handled. 

select distinct ?entity ?prefLabel
where {
{ ?entity a my:City }
UNION
{ ?entity a my:County }
UNION
{ ?entity a my:State }
UNION
{ ?entity a my:Community }
UNION
{ ?entity a my:Country }
?entity skos:prefLabel ?prefLabel .
}
ORDER BY
?prefLabel ;

Here are some of the class definintions  

my:Location rdf:type skos:Concept ;
     skos
:inScheme my:LocationScheme ;
       skos
:topConceptOf my:LocationScheme ;
   rdfs
:subClassOf skos:Concept ;
  skos
:prefLabel "Location" ;
     skos
:altLabel "Place" ;
 rdfs
:comment "The class of locations/places from geonames.org" ;
       rdfs
:label "Location" .

my
:City rdf:type my:Location ;
  rdfs
:subClassOf my:Location ;
   skos
:inScheme my:LocationScheme ;
   skos
:prefLabel "City" ;
   skos
:altLabel "Village" , "Town" ;
   rdfs
:comment "Cities, towns and villages from geonames.org." ;
   rdfs
:label "City" .

...and so forth



Here
's one of the (wished for) instances). Notice the pattern is exactly the same, which is why I think they're being treated as classes.

my:City_Canillo a my:City ;
  skos
:prefLabel "Canillo" ;
  geo
:lat "42.5833"^^xsd:double ;
 geo
:long "1.6667"^^xsd:double ;
 
my:Country my:Country_Andorra ;
 
my:PostalCode "AD100"^^xsd:string .
my:Country_Andorra a my:Country ;
  
my:PostalCode "AD"^^xsd:string ;
  skos
:prefLabel "Andorra" .

Kendall Clark

unread,
Jun 23, 2014, 11:43:53 AM6/23/14
to stardog
Brad,

This would be easier to help you with if you'd tell us:

1. what query yr asking Stardog to evaluate
2. against which data
3. what results yr getting

I can't easily tell any of that from yr message.

Cheers,
Kendall


--
-- --
You received this message because you are subscribed to the C&P "Stardog" group.
To post to this group, send email to sta...@clarkparsia.com
To unsubscribe from this group, send email to
stardog+u...@clarkparsia.com
For more options, visit this group at
http://groups.google.com/a/clarkparsia.com/group/stardog?hl=en

Brad Cox

unread,
Jun 23, 2014, 12:08:44 PM6/23/14
to sta...@clarkparsia.com
I'm sorry my question wasn't clear. 


On Monday, June 23, 2014 11:43:53 AM UTC-4, Kendall wrote:
Brad,

This would be easier to help you with if you'd tell us:

1. what query yr asking Stardog to evaluate

select distinct *
{
 ?entity a my:Location }
 ?entity skos:prefLabel ?prefLabel .
}
ORDER BY 
?prefLabel ;
 
2. against which data

The data shown  in my email.
 
3. what results yr getting

Query returns City, State, etc classes but not instances such as Andora.

Kendall Clark

unread,
Jun 24, 2014, 9:19:41 AM6/24/14
to stardog
On Mon, Jun 23, 2014 at 12:08 PM, Brad Cox <brad...@gmail.com> wrote:
The data shown  in my email.

Brad,

Sorry that I wasn't clear. You'll have to send actual data that someone else can load into Stardog and try to query. If that's a problem because the data is sensitive, you can use the built-in obfuscation tool or just send some representative data that shows the issue yr reporting.

Cheers,
Kendall
Reply all
Reply to author
Forward
0 new messages