This repository is no longer maintained and has therefore been archived. Feel free to use and extend the code, but we are aware that it might have security leaks, no longer supported dependencies or might not work at all.
smartSensorEditor is an extension on the smartEditor. The smartEditor provides a form-based user interface to easily edit ISO 19139 and INSPIRE metadata documents, with support for templates and validation, including error highlighting. Also the data can be uploaded to an OGC CSW 2.02 endpoint to communicate with a metadata management system.
smartSensorEditor extends these functionalities to to edit metadata based on SensorML v. 2.0. Although the original smartEditor was not designed to handle any other metadata standards, it was suitable to be extended to reuse aspects such as server-side validation with Schematron, user interface and styling, and drafts and template management.
This project was tested with the following versions:
- Java JDK:
1.7.x
- Apache Maven:
3.2.3
- Apache Tomcat:
7.0.x
- smartEditor:
2.1.6
You must download and build the project from source using git and Maven:
Clone source code repository:
git clone https://github.com/52North/smartSensorEditor.git
Build api and webapp modules: Because of the maven notice plugin the following command needs an internet connection to check the license of the third party software.
mvn clean install
The created war file sensorSmartEditor.war
can then be found in: "SmartSensorEditor/smartsensoreditor-webapp/target".
Configure Tomcat:
Next you have to make sure that the needed runtime environment (Java and Tomcat) are properly installed.
To make sure that the right java version is used (for linux, windoes is similar):
Create a file setenv.sh (for linux) and write the following:
JAVA_HOME=/jdk1.7.YYYY
JRE_HOME=/jdk1.7.YYYY/jre
If another program should run on the tomcat then the an additional line in setenv.sh has to be added:
export JAVA_OPTS="-Xms128m -Xmx1024m -XX:MaxPermSize=256m -server"
Quick start:
Put the file sensorSmartEditor.war
into the webapp folder of Tomcat and start Tomcat.
Start with all features:
If the feature for storing templates should be available, then additionally a database has to be created. For more information please take a look at the following link:
https://wiki.52north.org/bin/view/Metadata/SmartEditorInstallationGuide#Database_preparation
The database URL, username, the password and the database driver have to be accessible for Tomcat. The instructions can be found at this link:
https://wiki.52north.org/bin/view/Metadata/SmartEditorInstallationGuide#Servlet_container_configuration
Then open the browser at http://localhost:8080/smartSensorEditor. The form for SensorML can be opened by clicking on the button "Sensor".
User and developer documentation for smartEditor can be found in the 52North wiki.
Documentation specific to smartSensorEditor is in this document.
You can report bugs on GitHub and ask for help on the Metadata Management community mailing list (after looking at the guidelines).
To contribute to this project you must sign the 52°North CLA.
We follow the fork & pull development model: https://help.github.com/articles/using-pull-requests
smartSensorEditor is a Maven overlay of the original smartEditor webapp. It consists of two modules:
smartSensorEditor-api
: Java classes, partially overwriting classes from the smartEditor-api module using the maven-shade-plugin.smartSensorEditor-webapp
: the web application, building on smartEditor-webapp. The maven-war-plugin with its overlay functionality is used.
smartEditor uses the Spring Framework and all configuration happens via Spring Beans in XML files. For processing of XML documents, smartEditor uses a combination of XSLT and Groovy. For the front end Java Server Pages (jsp) are used. Therefore files of all of the above types were added to adjust smartEditor for SensorML and unit tests were written to ensure working code.
The following files of the smartEditor-api sub project are modified:
- org.n52.smartsensoreditor.beans
- BackendBeanSML.java
original file: de.conterra.smarteditor.beans.BackendBean.java - PublishBeanSML.java
original file: de.conterra.smarteditor.beans.PublishBean.java - StartEditorBeanSML.java
original file: de.conterra.smarteditor.beans.StartEditorBean.java
- BackendBeanSML.java
- org.n52.smartsensoreditor.controller
- BasicPublishControllerSML.java
original file: de.conterra.smarteditor.controller.BasicPublishController.java - EditControllerSML.java
original file: de.conterra.smarteditor.controller.EditController.java - SaveLocalControllerSML.java
original file: de.conterra.smarteditor.controller.SaveLocalController.java - SaveTemplateControllerSML.java
original file: de.conterra.smarteditor.controller.SaveTemplateController.java - StartEditorControllerSML.java
original file: de.conterra.smarteditor.controller.StartEditorController.java
- BasicPublishControllerSML.java
- org.n52.smartsensoreditor.cswclient.facades
- CSWContextSOS.java
original file: de.conterra.smarteditor.cswclient.facades.CSWContext.java - TransactionResponseSOS.java
original file: de.conterra.smarteditor.cswclient.facades.TransactionResponse.java
- CSWContextSOS.java
- org.n52.smartsensoreditor.cswclient.util
- DefaultsSOS.java
original file: de.conterra.smarteditor.cswclient.util.Defaults.java
- DefaultsSOS.java
- org.n52.smartsensoreditor.dao
- EditorAwareCatalogServiceDAO.java
original file: de.conterra.smarteditor.dao.CatalogServiceDAO.java - SOSCatalogService.java
original file: de.conterra.smarteditor.dao.GenericCatalogService.java
- EditorAwareCatalogServiceDAO.java
- org.n52.smartsensoreditor.service
- BackendManagerServiceSML.java
original file: de.conterra.smarteditor.service.BackendManagerService.java
- BackendManagerServiceSML.java
- org.n52.smartsensoreditor.validator
- MetadataValidatorSML.java
original file: de.conterra.smarteditor.validator.MetadataValidator.java
- MetadataValidatorSML.java
- org.n52.smartsensoreditor.xml
- EditorContextSML.java
original file: de.conterra.smarteditor.xml.EditorContext.java
- EditorContextSML.java
The following files of the smartEditor-webapp sub project are needed to be modified or were created:
resources folder:
- new groovy beans in
resources/groovy
- new xsl file extractDataFromSOSDescribeSensorResponse.xsl for tansformation of incoming SOS data in
resources/internal/external
- new xslt files for creating SOAP requests in ``resources/requests`
- new template files in
resources/templates
- new XML files for validation in
resources/validation
- new XSLT files to transform between bean and document in
resources/xslt
- adapt
resources/codelist_enumeration.xml
,resources/isolist.properties
, andresources/isolist_de.properties
for a new sensor button - adapt
resources/messages.properties
andresources/messages_de.properties
for error messages, element labels and validation errors - adapt
resources/application.properties
to define SOS Operations needed for the RequestFactory and the operationSOSManager states Beans - adapt
resources/log4j.xml
to add a smartSensorEditor logger
webapp folder:
- new images for the tootips in
webapp/images
- new JavaScript files for highlighting the form fields in
webapp/js/validation
- adapt the standard.css in
webapp/styles
for the SOS extension - new tooltip files in
webapp/tooltips
webapp/WEB-INF folder:
- adapt
webapp/WEB-INF/defs/tiles-editor.xml
to declare the .jsp files for each form element - adapt
webapp/WEB-INF/defs/tiles-elements.xml
to define the .jsp files for multi form elements - adapt
webapp/WEB-INF/beans-definitions.xml
to define the beans of the form elements and declare them in thebackendBean
- adapt
webapp/WEB-INF/dao-definitions.xml
for the SOS extension - adapt
webapp/WEB-INF/dispatcher-servlet.xml
to change the bean declarations - adapt
webapp/WEB-INF/service-definitions.xml
to declare the validators and set theactiveBeanNamesRegex
- adapt
webapp/WEB-INF/util-config-definitions.xml
to define additional information for the SmartSensorEditor separate - adapt
webapp/WEB-INF/validator-definitions.xml
to define the new validators
webapp/WEB-INF/jsp folder:
- new jsp-files for the different form elements in
webapp/WEB-INF/jsp/elements
- adapt the tabs of the start page in
webapp/WEB-INF/jsp/start
- new
webapp/WEB-INF/jsp/body_sensor.jsp
andwebapp/WEB-INF/jsp/body_acousticSensor.jsp
to define which elements should contain the form - adapt `webapp/WEB-INF/jsp/finished.jsp`` for the error message and the case that the page is shown after the "web- service" start tab
- adapt
webapp/WEB-INF/jsp/menu.jsp
to show the right error message - adapt
webapp/WEB-INF/jsp/selectStates.jsp
for updating and inserting the sensor description at the SOS
If only one of the sub modules should be build with maven, then go to the main folder of the whole project. With the attribute -pl a specific modul can be selected:
mvn clean package -pl smartsensoreditor-webapp
With the following command all dependencies of the module are build as well (details):
mvn clean package -pl smartsensoreditor-webapp -am
By default no integration tests are executed during the command "clean install". The integration test checks the communication between the SmartSensorEditor and the SOS. The following operations are checked:
get/insert/update/delete sensor description.
If you would like to execute them, then you need to create a build.properties file. You have to define the service url and the authorization token of the SOS. It should look like that:
IT_serviceURL:http://localhost:XX/XX/service
IT_authorizationToken:XXX
Please see the smartEditor developer documentation.
If you have further questions, contact Daniel: @nuest, d.nuest@52north.org
The software is released under the Apache License version 2. (http://www.apache.org/licenses/LICENSE-2.0)
For used libraries see the NOTICE
file.