Global Positioning System Reference
In-Depth Information
For example, in the particular case of a tourism system, the basic
concepts of a city should be described. From an ontology point of view,
every one of these concepts is a class. Figure 1 shows part of an ontology
used for a tourism domain. The classes of the ontology could be a
Point
of interest
, a
Resource
, a
Spatial point
, etc. Classes may also be specialized
using subclasses. For instance, a subclass of
Point of interest
class could be
a
Historic point
and a subclass of the Historic point could be a
Monument
(represented in orange color in Fig. 1). On the other hand, an instance of
Monument
class may be
SagradaFamilia
and an instance of
Resource
class
may be a picture:
Photo
(represented in purple color in Fig. 1). An Object
Property
hasResource
, allows to link the
SagradaFamilia
instance with the
Photo
instance, indicating what is shown in the picture. Then, the
name
is a
data property that is used to relate the
SagradaFamilia
instance with a String
value that indicates the name of the monument.
Historic
superclasses
:
Historic
Historic SubClassOf PointOfInterest
Resource
Monument
superclasses
:
Monument
Monument SubClassOf Historic
SagradaFamilia
Object property assertions
:
SagradaFamilia hasResource Photo
Data property assertions:
Photo
SagradaFamilia
SagradaFamilia name “La Sagrada Familia”^^string
Fig. 1.
Fragment of an ontology used for a tourism domain.
Color image of this figure appears in the color plate section at the end of the topic.
SPARQL
Data that represents ontology information of Fig. 1 is stored in RDF triplets
within a triplestore, which is a specifi c database built for the storage and
retrieval of triples. Since in a relational database, triplestores can be queried
by using a query language, which is called SPARQL (W3C 2012). SPARQL
is the equivalent of SQL in relational databases, but limited to query
operations. As an example, the following lines show a SPARQL query over
the ontology of Fig. 1.
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
Search WWH ::
Custom Search