-
Notifications
You must be signed in to change notification settings - Fork 193
Openiot Commons Library
In OpenIoT we maintain a project called Commons where we maintain the "common" Objects, Schemata and utilities used for most of the modules across the OpenIoT platform. This project is included in the binary file distribution as a library but has to be added as a seperate project for development. This project is available under the /utils/utils.commons/ folder.
As this project is a maven dependency it has to be installed to the local maven repository. If you have not yet done so, you must install Maven.
To download commons’s source code use your favorite git client and retrieve the code from one of the following URLs:
- HTTPS: https://github.com/OpenIotOrg/openiot.git
- SSH: git@github.com:OpenIotOrg/openiot.git The commons is available under the /utils/utils.commons/ folder.
To integrate the commons in Eclipse one should follow the steps below:
-
Import Existing maven project
File>Import>Maven>Existing Maven Projects -
Click the “Browse” button and navigate to the commons’s source code directory that has been previously downloaded.
-
Choose the
utils.commonsand click the Finish button. -
Right click on the
utils.commonsproject and chooseRun As>Maven Install -
Now you are ready to use this library from the Other OpenIoT modules.
The projects that run within JBoss container use a common central properties file (openiot.properties). The modules that are currently configured to use this file are:
The property file can be found under utils/utils.commons/src/main/resources/properties/. This file SHOULD be placed under the following path: \JBoss_HOME\standalone\configuration of your JBoss 7.XX container.
This file contains the following information that should be set up according your environment:
#Scheduler Properties
scheduler.core.lsm.openiotMetaGraph=http://lsm.deri.ie/OpenIoT/guest/sensormeta#
scheduler.core.lsm.openiotDataGraph=http://lsm.deri.ie/OpenIoT/guest/sensordata#
scheduler.core.lsm.openiotFunctionalGraph=http://lsm.deri.ie/OpenIoT/guest/functional#
scheduler.core.lsm.access.username=openiot_guest
scheduler.core.lsm.access.password=openiot
#Service Delivery & Utility Manager (SD&UM) Properties
sdum.core.lsm.openiotFunctionalGraph=http://lsm.deri.ie/OpenIoT/guest/functional#
sdum.core.lsm.sparql.endpoint=http://lsm.deri.ie/sparql
scheduler.core.lsm.openiotMetaGraph
TODO:Add Description
scheduler.core.lsm.openiotDataGraph
TODO:Add Description
scheduler.core.lsm.openiotFunctionalGraph
TODO:Add Description
scheduler.core.lsm.access.username
TODO:Add Description
scheduler.core.lsm.access.password
TODO:Add Description
sdum.core.lsm.openiotFunctionalGraph
TODO:Add Description
sdum.core.lsm.sparql.endpoint
TODO:Add Description
For using the central properties add the flowing to your code:
import org.openiot.commons.util.PropertyManagement;
public class TestProperties {
private PropertyManagement propertyManagement = null;
public TestProperties() {
propertyManagement = new PropertyManagement();
}
public void readFromProperties() {
// ============For Scheduler=========================
// reading proeprty LSM_META_GRAPH
System.out.println("lsmMetaGraph: " + propertyManagement.getSchedulerLsmMetaGraph());
// reading proeprty LSM_DATA_GRAPH
System.out.println("lsmDataGraph: " + propertyManagement.getSchedulerLsmDataGraph());
// reading proeprty LSM_FUNCTIONAL_GRAPH
System.out.println("lsmFunctionalGraph: " + propertyManagement.getSchedulerLsmFunctionalGraph());
// reading proeprty LSM_USER_NAME
System.out.println("lsmUserName: " + propertyManagement.getSchedulerLsmUserName());
// reading proeprty LSM_PASSWORD
System.out.println("lsmPassword: " + propertyManagement.getSchedulerLsmPassword());
// ============For SD&UM=============================
// reading proeprty LSM_FUNCTIONAL_GRAPH
System.out.println("lsmFunctionalGraph: " + propertyManagement.getSdumLsmFunctionalGraph());
// reading proeprty LSM_SPARQL_END_POINT
System.out.println("lsmSparqlEndPoint: " + propertyManagement.getSdumLsmSparqlEndPoint());
}
}
- Documentation
- Home
- Architecture
- Scheduler
- Service Delivery & Utility Manager
- Data Platform (LSM)
- X-GSN
- Mobile Sensors Management
- Optimizations
- Security
- User Interfaces
- OpenIoT Commons & Properties
- Standalone Platform Testing tools
- X-GSN Sensor Simulators
- Deliverables
- Glossary and Terminology
- Demos