-
Notifications
You must be signed in to change notification settings - Fork 1
ServiceMap Configuration
Distributed Systems and Internet Technology Lab, Distributed Data Intelligence and Tech. Lab edited this page Feb 24, 2020
·
4 revisions
The servicemap configuration is split among the servicemap.properties file and some tables in the ServiceMap database.
This file is located in the $TOMCAT_HOME/servicemap/servicemap.properties
property | default value | note |
---|---|---|
debug | false | if set to true debug messages are shown in the catalina.out file |
urlMySqlDB | jdbc:mysql://localhost:3306/ | jdbc url for mysql connection |
dbMySql | ServiceMap | database used |
userMySql | user | username used for the connection |
passMySql | password | password used for the mysql connection |
maxConnectionsMySql | 100 | maximum number of connections to the database |
maxWaitMySql | 1000 | max time in milliseconds to wait for a connection |
poolTypeMySql | grow | type of pool for the mysql connection, block=wait if exausted,fail=fail if exausted, grow=grow if exausted |
enableIoTChecker | false | if true access to iot devices is limited depending on the access token provided |
iotCheckerPassword | is a very complex hex string that should be passed as apikey parameter to avoid iot check control | |
iotCacheMaxTime | 600 | number of seconds a type of access of a specific serviceuri (public or private) is cached before reevaluating it |
datamanagerEndpoint | http://localhost:8080/datamanager/api/ | url to datamanager endpoint |
... | ... | ... |
This table is used in the api for lookup of a single service uri to retrieve all the data associated with this specific service uri. This table contains:
field | value description and example |
---|---|
serviceType | contains the class name to which this mapping applies, it can be a full uri or a simple class name if applied to km4city ontology |
apiVersion | number of version of the api this setting applies, normally it is 1 |
priority | a value used to give more or less priority to a mapping. If more than one mapping applies t is used the one with |
a lower value | |
section | the section where the results are given, normally it is equal to 'Service' |
serviceDetailsSparqlQuery | the SPARQL query template used to retrieve static information about a service, %SERVICE_URI is replaced with the actual serviceuri, %LANG with the requested language identifier. Some variables: ?_elat, ?_elong, ?_type,?_category, ?_wktGeometry have a special meaning and should be set with latitude, longitude, class type, macro class, WKT geometry associated with the service, all other variables not starting with _ are placed in the properties returned. If it is set to null a default query is performed. |
serviceAttributesSparqlQuery | the SPARQLquery used to retrieve the "real-time" attributes description of this service uri. If set to null a default query is performed. |
serviceRealTimeSparqlQuery | SPARQL query used to retrieve the real-time data associated with a service uri and stored in the KB. %SERVICE_URI is replaced with the service uri, %LIMIT with the limit value and %FROM_TIME with the FILTER condition on the measuredTime variable to retrieve all data from a specific time. The name of the variables have to match with the name of the attributes returned from the attributes query. Using this query is obsolete, it is used only for compatibility with previous versions. |
serviceRealTimeSqlQuery | An SQL query performed on HBASE/PHOENIX to retrieve data of a service, %SERVICE_URI is replaced with the actual service uri, %FROM_TIME is replaced with a condition on the observationTime to retrieve all records in a range, the %LIMIT is replaced with a limit value |
serviceRealTimeSolrQuery | it can be null, solr or elasticsearch, indicating where to perform the data search |
The mapping is retrieved using all the classes of a service uri (with inference enabled) and retieving from the table the one with lower priority value. For the realtime query to retrive data give precedence to serviceRealTimeSolrQuery then serviceRealTimeSqlQuery and finally serviceRealTimeSparqlQuery.
This table is used to build the categories menu in the ServiceMap UI, the fields are the following:
field | description |
---|---|
SubClass | name of the km4city class (e.g. Waste_container) |
MacroClass | name of the km4city macro class of the SubClass (e.g. Environment) |
typeOfService | can be Service or T_Service, Service for Service tab and T_Service for Transversal tab |
Visible | it can be 0=not visible or 1=visible |
icon | filename prefix used for the icon of the class |