database to store import setups created by users. That
import setups consist of the parameters that were used
to perform data extraction, filtering and importing.
The use of the Aquedücte Service requires client
authentication provided by the Authenticator compo-
nent, which can use a third-party security service.
The main functionalities of the Aquedücte Service are
realized by four main components, namely (i) Files
and APIs Processor, (ii) Import Setup Manager, (iii)
NGSI-LD Converter, and (iv) Data Importer.
The Files and APIs Processor component is re-
sponsible for filtering and extracting data through
two different approaches, Context and Common. As
means of standardizing extracted data and easing data
analysis and queries with NGSI-LD, the Context ap-
proach takes advantage of LGeoSIM, a semantic in-
formation model for smart cities (Rocha et al., 2019).
LGeoSIM was chosen as information model as it is
able to address data heterogeneity while considering
georeferenced information, which can be quite use-
ful for smart city applications. LGeoSIM relies on the
ability of defining different layers, each one repre-
senting a set of related elements with georeferenced
information. Furthermore, LGeoSIM is grounded on
the NGSI-LD specification to allow for Linked Data
along with ontologies.
The Common approach concerns extracting, filter-
ing, and importing data without providing standard-
ization through a specific context source. This ap-
proach is valid for cases in which a given data set to
be manipulated does not require standardization via a
context source from the end-user’s point view. There-
fore, only using the NGSI-LD protocol would be suf-
ficient.
The Import Setup Manager component aims to
manage user settings to easing data import. Therefore,
users can select one of the registered setups to import
data, thus avoiding setting again previously defined
parameters.
The NGSI-LD Converter component is responsi-
ble for converting data either from external Web ser-
vices or files with different structures. This compo-
nent handles both common properties (expressed in
numeric, text, and collection types) and geolocation
properties (expressed in the GeoJSON format
5
) and
converts data sets structured as key-value pairs to the
NGSI-LD protocol.
Listing 1 shows an example of entity data com-
plying with the NGSI-LD protocol. id and type are
mandatory properties: the former is a unique iden-
tifier for the entity and the latter indicates the type
represented by the entity. Other properties follow
the NGSI-LD standard. In this example, the loca-
5
https://geojson.org/
tion property is of the GeoProperty type and has a
GeoJSON value representing geographic information
about the entity.
{
" id ": "ur n : ngsi -ld : Pa rk i ng : D ow nt ow n1 " ,
" ty pe " : " Pa rk ing " ,
" na me " : {
" ty pe " : " Pr op er ty " ,
" va lu e ": " Do wn t o w n One "
},
" t ot a l S po tN um b e r ": {
" ty pe " : " Pr op er ty " ,
" va lu e ": 200
},
" l oc at i on ": {
" ty pe " : " Ge o P r o p e r ty ",
" va lu e ": {
" ty pe " : " Po i nt " ,
" c oo rd in at es ": [ -8.5 , 41 .2]
}
},
" @ co nt e xt ": [
" ht tp :// uri . et s i . or g / ngsi - ld / v1 /
ngsi - ld - core - c ont ex t . j so nl d " ,
" ht tp :// e xa m pl e . o rg / ngsi - l d /
pa rk i ng . j so n ld "
]
}
Listing 1: Example of NGSI-LD compliant data.
The @context field contains links to ontology files
that define a data vocabulary for an entity as means
of ensuring semantic consistency. For instance, the
@context field could contain a link pointing to a data
vocabulary about vehicles with fields such as name
and engine. Therefore, any entity using this vocab-
ulary must contain at least one of these fields. It is
worth highlighting that validating syntactic and se-
mantic information about the entity against the data
vocabulary is out of the scope of Aquedücte.
Data Importer is a core component in the Aque-
dücte architecture. This component is responsible for
importing NGSI-LD data sets to an application or
middleware able to handle such a protocol. Data im-
port takes place through a RESTful communication
between the Aquedücte’s Data Importer component
and an external persistence service.
3.2 Implementation
Aquedücte was developed by following a RESTful
service-oriented architecture. The Aquedücte UI is a
front-end developed with Vuetify
6
, a Javascript-based
library that provides developers with ready-to-use UI
components. This library also comes with two-way
6
https://vuetifyjs.com/
A Linked Data-based Service for Integrating Heterogeneous Data Sources in Smart Cities
207