Vocabulary structure definition

12 views
Skip to first unread message

Mauricio Banduk

unread,
Mar 19, 2012, 8:42:37 AM3/19/12
to sca...@googlegroups.com
Hi again,

I was wondering if it's possible to define vocabularies with their relations. I tried to find it in the docs but I couldn't find anything on it.

I tough about something like this:

object GEO extends Vocabulary("http://www.w3.org/2003/01/geo/wgs84_pos#") {
  val SpatialThing = GEO / "SpatialThing" - (
                                   val lat = prop("lat")
                                   val long = prop("long")
                                   val alt = prop("alt")
  )
}

Is it possible in any other way??

Thank you!
--
Maurício Banduk

Hrvoje Šimić

unread,
Mar 19, 2012, 9:53:51 AM3/19/12
to sca...@googlegroups.com
Can you elaborate?

Mauricio Banduk

unread,
Mar 19, 2012, 10:19:29 AM3/19/12
to sca...@googlegroups.com
Sure,

Can we define the range and the domain of each property when declaring a vocabulary?

I mean, we can declare this:

object GEO extends Vocabulary("http://www.w3.org/2003/01/geo/wgs84_pos#") {
  val SpatialThing = GEO / "SpatialThing" 
  val lat = prop("lat")
  val long = prop("long")
  val alt = prop("alt")
}

But it represents only all the entities and properties with no relation between them.
In the Vocabulary declared above, how can we know if the property GEO / "alt" can have an entity of type FOAF:Person as object??
And how to know if a FOAF:Person can have a property GEO / "alt" ?

That's it!


2012/3/19 Hrvoje Šimić <hrvoj...@gmail.com>



--
Maurício Banduk

Hrvoje Šimić

unread,
Mar 19, 2012, 11:32:56 AM3/19/12
to sca...@googlegroups.com
Well, I guess not. Are you interested in RDF statements like "geo:alt
rdfs:range foaf:Person"? If so, in what model/graph would they be? Or
is it just an idea for documentation/organisation?

H.

Mauricio Banduk

unread,
Mar 19, 2012, 11:54:19 AM3/19/12
to sca...@googlegroups.com

So, I need to generate Java Maps based on triples automatically.
To do that, I'd like to have the 'complete' definition of each class. With its properties, like in an owl file...

For example, this is what I can do now:

 object MyVoc extends Vocabulary("http://www.example.com/myvocabulary#") {
   val Computer = MyVoc / "Computer"
   val owns     = prop("owns")
 }

  object FOAF extends Vocabulary("http://xmlns.com/foaf/0.1/") {
    val Person = FOAF / "Person"
  }

It would be usefull (not only for me, I guess) to have something like this (I called OntClass refering to ontology class):
  
  object MyVoc extends Vocabulary("http://www.example.com/myvocabulary#") {
   val Computer = MyVoc / "Computer"
   val owns     = prop("owns")
 }

  object FOAF extends Vocabulary("http://xmlns.com/foaf/0.1/") {
    val Person = FOAF / "Person"
  }

  object MyVoc extends OntClass("http://www.example.com/myvocabulary#") {
   FOAF.Person -(
     MyVoc.owns -> MyVoc.Computer
   )
  }


Now that I was writing, I realised I could siply declare a Class extending the Graph one for my purposes (I'll try it and let you know)...
But I think that the declaration of a vocabulary would be more clear (for me, at least) like this.

2012/3/19 Hrvoje Šimić <hrvoj...@gmail.com>



--
Maurício Banduk

Reply all
Reply to author
Forward
0 new messages