Skip to main content

onto.Location

Definition

Some classes may refer to locations and these are usually asked using "where". To accomplish this you will set your class to extend the ontology concept of onto.Location.

Examples

  • "Where do we have the oldest customer?" could mean "In which city do we have the oldest customer?"

Limitations

If you define multiple classes as Location, it may be harder for Veezoo to disambiguate. Also, it could be that the behavior is not very consistent for the users, e.g. sometimes I see a country, sometimes a city.

Usage

For this to work, you will have to add an extends: onto.Location. Like this:

kb {
class Store {
name.en: "Store"

from_table: STORES
sql: "${STORES.ID}"
name_sql.en: "${STORES.NAME}"

// Make Store extend a Location
extends: onto.Location

...
}
}

Notice that sometimes your class will already be extending a concept from our ontology (onto). Many times this will already allow you to ask 'where' questions directly. Here is a list of some of them:

  • onto.Country
  • onto.State
  • onto.City
  • onto.PostalCode