Index: src/CMakeLists.txt
===================================================================
--- src/CMakeLists.txt	(revision 4b09d68494ca3be62fedf1006b53f3df1248aa54)
+++ src/CMakeLists.txt	(revision 16cceaa3078254d1ce5255c09bcc1498bedbd731)
@@ -20,16 +20,8 @@
 ######################
 
-IF(WITH_STATIONCLIENT)
-	FIND_PACKAGE(Qt5Core REQUIRED)
-	FIND_PACKAGE(Qt5Network REQUIRED)
-	FIND_PACKAGE(LibEngsas REQUIRED)
-	ADD_SUBDIRECTORY(lib)
-	ADD_SUBDIRECTORY(clientcommandline)
-	IF(BUILD_TESTING)
-		FIND_PACKAGE(Qt5Test REQUIRED)
-		ADD_SUBDIRECTORY(testing)
-		ADD_SUBDIRECTORY(tests)
-	ENDIF()
-ENDIF(WITH_STATIONCLIENT)
+IF(WITH_CLIENT)
+	FIND_PACKAGE(Qt4 REQUIRED)
+	ADD_SUBDIRECTORY(client)
+ENDIF(WITH_CLIENT)
 IF(WITH_WEBSERVICE)
 	ADD_SUBDIRECTORY(webservice)
Index: src/clientcommandline/CMakeLists.txt
===================================================================
--- src/clientcommandline/CMakeLists.txt	(revision 4b09d68494ca3be62fedf1006b53f3df1248aa54)
+++ 	(revision )
@@ -1,83 +1,0 @@
-######################
-#
-#    Copyright (C) 2015 EngSaS - Engineering Solutions and Services Langenbach. All rights reserved.
-#
-#    This library is free software; you can redistribute it and/or
-#    modify it under the terms of the GNU Lesser General Public
-#    License as published by the Free Software Foundation; either
-#    version 2.1 of the License, or (at your option) any later version.
-#
-#    This library is distributed in the hope that it will be useful,
-#    but WITHOUT ANY WARRANTY; without even the implied warranty of
-#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-#    Lesser General Public License for more details.
-#
-#    You should have received a copy of the GNU Lesser General Public
-#    License along with this library; if not, write to the Free Software
-#    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
-#    MA 02110-1301  USA.
-#
-######################
-
-INCLUDE_DIRECTORIES(
-  ${QT_INCLUDES}
-  ${CMAKE_CURRENT_BINARY_DIR}
-	${CMAKE_CURRENT_SOURCE_DIR}
-	${libsiweather_SOURCE_DIR}
-	${libsiweather_BINARY_DIR}
-	${LIBENGSAS_INCLUDE_DIR}
-)
-SET(LINK_LIBRARIES
-	${QT_LIBRARIES}
-	libsiweather
-	${LIBENGSAS_LIBRARIES}
-)
-
-SET(src_CPP
-	main.cpp
-	inputoutputhandler.cpp
-	stationsregister.cpp
-)
-
-CONFIGURE_FILE(siweatherclientconfig.h.in ${CMAKE_CURRENT_BINARY_DIR}/siweatherclientconfig.h)
-# needed to compile the icon into the exe file
-# the MINGW part is a workaround, since mingw can not handle the rc file
-# (msvc can handle it)
-# IF(WIN32)
-	# IF( MINGW )
-		# resource compilation for MinGW
-		# ADD_CUSTOM_COMMAND(
-			# OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/epartexeico.o
-			# COMMAND ${CMAKE_RC_COMPILER} -I${CMAKE_CURRENT_SOURCE_DIR} -i${CMAKE_CURRENT_SOURCE_DIR}/epartexe.rc
-			# -o ${CMAKE_CURRENT_BINARY_DIR}/epartexeico.o
-		# )
-		# SET(src_CPP ${src_CPP} ${CMAKE_CURRENT_BINARY_DIR}/epartexeico.o)
-	# ELSE( MINGW )
-		# SET(src_CPP ${src_CPP} epartexe.rc)
-	# ENDIF( MINGW )
-# ENDIF(WIN32)
-
-
-SET(neededStuff ${src_CPP})
-
-IF(UNIX)
- 	ADD_EXECUTABLE(siweatherstation ${neededStuff})
-ELSEIF(APPLE)
-	# it's with gui, so MACOSX_BUNDLE is needed
-	ADD_EXECUTABLE(siweatherstation ${neededStuff})
-ELSEIF(WIN32)
-  # it's with gui, so WIN32 is needed
-  ADD_EXECUTABLE(siweatherstation ${neededStuff})
-	SET_TARGET_PROPERTIES(siweatherstation PROPERTIES DEBUG_POSTFIX d)
-ENDIF()
-
-TARGET_LINK_LIBRARIES(siweatherstation ${LINK_LIBRARIES})
-
-qt5_use_modules(siweatherstation Core)
-
-# The COMPONENT option only defines the internal belonging of the INSTALL'ed thing
-INSTALL(
-  TARGETS siweatherstation
-  RUNTIME DESTINATION ${bin_DIR}
-  COMPONENT application
-)
Index: src/clientcommandline/inputoutputhandler.cpp
===================================================================
--- src/clientcommandline/inputoutputhandler.cpp	(revision 4b09d68494ca3be62fedf1006b53f3df1248aa54)
+++ 	(revision )
@@ -1,83 +1,0 @@
-/*
-    Copyright (C) 2015 EngSaS - Engineering Solutions and Services Langenbach. All rights reserved.
-
-    This library is free software; you can redistribute it and/or
-    modify it under the terms of the GNU Lesser General Public
-    License as published by the Free Software Foundation; either
-    version 2.1 of the License, or (at your option) any later version.
-
-    This library is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-    Lesser General Public License for more details.
-
-    You should have received a copy of the GNU Lesser General Public
-    License along with this library; if not, write to the Free Software
-    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
-    MA 02110-1301  USA.
-*/
-
-#include "inputoutputhandler.h"
-#include "moc_inputoutputhandler.cpp"
-
-#include <QTextStream>
-
-#include <iostream>
-#include <string>
-
-InputOutputHandler::InputOutputHandler(QObject* parent)
-	: QObject(parent)
-{
-	_out = new QTextStream(stdout);
-	_in = new QTextStream(stdin);
-}
-
-InputOutputHandler::~InputOutputHandler()
-{
-	if(_out)
-		delete _out;
-	if(_in)
-		delete _in;
-}
-
-QString InputOutputHandler::readLine()
-{
-	if(!_in)
-		return QString();
-	
-	QString line = _in->readLine();
-	return line.trimmed();
-}
-
-void InputOutputHandler::setFieldWidth(int columns)
-{
-	if(!_out)
-		return;
-	_out->setFieldWidth(columns);
-	_out->setFieldAlignment(QTextStream::AlignLeft);
-}
-
-bool InputOutputHandler::print(const QString& content)
-{
-	if(!_out)
-		return false;
-	*_out << content << flush;
-	return true;
-}
-
-InputOutputHandler& InputOutputHandler::operator<<(const QString& output)
-{
-	print(output);
-	return *this;
-}
-
-InputOutputHandler& InputOutputHandler::operator>>(QString& input)
-{
-	input = readLine();
-	return *this;
-}
-
-InputOutputHandler& endl(InputOutputHandler &handler)
-{
-	return handler << "\n";
-}
Index: src/clientcommandline/inputoutputhandler.h
===================================================================
--- src/clientcommandline/inputoutputhandler.h	(revision 4b09d68494ca3be62fedf1006b53f3df1248aa54)
+++ 	(revision )
@@ -1,56 +1,0 @@
-/*
-    Copyright (C) 2015 EngSaS - Engineering Solutions and Services Langenbach. All rights reserved.
-
-    This library is free software; you can redistribute it and/or
-    modify it under the terms of the GNU Lesser General Public
-    License as published by the Free Software Foundation; either
-    version 2.1 of the License, or (at your option) any later version.
-
-    This library is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-    Lesser General Public License for more details.
-
-    You should have received a copy of the GNU Lesser General Public
-    License along with this library; if not, write to the Free Software
-    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
-    MA 02110-1301  USA.
-*/
-
-#ifndef INPUTOUTPUTHANDLER_H
-#define INPUTOUTPUTHANDLER_H
-
-#include <QObject>
-
-class QTextStream;
-
-class InputOutputHandler : public QObject
-{
-	Q_OBJECT
-	public:
-		InputOutputHandler(QObject *parent = NULL);
-		~InputOutputHandler();
-
-		QString readLine();
-		void setFieldWidth(int columns);
-		
-		InputOutputHandler& operator<<(const QString &output);
-		InputOutputHandler& operator>>(QString &input);
-
-	public slots:
-			/**
-			 * @brief Prints @p content to STDOUT
-			 */
-		  bool print(const QString& content);
-
-	private:
-		QTextStream *_out, *_in;
-};
-
-typedef InputOutputHandler& (*InputOutputHandlerFunction)(InputOutputHandler&);// manipulator function
-inline InputOutputHandler& operator<<(InputOutputHandler &handler, InputOutputHandlerFunction function)
-{ return (*function)(handler); }
-
-InputOutputHandler& endl(InputOutputHandler &handler);
-
-#endif // INPUTOUTPUTHANDLER_H
Index: src/clientcommandline/main.cpp
===================================================================
--- src/clientcommandline/main.cpp	(revision 4b09d68494ca3be62fedf1006b53f3df1248aa54)
+++ 	(revision )
@@ -1,67 +1,0 @@
-/*
-    Copyright (C) 2015 EngSaS - Engineering Solutions and Services Langenbach. All rights reserved.
-
-    This library is free software; you can redistribute it and/or
-    modify it under the terms of the GNU Lesser General Public
-    License as published by the Free Software Foundation; either
-    version 2.1 of the License, or (at your option) any later version.
-
-    This library is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-    Lesser General Public License for more details.
-
-    You should have received a copy of the GNU Lesser General Public
-    License along with this library; if not, write to the Free Software
-    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
-    MA 02110-1301  USA.
-*/
-
-#include "siweatherclientconfig.h"
-
-#include "stationsregister.h"
-
-#include <ecmdlineargs.h>
-#include <ecmdlineoption.h>
-#include <elibrary.h>
-
-#include <QCoreApplication>
-#include <QTimer>
-#include <QTextStream>
-
-#include <iostream>
-
-int main ( int argc, char** argv )
-{
-	ECmdLineArgs *args = new ECmdLineArgs();
-	EngSaS::CmdLineOptions cmdLineOptions;
-	cmdLineOptions << new ECmdLineOption("[register]", "r", QObject::tr("Register new station"));
-
-	foreach(ECmdLineOption *option, cmdLineOptions)
-		args->add(option);
-
-	// if --help or --version is used, init returns false
-	// and outputs the help
-	if(!args->init(argc, argv))
-		return 1;
-
-	QCoreApplication app(argc, argv);
-	QString error;
-	ELibrary::setupApplication(QString("SiWeatherStation"), QString(VERSION), error);
-
-	if(args->isSet("register")){
-		StationsRegister *stationsRegister = new StationsRegister();
-		QTimer::singleShot(1, stationsRegister, SLOT(registerStation()));
-	}
-// 	else if(){
-// 		
-// 	}
-	else{
-		QTextStream stream(stdout);
-		stream << "Please specify an option" << endl;
-		return -2;
-	}
-
-	// allow to start the event loop before executing our code
-	return app.exec();
-}
Index: src/clientcommandline/siweatherclientconfig.h.in
===================================================================
--- src/clientcommandline/siweatherclientconfig.h.in	(revision 4b09d68494ca3be62fedf1006b53f3df1248aa54)
+++ 	(revision )
@@ -1,27 +1,0 @@
-/*
-    Copyright (C) 2015 EngSaS - Engineering Solutions and Services Langenbach. All rights reserved.
-
-    This library is free software; you can redistribute it and/or
-    modify it under the terms of the GNU Lesser General Public
-    License as published by the Free Software Foundation; either
-    version 2.1 of the License, or (at your option) any later version.
-
-    This library is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-    Lesser General Public License for more details.
-
-    You should have received a copy of the GNU Lesser General Public
-    License along with this library; if not, write to the Free Software
-    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
-    MA 02110-1301  USA.
-*/
-
-#ifndef SIWEATHERCLIENTCONFIG_H
-#define SIWEATHERCLIENTCONFIG_H
-
-#cmakedefine WEBSERVICE_BASE_URL "@WEBSERVICE_BASE_URL_COMPLETE@"
-#cmakedefine VERSION "@VERSION@"
-#cmakedefine WEBSERVICE_API_VERSION "@WEBSERVICE_API_VERSION@"
-
-#endif // SIWEATHERCLIENTCONFIG_H
Index: src/clientcommandline/stationsregister.cpp
===================================================================
--- src/clientcommandline/stationsregister.cpp	(revision 4b09d68494ca3be62fedf1006b53f3df1248aa54)
+++ 	(revision )
@@ -1,188 +1,0 @@
-/*
-    Copyright (C) 2015 EngSaS - Engineering Solutions and Services Langenbach. All rights reserved.
-
-    This library is free software; you can redistribute it and/or
-    modify it under the terms of the GNU Lesser General Public
-    License as published by the Free Software Foundation; either
-    version 2.1 of the License, or (at your option) any later version.
-
-    This library is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-    Lesser General Public License for more details.
-
-    You should have received a copy of the GNU Lesser General Public
-    License along with this library; if not, write to the Free Software
-    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
-    MA 02110-1301  USA.
-*/
-
-#include "stationsregister.h"
-#include "moc_stationsregister.cpp"
-
-#include "inputoutputhandler.h"
-#include "siweatherclientconfig.h"
-
-#include <siweatherstation.h>
-
-#include <QCoreApplication>
-
-using namespace SiWeather::Library;
-
-StationsRegister::StationsRegister(QObject* parent)
-	: QObject(parent)
-{
-	_ioHandler = new InputOutputHandler(this);
-}
-
-void StationsRegister::registerStation()
-{
-	registerStation(SiWeatherStation());
-}
-
-void StationsRegister::webserviceError(SiWeather::Library::SiWebserviceClient::ReplyType replyType, const QString& message)
-{
-	if(replyType != SiWebserviceClient::StationsRegister)
-		return;
-
-	*_ioHandler << "      "+ tr("FAILED") << endl;
-	*_ioHandler << "  "+ message << endl;
-	
-	QString result = getValue(tr("Do you want to change the station and try it again? (Y/n)"), "Y");
-	if(result != "Y"){
-		*_ioHandler << tr("Aborting!") << endl;
-		qApp->quit();
-		return;
-	}
-	registerStation(_lastStation);
-}
-
-void StationsRegister::webserviceFinished(bool result, const QUuid& stationUuid, const QString& message)
-{
-	if(!result){
-		*_ioHandler << "      "+ tr("FAILED") << endl;
-		*_ioHandler << "  "+ message << endl;
-		QString result = getValue(tr("Do you want to change the station and try it again? (Y/n)"), "Y");
-		if(result != "Y"){
-			*_ioHandler << tr("Aborting!") << endl;
-			qApp->quit();
-			return;
-		}
-		registerStation(_lastStation);
-		return;
-	}
-	
-	*_ioHandler << "      "+ tr("SUCCESS") << endl;
-	*_ioHandler << "  "+ tr("Registered station with uuid %1").arg(stationUuid.toString()) << endl;
-	*_ioHandler << "  "+ message << endl;
-	qApp->quit();
-}
-
-void StationsRegister::registerStation(SiWeatherStation station)
-{
-	if(!_ioHandler)
-		return;
-
-	QUrl baseUrl(QString(WEBSERVICE_BASE_URL));
-
-	*_ioHandler << tr("Please enter some data to describe your station") << endl;
-	
-	station.setName(getValue(tr("Name"), station.name()));
-	station.setCity(getValue(tr("City"), station.city()));
-	station.setLatitude(getCoordinate(tr("Latitude"), station.latitude()).toDouble());
-	station.setLongitude(getCoordinate(tr("Longitude"), station.longitude()).toDouble());
-	
-	station.setEMail(getValue(tr("Your E-Mail Address"), station.eMail()));
-	QString defaultType = "siweatherstation 1";
-	if(!station.type().isEmpty())
-		defaultType = station.type();
-	station.setType(getValue(tr("Type, describing your station"), defaultType));
-	station.setTypeUrl(getValue(tr("Url with information about your type (optional)"), station.typeUrl().toString()));
-	
-	*_ioHandler << tr("Your station is defined as follows:") << endl;
-	_ioHandler->setFieldWidth(20);
-	*_ioHandler << endl;
-	*_ioHandler << tr("Name:") << station.name() << endl;
-	*_ioHandler << tr("City:") << station.city() << endl;
-	*_ioHandler << tr("Latitude:") << coordinateToString(station.latitude()) << endl;
-	*_ioHandler << tr("Longitude:") << coordinateToString(station.longitude()) << endl;
-	*_ioHandler << tr("Type:") << station.type() << endl;
-	*_ioHandler << tr("Type Url:") << station.typeUrl().toString() << endl;
-	*_ioHandler << tr("E-Mail:") << station.eMail() << endl;
-	_ioHandler->setFieldWidth(0);
-	*_ioHandler << endl;
-
-	if(!station.isValidForRegister()){
-		*_ioHandler << tr("Your station is not valid for register at the webservice.") << endl;
-		*_ioHandler << tr("This means, the name, city, e-mail address or type is empty.") << endl;
-		QString result = getValue(tr("Do you want to change the station? (Y/n)"), "Y");
-		if(result != "Y"){
-			*_ioHandler << tr("Aborting!") << endl;
-			qApp->quit();
-			return;
-		}
-		registerStation(station);
-		return;
-	}
-	else{
-		QString result = getValue(tr("Do you want to register this station at %1? (Y/e/n)").arg(baseUrl.host()), "n");
-		if(result != "Y"){
-			if(result == "e"){
-				registerStation(station);
-				return;
-			}
-
-			*_ioHandler << tr("Aborting!") << endl;
-			qApp->quit();
-			return;
-		}
-		*_ioHandler << tr("Registering station...");
-		
-		SiWebserviceClient *client = new SiWebserviceClient(baseUrl, this);
-		connect(client, SIGNAL(error(SiWeather::Library::SiWebserviceClient::ReplyType, const QString&)),
-						this, SLOT(webserviceError(SiWeather::Library::SiWebserviceClient::ReplyType,QString)));
-		connect(client, SIGNAL(finishedStationsRegister(bool, const QUuid&, const QString&)),
-						this, SLOT(webserviceFinished(bool,QUuid,QString)));
-		QString errorMessage;
-		if(client->stationsRegister(station, errorMessage) != SiWebserviceClient::StationsRegister){
-			*_ioHandler << "      "+ tr("FAILED") << endl;
-			*_ioHandler << "  "+ errorMessage << endl;
-			qApp->quit();
-			return;
-		}
-		_lastStation = station;
-	}
-}
-
-QString StationsRegister::getValue(const QString& label, const QString& defaultValue)
-{
-	if(!_ioHandler)
-		return QString();
-
-	QString defaultValueLabel;
-	if(!defaultValue.isEmpty())
-		defaultValueLabel = QString(" [%1]").arg(defaultValue);
-	*_ioHandler << label + defaultValueLabel +": ";
-	QString value = _ioHandler->readLine();
-	if(value.isEmpty())
-		value = defaultValue;
-	return value;
-}
-
-QString StationsRegister::getCoordinate(const QString& type, double defaultValue)
-{
-	if(!_ioHandler)
-		return QString();
-
-	QString coordinate = getValue(tr("%1 (at least 4 digits, point as separator)").arg(type), coordinateToString(defaultValue));
-	if(coordinate.length() - coordinate.indexOf(".") < 5){
-		*_ioHandler << tr("Your %1 does not contain 4 digits. Try it again!").arg(type) << endl;
-		return getCoordinate(type, defaultValue);
-	}
-	return coordinate;
-}
-
-QString StationsRegister::coordinateToString(double coordinate) const
-{
-	return QString::number(coordinate, 'f', 4);
-}
Index: src/clientcommandline/stationsregister.h
===================================================================
--- src/clientcommandline/stationsregister.h	(revision 4b09d68494ca3be62fedf1006b53f3df1248aa54)
+++ 	(revision )
@@ -1,53 +1,0 @@
-/*
-    Copyright (C) 2015 EngSaS - Engineering Solutions and Services Langenbach. All rights reserved.
-
-    This library is free software; you can redistribute it and/or
-    modify it under the terms of the GNU Lesser General Public
-    License as published by the Free Software Foundation; either
-    version 2.1 of the License, or (at your option) any later version.
-
-    This library is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-    Lesser General Public License for more details.
-
-    You should have received a copy of the GNU Lesser General Public
-    License along with this library; if not, write to the Free Software
-    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
-    MA 02110-1301  USA.
-*/
-
-#ifndef STATIONSREGISTER_H
-#define STATIONSREGISTER_H
-
-class InputOutputHandler;
-
-#include <siwebserviceclient.h>
-#include <siweatherstation.h>
-
-#include <QPointer>
-
-class StationsRegister : public QObject
-{
-	Q_OBJECT
-	public:
-		StationsRegister(QObject *parent = NULL);
-
-	public slots:
-		void registerStation();
-
-	private slots:
-		void webserviceError(SiWeather::Library::SiWebserviceClient::ReplyType replyType, const QString &message);
-		void webserviceFinished(bool result, const QUuid &stationUuid, const QString &message);
-		
-	private:
-		void registerStation(SiWeather::Library::SiWeatherStation station);
-		QString getValue(const QString &label, const QString &defaultValue = QString());
-		QString getCoordinate(const QString &type, double defaultValue);
-		QString coordinateToString(double coordinate) const;
-		
-		QPointer<InputOutputHandler> _ioHandler;
-		SiWeather::Library::SiWeatherStation _lastStation;
-};
-
-#endif //STATIONSREGISTER_H
Index: src/lib/CMakeLists.txt
===================================================================
--- src/lib/CMakeLists.txt	(revision 4b09d68494ca3be62fedf1006b53f3df1248aa54)
+++ 	(revision )
@@ -1,227 +1,0 @@
-######################
-#
-#    Copyright (C) 2015 EngSaS - Engineering Solutions and Services Langenbach. All rights reserved.
-#
-#    This library is free software; you can redistribute it and/or
-#    modify it under the terms of the GNU Lesser General Public
-#    License as published by the Free Software Foundation; either
-#    version 2.1 of the License, or (at your option) any later version.
-#
-#    This library is distributed in the hope that it will be useful,
-#    but WITHOUT ANY WARRANTY; without even the implied warranty of
-#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-#    Lesser General Public License for more details.
-#
-#    You should have received a copy of the GNU Lesser General Public
-#    License along with this library; if not, write to the Free Software
-#    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
-#    MA 02110-1301  USA.
-#
-######################
-
-# IF(L10N_DE)
-# 	SET(files_TS ${files_TS} lang/siweather-lib_de.ts)
-# ENDIF(L10N_DE)
-# IF(L10N_EN)
-# 	SET(files_TS ${files_TS} lang/siweather-lib_en.ts)
-# ENDIF(L10N_EN)
-# IF(L10N_FR)
-# 	SET(files_TS ${files_TS} lang/siweather-lib_fr.ts)
-# ENDIF(L10N_FR)
-
-SET(files_UI
-)
-
-SET(files_CPP
-	silibrary.cpp
-	siweatherstation.cpp
-	siwebserviceclient.cpp
-)
-
-INCLUDE_DIRECTORIES(
-	${CMAKE_CURRENT_BINARY_DIR}
-	${CMAKE_CURRENT_SOURCE_DIR}
-# 	${CMAKE_CURRENT_BINARY_DIR}/internal
-# 	${CMAKE_CURRENT_SOURCE_DIR}/internal
-)
-ADD_DEFINITIONS(-DSI_BUILD_LIB)
-SET(LINK_LIBRARIES ${QT_LIBRARIES})
-SET(LIBOUTDIR ${LIBRARY_OUTPUT_PATH})
-SET(SHAREDIR ${share_DIR})
-CONFIGURE_FILE(
-	${CMAKE_CURRENT_SOURCE_DIR}/silibconfig.h.in
-	${CMAKE_CURRENT_BINARY_DIR}/silibconfig.h
-)
-CONFIGURE_FILE(
-	${CMAKE_CURRENT_SOURCE_DIR}/silibrary.h.in
-	${CMAKE_CURRENT_BINARY_DIR}/silibrary.h
-)
-
-# 	QT5_WRAP_UI(libengsas_UI_H ${libengsas_UI})
-# 	QT5_ADD_TRANSLATION(libengsas_TRANS ${libengsas_TS})
-
-ADD_LIBRARY(libsiweather SHARED
-	${files_CPP}
-# 	${files_UI_H}
-# 	${files_TRANS}
-)
-
-TARGET_LINK_LIBRARIES(libsiweather
-  ${LINK_LIBRARIES}
-)
-
-qt5_use_modules(libsiweather Core Network)
-
-SET_TARGET_PROPERTIES(libsiweather PROPERTIES
-	OUTPUT_NAME "siweather"
-	VERSION ${TARGET_VERSION_MAJOR}.${TARGET_VERSION_MINOR}.${${PROJECT_NAME}_PATCH_LEVEL}
-	SOVERSION ${TARGET_VERSION_MAJOR})
-IF(WIN32)
-	# this extra install command is needed by the nsis installer
-	INSTALL(TARGETS libsiweather 
-		RUNTIME DESTINATION ${LIB_INSTALL_DIR} 
-		COMPONENT library 
-	)
-	IF(MSVC)
-		INSTALL(FILES ${LIBRARY_OUTPUT_PATH}/siweather.lib DESTINATION ${LIB_INSTALL_DIR} COMPONENT library)
-	ENDIF(MSVC)
-ELSE(WIN32)
-	INSTALL(TARGETS libsiweather
-		ARCHIVE DESTINATION ${LIB_INSTALL_DIR}
-		LIBRARY DESTINATION ${LIB_INSTALL_DIR}
-		COMPONENT library
-	)
-ENDIF(WIN32)
-
-# INSTALL(
-#   FILES ${files_TRANS}
-#   DESTINATION ${qm_DIR}
-#   COMPONENT library
-# )
-
-# SET(LIBENGSAS_VERSION ${${PROJECT_NAME}_VERSION})
-# SET(QTVERSION "${QT_VERSION_MAJOR}.${QT_VERSION_MINOR}.${QT_VERSION_PATCH}")
-# SET(depends_XML ${CMAKE_BINARY_DIR}/depends/libengsas-core.xml)
-# CONFIGURE_FILE(libengsas-core.xml.in ${depends_XML})
-# INSTALL(
-# 	FILES ${depends_XML}
-# 	DESTINATION ${depends_DIR}
-# 	COMPONENT library
-# )
-
-IF(PACK_WIN32_STUFF)
-	# Qt translation files
-	# en has no translation files
-	IF(L10N_DE)
-		FILE(GLOB pack_qt_translations_de "${QT_BINARY_DIR}/../translations/*_de.qm")
-		INSTALL(
-			FILES ${pack_qt_translations_de}
-			DESTINATION ${qm_DIR}
-			COMPONENT library
-		)
-	ENDIF(L10N_DE)
-	IF(L10N_FR)
-		FILE(GLOB pack_qt_translations_fr "${QT_BINARY_DIR}/../translations/*_fr.qm")
-		INSTALL(
-			FILES ${pack_qt_translations_fr}
-			DESTINATION ${qm_DIR}
-			COMPONENT library
-		)
-	ENDIF(L10N_FR)
-
-	# Qt itself
-	FIND_FILE(pack_qtcore QtCore4.dll HINTS ${PACK_HINTS} NO_DEFAULT_PATH)
-	FIND_FILE(pack_qtnetwork QtNetwork4.dll HINTS ${PACK_HINTS} NO_DEFAULT_PATH)
-	
-	IF(NOT MSVC AND NOT CMAKE_CROSSCOMPILING)
-		FIND_FILE(pack_mingwm10 mingwm10.dll HINTS ${PACK_HINTS} NO_DEFAULT_PATH)
-		FIND_FILE(pack_libgcc_s_dw libgcc_s_dw2-1.dll HINTS ${PACK_HINTS} NO_DEFAULT_PATH)
-		SET(pack_extra_libraries
-			${pack_mingwm10}
-			${pack_libgcc_s_dw}
-		)
-	ELSEIF(CMAKE_CROSSCOMPILING)
-		FIND_FILE(pack_libstdcpp libstdc++-6.dll HINTS ${PACK_HINTS} NO_DEFAULT_PATH)
-		FIND_FILE(pack_libpng libpng16-16.dll HINTS ${PACK_HINTS} NO_DEFAULT_PATH)
-		SET(pack_extra_libraries
-			${pack_libstdcpp}
-			${pack_libpng}
-		)
-	ENDIF()
-	
-	INSTALL(
-		FILES 
-			${pack_qtcore}
-			${pack_qtnetwork}
-			${pack_extra_libraries}
-		DESTINATION ${bin_DIR}
-		COMPONENT qtlibs
-	)
-ENDIF()
-	
-IF(BUILD_DEV)
-	FILE(GLOB header "${CMAKE_CURRENT_SOURCE_DIR}/*.h")
-	INSTALL(
-		FILES ${header} "${CMAKE_CURRENT_BINARY_DIR}/siversion.h"
-		DESTINATION ${include_DIR}/core
-		COMPONENT headerfiles
-	)
-
-	# Install FindLibEngsas.cmake
-# 	SET(LIBENGSAS_LIBRARY_DIR 						"\${LIBENGSAS_LIBRARY_DIR}")
-# 	SET(PC_LIBENGSAS_CFLAGS_OTHER 				"\${PC_LIBENGSAS_CFLAGS_OTHER}")
-# 	SET(PC_LIBENGSAS_LIBDIR 							"\${PC_LIBENGSAS_LIBDIR}")
-# 	SET(PC_LIBENGSAS_LIBRARY_DIRS					"\${PC_LIBENGSAS_LIBRARY_DIRS}")
-# 	SET(PC_LIBENGSAS_INCLUDEDIR						"\${PC_LIBENGSAS_INCLUDEDIR}")
-# 	SET(PC_LIBENGSAS_INCLUDE_DIRS					"\${PC_LIBENGSAS_INCLUDE_DIRS}")
-# 	SET(LIBENGSAS_TESTING_LIBRARY_DIR 		"\${LIBENGSAS_TESTING_LIBRARY_DIR}")
-# 	SET(PC_LIBENGSAS_TESTING_CFLAGS_OTHER "\${PC_LIBENGSAS_CFLAGS_OTHER}")
-# 	SET(PC_LIBENGSAS_TESTING_LIBDIR 			"\${PC_LIBENGSAS_LIBDIR}")
-# 	SET(PC_LIBENGSAS_TESTING_LIBRARY_DIRS	"\${PC_LIBENGSAS_LIBRARY_DIRS}")
-# 	SET(PC_LIBENGSAS_TESTING_INCLUDEDIR		"\${PC_LIBENGSAS_INCLUDEDIR}")
-# 	SET(PC_LIBENGSAS_TESTING_INCLUDE_DIRS	"\${PC_LIBENGSAS_INCLUDE_DIRS}")
-# 	SET(LIBENGSAS_CHARTS_LIBRARY_DIR 			"\${LIBENGSAS_CHARTS_LIBRARY_DIR}")
-# 	SET(PC_LIBENGSAS_CHARTS_LIBDIR				"\${PC_LIBENGSAS_CHARTS_LIBDIR}")
-# 	SET(PC_LIBENGSAS_CHARTS_LIBRARY_DIRS 	"\${PC_LIBENGSAS_LIBRARY_DIRS}")
-# 	SET(PC_LIBENGSAS_CHARTS_INCLUDEDIR		"\${PC_LIBENGSAS_INCLUDEDIR}")
-# 	SET(PC_LIBENGSAS_CHARTS_INCLUDE_DIRS	"\${PC_LIBENGSAS_INCLUDE_DIRS}")
-# 	SET(LIBENGSAS_GRAPHS_LIBRARY_DIR 			"\${LIBENGSAS_GRAPHS_LIBRARY_DIR}")
-# 	SET(PC_LIBENGSAS_GRAPHS_LIBDIR				"\${PC_LIBENGSAS_GRAPHS_LIBDIR}")
-# 	SET(PC_LIBENGSAS_GRAPHS_LIBRARY_DIRS 	"\${PC_LIBENGSAS_LIBRARY_DIRS}")
-# 	SET(PC_LIBENGSAS_GRAPHS_INCLUDEDIR		"\${PC_LIBENGSAS_INCLUDEDIR}")
-# 	SET(PC_LIBENGSAS_GRAPHS_INCLUDE_DIRS	"\${PC_LIBENGSAS_INCLUDE_DIRS}")
-# 	SET(LIBENGSAS_PATCH_LEVEL ${${PROJECT_NAME}_PATCH_LEVEL})
-# 	CONFIGURE_FILE(
-# 		${CMAKE_CURRENT_SOURCE_DIR}/FindLibEngsas.cmake.in
-# 		${CMAKE_CURRENT_BINARY_DIR}/FindLibEngsas.cmake
-# 	)
-# 	INSTALL(
-# 		FILES ${CMAKE_CURRENT_BINARY_DIR}/FindLibEngsas.cmake
-# 		DESTINATION ${find_cmake_DIR}
-# 		COMPONENT devfinding
-# 	)
-
-# 	# CMake overrides ${var} during configuration, therefore we insert it with cmake
-# 	SET(prefix ${CMAKE_INSTALL_PREFIX})
-# 	SET(exec_prefix "\${prefix}")
-# 	SET(libdir "\${exec_prefix}/lib")
-# 	SET(includedir "\${prefix}/include/engsas")
-# 	SET(lib_flag "\${libdir}")
-# 	SET(include_flag "\${includedir}")
-# 	SET(LIBNAME engsas)
-# 	SET(REQUIRES "QtCore >= 4, QtGui >= 4, QtXml >= 4, QtXmlPatterns >= 4")
-# # KDE has no pkgconfig .pc file
-# # 	IF(BINDINGS_KDE)
-# # 		SET(REQUIRES "${REQUIRES}, KDELibs >= 4")
-# # 	ENDIF(BINDINGS_KDE)
-# 	CONFIGURE_FILE(
-# 		${CMAKE_CURRENT_SOURCE_DIR}/libengsas.pc.in
-# 		${CMAKE_CURRENT_BINARY_DIR}/libengsas.pc
-# 	)
-# 	# Install pkgconfig file
-# 	INSTALL(
-# 		FILES ${CMAKE_CURRENT_BINARY_DIR}/libengsas.pc
-# 		DESTINATION ${pkgconfig_DIR}
-# 		COMPONENT devfinding
-# 	)
-ENDIF(BUILD_DEV)
Index: src/lib/siglobal.h
===================================================================
--- src/lib/siglobal.h	(revision 4b09d68494ca3be62fedf1006b53f3df1248aa54)
+++ 	(revision )
@@ -1,35 +1,0 @@
-/*
-    Copyright (C) 2015 EngSaS - Engineering Solutions and Services Langenbach. All rights reserved.
-
-    This library is free software; you can redistribute it and/or
-    modify it under the terms of the GNU Lesser General Public
-    License as published by the Free Software Foundation; either
-    version 2.1 of the License, or (at your option) any later version.
-
-    This library is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-    Lesser General Public License for more details.
-
-    You should have received a copy of the GNU Lesser General Public
-    License along with this library; if not, write to the Free Software
-    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
-    MA 02110-1301  USA.
-*/
-
-/**
-	* @mainpage SiWeatherLibrary
-	*
-	* @author Joachim Langenbach
-	* 
-  */
-#ifndef SIGLOBAL_H
-#define SIGLOBAL_H
-
-#ifdef SI_BUILD_LIB
-	#define SI_LIB_EXPORT Q_DECL_EXPORT
-#else
-  #define SI_LIB_EXPORT Q_DECL_IMPORT
-#endif
-
-#endif // SIGLOBAL_H
Index: src/lib/silibconfig.h.in
===================================================================
--- src/lib/silibconfig.h.in	(revision 4b09d68494ca3be62fedf1006b53f3df1248aa54)
+++ 	(revision )
@@ -1,29 +1,0 @@
-/*
-    Copyright (C) 2015 EngSaS - Engineering Solutions and Services Langenbach. All rights reserved.
-
-    This library is free software; you can redistribute it and/or
-    modify it under the terms of the GNU Lesser General Public
-    License as published by the Free Software Foundation; either
-    version 2.1 of the License, or (at your option) any later version.
-
-    This library is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-    Lesser General Public License for more details.
-
-    You should have received a copy of the GNU Lesser General Public
-    License along with this library; if not, write to the Free Software
-    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
-    MA 02110-1301  USA.
-*/
-
-#ifndef SILIBCONFIG_H
-#define SILIBCONFIG_H
-
-#cmakedefine SI_SENSOR_PLUGIN_DIR "@SI_SENSOR_PLUGIN_DIR@"
-#cmakedefine SHAREDIR "@SHAREDIR@"
-
-#cmakedefine VERSION "@VERSION@"
-#cmakedefine WEBSERVICE_API_VERSION "@WEBSERVICE_API_VERSION@"
-
-#endif // SILIBCONFIG_H
Index: src/lib/silibrary.cpp
===================================================================
--- src/lib/silibrary.cpp	(revision 4b09d68494ca3be62fedf1006b53f3df1248aa54)
+++ 	(revision )
@@ -1,34 +1,0 @@
-/*
-    Copyright (C) 2015 EngSaS - Engineering Solutions and Services Langenbach. All rights reserved.
-
-    This library is free software; you can redistribute it and/or
-    modify it under the terms of the GNU Lesser General Public
-    License as published by the Free Software Foundation; either
-    version 2.1 of the License, or (at your option) any later version.
-
-    This library is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-    Lesser General Public License for more details.
-
-    You should have received a copy of the GNU Lesser General Public
-    License along with this library; if not, write to the Free Software
-    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
-    MA 02110-1301  USA.
-*/
-
-
-#include "silibrary.h"
-
-#include "silibconfig.h"
-
-using namespace SiWeather::Library;
-
-QString Library::version()
-{
-	return QString( VERSION );
-}
-
-QString Library::geoCoordinateToString(double coordinate){
-	return QString::number(coordinate, 'f', 6);
-}
Index: src/lib/silibrary.h.in
===================================================================
--- src/lib/silibrary.h.in	(revision 4b09d68494ca3be62fedf1006b53f3df1248aa54)
+++ 	(revision )
@@ -1,50 +1,0 @@
-/*
-    Copyright (C) 2015 EngSaS - Engineering Solutions and Services Langenbach. All rights reserved.
-
-    This library is free software; you can redistribute it and/or
-    modify it under the terms of the GNU Lesser General Public
-    License as published by the Free Software Foundation; either
-    version 2.1 of the License, or (at your option) any later version.
-
-    This library is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-    Lesser General Public License for more details.
-
-    You should have received a copy of the GNU Lesser General Public
-    License along with this library; if not, write to the Free Software
-    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
-    MA 02110-1301  USA.
-*/
-
-
-#ifndef SILIBRARY_H
-#define SILIBRARY_H
-
-/**
- * @file silibrary.h
- * @brief The file contains macros and functions related to the siweather library.
- */
-
-#include <siglobal.h>
-
-#include <QString>
-
-/**
-	* @brief Macro contains SiWeather library version at compile time.
-	* 
-	* For SiWeather version at runtime, use SiWeather::Library::Library::version().
-	*/
-#define SIWEATHER_VERSION_STRING "@VERSION@"
-
-namespace SiWeather {
-	namespace Library {
-		class SI_LIB_EXPORT Library {
-			public:
-			 static QString version();
-			 static QString geoCoordinateToString(double coordinate);
-		};
-	};
-};
-
-#endif // SIVERSION_H
Index: src/lib/siweatherstation.cpp
===================================================================
--- src/lib/siweatherstation.cpp	(revision 4b09d68494ca3be62fedf1006b53f3df1248aa54)
+++ 	(revision )
@@ -1,134 +1,0 @@
-/*
-    Copyright (C) 2015 EngSaS - Engineering Solutions and Services Langenbach. All rights reserved.
-
-    This library is free software; you can redistribute it and/or
-    modify it under the terms of the GNU Lesser General Public
-    License as published by the Free Software Foundation; either
-    version 2.1 of the License, or (at your option) any later version.
-
-    This library is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-    Lesser General Public License for more details.
-
-    You should have received a copy of the GNU Lesser General Public
-    License along with this library; if not, write to the Free Software
-    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
-    MA 02110-1301  USA.
-*/
-
-#include "siweatherstation.h"
-
-using namespace SiWeather::Library;
-
-SiWeatherStation::SiWeatherStation()
-{
-	init();
-}
-
-SiWeatherStation::SiWeatherStation(const QString &uuid, const QString &name)
-{
-	init();
-	setUuid(uuid);
-	setName(name);
-}
-
-void SiWeatherStation::setUuid(const QString &uuid)
-{
-	_uuid = QUuid(uuid);
-}
-
-QUuid SiWeatherStation::uuid() const
-{
-	return _uuid;
-}
-
-void SiWeatherStation::setName(const QString &name)
-{
-	_name = name;
-}
-
-QString SiWeatherStation::name() const
-{
-	return _name;
-}
-
-void SiWeatherStation::setCity(const QString &city)
-{
-	_city = city;
-}
-
-QString SiWeatherStation::city() const
-{
-	return _city;
-}
-
-void SiWeatherStation::setLongitude(double longitude)
-{
-	_longitude = longitude;
-}
-
-double SiWeatherStation::longitude() const
-{
-	return _longitude;
-}
-
-void SiWeatherStation::setLatitude(double latitude)
-{
-	_latitude = latitude;
-}
-
-double SiWeatherStation::latitude() const
-{
-	return _latitude;
-}
-
-void SiWeatherStation::setType(const QString &type)
-{
-	_type = type;
-}
-
-QString SiWeatherStation::type() const
-{
-	return _type;
-}
-
-void SiWeatherStation::setTypeUrl(const QString &typeUrl)
-{
-	_typeUrl = QUrl(typeUrl);
-}
-
-QUrl SiWeatherStation::typeUrl() const
-{
-	return _typeUrl;
-}
-
-void SiWeatherStation::setEMail(const QString &address)
-{
-	_eMail = address;
-}
-
-QString SiWeatherStation::eMail() const
-{
-	return _eMail;
-}
-
-
-bool SiWeatherStation::isValidForRegister() const
-{
-	if(_name.isEmpty())
-		return false;
-	if(_city.isEmpty())
-		return false;
-	if(_eMail.isEmpty())
-		return false;
-	if(_type.isEmpty())
-		return false;
-	return true;
-}
-
-void SiWeatherStation::init()
-{
-	_longitude = 0;
-	_latitude = 0;
-}
Index: src/lib/siweatherstation.h
===================================================================
--- src/lib/siweatherstation.h	(revision 4b09d68494ca3be62fedf1006b53f3df1248aa54)
+++ 	(revision )
@@ -1,68 +1,0 @@
-/*
-    Copyright (C) 2015 EngSaS - Engineering Solutions and Services Langenbach. All rights reserved.
-
-    This library is free software; you can redistribute it and/or
-    modify it under the terms of the GNU Lesser General Public
-    License as published by the Free Software Foundation; either
-    version 2.1 of the License, or (at your option) any later version.
-
-    This library is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-    Lesser General Public License for more details.
-
-    You should have received a copy of the GNU Lesser General Public
-    License along with this library; if not, write to the Free Software
-    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
-    MA 02110-1301  USA.
-*/
-
-#ifndef SIWEATHERSTATION_H
-#define SIWEATHERSTATION_H
-
-#include <siglobal.h>
-
-#include <QString>
-#include <QUuid>
-#include <QUrl>
-
-namespace SiWeather {
-	namespace Library {
-		class SI_LIB_EXPORT SiWeatherStation
-		{
-			public:
-				SiWeatherStation();
-				SiWeatherStation(const QString &uuid, const QString &name);
-				
-				void setUuid(const QString &uuid);
-				QUuid uuid() const;
-				void setName(const QString &name);
-				QString name() const;
-				void setCity(const QString &city);
-				QString city() const;
-				void setLongitude(double longitude);
-				double longitude() const;
-				void setLatitude(double latitude);
-				double latitude() const;
-				void setType(const QString &type);
-				QString type() const;
-				void setTypeUrl(const QString &typeUrl);
-				QUrl typeUrl() const;
-				void setEMail(const QString &address);
-				QString eMail() const;
-				
-				bool isValidForRegister() const;
-
-			private:
-				void init();
-				
-				QUuid _uuid;
-				QString _name, _city;
-				QString _type, _eMail;
-				double _longitude, _latitude;
-				QUrl _typeUrl;
-		};
-	};
-};
-
-#endif // SIWEATHERSTATION_H
Index: src/lib/siwebserviceclient.cpp
===================================================================
--- src/lib/siwebserviceclient.cpp	(revision 4b09d68494ca3be62fedf1006b53f3df1248aa54)
+++ 	(revision )
@@ -1,135 +1,0 @@
-/*
-    Copyright (C) 2015 EngSaS - Engineering Solutions and Services Langenbach. All rights reserved.
-
-    This library is free software; you can redistribute it and/or
-    modify it under the terms of the GNU Lesser General Public
-    License as published by the Free Software Foundation; either
-    version 2.1 of the License, or (at your option) any later version.
-
-    This library is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-    Lesser General Public License for more details.
-
-    You should have received a copy of the GNU Lesser General Public
-    License along with this library; if not, write to the Free Software
-    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
-    MA 02110-1301  USA.
-*/
-
-#include "siwebserviceclient.h"
-#include "moc_siwebserviceclient.cpp"
-
-#include "silibconfig.h"
-#include "silibrary.h"
-#include "siweatherstation.h"
-
-#include <QNetworkAccessManager>
-#include <QNetworkRequest>
-#include <QNetworkReply>
-#include <QJsonObject>
-#include <QJsonDocument>
-
-using namespace SiWeather::Library;
-
-SiWebserviceClient::SiWebserviceClient(QUrl baseUrl, QObject* parent)
-	: QObject(parent)
-{
-	_baseUrl = baseUrl;
-	_networkManager = new QNetworkAccessManager(this);
-}
-
-QString SiWebserviceClient::apiVersion()
-{
-	return QString(WEBSERVICE_API_VERSION);
-}
-
-SiWebserviceClient::ReplyType SiWebserviceClient::stationsRegister(const SiWeatherStation &station, QString &error)
-{
-	if(!_networkManager)
-		return Error;
-
-	if(station.name().isEmpty() || station.city().isEmpty() || station.eMail().isEmpty() || station.type().isEmpty()){
-		error = tr("Station has empty name, city or eMail address. All of these are needed!");
-		return Error;
-	}
-	
-	QJsonObject jsonStation;
-	jsonStation["name"] = station.name();
-	jsonStation["city"] = station.city();
-	jsonStation["longitude"] = Library::geoCoordinateToString(station.longitude());
-	jsonStation["latitude"] = Library::geoCoordinateToString(station.latitude());
-	jsonStation["email"] = station.eMail();
-	jsonStation["type"] = station.type();
-	jsonStation["typeUrl"] = station.typeUrl().toString();
-	QJsonDocument jsonDocument(jsonStation);
-
-	QNetworkRequest request;
-	request.setUrl(QString("%1%2").arg(appendSlashToUrl(_baseUrl.toString())).arg("index.php/stations/register"));
-	request.setRawHeader("User-Agent", QString("SiWeather Library %1").arg(Library::version()).toUtf8());
-	request.setHeader(QNetworkRequest::ContentTypeHeader, 
-    "application/json");
-	QNetworkReply *reply = _networkManager->post(request, jsonDocument.toJson(QJsonDocument::Indented));
-	connect(reply, SIGNAL(finished()),
-					this, SLOT(replyStationsRegister()));
-	return StationsRegister;
-}
-
-void SiWebserviceClient::replyStationsRegister()
-{
-	QNetworkReply *reply = getNetworkReply(sender(), StationsRegister);
-	if(!reply)
-		return;
-	
-	QByteArray data = reply->readAll();
-	reply->deleteLater();
-
-	QJsonDocument jsonDocument = QJsonDocument::fromJson(data);
-	QJsonObject json = jsonDocument.object();
-	if(!json.contains("result")){
-		emit finishedStationsRegister(false, "", tr("No result in response found"));
-		emit finished(StationsRegister, false, data);
-		return;
-	}
-	if(json["result"].toString() != "success"){
-		emit finishedStationsRegister(false, "", tr("Operation failed for reason: %1").arg(json["message"].toString()));
-		emit finished(StationsRegister, false, data);
-		return;
-	}
-	if(!json.contains("uuid")){
-		emit finishedStationsRegister(false, "", tr("No uuid in response found"));
-		emit finished(StationsRegister, false, data);
-		return;
-	}
-
-	emit finishedStationsRegister(true, QUuid(json["uuid"].toString()), json["message"].toString());
-	emit finished(StationsRegister, false, data);
-}
-
-QNetworkReply* SiWebserviceClient::getNetworkReply(QObject* sender, ReplyType type) const
-{
-	if(!sender){
-		emit error(Error, tr("No sender object found"));
-		return NULL;
-	}
-	QNetworkReply *reply = qobject_cast<QNetworkReply*>(sender);
-	if(!reply){
-		emit error(Error, tr("No reply found"));
-		return NULL;
-	}
-
-	if(reply->error() != QNetworkReply::NoError){
-		emit error(type, reply->errorString());
-		reply->deleteLater();
-		return NULL;
-	}
-
-	return reply;
-}
-
-QString SiWebserviceClient::appendSlashToUrl(QString url)
-{
-	if(url.right(1) != "/")
-		url += "/";
-	return url;
-}
Index: src/lib/siwebserviceclient.h
===================================================================
--- src/lib/siwebserviceclient.h	(revision 4b09d68494ca3be62fedf1006b53f3df1248aa54)
+++ 	(revision )
@@ -1,77 +1,0 @@
-/*
-    Copyright (C) 2015 EngSaS - Engineering Solutions and Services Langenbach. All rights reserved.
-
-    This library is free software; you can redistribute it and/or
-    modify it under the terms of the GNU Lesser General Public
-    License as published by the Free Software Foundation; either
-    version 2.1 of the License, or (at your option) any later version.
-
-    This library is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-    Lesser General Public License for more details.
-
-    You should have received a copy of the GNU Lesser General Public
-    License along with this library; if not, write to the Free Software
-    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
-    MA 02110-1301  USA.
-*/
-
-#ifndef SIWEBSERVICECLIENT_H
-#define SIWEBSERVICECLIENT_H
-
-#include <siglobal.h>
-#include <QObject>
-
-class QNetworkAccessManager;
-class QNetworkReply;
-
-#include <QPointer>
-#include <QUrl>
-
-namespace SiWeather {
-	namespace Library {
-
-		class SiWeatherStation;
-
-		class SI_LIB_EXPORT SiWebserviceClient : public QObject
-		{
-			Q_OBJECT
-			public:
-				enum ReplyType{ Error = 1, StationsRegister = 2 };
-
-				SiWebserviceClient(QUrl baseUrl, QObject *parent = NULL);
-				
-				static QString apiVersion();
-				
-				/**
-				 * @brief Registers a station at the server and emits error() or finishedStationsRegister() if finished.
-				 */
-				ReplyType stationsRegister(const SiWeather::Library::SiWeatherStation& station, QString& error);
-
-			signals:
-				void error(SiWeather::Library::SiWebserviceClient::ReplyType replyType, const QString &errorMessage) const;
-				/**
-				 * @brief Generic finish signal for all requests. Use specialized finished signals instead!
-				 *
-				 * @see finishedStationsRegister
-				 */
-				void finished(SiWeather::Library::SiWebserviceClient::ReplyType replyType, bool result, const QByteArray &data) const;
-				void finishedStationsRegister(bool result, const QUuid &uuid, const QString &message) const;
-				
-
-			private slots:
-				void replyStationsRegister();
-
-			private:
-				static QString appendSlashToUrl(QString url);
-
-				QNetworkReply* getNetworkReply(QObject *sender, ReplyType type) const;
-				QUrl _baseUrl;
-				QPointer<QNetworkAccessManager> _networkManager;
-		};
-	};
-};
-Q_DECLARE_METATYPE(SiWeather::Library::SiWebserviceClient::ReplyType)
-
-#endif //SIWEBSERVICECLIENT_H
Index: src/testing/CMakeLists.txt
===================================================================
--- src/testing/CMakeLists.txt	(revision 4b09d68494ca3be62fedf1006b53f3df1248aa54)
+++ 	(revision )
@@ -1,77 +1,0 @@
-######################
-#
-#    Copyright (C) 2015 EngSaS - Engineering Solutions and Services Langenbach. All rights reserved.
-#
-#    This library is free software; you can redistribute it and/or
-#    modify it under the terms of the GNU Lesser General Public
-#    License as published by the Free Software Foundation; either
-#    version 2.1 of the License, or (at your option) any later version.
-#
-#    This library is distributed in the hope that it will be useful,
-#    but WITHOUT ANY WARRANTY; without even the implied warranty of
-#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-#    Lesser General Public License for more details.
-#
-#    You should have received a copy of the GNU Lesser General Public
-#    License along with this library; if not, write to the Free Software
-#    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
-#    MA 02110-1301  USA.
-#
-######################
-
-SET(files_UI
-)
-
-SET(files_CPP
-	webserverprocess.cpp
-)
-
-INCLUDE_DIRECTORIES(
-	${CMAKE_CURRENT_BINARY_DIR}
-	${CMAKE_CURRENT_SOURCE_DIR}
-)
-ADD_DEFINITIONS(-DSI_BUILD_TESTING)
-SET(LINK_LIBRARIES ${QT_LIBRARIES})
-SET(LIBOUTDIR ${LIBRARY_OUTPUT_PATH})
-SET(SHAREDIR ${share_DIR})
-SET(WEBSERVICE_SERVER_DOCROOT ${WEB_OUTPUT_DIRECTORY})
-CONFIGURE_FILE(
-	${CMAKE_CURRENT_SOURCE_DIR}/sitestingconfig.h.in
-	${CMAKE_CURRENT_BINARY_DIR}/sitestingconfig.h
-)
-
-# 	QT5_WRAP_UI(libengsas_UI_H ${libengsas_UI})
-# 	QT5_ADD_TRANSLATION(libengsas_TRANS ${libengsas_TS})
-
-ADD_LIBRARY(libsiweather_testing SHARED
-	${files_CPP}
-# 	${files_UI_H}
-# 	${files_TRANS}
-)
-
-TARGET_LINK_LIBRARIES(libsiweather_testing
-  ${LINK_LIBRARIES}
-)
-
-qt5_use_modules(libsiweather_testing Core Network Test)
-
-SET_TARGET_PROPERTIES(libsiweather_testing PROPERTIES
-	OUTPUT_NAME "siweather-testing"
-	VERSION ${TARGET_VERSION_MAJOR}.${TARGET_VERSION_MINOR}.${${PROJECT_NAME}_PATCH_LEVEL}
-	SOVERSION ${TARGET_VERSION_MAJOR})
-
-# INSTALL(
-#   FILES ${files_TRANS}
-#   DESTINATION ${qm_DIR}
-#   COMPONENT library
-# )
-
-# SET(LIBENGSAS_VERSION ${${PROJECT_NAME}_VERSION})
-# SET(QTVERSION "${QT_VERSION_MAJOR}.${QT_VERSION_MINOR}.${QT_VERSION_PATCH}")
-# SET(depends_XML ${CMAKE_BINARY_DIR}/depends/libengsas-core.xml)
-# CONFIGURE_FILE(libengsas-core.xml.in ${depends_XML})
-# INSTALL(
-# 	FILES ${depends_XML}
-# 	DESTINATION ${depends_DIR}
-# 	COMPONENT library
-# )
Index: src/testing/sitestingconfig.h.in
===================================================================
--- src/testing/sitestingconfig.h.in	(revision 4b09d68494ca3be62fedf1006b53f3df1248aa54)
+++ 	(revision )
@@ -1,31 +1,0 @@
-/*
-    Copyright (C) 2015 EngSaS - Engineering Solutions and Services Langenbach. All rights reserved.
-
-    This library is free software; you can redistribute it and/or
-    modify it under the terms of the GNU Lesser General Public
-    License as published by the Free Software Foundation; either
-    version 2.1 of the License, or (at your option) any later version.
-
-    This library is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-    Lesser General Public License for more details.
-
-    You should have received a copy of the GNU Lesser General Public
-    License along with this library; if not, write to the Free Software
-    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
-    MA 02110-1301  USA.
-*/
-
-#ifndef SITESTINGCONFIG_H
-#define SITESTINGCONFIG_H
-
-#cmakedefine WEBSERVICE_BASE_URL "@WEBSERVICE_BASE_URL_COMPLETE@"
-#cmakedefine WEBSERVICE_SERVER_HOST "@WEBSERVICE_SERVER_HOST@"
-#cmakedefine WEBSERVICE_SERVER_PORT "@WEBSERVICE_SERVER_PORT@"
-#cmakedefine WEBSERVICE_SERVER_DOCROOT "@WEBSERVICE_SERVER_DOCROOT@"
-#cmakedefine PHP_EXECUTABLE "@PHP_EXECUTABLE@"
-
-#cmakedefine WEBSERVICE_API_VERSION "@WEBSERVICE_API_VERSION@"
-
-#endif // SITESTINGCONFIG_H
Index: src/testing/sitestingglobal.h
===================================================================
--- src/testing/sitestingglobal.h	(revision 4b09d68494ca3be62fedf1006b53f3df1248aa54)
+++ 	(revision )
@@ -1,34 +1,0 @@
-/*
-    Copyright (C) 2015 EngSaS - Engineering Solutions and Services Langenbach. All rights reserved.
-
-    This library is free software; you can redistribute it and/or
-    modify it under the terms of the GNU Lesser General Public
-    License as published by the Free Software Foundation; either
-    version 2.1 of the License, or (at your option) any later version.
-
-    This library is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-    Lesser General Public License for more details.
-
-    You should have received a copy of the GNU Lesser General Public
-    License along with this library; if not, write to the Free Software
-    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
-    MA 02110-1301  USA.
-*/
-
-/**
- * @brief Library with helpers to run the tests
-	* @author Joachim Langenbach
-	* 
-  */
-#ifndef SITESTINGGLOBAL_H
-#define SITESTINGGLOBAL_H
-
-#ifdef SI_BUILD_TESTING
-	#define SI_TESTING_EXPORT Q_DECL_EXPORT
-#else
-  #define SI_TESTING_EXPORT Q_DECL_IMPORT
-#endif
-
-#endif // SITESTINGGLOBAL_H
Index: src/testing/webserverprocess.cpp
===================================================================
--- src/testing/webserverprocess.cpp	(revision 4b09d68494ca3be62fedf1006b53f3df1248aa54)
+++ 	(revision )
@@ -1,225 +1,0 @@
-/*
-    Copyright (C) 2015 EngSaS - Engineering Solutions and Services Langenbach. All rights reserved.
-
-    This library is free software; you can redistribute it and/or
-    modify it under the terms of the GNU Lesser General Public
-    License as published by the Free Software Foundation; either
-    version 2.1 of the License, or (at your option) any later version.
-
-    This library is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-    Lesser General Public License for more details.
-
-    You should have received a copy of the GNU Lesser General Public
-    License along with this library; if not, write to the Free Software
-    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
-    MA 02110-1301  USA.
-*/
-
-#include "webserverprocess.h"
-#include "moc_webserverprocess.cpp"
-
-#include "sitestingconfig.h"
-
-#include <QTcpSocket>
-#include <QRegExp>
-#include <QNetworkAccessManager>
-#include <QNetworkRequest>
-#include <QNetworkReply>
-#include <QTime>
-#include <QCoreApplication>
-#include <QTest>
-#include <QDir>
-
-WebserverProcess::WebserverProcess(QObject* parent)
- : QObject(parent)
-{
-	_process = new QProcess(this);
-	connect(_process, SIGNAL(error(QProcess::ProcessError)),
-					this, SLOT(processError(QProcess::ProcessError)));
-	connect(_process, SIGNAL(finished(int,QProcess::ExitStatus)),
-					this, SLOT(processFinished(int,QProcess::ExitStatus)));
-	connect(_process, SIGNAL(readyRead()),
-					this, SLOT(processReadyRead()));
-}
-
-WebserverProcess::~WebserverProcess()
-{
-	if(_process && _process->state() == QProcess::Running){
-		_process->kill();
-		_process->waitForFinished(5000);
-	}
-	cleanupDataDirectory();
-}
-
-QString WebserverProcess::webserviceBaseUrl()
-{
-	return appendSlashToUrl(QString(WEBSERVICE_BASE_URL));
-}
-
-QString WebserverProcess::webserviceApiVersion()
-{
-	return QString(WEBSERVICE_API_VERSION);
-}
-
-
-bool WebserverProcess::isRunning() const
-{
-	if(!_process)
-		return false;
-
-	QRegExp regex("http:\\/\\/([^:]+)+:([0-9]+)");
-	if(regex.indexIn(webserviceBaseUrl()) < 0){
-		qDebug() << QString("Regex %1 to find host and port not matching in %2").arg(regex.pattern()).arg(webserviceBaseUrl());
-		return false;
-	}
-	QStringList capturedTexts = regex.capturedTexts();
-	if(capturedTexts.size() != 3){
-		qDebug() << QString("Regex %1 does not matches enough items in %2").arg(regex.pattern()).arg(webserviceBaseUrl());
-		return false;
-	}
-	QTcpSocket *socket = new QTcpSocket();
-	socket->connectToHost(capturedTexts[1], capturedTexts[2].toInt(), QIODevice::ReadOnly); 
-	if (!socket->waitForConnected()){
-		qDebug() << QString("Webservice at %1:%2 not reachable").arg(capturedTexts[1]).arg(capturedTexts[2]);
-		delete socket;
-		return false;
-	}
-	socket->close();
-	delete socket;
-	return true;
-}
-
-bool WebserverProcess::start()
-{
-	if(!_process)
-		return false;
-
-	QStringList arguments;
-	arguments << QString("-S %1:%2").arg(QString(WEBSERVICE_SERVER_HOST)).arg(QString(WEBSERVICE_SERVER_PORT));
-	arguments << QString("-t %1").arg(QString(WEBSERVICE_SERVER_DOCROOT));
-	
-	connect(_process, SIGNAL(error(QProcess::ProcessError)),
-					this, SLOT(processError(QProcess::ProcessError)));
-	connect(_process, SIGNAL(finished(int,QProcess::ExitStatus)),
-					this, SLOT(processFinished(int,QProcess::ExitStatus)));
-	connect(_process, SIGNAL(readyRead()),
-					this, SLOT(processReadyRead()));
-	
- 	_process->setReadChannelMode(QProcess::ForwardedChannels);
-	_process->start(QString("%1 %2").arg(QString(PHP_EXECUTABLE)).arg(arguments.join(" ")));
-	// give the php webserver a few seconds to start
- 	QTest::qWait(5000);
- 	if(!isRunning())
-		return false;
-	return true;
-}
-
-bool WebserverProcess::stop()
-{
-	if(!_process)
-		return true;
-	_process->terminate();
-	return _process->waitForFinished(5000);
-}
-
-
-bool WebserverProcess::setup()
-{
-	if(!_process)
-		return false;
-
-	QRegExp regex("http:\\/\\/([^:]+)+:([0-9]+)");
-	if(regex.indexIn(webserviceBaseUrl()) < 0){
-		qDebug() << QString("Regex %1 to find host and port not matching in %2").arg(regex.pattern()).arg(webserviceBaseUrl());
-		return false;
-	}
-	QStringList capturedTexts = regex.capturedTexts();
-	if(capturedTexts.size() != 3){
-		qDebug() << QString("Regex %1 does not matches enough items in %2").arg(regex.pattern()).arg(webserviceBaseUrl());
-		return false;
-	}
-	QNetworkAccessManager *manager = new QNetworkAccessManager(this);
-	QNetworkReply *reply = manager->get(QNetworkRequest(QUrl(QString("%1%2").arg(webserviceBaseUrl()).arg("index.php/setup"))));
-	QTime dieTime = QTime::currentTime().addSecs(30);
-	while(QTime::currentTime() < dieTime){
-		if(reply->isFinished())
-			break;
-		QCoreApplication::processEvents(QEventLoop::ExcludeUserInputEvents, 100);
-	}
-	bool result = reply->isFinished();
-	reply->deleteLater();
-	manager->deleteLater();
-	return result;
-}
-
-bool WebserverProcess::cleanupDataDirectory()
-{
-	QDir dir(QString(WEBSERVICE_SERVER_DOCROOT));
-	if(!dir.exists())
-		return true;
-	if(!dir.removeRecursively())
-		return false;
-	return true;
-}
-
-void WebserverProcess::processError(QProcess::ProcessError error)
-{
-	QString errorString;
-	switch(error){
-		case QProcess::FailedToStart:
-			errorString = "FailedToStart";
-			break;
-		case QProcess::Crashed:
-			errorString = "Crashed";
-			break;
-		case QProcess::Timedout:
-			errorString = "Timedout";
-			break;
-		case QProcess::WriteError:
-			errorString = "WriteError";
-			break;
-		case QProcess::ReadError:
-			errorString = "ReadError";
-			break;
-		default:
-			errorString = "Unknown";
-	}
-
-	qDebug() << QString("%1: Error %2 (%3)")
-								.arg(metaObject()->className()).arg(errorString).arg(int(error));
-}
-
-void WebserverProcess::processFinished(int exitCode, QProcess::ExitStatus exitStatus)
-{
-	QString exitString;
-	switch(exitStatus){
-		case QProcess::NormalExit:
-			exitString = "NormalExit";
-			break;
-		case QProcess::CrashExit:
-			exitString = "CrashExit";
-			break;
-		default:
-			exitString = "Unknown";
-	}
-	qDebug() << QString("%1: Finished with exit code %2 and staus %3 (%4)")
-								.arg(metaObject()->className()).arg(exitCode).arg(exitString).arg(int(exitStatus));
-}
-
-void WebserverProcess::processReadyRead()
-{
-	QProcess *process = qobject_cast<QProcess*>(sender());
-	if(!process)
-		return;
-	qDebug() << QString("%1: Read %2")
-							.arg(metaObject()->className()).arg(QString::fromUtf8(process->readAll()));
-}
-
-QString WebserverProcess::appendSlashToUrl(QString url)
-{
-	if(url.right(1) != "/")
-		url += "/";
-	return url;
-}
Index: src/testing/webserverprocess.h
===================================================================
--- src/testing/webserverprocess.h	(revision 4b09d68494ca3be62fedf1006b53f3df1248aa54)
+++ 	(revision )
@@ -1,68 +1,0 @@
-/*
-    Copyright (C) 2015 EngSaS - Engineering Solutions and Services Langenbach. All rights reserved.
-
-    This library is free software; you can redistribute it and/or
-    modify it under the terms of the GNU Lesser General Public
-    License as published by the Free Software Foundation; either
-    version 2.1 of the License, or (at your option) any later version.
-
-    This library is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-    Lesser General Public License for more details.
-
-    You should have received a copy of the GNU Lesser General Public
-    License along with this library; if not, write to the Free Software
-    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
-    MA 02110-1301  USA.
-*/
-
-#ifndef WEBSERVERPROCESS_H
-#define WEBSERVERPROCESS_H
-
-#include <QObject>
-#include <sitestingglobal.h>
-
-#include <QPointer>
-#include <QProcess>
-
-/**
- * @brief Starts the php build in webserver to allow testing against the webservice
- */
-class SI_TESTING_EXPORT WebserverProcess : public QObject {
-	Q_OBJECT
-	public:
-		WebserverProcess(QObject *parent = NULL);
-		~WebserverProcess();
-
-		static QString webserviceBaseUrl();
-		static QString webserviceApiVersion();
-		
-		bool isRunning() const;
-		bool start();
-		/**
-		 * @brief Stops the webservice with QProcess::terminate(). The destructor ~WebserverProcess() calls QProcess::kill() to stop the webserver process.
-		 */
-		bool stop();
-		/**
-		 * @brief Calls the setup page of the webservice. Returns true, if the call was successfully. This does not means, the setup was successfully.
-		 */
-		bool setup();
-		/**
-		 * @brief Removes the webservice data directory to cleanup test case. It is called by ~WebserverProcess().
-		 */
-		bool cleanupDataDirectory();
-
-	private slots:
-		void processError(QProcess::ProcessError error);
-		void processFinished(int exitCode, QProcess::ExitStatus exitStatus);
-		void processReadyRead();
-
-	private:
-		static QString appendSlashToUrl(QString url);
-
-		QPointer<QProcess> _process;
-		int _timeout;
-};
-
-#endif // WEBSERVERPROCESS_H
Index: src/tests/CMakeLists.txt
===================================================================
--- src/tests/CMakeLists.txt	(revision 4b09d68494ca3be62fedf1006b53f3df1248aa54)
+++ 	(revision )
@@ -1,60 +1,0 @@
-######################
-#
-#    Copyright (C) 2015 EngSaS - Engineering Solutions and Services Langenbach. All rights reserved.
-#
-#    This library is free software; you can redistribute it and/or
-#    modify it under the terms of the GNU Lesser General Public
-#    License as published by the Free Software Foundation; either
-#    version 2.1 of the License, or (at your option) any later version.
-#
-#    This library is distributed in the hope that it will be useful,
-#    but WITHOUT ANY WARRANTY; without even the implied warranty of
-#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-#    Lesser General Public License for more details.
-#
-#    You should have received a copy of the GNU Lesser General Public
-#    License along with this library; if not, write to the Free Software
-#    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
-#    MA 02110-1301  USA.
-#
-######################
-
-INCLUDE_DIRECTORIES(
-	${CMAKE_CURRENT_BINARY_DIR}
-	${CMAKE_CURRENT_SOURCE_DIR}
-	${libsiweather_SOURCE_DIR}
-	${libsiweather_BINARY_DIR}
-	${libsiweather_testing_SOURCE_DIR}
-	${libsiweather_testing_BINARY_DIR}
-)
-ADD_DEFINITIONS(${QT_DEFINITIONS})
-
-#######################
-#
-# SiWeatherStation Test
-#
-#######################
-
-SET(test_CPP
-	siweatherstationtest.cpp
-)
-
-ADD_EXECUTABLE(testsiweatherstationtest ${test_CPP})
-TARGET_LINK_LIBRARIES(testsiweatherstationtest ${QT_LIBRARIES} libsiweather libsiweather_testing)
-qt5_use_modules(testsiweatherstationtest Core Test)
-ADD_TEST(TestSiWeatherStation ${EXECUTABLE_OUTPUT_PATH}/testsiweatherstationtest)
-
-#######################
-#
-# SiWebserviceClient Test
-#
-#######################
-
-SET(test_CPP
-	siwebserviceclienttest.cpp
-)
-
-ADD_EXECUTABLE(testsiwebserviceclient ${test_CPP})
-TARGET_LINK_LIBRARIES(testsiwebserviceclient ${QT_LIBRARIES} libsiweather libsiweather_testing)
-qt5_use_modules(testsiwebserviceclient Core Test)
-ADD_TEST(TestSiWebserviceClient ${EXECUTABLE_OUTPUT_PATH}/testsiwebserviceclient)
Index: src/tests/siweatherstationtest.cpp
===================================================================
--- src/tests/siweatherstationtest.cpp	(revision 4b09d68494ca3be62fedf1006b53f3df1248aa54)
+++ 	(revision )
@@ -1,96 +1,0 @@
-/*
-    Copyright (C) 2015 EngSaS - Engineering Solutions and Services Langenbach. All rights reserved.
-
-    This library is free software; you can redistribute it and/or
-    modify it under the terms of the GNU Lesser General Public
-    License as published by the Free Software Foundation; either
-    version 2.1 of the License, or (at your option) any later version.
-
-    This library is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-    Lesser General Public License for more details.
-
-    You should have received a copy of the GNU Lesser General Public
-    License along with this library; if not, write to the Free Software
-    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
-    MA 02110-1301  USA.
-*/
-
-#include "siweatherstationtest.h"
-#include "moc_siweatherstationtest.cpp"
-
-#include <siweatherstation.h>
-
-#include <QTest>
-
-using namespace SiWeather::Library;
-
-void SiWeatherStationTest::setUuid()
-{
-	QUuid uuid = QUuid::createUuid();
-	SiWeatherStation station;
-	station.setUuid(uuid.toString());
-	QCOMPARE(station.uuid(), uuid);
-}
-
-void SiWeatherStationTest::setName()
-{
-	QString value = "Station Name";
-	SiWeatherStation station;
-	station.setName(value);
-	QCOMPARE(station.name(), value);
-}
-
-void SiWeatherStationTest::setCity(){
-	QString value = "Station Name";
-	SiWeatherStation station;
-	station.setCity(value);
-	QCOMPARE(station.city(), value);
-}
-
-void SiWeatherStationTest::setLongitude(){
-	double coordinate = 12.12345;
-	SiWeatherStation station;
-	station.setLatitude(coordinate);
-	QCOMPARE(station.latitude(), coordinate);
-}
-
-void SiWeatherStationTest::setLatitude(){
-	double coordinate = 12.12345;
-	SiWeatherStation station;
-	station.setLongitude(coordinate);
-	QCOMPARE(station.longitude(), coordinate);
-}
-
-void SiWeatherStationTest::setType(){
-	QString value = "Station Type";
-	SiWeatherStation station;
-	station.setType(value);
-	QCOMPARE(station.type(), value);
-}
-
-void SiWeatherStationTest::setTypeUrl(){
-	QUrl value("http://example.org");
-	SiWeatherStation station;
-	station.setTypeUrl(value.toString());
-	QCOMPARE(station.typeUrl(), value);
-}
-
-void SiWeatherStationTest::setEMail(){
-	QString value = "test@example.org";
-	SiWeatherStation station;
-	station.setEMail(value);
-	QCOMPARE(station.eMail(), value);
-}
-
-void SiWeatherStationTest::constructor()
-{
-	QUuid uuid = QUuid::createUuid();
-	QString name = "Station Name";
-	SiWeatherStation station(uuid.toString(), name);
-	QCOMPARE(station.uuid(), uuid);
-	QCOMPARE(station.name(), name);
-}
-
-QTEST_MAIN(SiWeatherStationTest)
Index: src/tests/siweatherstationtest.h
===================================================================
--- src/tests/siweatherstationtest.h	(revision 4b09d68494ca3be62fedf1006b53f3df1248aa54)
+++ 	(revision )
@@ -1,40 +1,0 @@
-/*
-    Copyright (C) 2015 EngSaS - Engineering Solutions and Services Langenbach. All rights reserved.
-
-    This library is free software; you can redistribute it and/or
-    modify it under the terms of the GNU Lesser General Public
-    License as published by the Free Software Foundation; either
-    version 2.1 of the License, or (at your option) any later version.
-
-    This library is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-    Lesser General Public License for more details.
-
-    You should have received a copy of the GNU Lesser General Public
-    License along with this library; if not, write to the Free Software
-    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
-    MA 02110-1301  USA.
-*/
-
-#ifndef SIWEATHERSTATIONTEST_H
-#define SIWEATHERSTATIONTEST_H
-
-#include <QObject>
-
-class SiWeatherStationTest : public QObject
-{
-	Q_OBJECT
-	private slots:
-		void setUuid();
-		void setName();
-		void setCity();
-		void setLongitude();
-		void setLatitude();
-		void setType();
-		void setTypeUrl();
-		void setEMail();
-		void constructor();
-};
-
-#endif // SIWEATHERSTATIONTEST_H
Index: src/tests/siwebserviceclienttest.cpp
===================================================================
--- src/tests/siwebserviceclienttest.cpp	(revision 4b09d68494ca3be62fedf1006b53f3df1248aa54)
+++ 	(revision )
@@ -1,120 +1,0 @@
-/*
-    Copyright (C) 2015 EngSaS - Engineering Solutions and Services Langenbach. All rights reserved.
-
-    This library is free software; you can redistribute it and/or
-    modify it under the terms of the GNU Lesser General Public
-    License as published by the Free Software Foundation; either
-    version 2.1 of the License, or (at your option) any later version.
-
-    This library is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-    Lesser General Public License for more details.
-
-    You should have received a copy of the GNU Lesser General Public
-    License along with this library; if not, write to the Free Software
-    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
-    MA 02110-1301  USA.
-*/
-
-#include "siwebserviceclient.h"
-#include "moc_siwebserviceclienttest.cpp"
-
-#include <siwebserviceclient.h>
-#include <siweatherstation.h>
-
-#include <webserverprocess.h>
-
-#include <QTest>
-#include <QSignalSpy>
-
-using namespace SiWeather::Library;
-
-void SiWebserviceClientTest::initTestCase()
-{
-	_webserverProcess = new WebserverProcess(this);
-	QCOMPARE(_webserverProcess->start(), true);
-	QCOMPARE(_webserverProcess->isRunning(), true);
-	QCOMPARE(_webserverProcess->setup(), true);
-}
-
-void SiWebserviceClientTest::cleanupTestCase()
-{
-	QVERIFY(_webserverProcess);
-	QCOMPARE(_webserverProcess->stop(), true);
-}
-
-void SiWebserviceClientTest::apiVersion()
-{
-	QVERIFY(_webserverProcess);
-	QCOMPARE(_webserverProcess->isRunning(), true);
-
-	SiWebserviceClient *client = new SiWebserviceClient(_webserverProcess->webserviceBaseUrl(), this);
-	QCOMPARE(client->apiVersion(), _webserverProcess->webserviceApiVersion());
-
-	delete client;
-}
-
-void SiWebserviceClientTest::stationsRegister()
-{
-	QVERIFY(_webserverProcess);
-	QCOMPARE(_webserverProcess->isRunning(), true);
-
-	SiWebserviceClient *client = new SiWebserviceClient(_webserverProcess->webserviceBaseUrl(), this);
-	QSignalSpy spyError(client, SIGNAL(error(SiWeather::Library::SiWebserviceClient::ReplyType, const QString&)));
-	QSignalSpy spyFinished(client, SIGNAL(finished(SiWeather::Library::SiWebserviceClient::ReplyType, bool, const QByteArray&)));
-	QSignalSpy spyFinishedStationsRegister(client, SIGNAL(finishedStationsRegister(bool, const QUuid&, const QString&)));
-	QString errorMessage;
-
-	SiWeatherStation station;
-	QCOMPARE(client->stationsRegister(station, errorMessage), SiWebserviceClient::Error);
-	QCOMPARE(errorMessage.isEmpty(), false);
-	QCOMPARE(spyError.count(), 0);
-	QCOMPARE(spyFinished.count(), 0);
-	QCOMPARE(spyFinishedStationsRegister.count(), 0);
-
-	spyError.clear();
-	spyFinished.clear();
-	spyFinishedStationsRegister.clear();
-	errorMessage.clear();
-	station.setName("Test Station Name");
-	station.setCity("New York");
-	station.setEMail("test@example.org");
-	station.setLatitude(40.712778);
-	station.setLongitude(-74.005833);
-	station.setType("Test Type");
-
-	QCOMPARE(station.isValidForRegister(), true);
-	QCOMPARE(client->stationsRegister(station, errorMessage), SiWebserviceClient::StationsRegister);
-	QTest::qWarn(errorMessage.toUtf8());
-	QCOMPARE(errorMessage.isEmpty(), true);
-
-	// use long timeout to allow webservice query for geolocation!
-	QTime dieTime = QTime::currentTime().addSecs(10);
-	while(QTime::currentTime() < dieTime){
-		QCoreApplication::processEvents(QEventLoop::ExcludeUserInputEvents, 100);
-		if(spyError.count() != 0 || spyFinished.count() != 0)
-			break;
-	}
-
-	if(spyError.count() > 0){
-		QVariantList data = spyError.takeFirst();
-		QCOMPARE(data.count(), 2);
-		QWARN(data[1].toString().toUtf8());
-	}
-	QCOMPARE(spyError.count(), 0);
-	QCOMPARE(spyFinished.count(), 1);
-	QCOMPARE(spyFinishedStationsRegister.count(), 1);
-	QVariantList data = spyFinishedStationsRegister.takeFirst();
-	QCOMPARE(data.count(), 3);
-	if(!data[0].toBool()){
-		QTest::qWarn(data[2].toString().toUtf8());
-	}
-	QCOMPARE(data[0].toBool(), true);
-	QCOMPARE(data[1].toUuid().isNull(), false);
-	QCOMPARE(data[2].toString().isEmpty(), false);
-
-	delete client;
-}
-
-QTEST_MAIN(SiWebserviceClientTest)
Index: src/tests/siwebserviceclienttest.h
===================================================================
--- src/tests/siwebserviceclienttest.h	(revision 4b09d68494ca3be62fedf1006b53f3df1248aa54)
+++ 	(revision )
@@ -1,41 +1,0 @@
-/*
-    Copyright (C) 2015 EngSaS - Engineering Solutions and Services Langenbach. All rights reserved.
-
-    This library is free software; you can redistribute it and/or
-    modify it under the terms of the GNU Lesser General Public
-    License as published by the Free Software Foundation; either
-    version 2.1 of the License, or (at your option) any later version.
-
-    This library is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-    Lesser General Public License for more details.
-
-    You should have received a copy of the GNU Lesser General Public
-    License along with this library; if not, write to the Free Software
-    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
-    MA 02110-1301  USA.
-*/
-
-#ifndef SIWEBSERVICECLIENTTEST_H
-#define SIWEBSERVICECLIENTTEST_H
-
-#include <QObject>
-
-class WebserverProcess;
-
-class SiWebserviceClientTest : public QObject
-{
-	Q_OBJECT
-	private slots:
-		void initTestCase();
-		void cleanupTestCase();
-		
-		void apiVersion();
-		void stationsRegister();
-		
-	private:
-		WebserverProcess *_webserverProcess;
-};
-
-#endif // SIWEBSERVICECLIENTTEST_H
Index: src/webservice/CMakeLists.txt
===================================================================
--- src/webservice/CMakeLists.txt	(revision 4b09d68494ca3be62fedf1006b53f3df1248aa54)
+++ src/webservice/CMakeLists.txt	(revision 16cceaa3078254d1ce5255c09bcc1498bedbd731)
@@ -20,11 +20,5 @@
 ######################
 
-SET(WEBSERVICE_OUTPUT_APP_DIRECTORY "${WEBSERVICE_OUTPUT_DIRECTORY}/${WEBSERVICE_API_VERSION}")
-
-# switch Slim mode according to CMake debug mode
-SET(WEBSERVICE_MODE "production")
-IF(BUILD_DEBUG)
-	SET(WEBSERVICE_MODE "development")
-ENDIF(BUILD_DEBUG)
+SET(WEBSERVICE_OUTPUT_DIRECTORY ${WEB_OUTPUT_DIRECTORY}/webservice)
 
 # ADD_CUSTOM_COMMAND(
@@ -35,29 +29,9 @@
 # )
 
-CONFIGURE_FILE("config/config.php.in" "${WEBSERVICE_OUTPUT_DIRECTORY}/config/config.php")
-CONFIGURE_FILE("config/internalconfig.php.in" "${WEBSERVICE_OUTPUT_APP_DIRECTORY}/inc/internalconfig.php")
-# workaround to copy "hidden" file .htaccess. copy command ignores it
-CONFIGURE_FILE("htaccess.in" "${WEBSERVICE_OUTPUT_APP_DIRECTORY}/.htaccess")
-
 FILE(GLOB src_HTDOCS "htdocs/*.*")
-ADD_CUSTOM_TARGET(webservice-prepare ALL
-	COMMAND ${CMAKE_COMMAND} -E copy_directory "${CMAKE_CURRENT_SOURCE_DIR}/htdocs" "${WEBSERVICE_OUTPUT_APP_DIRECTORY}"
+ADD_CUSTOM_TARGET(webservice ALL
+	COMMAND ${CMAKE_COMMAND} -E copy_directory "${CMAKE_CURRENT_SOURCE_DIR}/htdocs" "${WEBSERVICE_OUTPUT_DIRECTORY}"
 # 	DEPENDS "${WEBSERVICE_OUTPUT_DIRECTORY}/${STAFF_WSDL_FILE}"
-	COMMENT "Preparing webservice"
+	COMMENT "Preparing webclient"
 	SOURCES ${src_HTDOCS}
 )
-
-#######################
-#
-# PHPUnit tests
-#
-#######################
-CONFIGURE_FILE("testconfig/testconfig.php.in" "${WEBSERVICE_TEST_OUTPUT_DIRECTORY}/testconfig/testconfig.php")
-
-FILE(GLOB src_HTDOCS_TEST "tests/*.*")
-ADD_CUSTOM_TARGET(webservice-tests-prepare ALL
-	COMMAND ${CMAKE_COMMAND} -E copy_directory "${CMAKE_CURRENT_SOURCE_DIR}/tests" "${WEBSERVICE_TEST_OUTPUT_DIRECTORY}"
-# 	DEPENDS "${WEBSERVICE_OUTPUT_DIRECTORY}/${STAFF_WSDL_FILE}"
-	COMMENT "Preparing webservice tests"
-	SOURCES ${src_HTDOCS_TEST}
-)
Index: src/webservice/config/config.php.in
===================================================================
--- src/webservice/config/config.php.in	(revision 4b09d68494ca3be62fedf1006b53f3df1248aa54)
+++ 	(revision )
@@ -1,30 +1,0 @@
-<?php
-/*
-    Copyright (C) 2015 EngSaS - Engineering Solutions and Services Langenbach. All rights reserved.
-
-    This library is free software; you can redistribute it and/or
-    modify it under the terms of the GNU Lesser General Public
-    License as published by the Free Software Foundation; either
-    version 2.1 of the License, or (at your option) any later version.
-
-    This library is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-    Lesser General Public License for more details.
-
-    You should have received a copy of the GNU Lesser General Public
-    License along with this library; if not, write to the Free Software
-    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
-    MA 02110-1301  USA.
-*/
-
-$config = [
-	"mode" => "@WEBSERVICE_MODE@",
-	"webserviceBaseUrl" => "@WEBSERVICE_BASE_URL_COMPLETE@",
-	"spatialiteExtension" => "mod_spatialite.so",
-	"geonamesUsername" => "@WEBSERVICE_GEONAMES_USERNAME@",
-	"mailaddressFrom" => "webmaster@example.org",
-	"mailaddressCC" => "info@example.org",
-];
-
-?>
Index: src/webservice/config/internalconfig.php.in
===================================================================
--- src/webservice/config/internalconfig.php.in	(revision 4b09d68494ca3be62fedf1006b53f3df1248aa54)
+++ 	(revision )
@@ -1,30 +1,0 @@
-<?php
-/*
-    Copyright (C) 2015 EngSaS - Engineering Solutions and Services Langenbach. All rights reserved.
-
-    This library is free software; you can redistribute it and/or
-    modify it under the terms of the GNU Lesser General Public
-    License as published by the Free Software Foundation; either
-    version 2.1 of the License, or (at your option) any later version.
-
-    This library is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-    Lesser General Public License for more details.
-
-    You should have received a copy of the GNU Lesser General Public
-    License along with this library; if not, write to the Free Software
-    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
-    MA 02110-1301  USA.
-*/
-
-/**
-  * @brief Should not be edited by the user! Holds internal values configured by the developer / build system
-  */
-$internalconfig = [
-	"version" => "@VERSION@",
-	"webserviceApiVersion" => "@WEBSERVICE_API_VERSION@",
-	"databaseVersionCore" => "@WEBSERVICE_DATABASE_SCHEMA_VERSION_CORE@"
-];
-
-?>
Index: src/webservice/htaccess.in
===================================================================
--- src/webservice/htaccess.in	(revision 4b09d68494ca3be62fedf1006b53f3df1248aa54)
+++ 	(revision )
@@ -1,27 +1,0 @@
-######################
-#
-#    Copyright (C) 2015 EngSaS - Engineering Solutions and Services Langenbach. All rights reserved.
-#
-#    This library is free software; you can redistribute it and/or
-#    modify it under the terms of the GNU Lesser General Public
-#    License as published by the Free Software Foundation; either
-#    version 2.1 of the License, or (at your option) any later version.
-#
-#    This library is distributed in the hope that it will be useful,
-#    but WITHOUT ANY WARRANTY; without even the implied warranty of
-#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-#    Lesser General Public License for more details.
-#
-#    You should have received a copy of the GNU Lesser General Public
-#    License along with this library; if not, write to the Free Software
-#    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
-#    MA 02110-1301  USA.
-#
-######################
-
-# Requires AllowOverride All directive in your apache config
-RewriteEngine On
-RewriteBase @WEBSERVICE_BASE_URL@
-RewriteCond %{REQUEST_FILENAME} !-f
-RewriteCond %{REQUEST_FILENAME} !-d
-RewriteRule ^ index.php [QSA,NC,L]
Index: src/webservice/htdocs/SiWeather/Webservice/DataDirectoryChecks.php
===================================================================
--- src/webservice/htdocs/SiWeather/Webservice/DataDirectoryChecks.php	(revision 4b09d68494ca3be62fedf1006b53f3df1248aa54)
+++ 	(revision )
@@ -1,34 +1,0 @@
-<?php
-/*
-    Copyright (C) 2015 EngSaS - Engineering Solutions and Services Langenbach. All rights reserved.
-
-    This library is free software; you can redistribute it and/or
-    modify it under the terms of the GNU Lesser General Public
-    License as published by the Free Software Foundation; either
-    version 2.1 of the License, or (at your option) any later version.
-
-    This library is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-    Lesser General Public License for more details.
-
-    You should have received a copy of the GNU Lesser General Public
-    License along with this library; if not, write to the Free Software
-    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
-    MA 02110-1301  USA.
-*/
-
-
-namespace SiWeather\Webservice;
-
-abstract class DataDirectoryChecks
-{
-	const Success = 0;
-	const Error = 1;
-	const NoConfiguration = 2;
-	const NoDirectoryPath = 3;
-    const NotExist = 4;
-    const DirectoryNotWritable = 5;
-}
-
-?>
Index: src/webservice/htdocs/SiWeather/Webservice/DatabaseChecks.php
===================================================================
--- src/webservice/htdocs/SiWeather/Webservice/DatabaseChecks.php	(revision 4b09d68494ca3be62fedf1006b53f3df1248aa54)
+++ 	(revision )
@@ -1,35 +1,0 @@
-<?php
-/*
-    Copyright (C) 2015 EngSaS - Engineering Solutions and Services Langenbach. All rights reserved.
-
-    This library is free software; you can redistribute it and/or
-    modify it under the terms of the GNU Lesser General Public
-    License as published by the Free Software Foundation; either
-    version 2.1 of the License, or (at your option) any later version.
-
-    This library is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-    Lesser General Public License for more details.
-
-    You should have received a copy of the GNU Lesser General Public
-    License along with this library; if not, write to the Free Software
-    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
-    MA 02110-1301  USA.
-*/
-
-
-namespace SiWeather\Webservice;
-
-abstract class DatabaseChecks
-{
-	const Success = 0;
-	const Error = 1;
-    const NoDatabaseFile = 2;
-    const NoDirectoryPath = 3;
-    const DirectoryDoesNotExist = 4;
-    const DirectoryNotWritable = 5;
-    const DatabaseFileNotWritable = 6;
-}
-
-?>
Index: src/webservice/htdocs/SiWeather/Webservice/DatabaseHandler.php
===================================================================
--- src/webservice/htdocs/SiWeather/Webservice/DatabaseHandler.php	(revision 4b09d68494ca3be62fedf1006b53f3df1248aa54)
+++ 	(revision )
@@ -1,238 +1,0 @@
-<?php
-/*
-    Copyright (C) 2015 EngSaS - Engineering Solutions and Services Langenbach. All rights reserved.
-
-    This library is free software; you can redistribute it and/or
-    modify it under the terms of the GNU Lesser General Public
-    License as published by the Free Software Foundation; either
-    version 2.1 of the License, or (at your option) any later version.
-
-    This library is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-    Lesser General Public License for more details.
-
-    You should have received a copy of the GNU Lesser General Public
-    License along with this library; if not, write to the Free Software
-    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
-    MA 02110-1301  USA.
-*/
-
-namespace SiWeather\Webservice;
-
-/**
-	* @brief Manages the database connection for SiWeather webservice
-	* @note This class needs to load the SpatialLite SQLite extension.
-	*       Therefore the sqlite3.extension_dir in php.ini must be set
-  *       to a path, where this extension could be found!
-	*/
-class DatabaseHandler {
-	function __construct()
-	{
-		$this->_config = new WebserviceConfig();
-	
-		$this->_lastErrorMessage = "";
-		$this->_database = null;
-		if(!$this->_config->dataDirectory()){
-			$this->setLastErrorMessage("Could not connect to the database: No data directory set!");
-			$this->databaseFile = null;
-		}
-		else{
-			$this->_databaseFile = $this->_config->dataDirectory() ."/siweather.sqlite";
-		}
-	}
-
-	function __destruct()
-	{
-		if(!is_null($this->_database)){
-			$this->close();
-		}
-	}
-
-	public function databaseFile()
-	{
-		return $this->_databaseFile;
-	}
-
-	public function lastErrorMessage()
-	{
-		return $this->_lastErrorMessage;
-	}
-
-	public function lastDatabaseErrorMessage(){
-		if(is_null($this->_database))
-			return false;
-		return $this->_database->lastErrorMsg();
-	}
-
-	public function lastInsertRowId(){
-		if(is_null($this->_database))
-			return -1;
-		return $this->_database->lastInsertRowID();
-	}
-
-	/**
-	 * @brief Connects to the database and does some checks.
-	 *
-	 * @note This function should only called by the setup with @p ignoreVersion = true!
-	 *       Otherwise the database version is not checked! Data loss may be the consequence!
-	 */
-	public function connect($ignoreVersion = false)
-	{
-		if(!is_null($this->_database)){
-			return true;
-		}
-		if(is_null($this->_databaseFile) || empty($this->_databaseFile)){
-			$this->setLastErrorMessage("Could not connect to the database: No database file given");
-			return false;
-		}
-		try {
-			$db = new \SQLite3($this->_databaseFile, SQLITE3_OPEN_READWRITE | SQLITE3_OPEN_CREATE);
-		}
-		catch(\Exception $exception){
-			$this->setLastErrorMessage("Could not connect to the database: "+ $exception->getMessage());
-			return false;
-		}
-		// loading SpatiaLite as an extension
-		$extension = $this->_config->getConfig("spatialiteExtension");
-		if(empty($extension)){
-			$this->setLastErrorMessage("No spatialiteExtension set!");
-			return false;
-		}
-		if(!$db->loadExtension($extension)){
-			$this->setLastErrorMessage("Could not load SpatialLite extension: ". $db->lastErrorMsg());
-			return false;
-		}
-		$this->_database = $db;
-
-		// check schema version
-		if(!$this->checkVersions() && !$ignoreVersion)
-			return false;
-		
-		return true;
-	}
-
-	public function close()
-	{
-		if(is_null($this->_database)){
-			return true;
-		}
-		if($this->_database->close()){
-			$this->_database = null;
-			return true;
-		}
-		$this->setLastErrorMessage("Failed to close the database: "+ $this->_database->lastErrorMsg());
-		return false;
-	}
-	
-	public function databaseTableExists($table){
-		if(!$this->_database || !is_object($this->_database)){
-			return false;
-		}
-		$statement = $this->prepare("SELECT COUNT(*) FROM sqlite_master WHERE type=\"table\" AND name=:name");
-		if(!$statement){
-			$this->setLastErrorMessage(\Translator::swGettext("Could not prepare query to check if table %s exists", $table));
-			return false;
-		}
-		$statement->bindValue(":name", $table);
-		$result = $statement->execute();
-		$row = $result->fetchArray();
-		if(!$row || !is_array($row) || count($row) < 1 || $row[0] != 1)
-			return false;
-		return true;
-	}
-	
-	public function checkVersions(){
-		if(is_null($this->_database)){
-			$this->setLastErrorMessage("No database available to check versions");
-			return false;
-		}
-		$table = "schema";
-		if(!$this->databaseTableExists($table)){
-			$this->setLastErrorMessage("Database table with schema versions does not exists!");
-			return false;
-		}
-
-		// check schema version
-		$neededVersion = $this->_config->getConfig("databaseVersionCore");
-		$currentVersion = $this->exec("SELECT version FROM ". $table ." WHERE name='core'");
-		if(empty($neededVersion) || !is_numeric($neededVersion) || !$currentVersion || $currentVersion != $neededVersion){
-			$this->setLastErrorMessage("Found wrong database core version. Expected ". $neededVersion ." got ". $currentVersion);
-			return false;
-		}
-		return true;
-	}
-	
-	public function exec($query)
-	{
-		if(is_null($this->_database)){
-			return false;
-		}
-		if(!$this->connect()){
-			return false;
-		}
-		$result = $this->_database->exec($query);
-		if(!$result)
-			$this->setLastErrorMessage("Could not execute databae query \"". $query ."\": ". $this->_database->lastErrorMsg());
-		return $result;
-	}
-	
-	public function prepare($query)
-	{
-		if(is_null($this->_database)){
-			return false;
-		}
-		if(!$this->connect()){
-			return false;
-		}
-		$result = $this->_database->prepare($query);
-		if(!$result){
-			error_log("logging");
-			$this->setLastErrorMessage("Could not prepare database query \"". $query ."\": ". $this->_database->lastErrorMsg());
-		}
-		return $result;
-	}
-	
-	public function versionSpatialite(){
-		if(is_null($this->_database)){
-			$this->setLastErrorMessage("No database connection");
-			return 0;
-		}
-		if(!$this->connect()){
-			return 0;
-		}
-		$result = $this->_database->query("SELECT spatialite_version()");
-		while($row = $result->fetchArray()){
-			return $row[0];
-		}
-		return 0;
-	}
-	
-	public function versionSqlite(){
-		if(is_null($this->_database)){
-			$this->setLastErrorMessage("No database connection");
-			return 0;
-		}
-		if(!$this->connect()){
-			return 0;
-		}
-		$result = $this->_database->query("SELECT sqlite_version()");
- 		while($row = $result->fetchArray()){
-			return $row[0];
-		}
-		return 0;
-	}
-
-	private function setLastErrorMessage($message){
-		if(!empty($message))
-			error_log($message);
-		$this->_lastErrorMessage = $message;
-	}
-	
-	private $_database;
-	private $_databaseFile;
-	private $_lastErrorMessage;
-	private $_config;
-}
-
-?>
Index: src/webservice/htdocs/SiWeather/Webservice/GeoLocator.php
===================================================================
--- src/webservice/htdocs/SiWeather/Webservice/GeoLocator.php	(revision 4b09d68494ca3be62fedf1006b53f3df1248aa54)
+++ 	(revision )
@@ -1,136 +1,0 @@
-<?php
-/*
-    Copyright (C) 2015 EngSaS - Engineering Solutions and Services Langenbach. All rights reserved.
-
-    This library is free software; you can redistribute it and/or
-    modify it under the terms of the GNU Lesser General Public
-    License as published by the Free Software Foundation; either
-    version 2.1 of the License, or (at your option) any later version.
-
-    This library is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-    Lesser General Public License for more details.
-
-    You should have received a copy of the GNU Lesser General Public
-    License along with this library; if not, write to the Free Software
-    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
-    MA 02110-1301  USA.
-*/
-
-namespace SiWeather\Webservice;
-
-/**
-  * @brief Retrieves geo location data for different input data
-  *
-  * Returns null if someting failed.
-  *
-  * @note Requires Services_GeoNames
-  */
-class GeoLocator
-{
-	private static $_serviceBaseUrl = "http://api.geonames.org/";
-
-	public static function configured(){
-		if(empty(self::$_serviceBaseUrl))
-			return false;
-		if(!self::getUsername())
-			return false;
-		return true;
-	}
-
-	/**
-		* @brief Get locations within radius @p radius around @p latitude and @p longitude.
-		* 
-		* Returns an array of Location objects.
-		*
-		* @see Location
-		*/
-	public static function locations($latitude, $longitude, $radius, &$errorMessage){
-		if(!Location::validLatitude($latitude)){
-			$errorMessage = "GeoLocator: ". $latitude ." is no valid latitude";
-			return false;
-		}
-		if(!Location::validLatitude($longitude)){
-			$errorMessage = "GeoLocator: ".$longitude ."is no valid longitude";
-			return false;
-		}
-		if(!$radius || !is_numeric($radius) || $radius < 1){
-			$errorMessage = "GeoLocator: No or invalid radius given (". $radius .")";
-			return false;
-		}
-	
-		$user = self::getUsername();
-		if(!$user){
-			$errorMessage = "geonames webservice not configured";
-			return false;
-		}
-
-		$client = new \GuzzleHttp\Client
-		(
-			[
-				"base_uri" => self::$_serviceBaseUrl,
-				"timeout" => 2.0,								# we need a very small timeout here, because otherwise the request of our caller function may time out!
-				"http_errors" => false,
-			]
-		);
-		try{
-			$response = $client->get("findNearbyPlaceNameJSON?lat=". $latitude ."&lng=". $longitude ."&username=". $user ."&lang=local&radius=". $radius ."&style=full");
-		}
-		catch(Exception $exception){
-			$errorMessage = "GeoLocator: Fetched connect exception: ". $exception->getMessage();
-			error_log($errorMessage);
-			return false;
-		}
-		if(is_null($response)){
-			$errorMessage = "GeoLocator: Failed to fetch locations";
-			error_log($errorMessage);
-			return false;
-		}
-		if($response->getStatusCode() != 200){
-			if($response->getStatusCode() == 403){
-				$errorMessage = "GeoLocator: Probably too many ". $baseUrl ." requests (>2000/hour or >30000/day). Reason:". $response->getReasonPhrase();
-			}
-			else{
-				$errorMessage = "GeoLocator: Request failed with code ". $response->getStatusCode() ." and reason ". $response->getReasonPhrase();
-			}
-			error_log($errorMessage);
-			return false;
-		}
-
-		$body = $response->getBody();
-		if(empty($body)){
-			$errorMessage = "GeoLocator: Returned empty body";
-			error_log($errorMessage);
-			return false;
-		}
-		$json = json_decode($body, true);
-		if(is_null($json) || !$json || !is_array($json) || !array_key_exists("geonames", $json)){
-			$errorMessage = "GeoLocator: Could not convert answer into json data\n". $body;
-			error_log($errorMessage);
-			return false;
-		}
-		
-		$result = array();
-		foreach($json["geonames"] as $geoname){
-			$result[] = new Location($geoname["name"], "",
-									$geoname["adminName1"], $geoname["adminCode1"],
-									$geoname["countryName"], $geoname["countryCode"],
-									$geoname["lat"], $geoname["lng"],
-									$geoname["timezone"]["timeZoneId"]);
-		}
-		return $result;
-	}
-
-	private static function getUsername(){
-		$webserviceConfig = new WebserviceConfig();
-		$user = $webserviceConfig->getConfig("geonamesUsername");
-		if(!$user || empty($user)){
-			error_log("GeoLocator: No geonamesUsername set. Please adjust your webservice configuration");
-			return false;
-		}
-		return $user;
-	}
-}
-
-?>
Index: src/webservice/htdocs/SiWeather/Webservice/Location.php
===================================================================
--- src/webservice/htdocs/SiWeather/Webservice/Location.php	(revision 4b09d68494ca3be62fedf1006b53f3df1248aa54)
+++ 	(revision )
@@ -1,162 +1,0 @@
-<?php
-/*
-    Copyright (C) 2015 EngSaS - Engineering Solutions and Services Langenbach. All rights reserved.
-
-    This library is free software; you can redistribute it and/or
-    modify it under the terms of the GNU Lesser General Public
-    License as published by the Free Software Foundation; either
-    version 2.1 of the License, or (at your option) any later version.
-
-    This library is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-    Lesser General Public License for more details.
-
-    You should have received a copy of the GNU Lesser General Public
-    License along with this library; if not, write to the Free Software
-    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
-    MA 02110-1301  USA.
-*/
-
-namespace SiWeather\Webservice;
-
-/**
-  * @brief Describes a city in a region and a country.
-  *
-  * The codes (region and country) are Alpha 2 codes from ISO 3166-1 (country) and ISO 3166-2 (subdivision).
-  *
-  */
-class Location
-{
-	public function __construct($city, $postalCode = "",
-								$regionName = "", $regionCode = "",
-								$countryName = "", $countryCode = "",
-								$latitude = "", $longitude = "", 
-								$timeZone = ""){
-
-		$this->_city = "";
-		$this->_postalCode = "";
-		$this->_regionName = "";
-		$this->_regionCode = "";
-		$this->_countryName = "";
-		$this->_countryCode = "";
-		$this->_longitude = 0;
-		$this->_latitude = 0;
-		$this->_timeZone = "";
-
-
-		$this->setCity($city);
-		$this->setPostalCode($postalCode);
-		$this->setRegion($regionName, $regionCode);
-		$this->setCountry($countryName, $countryCode);
-		$this->setLocation($latitude, $longitude);
-		$this->setTimezone($timeZone);
-	}
-
-	public function setCity($name){
-		$this->_city = $name;
-	}
-	
-	public function city(){
-		return $this->_city;
-	}
-	
-	public function setPostalCode($code){
-		$this->_postalCode = $code;
-	}
-	
-	public function postalCode(){
-		return $this->_postalCode;
-	}
-	
-	public function setRegion($name, $code){
-		$this->_regionName = $name;
-		if(strlen($code) == 2)
-			$this->_regionCode = $code;
-	}
-	
-	public function regionName(){
-		return $this->_regionName;
-	}
-	
-	public function regionCode(){
-		return $this->_regionCode;
-	}
-
-	public function setCountry($name, $code){
-		$this->_countryName = $name;
-		if(strlen($code) == 2)
-			$this->_countryCode = $code;
-	}
-	
-	public function countryName(){
-		return $this->_countryName;
-	}
-	
-	public function countryCode(){
-		return $this->_countryCode;
-	}
-	
-	/**
-	  * @brief Sets the location to @p $latitude and @p $longitude
-	  *
-	  * @note Please note that this functions arguments are in the typical order of 
-	  *       city coordinates, whereas the WKT format turned around those values
-	  *       (WKT(Longitude Latitude)).
-	  *
-	  * @see latitude()
-	  * @see longitude()
-	  * @see locationWkt()
-	  */
-	public function setLocation($latitude, $longitude){
-		if(self::validLatitude($latitude))
-			$this->_latitude = $latitude;
-		if(self::validLongitude($longitude))
-			$this->_longitude = $longitude;
-	}
-	
-	public function latitude(){
-		return $this->_latitude;
-	}
-	
-	public function longitude(){
-		return $this->_longitude;
-	}
-	
-	public function locationWkt(){
-		return $this->longitude() ." ". $this->latitude();
-	}
-
-	public static function validLatitude($latitude){
-		if(is_numeric($latitude) && (-90.0 <= $latitude && $latitude <= 90.0))
-			return true;
-		return false;
-	}
-
-	public static function validLongitude($longitude){
-		if(is_numeric($longitude) && (-180.0 <= $longitude && $longitude <= 180.0))
-			return true;
-		return false;
-	}
-
-	public function setTimeZone($zone){
-		if(preg_match("/^[\D]+\/[\D]+$/", $zone) > 0)
-			$this->_timeZone = $zone;
-	}
-	
-	public function timeZone(){
-		return $this->_timeZone;
-	}
-
-	private $_countryCode;
-	private $_countryName;
-	private $_regionCode;
-	private $_regionName;
-	private $_city;
-	private $_postalCode;
-	private $_timeZone;
-	private $_latitude;
-	private $_longitude;
-}
-
-?>
Index: src/webservice/htdocs/SiWeather/Webservice/Setup.php
===================================================================
--- src/webservice/htdocs/SiWeather/Webservice/Setup.php	(revision 4b09d68494ca3be62fedf1006b53f3df1248aa54)
+++ 	(revision )
@@ -1,460 +1,0 @@
-<?php
-/*
-    Copyright (C) 2015 EngSaS - Engineering Solutions and Services Langenbach. All rights reserved.
-
-    This library is free software; you can redistribute it and/or
-    modify it under the terms of the GNU Lesser General Public
-    License as published by the Free Software Foundation; either
-    version 2.1 of the License, or (at your option) any later version.
-
-    This library is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-    Lesser General Public License for more details.
-
-    You should have received a copy of the GNU Lesser General Public
-    License along with this library; if not, write to the Free Software
-    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
-    MA 02110-1301  USA.
-*/
-
-namespace SiWeather\Webservice;
-
-require_once(__DIR__ ."/../../inc/envsetup.php");
-
-/**
-  * @brief Configures the Webservice and creates all needed files and directories (e.g. Databases)
-  *
-  * @note Requires php-posix!
-  */
-class Setup {
-
-	public function __construct(){
-		$this->_webserviceConfig = new WebserviceConfig();
-		$this->_dataDirectory = $this->_webserviceConfig->getConfig("dataDirectory");
-		$this->_databaseHandler = new DatabaseHandler();
-		$this->_databaseFile = $this->_databaseHandler->databaseFile();
-		$this->_databaseDirectory = pathinfo($this->_databaseFile, PATHINFO_DIRNAME);
-		$this->_databaseFirstConnection = !file_exists($this->_databaseFile);
-	}
-	
-	/**
-	  * @brief Checks if data directory is present and writable  and returns a value from DatabaesChecks
-	  *
-	  * If an error occurs, the error message is stored into @p $errorMessage.
-	  *
-	  * @see DataDirectoryChecks
-	  * @see dataDirectoryCreate()
-	  */
-	public function dataDirectoryCheck(&$errorMessage){
-		if(!is_object($this->_webserviceConfig)){
-			$errorMessage = _("Could not load the webservice configuration");
-			return DataDirectoryChecks::NoConfiguration;
-		}
-		if(!$this->_dataDirectory || empty($this->_dataDirectory)){
-			$errorMessage = _("Could not determine dataDirectory setting");
-			return DataDirectoryChecks::NoDirectoryPath;
-		}
-		if(!is_dir($this->_dataDirectory)){
-			$errorMessage = _("Data directory does not exists");
-			return DataDirectoryChecks::NotExist;
-		}
-		if(!is_writable($this->_dataDirectory)){
-			$errorMessage = \Translator::swGettext("Data directory is not writable for %s:%s (%s)",
-												  $this->getProcessUser(), $this->getProcessGroup(), $this->_dataDirectory);
-			return DataDirectoryChecks::NotWritable;
-		}
-		return DataDirectoryChecks::Success;
-	}
-	
-	/**
-	  * @brief Creates the data directory and returns a value from DatabaesChecks
-	  *
-	  * If an error occurs, the error message is stored into @p $errorMessage.
-	  *
-	  * @see DataDirectoryChecks
-	  * @see dataDirectoryCreate()
-	  */
-	public function dataDirectoryCreate(&$errorMessage){
-		$result = $this->dataDirectoryCheck($errorMessage);
-		if($result == DataDirectoryChecks::Success){
-			// directory already exists, therefore there is no need to create it
-			return DataDirectoryChecks::Success;
-		}
-		if($result != DataDirectoryChecks::NotExist){
-			return $result;
-		}
-		// clear $errorMessage, because it contains the "Data directory does not exist" entry
-		// from dataDirectoryCheck(), which is not an error at this point!
-		$errorMessage = "";
-		if(!mkdir($this->_dataDirectory)){
-			$errorMessage = \Translator::swGettext("Could not create data directory (%s)", $this->_dataDirectory);
-			return DataDirectoryChecks::Error;
-		}
-		return DataDirectoryChecks::Success;
-	}
-	
-	/**
-	  * @brief Checks everything related to the database path and returns a value from DatabaesChecks
-	  *
-	  * If an error occurs, the error message is stored into @p $errorMessage.
-	  *
-	  * @see DatabaseDirectoryChecks
-	  * @see databaseDirectoryCreate()
-	  */
-	public function databaseDirectoryCheck(&$errorMessage){
-		if(is_null($this->_databaseDirectory) || empty($this->_databaseDirectory)){
-			$errorMessage = \Translator::swGettext("Failed to extract directory from database file path (%s)", $this->_databaseFile);
-			return DatabaseChecks::NoDirectoryPath;
-		}
-		if(!is_dir($this->_databaseDirectory)){
-			$errorMessage = \Translator::swGettext("Database directory does not exists (%s)", $this->_databaseDirectory);
-			return DatabaseChecks::DirectoryDoesNotExist;
-		}
-		if(!is_writable($this->_databaseDirectory)){
-			$errorMessage = \Translator::swGettext("Database directory is not writable  for %s:%s (%s)",
-												  $this->getProcessUser(), $this->getProcessGroup(),
-												  $this->_databaseDirectory);
-			return DatabaseChecks::DirectoryNotWritable;
-		}
-		return DatabaseChecks::Success;
-	}
-	
-	/**
-	  * @brief Creates the database directory  and returns a value from DatabaesChecks
-	  *
-	  * If an error occurs, the error message is stored into @p $errorMessage.
-	  *
-	  * @see DatabaseDirectoryChecks
-	  * @see databaseDirectoryCheck()
-	  */
-	public function databaseDirectoryCreate(&$errorMessage){
-		$result = $this->databaseDirectoryChecks($errorMessage);
-		if($result == DatabaseChecks::Success){
-			$errorMessage = "";
-			return DatabaseChecks::Success;
-		}
-		if($result == DatabaseChecks::NoDatabaseFile || $result == DatabaseChecks::NoDirectoryPath || $result == DatabaseChecks::DirectoryNotWritable){
-			return $result;
-		}
-		if(!mkdir($this->_databaseDirectory)){
-			$errorMessage = \Translator::swGettext("Could not create database directory (%s)", $this->_databaseDirectory);
-			return DatabaseChecks::Error;
-		}
-		return DatabaseChecks::Success;
-	}
-	
-	/**
-	  * @brief Checks, if the database file is given and is in a writable path
-	  *
-	  * The database file itself is created by the DatabaseHandler. Therefore
-	  * this function only checks, if the database directory exists, and it must be
-	  * writable.
-	  *
-	  * @see DatabaseChecks
-	  * @see databaseDirectoryCheck()
-	  */
-	public function databaseFileCheck(&$errorMessage){
-		if(is_null($this->_databaseFile) || empty($this->_databaseFile)){
-			$errorMessage = \Translator::swGettext("No database file given (%s)", $this->_databaseHandler->lastErrorMessage());
-			return DatabaseChecks::NoDatabaseFile;
-		}
-		if(file_exists($this->_databaseFile)){
-			if(!is_writable($this->_databaseFile)){
-				$errorMessage = \Translator::swGettext("Database file is not writable for %s:%s (%s)",
-													  $this->getProcessUser(), $this->getProcessGroup(),
-													  $this->_databaseFile);
-				return DatabaseChecks::DatabaseFileNotWritable;
-			}
-			return DatabaseChecks::Success;
-		}
-		// if the databaseDirectoryCheck function return something other than success,
-		// we probably have a problem (like no write permission, ...)
-		if($this->databaseDirectoryCheck($errorMessage) != DatabaseChecks::Success){
-			return DatabaseChecks::Error;
-		}
-		return DatabaseChecks::Success;
-	}
-
-	public function databaseConnection(&$errorMessage){
-		if(!is_object($this->_databaseHandler)){
-			$errorMessage = _("No database handler");
-			return false;
-		}
-		if(!$this->_databaseHandler->connect(true)){
-			$errorMessage = \Translator::swGettext("Could not connect to the database (%s)", $this->_databaseHandler->lastErrorMessage());
-			return false;
-		}
-		// check version, if an schema already exists
-		if($this->_databaseHandler->databaseTableExists("schema")){
-			if(!$this->_databaseHandler->checkVersions()){
-				$errorMessage = \Translator::swGettext("Database schema versions check failed (%s)", $this->_databaseHandler->lastErrorMessage());
-				return false;
-			}
-		}
-		
-		// prepare Spatalite
-		if(!$this->_databaseHandler->databaseTableExists("spatial_ref_sys")){
-			if(!$this->_databaseHandler->exec("BEGIN")){
-				$errorMessage = _("Could not start transaction to init Spatialite");
-				return false;
-			}
-			if(!$this->_databaseHandler->exec("SELECT InitSpatialMetadata()")){
-				$errorMessage = _("Could not initiate Spatialite metadata");
-				return false;
-			}
-			if(!$this->_databaseHandler->exec("COMMIT")){
-				$errorMessage = _("Could not commit transaction to init Spatialite");
-				return false;
-			}
-		}
-
-// 		// prepare countries table
-// 		$table = "countries";
-// 		if(!$this->databaseTableExists($table)){
-// 			$sql  = "CREATE TABLE ". $table ." (";
-// 			$sql .= "  id INTEGER NOT NULL PRIMARY KEY,";
-// 			$sql .= "  name TEXT NOT NULL,";
-// 			$sql .= "  code VARCHAR(2)";
-// 			$sql .= ")";
-// 			if(!$this->databaseTableCreate($table, $sql, $errorMessage)){
-// 				return false;
-// 			}
-// 		}
-// 		
-// 		// prepare regions table
-// 		$table = "regions";
-// 		if(!$this->databaseTableExists($table)){
-// 			$sql  = "CREATE TABLE ". $table ." (";
-// 			$sql .= "  id INTEGER NOT NULL PRIMARY KEY,";
-// 			$sql .= "  name TEXT NOT NULL,";
-// 			$sql .= "  code VARCHAR(2),";
-// 			$sql .= "  country INTEGER,";
-// 			$sql .= "  FOREIGN KEY(country) REFERENCES countries(id)";
-// 			$sql .= ")";
-// 			if(!$this->databaseTableCreate($table, $sql, $errorMessage)){
-// 				return false;
-// 			}
-// 		}
-
-		// prepare schema table
-		$table = "schema";
-		if(!$this->_databaseHandler->databaseTableExists($table)){
-			$sql  = "CREATE TABLE ". $table ." (";
-			$sql .= "  id INTEGER NOT NULL PRIMARY KEY,";
-			$sql .= "  name TEXT NOT NULL,";
-			$sql .= "  version INTEGER NOT NULL";
-			$sql .= ")";
-			if(!$this->databaseTableCreate($table, $sql, $errorMessage)){
-				return false;
-			}
-			$sql  = "INSERT INTO ". $table ." (name, version) VALUES(:name, :version)";
-			$sqlStatement = $this->_databaseHandler->prepare($sql);
-			$sqlStatement->clear();
-			$sqlStatement->bindValue(":name", "core");
-			$sqlStatement->bindValue(":version", $this->_webserviceConfig->getConfig("databaseVersionCore"));
-			if(!$sqlStatement->execute()){
-				$errorMessage = Translation::swGettext("Could not add schema version %s to the database", "core");
-				error_log($errorMessage);
-				return false;
-			}
-			$sqlStatement->reset();
-		}
-
-		// prepare cities table
-		$table = "cities";
-		if(!$this->_databaseHandler->databaseTableExists($table)){
-			$sql  = "CREATE TABLE ". $table ." (";
-			$sql .= "  id INTEGER NOT NULL PRIMARY KEY,";
-			$sql .= "  name TEXT NOT NULL";
-			$sql .= ")";
-			if(!$this->databaseTableCreate($table, $sql, $errorMessage)){
-				return false;
-			}
-			// creating a POINT Geometry column named center,
-			// taking two coordinates in SRID 4326 (WGS84) format
-			$sql  = "SELECT AddGeometryColumn(\"". $table ."\", ";
-			$sql .= "\"location\", 4326, \"POINT\", \"XY\")";
-			if(!$this->_databaseHandler->exec($sql)){
-				$errorMessage = Translation::swGettext("Could not create location field for %s table", $table);
-				return false;
-			}
-		}
-
-		// prepare status table
-		$table = "status";
-		if(!$this->_databaseHandler->databaseTableExists($table)){
-			$sql  = "CREATE TABLE ". $table ." (";
-			$sql .= "  id INTEGER NOT NULL PRIMARY KEY,";
-			$sql .= "  name TEXT NOT NULL";
-			$sql .= ")";
-			if(!$this->databaseTableCreate($table, $sql, $errorMessage)){
-				return false;
-			}
-			$status = array("confirming", "active", "deletionrequested");
-			$sql  = "INSERT INTO ". $table ." (name) VALUES(:name)";
-			$sqlStatement = $this->_databaseHandler->prepare($sql);
-			foreach ($status as $name){
-				$sqlStatement->clear();
-				$sqlStatement->bindValue(":name", $name);
-				if(!$sqlStatement->execute()){
-					$errorMessage = Translation::swGettext("Could not add status %s to the database", $name);
-					error_log($errorMessage);
-					return false;
-				}
-				$sqlStatement->reset();
-			}
-		}
-
-		// prepare stations table
-		$table = "stations";
-		if(!$this->_databaseHandler->databaseTableExists($table)){
-			$sql  = "CREATE TABLE ". $table ." (";
-			$sql .= "  id INTEGER NOT NULL PRIMARY KEY,";
-			$sql .= "  name TEXT NOT NULL,";
-			$sql .= "  city INTEGER NOT NULL,";
-			$sql .= "  uuid TEXT NOT NULL,";
-			$sql .= "  ownerMail TEXT NOT NULL,";
-			$sql .= "  type TEXT NOT NULL,";
-			$sql .= "  typeUrl TEXT,";
-			$sql .= "  creationDate TIMESTAMP DEFAULT (strftime('%s', 'now')),";
-// 			$sql .= "  creationDate TIMESTAMP DEFAULT CURRENT_TIMESTAMP,";
-			$sql .= "  status INTEGER DEFAULT 1,";
-			$sql .= "  FOREIGN KEY(city) REFERENCES cities(id)";
-			$sql .= "  FOREIGN KEY(status) REFERENCES status(id)";
-			$sql .= ")";
-			if(!$this->databaseTableCreate($table, $sql, $errorMessage)){
-				return false;
-			}
-			// creating a POINT Geometry column named center,
-			// taking two coordinates in SRID 4326 (WGS84) format
-			$sql  = "SELECT AddGeometryColumn(\"". $table ."\", ";
-			$sql .= "\"location\", 4326, \"POINT\", \"XY\")";
-			if(!$this->_databaseHandler->exec($sql)){
-				$errorMessage = Translation::swGettext("Could not create location field for %s table", $table);
-				return false;
-			}
-		}
-		
-		return true;
-	}
-	
-	public function databaseVersionSqlite(&$errorMessage){
-		if(!is_object($this->_databaseHandler)){
-			return 0;
-		}
-		$result =  $this->_databaseHandler->versionSqlite();
-		if($result == 0){
-			$errorMessage = $this->_databaseHandler->lastErrorMessage();
-		}
-		return $result;
-	}
-	
-	public function databaseVersionSpatalite(&$errorMessage){
-		if(!is_object($this->_databaseHandler)){
-			return 0;
-		}
-		$result = $this->_databaseHandler->versionSpatialite();
-		if($result == 0){
-			$errorMessage = $this->_databaseHandler->lastErrorMessage();
-		}
-		return $result;
-	}
-	
-	public function apiCheckWithoutRewrite(&$errorMessage){
-		return $this->apiCheck("index.php/stations", $errorMessage);
-	}
-	
-	public function apiCheckWithRewrite(&$errorMessage){
-		return $this->apiCheck("stations", $errorMessage);
-	}
-
-	private function getProcessUser(){
-		$processUser = posix_getpwuid(posix_getuid());
-		return $processUser["name"];
-	}
-	
-	private function getProcessGroup(){
-		$processGroup = posix_getgrgid(posix_getgid());
-		return $processGroup["name"];
-	}
-	
-	private function apiCheck($url, &$errorMessage){
-		$baseUrl = $this->_webserviceConfig->webserviceBaseUrl();
-		if(!$baseUrl || empty($baseUrl)){
-			$errorMessage = _("No webservice base url given!");
-			return false;
-		}
-
-		# base_url needs to end with a /, otherwise the last element is chopped
-		try{
-			$client = new \GuzzleHttp\Client
-			(
-				[
-					"base_uri" => $baseUrl,
-					"timeout" => 2.0,
-					"http_errors" => false,
-				]
-			);
-			$response = $client->get($url);
-		}
-		catch(\GuzzleHttp\Exception\ConnectException $exception){
-			$errorMessage = \Translator::swGettext("Webservce has not answered at url %s! Error: %s", $baseUrl, $exception->getMessage());
-			return false;
-		}
-		if(is_null($response)){
-			$errorMessage = \Translator::swGettext("Webservice has not answered at url %s!", $baseUrl);
-			return false;
-		}
-		$result = $response->getStatusCode();
-		if($result != 200){
-			$errorMessage = \Translator::swGettext("Got http error %s (%s) at url %s", $result, $response->getReasonPhrase(), $baseUrl . $url);
-			return false;
-		}
-		$result = $response->getReasonPhrase();
-		if($result != "OK"){
-			$errorMessage = \Translator::swGettext("Got a http error reason with http code 200: %s", $result);
-			return false;
-		}
-
-		$body = $response->getBody();
-		if(empty($body)){
-			$errorMessage = _("Got empty return value");
-			return false;
-		}
-		
-		$json = json_decode($body);
-		if(is_null($json)){
-			$errorMessage = _("Could not decode json message body");
-			return false;
-		}
-		return true;
-	}
-	
-	private function databaseTableCreate($table, $sqlStatement, &$errorMessage){
-		if(!$this->_databaseHandler || !is_object($this->_databaseHandler)){
-			return false;
-		}
-		if(!$this->_databaseHandler->exec("BEGIN")){
-			$errorMessage = \Translator::swGettext("Could not start transaction to create table %s", $table);
-			return false;
-		}
-		if(!$this->_databaseHandler->exec($sqlStatement)){
-			$errorMessage = \Translator::swGettext("Could not execute sql statement to create table %s:\n%s", $table, $sqlStatement);
-			return false;
-		}
-		if(!$this->_databaseHandler->exec("COMMIT")){
-			$errorMessage = \Translator::swGettext("Could not commit transaction to create table %s", $table);
-			return false;
-		}
-		return true;
-	}
-
-	private $_webserviceConfig;
-	private $_dataDirectory;
-	private $_databaseHandler;
-	private $_databaseFile;
-	private $_databaseFirstConnection;
-}
-
-?>
Index: src/webservice/htdocs/SiWeather/Webservice/WebserviceApi.php
===================================================================
--- src/webservice/htdocs/SiWeather/Webservice/WebserviceApi.php	(revision 4b09d68494ca3be62fedf1006b53f3df1248aa54)
+++ 	(revision )
@@ -1,449 +1,0 @@
-<?php
-/*
-    Copyright (C) 2015 EngSaS - Engineering Solutions and Services Langenbach. All rights reserved.
-
-    This library is free software; you can redistribute it and/or
-    modify it under the terms of the GNU Lesser General Public
-    License as published by the Free Software Foundation; either
-    version 2.1 of the License, or (at your option) any later version.
-
-    This library is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-    Lesser General Public License for more details.
-
-    You should have received a copy of the GNU Lesser General Public
-    License along with this library; if not, write to the Free Software
-    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
-    MA 02110-1301  USA.
-*/
-
-namespace SiWeather\Webservice;
-
-require(__DIR__ ."/../../inc/envsetup.php");
-
-/**
-  * @brief Implementation of the Webservice API
-  *
-  * @module WebserviceAPI
-  */
-class WebserviceApi {
-	/**
-		* @brief Handles the stations (list) REST requests
-		*/
-	public static function stations(){
-		$stations = Array();
-
-		$db = new DatabaseHandler();
-		if(!$db->connect()){
-			echo json_encode
-			(
-				[
-					"result" => "failed",
-					"message" => "Could not connect to the database",
-				]
-			);
-			return;
-		}
-		$db->exec("BEGIN");
-
-		$sqlStatement = $db->prepare("SELECT stations.uuid as uuid, stations.name as name, X(stations.location) as longitude, Y(stations.location) as latitude, cities.name as city FROM stations, cities WHERE stations.city=cities.id");
-		if(!$sqlStatement){
-			$db->exec("ROLLBACK");
-			echo json_encode
-			(
-				[
-					"result" => "failed",
-					"message" => "Could not fetch stations from database",
-				]
-			);
-			return;
-		}
-		$result = $sqlStatement->execute();
-		while($row = $result->fetchArray()){
-			$station = Array();
-			$station["uuid"] = $row["uuid"];
-			$station["name"] = $row["name"];
-			$station["longitude"] = $row["longitude"];
-			$station["latitude"] = $row["latitude"];
-			$station["city"] = $row["city"];
-	// 		$station["values"] = Array();
-	// 		$station["values"][] = "temperature";
-	// 		$station["values"][] = "humidity";
-			$station["url"] = "stations/". $station["uuid"];
-			$stations[] = $station;
-		}
-		$db->exec("COMMIT");
-
-		echo json_encode($stations);
-	}
-
-	/**
-	  * @brief Registers a new weather station
-	  *
-	  * @note Call this function with a big timeout > 2seconds, because we use another webservice
-	  *       to fetch location data. This fetch runs already max. 2 seconds.
-	  * @note Requires php-pecl-uuid
-	  * @note Requires php-pecl-rrd
-	  */
-	public static function stationsRegister(){
-		$geoLocationRadius = 5;
-
-		try{
-			$app = \Slim\Slim::getInstance("siweather");
-			$body = $app->request->getBody();
-			$json = json_decode($body, true);
-
-			$app->response()->header("Content-Type", "application/json");
-
-			if(!function_exists("uuid_create")){
-				error_log("pecl uuid extension not installed!");
-				echo json_encode
-				(
-					[
-						"result" => "missinguuidcreate",
-						"message" => "The function uuid_create() from pecl package http://pecl.php.net/package/uuid is not installed, but needed!",
-					]
-				);
-				return;
-			}
-
-			if(!function_exists("rrd_create") || !function_exists("rrd_update")){
-				error_log("pecl rrd extension not installed!");
-				echo json_encode
-				(
-					[
-						"result" => "missingrrd",
-						"message" => "The function rrd_create() or rrd_update() from pecl package http://pecl.php.net/package/rrd is not installed, but needed!",
-					]
-				);
-				return;
-			}
-
-			$expectedKeys = array("name", "city", "longitude", "latitude", "email", "type");
-			$missingKeys = array();
-			foreach($expectedKeys as $key){
-				if(!array_key_exists($key, $json))
-					$missingKeys[] = $key;
-			}
-			if(count($missingKeys) > 0){
-				echo json_encode
-				(
-					[
-						"result" => "missingkeys",
-						"message" => "Your request misses the following keys: ". implode(", ", $missingKeys),
-					]
-				);
-				return;
-			}
-
-			if(!Location::ValidLatitude($json["latitude"])){
-				echo json_encode
-				(
-					[
-						"result" => "invalid latitude",
-						"message" => "Your specified an invalid latitude: ". $json["latitude"],
-					]
-				);
-				return;
-			}
-			if(!Location::ValidLongitude($json["longitude"])){
-				echo json_encode
-				(
-					[
-						"result" => "invalid longitude",
-						"message" => "Your specified an invalid longitude: ". $json["longitude"],
-					]
-				);
-				return;
-			}
-			if(empty($json["email"]) || !filter_var($json["email"], FILTER_VALIDATE_EMAIL)){
-				echo json_encode
-				(
-					[
-						"result" => "invalid email",
-						"message" => "Your specified an invalid email address: ". $json["email"],
-					]
-				);
-				return;
-			}
-			if(!array_key_exists("typeUrl", $json)){
-				$json["typeUrl"] = "";
-			}
-			elseif(!empty($json["typeUrl"]) && !filter_var($json["typeUrl"], FILTER_VALIDATE_URL)){
-				echo json_encode
-				(
-					[
-						"result" => "invalid type url",
-						"message" => "Your specified type url is invalid: ". $json["typeUrl"] ." Set it to an empty value or fix it.",
-					]
-				);
-				return;
-			}
-
-			$errorMessage = "";
-			$locations = GeoLocator::locations($json["latitude"], $json["longitude"], $geoLocationRadius, $errorMessage);
-			if(!$locations || count($locations) < 1){
-				error_log($errorMessage);
-				echo json_encode
-				(
-					[
-						"result" => "unprovenlocation",
-						"message" => "Could not check the city (". $json["city"] .") and location (". $json["latitude"] .", ". $json["longitude"] .") you send with help of your city and geo coordinates. Please make sure, your data is correct.",
-					]
-				);
-				return;
-			}
-			else{
-				$validatedLocation = false;
-				foreach($locations as $location){
-					if($location->city() == $json["city"]){
-						$validatedLocation = $location;
-					}
-				}
-				if(!$validatedLocation){
-					$message  = "The city (". $json["city"] .") and location (". $json["latitude"] .", ". $json["longitude"] .") you send, does not suite with locations we found at your given location (city, latitude, longitude):\n";
-					foreach($locations as $location){
-						$message .= "    ". $location->city() .": ". $location->latitude() .", ". $location->longitude() ."\n";
-					}
-					$message .= " Please make sure, your data is correct.";
-
-					echo json_encode
-					(
-						[
-							"result" => "unprovenlocation",
-							"message" => $message,
-						]
-					);
-					return;
-				}
-			}
-
-			$db = new DatabaseHandler();
-			if(!$db->connect()){
-				echo json_encode
-				(
-					[
-						"result" => "failed",
-						"message" => "Could not connect to the database",
-					]
-				);
-				return;
-			}
-			$db->exec("BEGIN");
-
-			// find out, if the city is already there
-			$cityId = -1;
-			$sqlStatement = $db->prepare("SELECT id FROM cities WHERE name=:name AND location=:location");
-			if(!$sqlStatement){
-				$db->exec("ROLLBACK");
-				echo json_encode
-				(
-					[
-						"result" => "failed",
-						"message" => "Could not fetch city from database",
-					]
-				);
-				return;
-			}
-			$sqlStatement->bindValue(":name", $validatedLocation->city());
-			$sqlStatement->bindValue(":location", "POINT(". $location->locationWkt() .")");
-			$result = $sqlStatement->execute();
-			$row = $result->fetchArray();
-			if($row){
-				$cityId = $row[0];
-			}
-			else{
-				$sqlStatement = $db->prepare("INSERT INTO cities (name, location) VALUES(:name, GeomFromText(:location, 4326))");
-				if(!$sqlStatement){
-					error_log("Failed to add city to the database: ". $db->lastDatabaseErrorMessage());
-					$db->exec("ROLLBACK");
-					echo json_encode
-					(
-						[
-							"result" => "failed",
-							"message" => "Could insert city into the database",
-						]
-					);
-					return;
-				}
-				$sqlStatement->bindValue(":name", $validatedLocation->city());
-				$sqlStatement->bindValue(":location", "POINT(". $location->locationWkt() .")");
-				$sqlResult = $sqlStatement->execute();
-				if(!$sqlResult){
-					error_log("Failed to add city to the database: ". $db->lastDatabaseErrorMessage());
-					$db->exec("ROLLBACK");
-					echo json_encode
-					(
-						[
-							"result" => "failed",
-							"message" => "Could not add city to the database",
-						]
-					);
-					return;
-				}
-				$cityId = $db->lastInsertRowId();
-			}
-			if(!is_numeric($cityId) || $cityId < 0){
-				error_log("Failed to select city from the database: ". $db->lastDatabaseErrorMessage());
-				$db->exec("ROLLBACK");
-				echo json_encode
-				(
-					[
-						"result" => "failed",
-						"message" => "Could not select city from the database",
-					]
-				);
-				return;
-			}
-
-			// find out initial state
-			$statusId = -1;
-			$sqlStatement = $db->prepare("SELECT id FROM status WHERE name=:name");
-			if(!$sqlStatement){
-				$db->exec("ROLLBACK");
-				error_log("Could not find initial state to register station (Prepare): ". $db->lastDatabaseErrorMessage());
-				echo json_encode
-				(
-					[
-						"result" => "failed",
-						"message" => "Could not fetch status from database",
-					]
-				);
-				return;
-			}
-			$sqlStatement->bindValue(":name", "confirming");
-			$result = $sqlStatement->execute();
-			$row = $result->fetchArray();
-			if($row){
-				$statusId = $row[0];
-			}
-			else{
-				error_log("columns ". $result->numColumns() .", columnType: ". $result->columnType(0));
-				$db->exec("ROLLBACK");
-				error_log("Could not find initial state to register station (Execute): ". $db->lastDatabaseErrorMessage());
-				echo json_encode
-				(
-					[
-						"result" => "failed",
-						"message" => "Could not fetch status from database (Status not found)",
-					]
-				);
-				return;
-			}
-
-			// insert station
-			$uuid = uuid_create(4);
-			$sqlStatement = $db->prepare("INSERT INTO stations (name, city, uuid, ownerMail, type, typeUrl, status, location) VALUES(:name, :city, :uuid, :ownerMail, :type, :typeUrl, :status, GeomFromText(:location, 4326))");
-			if(!$sqlStatement){
-				$db->exec("ROLLBACK");
-				echo json_encode
-				(
-					[
-						"result" => "failed",
-						"message" => "Could insert station into the database",
-					]
-				);
-				return;
-			}
-			$sqlStatement->bindValue(":name", $json["name"]);
-			$sqlStatement->bindValue(":city", $cityId);
-			$sqlStatement->bindValue(":uuid", $uuid);
-			$sqlStatement->bindValue(":ownerMail", $json["email"]);
-			$sqlStatement->bindValue(":type", $json["type"]);
-			$sqlStatement->bindValue(":typeUrl", $json["typeUrl"]);
-			$sqlStatement->bindValue(":status", $statusId);
-			$sqlStatement->bindValue(":location", "POINT(". $location->locationWkt() .")");
-			$sqlResult = $sqlStatement->execute();
-			if(!$sqlResult){
-				error_log("Failed to add station to the database: ". $db->lastDatabaseErrorMessage());
-				$db->query("ROLLBACK");
-				echo json_encode
-				(
-					[
-						"result" => "failed",
-						"message" => "Could not add station to the database",
-					]
-				);
-				return;
-			}
-
-			// creating rrd file
-			$webserviceConfig = new WebserviceConfig();
-			$rrdFileName = $webserviceConfig->dataDirectory() . $uuid .".rrd"; 
-			$rrdCreator = new \RRDCreator($rrdFileName, "now", 900);
-			$rrdCreator->addDataSource("Temp:GAUGE:1320:-100:100");
-			$rrdCreator->addDataSource("Humidity:GAUGE:1320:0:100");
-			$rrdCreator->addDataSource("Pressure:GAUGE:1320:800:1200");
-			$rrdCreator->addDataSource("WindSpeed:GAUGE:1320:0:999");
-			$rrdCreator->addDataSource("Winddirection:GAUGE:1320:1:360");
-			$rrdCreator->addDataSource("Rainfall:GAUGE:1320:0:999");
-			$rrdCreator->addArchive("AVERAGE:0.5:1:96");
-			$rrdCreator->addArchive("AVERAGE:0.5:4:96");
-			$rrdCreator->addArchive("AVERAGE:0.5:8:360");
-			$rrdCreator->addArchive("AVERAGE:0.5:16:2190");
-			$rrdCreator->addArchive("AVERAGE:0.5:24:146000");
-			$rrdCreator->addArchive("AVERAGE:0.5:48:146000");
-			$rrdCreator->addArchive("AVERAGE:0.5:96:146000");
-			$rrdCreator->addArchive("MIN:0.5:4:96");
-			$rrdCreator->addArchive("MIN:0.5:8:360");
-			$rrdCreator->addArchive("MIN:0.5:16:2190");
-			$rrdCreator->addArchive("MIN:0.5:24:146000");
-			$rrdCreator->addArchive("MIN:0.5:48:146000");
-			$rrdCreator->addArchive("MIN:0.5:96:146000");
-			$rrdCreator->addArchive("MAX:0.5:4:96");
-			$rrdCreator->addArchive("MAX:0.5:8:360");
-			$rrdCreator->addArchive("MAX:0.5:16:2190");
-			$rrdCreator->addArchive("MAX:0.5:24:146000");
-			$rrdCreator->addArchive("MAX:0.5:48:146000");
-			$rrdCreator->addArchive("MAX:0.5:96:146000");
-			if(!$rrdCreator->save()){
-				$db->query("ROLLBACK");
-				$errorMessage = rrd_error();
-				echo json_encode
-				(
-					[
-						"result" => "failed",
-						"message" => "Could not create rrd files for this station: ". $errorMessage,
-					]
-				);
-				return;
-			}
-
-			// finish transaction
-			$db->exec("COMMIT");
-			
-			$deletionDate = date(DATE_RFC850, time() + 14 * 24 * 60 * 60);
-			$mailRecipient = $json["email"];
-			$header = "From: ". WebserviceConfig::value("mailaddressFrom") ."\r\n" .
-					  "Reply-To: ". WebserviceConfig::value("mailaddressFrom") ."\r\n" .
-					  "CC: ". WebserviceConfig::value("mailaddressCC") ."\r\n" .
-					  "X-Mailer: PHP/". phpversion();
-			$message = "Dear user,\r\n" .
-					   "\r\n" . 
-					   "please visit the following Link to confirm your newly created weather station ". $json["name"] .".\r\n" . 
-					   "If you do not visit this link, your station will be delete in 14 days (". $deletionDate .").\r\n" .
-					   "\r\n" . 
-					   WebserviceConfig::value("webserviceBaseUrl"). "/stations/". $uuid ."/confirm" ."\r\n" . 
-					   "\r\n" . 
-					   "Kind regards,\r\n" . 
-					   "Your weather service\r\n";
-			mail($mailRecipient, \Translator::swGettext("Weather station %s - Confirmation request", $uuid), $message, $header);
-			echo json_encode
-			(
-				[
-					"result" => "success",
-					"message" => "Confirmation request is send to ". $mailRecipient .". The station is fully functional already, but might be deleted in 14 days (". $deletionDate .") without any further warnings!",
-					"uuid" => $uuid,
-				]
-			);
-		}
-		catch(Exception $exception){
-			error_log("Caught exception handling request stationsRegister: ". $exception->getMessage());
-			$app->response()->status(400);
-			$app->response()->header("X-Status-Reason", $exception->getMessage());
-		}
-	}
-}
-
-?>
Index: src/webservice/htdocs/SiWeather/Webservice/WebserviceConfig.php
===================================================================
--- src/webservice/htdocs/SiWeather/Webservice/WebserviceConfig.php	(revision 4b09d68494ca3be62fedf1006b53f3df1248aa54)
+++ 	(revision )
@@ -1,91 +1,0 @@
-<?php
-/*
-    Copyright (C) 2015 EngSaS - Engineering Solutions and Services Langenbach. All rights reserved.
-
-    This library is free software; you can redistribute it and/or
-    modify it under the terms of the GNU Lesser General Public
-    License as published by the Free Software Foundation; either
-    version 2.1 of the License, or (at your option) any later version.
-
-    This library is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-    Lesser General Public License for more details.
-
-    You should have received a copy of the GNU Lesser General Public
-    License along with this library; if not, write to the Free Software
-    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
-    MA 02110-1301  USA.
-*/
-
-namespace SiWeather\Webservice;
-
-class WebserviceConfig {
-
-	function __construct(){
-		require(__DIR__ ."/../../../config/config.php");
-		$this->_config = $config;
-		$this->loadAdditionalConfiguration();
-
-		if($this->getConfig("mode") == "development"){
-			error_reporting(E_ALL);
-		}
-	}
-	
-	static public function value($key){
-		$webserviceConfig = new WebserviceConfig();
-		return $webserviceConfig->getConfig($key);
-	}
-	
-	private function loadAdditionalConfiguration(){
-		$this->_config["dataDirectory"] = "data";
-		
-		require(__DIR__ ."/../../inc/internalconfig.php");
-		foreach(array_keys($internalconfig) as $key){
-			if(array_key_exists($key, $this->_config)){
-				error_log("Internal config entry ". $key ." already exists --> Keeping existing value and discard internal config value");
-			}
-			else{
-				$this->_config[$key] = $internalconfig[$key];
-			}
-		}
-	}
-
-	public function getConfig($key){
-		if(!array_key_exists($key, $this->_config)){
-			error_log("Expected config value ". $key ." does not exists");
-			return FALSE;
-		}
-		
-		if($key == "dataDirectory"){
-// 			error_log("Use dataDirectory() function to access this value");
-			return $this->dataDirectory();
-		}
-		if($key == "webserviceBaseUrl"){
-// 			error_log("Use dataDirectory() function to access this value");
-			return $this->webserviceBaseUrl();
-		}
-		
-		return $this->_config[$key];
-	}
-
-	public function dataDirectory(){
-		$directory = __DIR__ ."/../../../". $this->_config["dataDirectory"];
-		if(substr($directory, strlen($directory) - 1, 1) != "/"){
-			$directory .= "/";
-		}
-		return $directory;
-	}
-	
-	public function webserviceBaseUrl(){
-		$baseUrl = $this->_config["webserviceBaseUrl"];
-		if(substr($baseUrl, strlen($baseUrl) - 1, 1) != "/"){
-			$baseUrl .= "/";
-		}
-		return $baseUrl;
-	}
-
-	private $_config;
-}
-
-?>
Index: src/webservice/htdocs/inc/envsetup.php
===================================================================
--- src/webservice/htdocs/inc/envsetup.php	(revision 4b09d68494ca3be62fedf1006b53f3df1248aa54)
+++ 	(revision )
@@ -1,30 +1,0 @@
-<?php
-/*
-    Copyright (C) 2015 EngSaS - Engineering Solutions and Services Langenbach. All rights reserved.
-
-    This library is free software; you can redistribute it and/or
-    modify it under the terms of the GNU Lesser General Public
-    License as published by the Free Software Foundation; either
-    version 2.1 of the License, or (at your option) any later version.
-
-    This library is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-    Lesser General Public License for more details.
-
-    You should have received a copy of the GNU Lesser General Public
-    License along with this library; if not, write to the Free Software
-    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
-    MA 02110-1301  USA.
-*/
-
-// set_include_path(get_include_path() . PATH_SEPARATOR . __DIR__ ."/../../vendor/");
-$composerAutoloader = require(__DIR__ ."/../../../vendor/autoload.php");
-if(is_object($composerAutoloader)){
-	$composerAutoloader->add("SiWeather\\Webservice\\", __DIR__ ."/../");
-	$composerAutoloader->register();
-}
-
-require_once(__DIR__ ."/translate.php");
-
-?>
Index: src/webservice/htdocs/inc/footer.php
===================================================================
--- src/webservice/htdocs/inc/footer.php	(revision 4b09d68494ca3be62fedf1006b53f3df1248aa54)
+++ 	(revision )
@@ -1,38 +1,0 @@
-<?php
-/*
-    Copyright (C) 2015 EngSaS - Engineering Solutions and Services Langenbach. All rights reserved.
-
-    This library is free software; you can redistribute it and/or
-    modify it under the terms of the GNU Lesser General Public
-    License as published by the Free Software Foundation; either
-    version 2.1 of the License, or (at your option) any later version.
-
-    This library is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-    Lesser General Public License for more details.
-
-    You should have received a copy of the GNU Lesser General Public
-    License along with this library; if not, write to the Free Software
-    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
-    MA 02110-1301  USA.
-*/
-
-require_once(__DIR__ ."/envsetup.php");
-
-$webserviceConfig = new SiWeather\Webservice\WebserviceConfig();
-$apiVersion = $webserviceConfig->getConfig("webserviceApiVersion");
-
-echo "		<div class=\"footer\">\n";
-echo "			". Translator::swGettext("SiWeather webservice %s with API version %s), ", $webserviceConfig->getConfig("version"), $apiVersion) ."<br/>\n";
-echo "			". Translator::swGettext("Webservice accessible at %s or", $webserviceConfig->webserviceBaseUrl()) ."<br/>\n";
-echo "			". $webserviceConfig->webserviceBaseUrl() ."index.php/\n";
-echo "			<div class=\"footnotes\">\n";
-echo "				". _("This site uses icons from Oxygen icon theme &#40;License: LGPLv3") .", <a href=\"http://www.kde.org/\">http://www.kde.org</a>&#41;<br/>\n";
-echo "				". _("This site uses GeoNames as geo data provider &#40;License: CC-by-sa-3.0") .", <a href=\"http://www.geonames.org/\">http://www.geonames.org</a>&#41;<br/>\n";
-echo "			</div>\n";
-echo "		</div>\n";
-
-?>
-	</body>
-</html>
Index: src/webservice/htdocs/inc/header.php
===================================================================
--- src/webservice/htdocs/inc/header.php	(revision 4b09d68494ca3be62fedf1006b53f3df1248aa54)
+++ 	(revision )
@@ -1,38 +1,0 @@
-<?php
-/*
-    Copyright (C) 2015 EngSaS - Engineering Solutions and Services Langenbach. All rights reserved.
-
-    This library is free software; you can redistribute it and/or
-    modify it under the terms of the GNU Lesser General Public
-    License as published by the Free Software Foundation; either
-    version 2.1 of the License, or (at your option) any later version.
-
-    This library is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-    Lesser General Public License for more details.
-
-    You should have received a copy of the GNU Lesser General Public
-    License along with this library; if not, write to the Free Software
-    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
-    MA 02110-1301  USA.
-*/
-
-require_once(__DIR__ ."/envsetup.php");
-
-if(!isset($title)){
-	$title = "";
-}
-
-$webserviceConfig = new SiWeather\Webservice\WebserviceConfig();
-?>
-
-<html>
-	<head>
-		<title><?php echo Translator::swGettext("SiWeather Webservice - %s", $title); ?></title>
-		<link rel="stylesheet" type="text/css" href="<?php echo SiWeather\Webservice\WebserviceConfig::value("webserviceBaseUrl"); ?>resources/css/webservice.css"/>
-	</head>
-	<body>
-		<div class="header">
-			<h1>SiWeather Webservice</h1>
-		</div>
Index: src/webservice/htdocs/inc/translate.php
===================================================================
--- src/webservice/htdocs/inc/translate.php	(revision 4b09d68494ca3be62fedf1006b53f3df1248aa54)
+++ 	(revision )
@@ -1,92 +1,0 @@
-<?php
-######################
-#
-#    Copyright (C) 2015 EngSaS - Engineering Soluations and Services Langenbach. All rights reserved.
-#
-#    This library is free software; you can redistribute it and/or
-#    modify it under the terms of the GNU Lesser General Public
-#    License as published by the Free Software Foundation; either
-#    version 2.1 of the License, or (at your option) any later version.
-#
-#    This library is distributed in the hope that it will be useful,
-#    but WITHOUT ANY WARRANTY; without even the implied warranty of
-#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-#    Lesser General Public License for more details.
-#
-#    You should have received a copy of the GNU Lesser General Public
-#    License along with this library; if not, write to the Free Software
-#    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
-#    MA 02110-1301  USA.
-#
-######################
-
-// Require per-http2
-// Require php5-gettext
-
-define("LOCALE_SESSION_KEY", "gyl_locale");
-define("LOCALE_DEFAULT", "en_US");
-define("LOCALE_REQUEST_PARAN", "lang");
-define("LOCALE_DOMAIN", "messages"); // Must be the same name, as the po and mo files and the directory they are in
-
-require_once("HTTP2.php");
-
-$config = new SiWeather\Webservice\WebserviceConfig();
-
-$numberDelimiterDecimal = array();
-$numberDelimiterDecimal["en_US"] = ".";
-$numberDelimiterDecimal["de_DE"] = ",";
-
-$_localeCurrent = LOCALE_DEFAULT;
-if(isset($_SESSION)){
-	if(array_key_exists(LOCALE_REQUEST_PARAN, $_REQUEST)){
-		$_localeCurrent = $_REQUEST[LOCALE_REQUEST_PARAN];
-		$_SESSION[LOCALE_SESSION_KEY] = $_localeCurrent;
-	}
-	elseif(array_key_exists(LOCALE_SESSION_KEY, $_SESSION)){
-		$_localeCurrent = $_SESSION[LOCALE_SESSION_KEY];
-	}
-	else{
-		$supportedLanguages = Array(LOCALE_DEFAULT);
-		$transDirHandle = opendir($config->getConfig("translationdirectory"));
-		if($transDirHandle){
-			while(false !== ($entry = readdir($transDirHandle))){
-				if($entry != "." && $entry != ".."){
-					$supportedLanguages[str_replace("_", "-", $entry)] = true;
-				}
-			}
-			
-			closedir($transDirHandle);
-		}
-		$http = new HTTP2();
-		$_localeCurrent = str_replace("-", "_", $http->negotiateLanguage($supportedLanguages, LOCALE_DEFAULT));
-		$_SESSION[LOCALE_SESSION_KEY] = $_localeCurrent;
-	}
-}
-
-$results = putenv("LC_ALL0=". $_localeCurrent);
-if(!$results){
-	error_log("putenv failed (". $result .")");
-}
-$result = setlocale(LC_ALL, $_localeCurrent);
-if(!$results){
-	error_log("setlocale failed (". $result .")");
-}
-$results = bindtextdomain(LOCALE_DOMAIN, $config->getConfig("translationdirectory"));
-if(!$results){
-	error_log("bindtextdomain failed (". $result .")");
-}
-$results = bind_textdomain_codeset(LOCALE_DOMAIN, "UTF-8");
-if(!$results){
-	error_log("bind_textdomain_codeset failed (". $result .")");
-}
-$results = textdomain(LOCALE_DOMAIN);
-if(!$results){
-	error_log("textdomain failed (". $result .")");
-}
-
-class Translator {
-	public static function swGettext($id)
-	{
-		return vsprintf(gettext($id), array_slice(func_get_args(), 1));
-	}
-}
Index: src/webservice/htdocs/index.php
===================================================================
--- src/webservice/htdocs/index.php	(revision 4b09d68494ca3be62fedf1006b53f3df1248aa54)
+++ 	(revision )
@@ -1,74 +1,0 @@
-<?php
-/*
-    Copyright (C) 2015 EngSaS - Engineering Solutions and Services Langenbach. All rights reserved.
-
-    This library is free software; you can redistribute it and/or
-    modify it under the terms of the GNU Lesser General Public
-    License as published by the Free Software Foundation; either
-    version 2.1 of the License, or (at your option) any later version.
-
-    This library is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-    Lesser General Public License for more details.
-
-    You should have received a copy of the GNU Lesser General Public
-    License along with this library; if not, write to the Free Software
-    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
-    MA 02110-1301  USA.
-*/
-
-require(__DIR__ ."/inc/envsetup.php");
-
-$settings = new SiWeather\Webservice\WebserviceConfig();
-
-$app = new \Slim\Slim
-(
-	array
-	(
-		"mode" => $settings->getConfig("mode"),
-	)
-);
-$app->setName("siweather");
-
-// Only invoked if mode is "production"
-$app->configureMode('production', function () use ($app) {
-    $app->config(array(
-        "log.enable" => true,
-        "log.level" => \Slim\Log::WARN,
-        "debug" => false,
-    ));
-});
-// Only invoked if mode is "development"
-$app->configureMode('development', function () use ($app) {
-    $app->config(array(
-        "log.enable" => true,
-        "log.level" => \Slim\Log::DEBUG,
-        "debug" => true
-    ));
-});
-
-$app->notFound(function () use ($app) {
-	$html = "";
-    if($app->config("debug")){
-        ob_start();
-        phpinfo( INFO_VARIABLES ^ INFO_ENVIRONMENT );
-        $html = ob_get_contents();
-        ob_end_clean();
-    }
-    $app->render("404.php", array("dump" => $html));
-});
-
-$app->get("/setup", function () use ($app){
-	$app->render("setup.php");
-});
-$app->get("/stations", function () use ($app){
-	\SiWeather\Webservice\WebserviceApi::stations();
-});
-$app->post("/stations/register", function () use ($app){
-	\SiWeather\Webservice\WebserviceApi::stationsRegister();
-});
-
-$app->run();
-
-?>
Index: src/webservice/htdocs/resources/css/webservice.css
===================================================================
--- src/webservice/htdocs/resources/css/webservice.css	(revision 4b09d68494ca3be62fedf1006b53f3df1248aa54)
+++ 	(revision )
@@ -1,72 +1,0 @@
-.success {
-	color: #66BD66;
-	font-weight: bold;
-}
-
-.error {
-	color: #8C1C00;
-	font-weight: bold;
-}
-
-.lierror {
-	list-style-type: none;
-	background-image: url("../icons/dialog-cancel.png");
-	background-repeat: no-repeat;
-	background-position: left center;
-	background-size: auto 1em;
-	padding-left: 1.5em;
-}
-
-.lisuccess {
-	list-style-type: none;
-	background-image: url("../icons/dialog-ok-apply.png");
-	background-repeat: no-repeat;
-	background-position: left center;
-	background-size: auto 1em;
-	padding-left: 1.5em;
-}
-
-.header {
-	margin-top: 1em;
-	padding-top: 0.5em;
-	padding-left: 2em;
-	color: #ACDFAC;
-	text-align: left;
-	font-size: 9pt;
-	border-width: 0;
-	border-bottom-width: 2px;
-	border-color: #ACDFAC;
-	border-style: solid;
-}
-
-.header h1 {
-	font-size: 16pt;
-}
-
-.footer {
-	margin-top: 1em;
-	padding-top: 0.5em;
-	color: #ACDFAC;
-	text-align: center;
-	font-size: 9pt;
-	border-width: 0;
-	border-top-width: 2px;
-	border-color: #ACDFAC;
-	border-style: solid;
-}
-
-.footnotes {
-	font-size: 8pt;
-	margin-top: 0.5em;
-}
-
-a {
-	color: #6BA3A3;
-	text-decoration: none;
-/* 	font-weight: bold; */
-}
-
-a:hover {
-	color: #6BA3A3;
-	text-decoration: underline;
-}
Index: src/webservice/htdocs/setup.php
===================================================================
--- src/webservice/htdocs/setup.php	(revision 4b09d68494ca3be62fedf1006b53f3df1248aa54)
+++ 	(revision )
@@ -1,23 +1,0 @@
-<?php
-/*
-    Copyright (C) 2015 EngSaS - Engineering Solutions and Services Langenbach. All rights reserved.
-
-    This library is free software; you can redistribute it and/or
-    modify it under the terms of the GNU Lesser General Public
-    License as published by the Free Software Foundation; either
-    version 2.1 of the License, or (at your option) any later version.
-
-    This library is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-    Lesser General Public License for more details.
-
-    You should have received a copy of the GNU Lesser General Public
-    License along with this library; if not, write to the Free Software
-    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
-    MA 02110-1301  USA.
-*/
-
-require(__DIR__ ."/templates/setup.php");
-
-?>
Index: src/webservice/htdocs/templates/404.php
===================================================================
--- src/webservice/htdocs/templates/404.php	(revision 4b09d68494ca3be62fedf1006b53f3df1248aa54)
+++ 	(revision )
@@ -1,33 +1,0 @@
-<?php
-/*
-    Copyright (C) 2015 EngSaS - Engineering Solutions and Services Langenbach. All rights reserved.
-
-    This library is free software; you can redistribute it and/or
-    modify it under the terms of the GNU Lesser General Public
-    License as published by the Free Software Foundation; either
-    version 2.1 of the License, or (at your option) any later version.
-
-    This library is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-    Lesser General Public License for more details.
-
-    You should have received a copy of the GNU Lesser General Public
-    License along with this library; if not, write to the Free Software
-    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
-    MA 02110-1301  USA.
-*/
-
-require(__DIR__ ."/../inc/envsetup.php");
-
-$title = _("404 Site Not Found");
-include(__DIR__ ."/../inc/header.php");
-
-if(isset($dump) && !empty($dump)){
-	echo "		<div class=\"dump\">\n";
-	echo $dump;
-	echo "		</div>\n";
-}
-
-include(__DIR__ ."/../inc/footer.php");
-?>
Index: src/webservice/htdocs/templates/setup.php
===================================================================
--- src/webservice/htdocs/templates/setup.php	(revision 4b09d68494ca3be62fedf1006b53f3df1248aa54)
+++ 	(revision )
@@ -1,116 +1,0 @@
-<?php
-/*
-    Copyright (C) 2015 EngSaS - Engineering Solutions and Services Langenbach. All rights reserved.
-
-    This library is free software; you can redistribute it and/or
-    modify it under the terms of the GNU Lesser General Public
-    License as published by the Free Software Foundation; either
-    version 2.1 of the License, or (at your option) any later version.
-
-    This library is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-    Lesser General Public License for more details.
-
-    You should have received a copy of the GNU Lesser General Public
-    License along with this library; if not, write to the Free Software
-    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
-    MA 02110-1301  USA.
-*/
-
-require(__DIR__ ."/../inc/envsetup.php");
-
-function printError($message)
-{
-	echo "<div class=\"error\">\n";
-	echo "	<h3>". _("The following error occured:") ."</h3>\n";
-	echo $message;
-	echo "</div>\n";
-}
-
-function printResult($result, $message)
-{
-	$class = "success";
-	if(!$result){
-		$class = "error";
-	}
-	echo "<li class=\"". $class ." li". $class ."\">". $message ."</li>\n";
-}
-
-$title = _("Setup");
-include(__DIR__ ."/../inc/header.php");
-?>
-
-		<h2><?php echo _("Welcome to the setup"); ?></h2>
-		<ul>
-<?php
-
-$setup = new SiWeather\Webservice\Setup();
-$webserviceConfig = new SiWeather\Webservice\WebserviceConfig();
-
-$errorMessage = "";
-$result = $setup->dataDirectoryCheck($errorMessage);
-if($result == SiWeather\Webservice\DataDirectoryChecks::NotExist && $result != SiWeather\Webservice\DataDirectoryChecks::Success){
-	$result = $setup->dataDirectoryCreate($errorMessage);
-}
-
-if($result != SiWeather\Webservice\DataDirectoryChecks::Success){
-	printResult(false, Translator::swGettext("Data directory not accessible (%s)", $errorMessage));
-}
-else{
-	printResult(true, Translator::swGettext("Data directory checked (%s)", realpath($webserviceConfig->getConfig("dataDirectory"))));
-	$result = $setup->databaseDirectoryCheck($errorMessage);
-	if($result != SiWeather\Webservice\DatabaseChecks::Success){
-		printResult(false, $errorMessage);
-	}
-	else{
-		printResult(true, _("Database directory checked"));
-		$result = $setup->databaseFileCheck($errorMessage);
-		if($result != SiWeather\Webservice\DatabaseChecks::Success){
-			printResult(false, $errorMessage);
-		}
-		else{
-			printResult(true, _("Database file checked"));
-			if(!$setup->databaseConnection($errorMessage)){
-				printResult(false, $errorMessage);
-			}
-			else{
-				$prefix = "Database up and running";
-				$versionSqlite = $setup->databaseVersionSqlite($errorMessage);
-				if($versionSqlite <= 0){
-					printResult(false,  Translator::swGettext("%s (Could not determine SQLite version: %s)", $prefix, $errorMessage));
-				}
-				else{
-					$versionSpatalite = $setup->databaseVersionSpatalite($errorMessage);
-					if($versionSpatalite <= 0){
-						printResult(false, Translator::swGettext("%s (Could not determine Spatalite version: %s)", $prefix, $errorMessage));
-					}
-					else{
-						printResult(true, Translator::swGettext("%s (SQLite: %s, Spatalite: %s)", $prefix, $versionSqlite, $versionSpatalite));
-					}
-				}
-			}
-		}
-	}
-}
-
-if(!$setup->apiCheckWithoutRewrite($errorMessage)){
-	printResult(false, Translator::swGettext("Could not connect to webservice without rewrite (%s)", $errorMessage));
-}
-else{
-	$url = $webserviceConfig->webserviceBaseUrl() ."index.php/";
-	printResult(true, Translator::swGettext("Webservice withpout rewrite accessible at %s", "<a href=\"". $url ."\">". $url ."</a>"));
-}
-if(!$setup->apiCheckWithRewrite($errorMessage)){
-	printResult(false, Translator::swGettext("Could not connect to webservice with rewrite (%s)", $errorMessage));
-}
-else{
-	$url = $webserviceConfig->webserviceBaseUrl();
-	printResult(true, Translator::swGettext("Webservice withp rewrite accessible at %s", "<a href=\"". $url ."\">". $url ."</a>"));
-}
-
-?>
-		</ul>
-<?php
-	include(__DIR__ ."/../inc/footer.php");
-?>
Index: src/webservice/testconfig/testconfig.php.in
===================================================================
--- src/webservice/testconfig/testconfig.php.in	(revision 4b09d68494ca3be62fedf1006b53f3df1248aa54)
+++ 	(revision )
@@ -1,28 +1,0 @@
-<?php
-/*
-    Copyright (C) 2015 EngSaS - Engineering Solutions and Services Langenbach. All rights reserved.
-
-    This library is free software; you can redistribute it and/or
-    modify it under the terms of the GNU Lesser General Public
-    License as published by the Free Software Foundation; either
-    version 2.1 of the License, or (at your option) any later version.
-
-    This library is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-    Lesser General Public License for more details.
-
-    You should have received a copy of the GNU Lesser General Public
-    License along with this library; if not, write to the Free Software
-    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
-    MA 02110-1301  USA.
-*/
-
-$testconfig = [
-	"webserviceDirectory" => "@WEBSERVICE_OUTPUT_APP_DIRECTORY@",
-];
-
-// set_include_path(get_include_path() . PATH_SEPARATOR . "@WEB_TEST_OUTPUT_DIRECTORY@");
-// require 'vendor/autoload.php';
-
-?>
Index: src/webservice/tests/GeoLocatorTest.php
===================================================================
--- src/webservice/tests/GeoLocatorTest.php	(revision 4b09d68494ca3be62fedf1006b53f3df1248aa54)
+++ 	(revision )
@@ -1,80 +1,0 @@
-<?php
-/*
-    Copyright (C) 2015 EngSaS - Engineering Solutions and Services Langenbach. All rights reserved.
-
-    This library is free software; you can redistribute it and/or
-    modify it under the terms of the GNU Lesser General Public
-    License as published by the Free Software Foundation; either
-    version 2.1 of the License, or (at your option) any later version.
-
-    This library is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-    Lesser General Public License for more details.
-
-    You should have received a copy of the GNU Lesser General Public
-    License along with this library; if not, write to the Free Software
-    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
-    MA 02110-1301  USA.
-*/
-
-$file = __DIR__ ."/testconfig/testconfig.php";
-require($file);
-require_once($testconfig["webserviceDirectory"] ."/inc/envsetup.php");
-		
-class GeoLocatorTest extends PHPUnit_Framework_TestCase
-{
-	public function testConfigured(){
-		$this->assertTrue(\SiWeather\Webservice\GeoLocator::configured());
-	}
-
-	/**
-	  * @dataProvider testLocations_data
-	  */
-	public function testLocations($latiude, $longitude, $radius, $results){
-		$errorMessage = "";
-		$locations = \SiWeather\Webservice\GeoLocator::locations($latiude, $longitude, $radius, $errorMessage);
-
-		$this->assertInternalType("array", $locations, $errorMessage);
-		$this->assertTrue(empty($errorMessage));
-
-		$this->assertEquals(count($locations), count($results));
-
-		for($i = 0; $i < count($locations); $i++){
-			$this->assertEquals($locations[$i]->city(), $results[$i]->city());
-			$this->assertEquals($locations[$i]->postalCode(), $results[$i]->postalCode());
-			$this->assertEquals($locations[$i]->regionName(), $results[$i]->regionName());
-			$this->assertEquals($locations[$i]->regionCode(), $results[$i]->regionCode());
-			$this->assertEquals($locations[$i]->countryName(), $results[$i]->countryName());
-			$this->assertEquals($locations[$i]->countryCode(), $results[$i]->countryCode());
-			$this->assertEquals($locations[$i]->latitude(), $results[$i]->latitude());
-			$this->assertEquals($locations[$i]->longitude(), $results[$i]->longitude());
-			$this->assertEquals($locations[$i]->locationWkt(), $results[$i]->locationWkt());
-			$this->assertEquals($locations[$i]->timeZone(), $results[$i]->timeZone());
-		}
-	}
-	
-	public function testLocations_data(){
-		$radius = 5;
-		$result = array();
-		$result[] = array
-		(
-			51.828056,
-			10.2825,
-			$radius,
-			array
-			(
-				new \SiWeather\Webservice\Location("Wildemann", "", "Niedersachsen", "06", "Deutschland", "DE", 51.8281, 10.28152, "Europe/Berlin"),
-				new \SiWeather\Webservice\Location("Bad Grund", "", "Niedersachsen", "06", "Deutschland", "DE", 51.81021, 10.23694, "Europe/Berlin"),
-				new \SiWeather\Webservice\Location("Zellerfeld", "", "Niedersachsen", "06", "Deutschland", "DE", 51.81846, 10.33532, "Europe/Berlin"),
-				new \SiWeather\Webservice\Location("Clausthal-Zellerfeld", "", "Niedersachsen", "06", "Deutschland", "DE", 51.80949, 10.33821, "Europe/Berlin"),
-				new \SiWeather\Webservice\Location("Clausthal", "", "Niedersachsen", "06", "Deutschland", "DE", 51.80441, 10.33384, "Europe/Berlin"),
-				new \SiWeather\Webservice\Location("Hahnenklee-Bockswiese", "", "Niedersachsen", "06", "Deutschland", "DE", 51.85487, 10.33178, "Europe/Berlin"),
-				new \SiWeather\Webservice\Location("Lautenthal", "", "Niedersachsen", "06", "Deutschland", "DE", 51.86934, 10.28741, "Europe/Berlin"),
-				new \SiWeather\Webservice\Location("Laubhütte", "", "Niedersachsen", "06", "Deutschland", "DE", 51.79609, 10.23479, "Europe/Berlin"),
-			)
-		);
-		return $result;
-	}
-}
-?>
Index: src/webservice/tests/LocationTest.php
===================================================================
--- src/webservice/tests/LocationTest.php	(revision 4b09d68494ca3be62fedf1006b53f3df1248aa54)
+++ 	(revision )
@@ -1,146 +1,0 @@
-<?php
-/*
-    Copyright (C) 2015 EngSaS - Engineering Solutions and Services Langenbach. All rights reserved.
-
-    This library is free software; you can redistribute it and/or
-    modify it under the terms of the GNU Lesser General Public
-    License as published by the Free Software Foundation; either
-    version 2.1 of the License, or (at your option) any later version.
-
-    This library is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-    Lesser General Public License for more details.
-
-    You should have received a copy of the GNU Lesser General Public
-    License along with this library; if not, write to the Free Software
-    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
-    MA 02110-1301  USA.
-*/
-
-$file = __DIR__ ."/testconfig/testconfig.php";
-require($file);
-require($testconfig["webserviceDirectory"] ."/inc/envsetup.php");
-
-class LocationTest extends PHPUnit_Framework_TestCase
-{
-	public function testCity(){
-		$location = new \SiWeather\Webservice\Location("", "");
-		
-		$value = "testCity";
-		$location->setCity($value);
-		$this->assertEquals($location->city(), $value);
-	}
-	
-	public function testPostalCode(){
-		$location = new \SiWeather\Webservice\Location("", "");
-		
-		$value = "12345";
-		$location->setPostalCode($value);
-		$this->assertEquals($location->postalCode(), $value);
-	}
-	
-	public function testRegion(){
-		$location = new \SiWeather\Webservice\Location("", "");
-		
-		$value1 = "Wallhall";
-		$value2 = "WH";
-		$location->setRegion($value1, $value2);
-		$this->assertEquals($location->regionName(), $value1);
-		$this->assertEquals($location->regionCode(), $value2);
-	}
-	
-	public function testCountry(){
-		$location = new \SiWeather\Webservice\Location("", "");
-		
-		$value1 = "Wallhall";
-		$value2 = "WH";
-		$location->setCountry($value1, $value2);
-		$this->assertEquals($location->countryName(), $value1);
-		$this->assertEquals($location->countryCode(), $value2);
-	}
-
-	public function testValidLatitude_data(){
-		$result = array();
-		$result[] = array(null, false);
-		$result[] = array("asdasd", false);
-		$result[] = array(0, true);
-		$result[] = array(-90, true);
-		$result[] = array(90, true);
-		$result[] = array(85.1234, true);
-		$result[] = array(-90.0001, false);
-		$result[] = array(90.0001, false);
-		return $result;
-	}
-
-	/**
-		* @dataProvider testValidLatitude_data
-		*/
-	public function testValidLatitude($latitude, $result){
-		$this->assertEquals(\SiWeather\Webservice\Location::validLatitude($latitude), $result);
-	}
-
-	public function testValidLongitude_data(){
-		$result = array();
-		$result[] = array(null, false);
-		$result[] = array("asdasd", false);
-		$result[] = array(0, true);
-		$result[] = array(-90, true);
-		$result[] = array(90, true);
-		$result[] = array(85.1234, true);
-		$result[] = array(-180.0001, false);
-		$result[] = array(180.0001, false);
-		return $result;
-	}
-
-	/**
-		* @dataProvider testValidLongitude_data
-		*/
-	public function testValidLongitude($longitude, $result){
-		$this->assertEquals(\SiWeather\Webservice\Location::validLongitude($longitude), $result);
-	}
-	
-	public function testLocation(){
-		$location = new \SiWeather\Webservice\Location("", "");
-		
-		$latitude = -59.0;
-		$longitude = 33;
-		$location->setLocation($latitude, $longitude);
-		$this->assertEquals($location->latitude(), $latitude);
-		$this->assertEquals($location->longitude(), $longitude);
-		$this->assertEquals($location->locationWKT(), $longitude ." ". $latitude);
-	}
-	
-	public function testTimeZone(){
-		$location = new \SiWeather\Webservice\Location("", "");
-		
-		$value = "Europe/Berlin";
-		$location->setTimeZone($value);
-		$this->assertEquals($location->timeZone(), $value);
-	}
-
-	public function constructor(){
-		$city = "Nice Place";
-		$postalCode = "0001";
-		$regionName = "Nice Region";
-		$regionCode = "NR";
-		$countryName = "Nice Country";
-		$countryCode = "NC";
-		$longitude = 50;
-		$latitude = 20;
-		$location = new \SiWeather\Webservice\Location($city, $postalCode, $regionName,
-													   $regionCode, $countryName, $countryCode,
-													   $latitude, $longitude);
-		
-		$this->assertEquals($location->city(), $city);
-		$this->assertEquals($location->postalCode(), $postalCode);
-		$this->assertEquals($location->regionName(), $regionName);
-		$this->assertEquals($location->regionCode(), $regionCode);
-		$this->assertEquals($location->countryName(), $countryName);
-		$this->assertEquals($location->countryCode(), $countryCode);
-		$this->assertEquals($location->latitude(), $latitude);
-		$this->assertEquals($location->longitude(), $longitude);
-		$this->assertEquals($location->locationWkt(), $longitude ." ". $latitude);
-	}
-}
-?>
Index: src/webservice/tests/SetupTest.php
===================================================================
--- src/webservice/tests/SetupTest.php	(revision 4b09d68494ca3be62fedf1006b53f3df1248aa54)
+++ 	(revision )
@@ -1,170 +1,0 @@
-<?php
-/*
-    Copyright (C) 2015 EngSaS - Engineering Solutions and Services Langenbach. All rights reserved.
-
-    This library is free software; you can redistribute it and/or
-    modify it under the terms of the GNU Lesser General Public
-    License as published by the Free Software Foundation; either
-    version 2.1 of the License, or (at your option) any later version.
-
-    This library is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-    Lesser General Public License for more details.
-
-    You should have received a copy of the GNU Lesser General Public
-    License along with this library; if not, write to the Free Software
-    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
-    MA 02110-1301  USA.
-*/
-
-require_once(__DIR__ ."/TestHelpers/TestSetup.php");
-
-class SetupTest extends PHPUnit_Framework_TestCase
-{
-	public static function setUpBeforeClass()
-	{
-		global $testconfig;
-
-		$file = __DIR__ ."/testconfig/testconfig.php";
-		self::assertFileExists($file);
-		require($file);
-		self::$_testconfig = $testconfig;
-
-		require_once($testconfig["webserviceDirectory"] ."/inc/envsetup.php");
-		
-		self::$_webserviceConfig = new SiWeather\Webservice\WebserviceConfig();
-		self::assertNotNull(self::$_webserviceConfig);
-
-		self::$_dataDirectory = self::$_webserviceConfig->getConfig("dataDirectory");
-		self::assertInternaltype("string", self::$_dataDirectory);
-		self::assertTrue(!empty(self::$_dataDirectory));
-		if(file_exists(self::$_dataDirectory))
-			self::assertTrue(TestHelpers\TestSetup::wipeDataDirectory());
-
-		self::assertTrue(!file_exists(self::$_dataDirectory));
-	}
-	
-	public static function tearDownAfterClass()
-	{
-		if(file_exists(self::$_dataDirectory))
-			self::assertTrue(TestHelpers\TestSetup::wipeDataDirectory());
-	}
-
-	public function testSetupFail() {
-		$setup = new SiWeather\Webservice\Setup();
-		$errorMessage = "";
-
-		// all of the following setup routines should report errors (with errorMessages)!
-		// check that data directory does not exists
-		$result = $setup->dataDirectoryCheck($errorMessage);
-		$this->assertEquals($result, SiWeather\Webservice\DataDirectoryChecks::NotExist, $errorMessage);
-		$this->assertTrue(!empty($errorMessage), "Error message \"". $errorMessage ."\" is not empty");
-		$errorMessage = "";
-		
-		// check database directory
-		$result = $setup->databaseDirectoryCheck($errorMessage);
-		$this->assertEquals(!$result, SiWeather\Webservice\DatabaseChecks::Success, $errorMessage);
-		$this->assertTrue(!empty($errorMessage), "Error message \"". $errorMessage ."\" is not empty");
-		$errorMessage = "";
-		
-		// open database connection (and configure the database, if necessary)
-		$this->assertTrue(!$setup->databaseConnection($errorMessage), $errorMessage);
-		$this->assertTrue(!empty($errorMessage), "Error message \"". $errorMessage ."\" is not empty");
-		$errorMessage = "";
-		
-		$prefix = "Database not connected";
-		$versionSqlite = $setup->databaseVersionSqlite($errorMessage);
-		$this->assertEquals($versionSqlite, 0, $prefix ." (Could not determine SQLite version: ". $errorMessage .")");
-		$this->assertTrue(!empty($errorMessage), "Error message \"". $errorMessage ."\" is not empty");
-		$errorMessage = "";
-
-		$versionSpatalite = $setup->databaseVersionSpatalite($errorMessage);
-		$this->assertEquals($versionSpatalite, 0, $prefix ." (Could not determine Spatalite version: ". $errorMessage .")");
-		$this->assertTrue(!empty($errorMessage), "Error message \"". $errorMessage ."\" is not empty");
-   }
-   
-   	public function testSetupWorking() {
-		$setup = new SiWeather\Webservice\Setup();
-		$errorMessage = "";
-		
-		// check that data directory does not exists
-		$result = $setup->dataDirectoryCheck($errorMessage);
-		$this->assertEquals($result, SiWeather\Webservice\DataDirectoryChecks::NotExist, $errorMessage);
-		$this->assertTrue(!empty($errorMessage), "Error message \"". $errorMessage ."\" is not empty");
-		$errorMessage = "";
-		
-		// create data directory
-		$result = $setup->dataDirectoryCreate($errorMessage);
-		$this->assertEquals($result, SiWeather\Webservice\DataDirectoryChecks::Success, $errorMessage);
-		$this->assertTrue(empty($errorMessage), "Error message \"". $errorMessage ."\" is not empty");
-
-		// check database directory
-		$result = $setup->databaseDirectoryCheck($errorMessage);
-		$this->assertEquals($result, SiWeather\Webservice\DatabaseChecks::Success, $errorMessage);
-		$this->assertTrue(empty($errorMessage), "Error message \"". $errorMessage ."\" is not empty");
-		
-		// check database file (or if it could be created)
-		$result = $setup->databaseFileCheck($errorMessage);
-		$this->assertEquals($result, SiWeather\Webservice\DatabaseChecks::Success, $errorMessage);
-		$this->assertTrue(empty($errorMessage), "Error message \"". $errorMessage ."\" is not empty");
-		
-		// open database connection (and configure the database, if necessary)
-		$this->assertTrue($setup->databaseConnection($errorMessage), $errorMessage);
-		$this->assertTrue(empty($errorMessage), "Error message \"". $errorMessage ."\" is not empty");
-
-		$prefix = "Database up and running";
-		$versionSqlite = $setup->databaseVersionSqlite($errorMessage);
-		$this->assertLessThan($versionSqlite, 0, $prefix ." (Could not determine SQLite version: ". $errorMessage .")");
-		$this->assertTrue(empty($errorMessage), "Error message \"". $errorMessage ."\" is not empty");
-
-		$versionSpatalite = $setup->databaseVersionSpatalite($errorMessage);
-		$this->assertLessThan($versionSpatalite, 0, $prefix ." (Could not determine Spatalite version: ". $errorMessage .")");
-		$this->assertTrue(empty($errorMessage), "Error message \"". $errorMessage ."\" is not empty");
-
-		$result = $setup->apiCheckWithoutRewrite($errorMessage);
-		$this->assertTrue($result, $errorMessage);
-   }
-   
-   public function testAlreadyConfigured(){
-		$setup = new SiWeather\Webservice\Setup();
-		$errorMessage = "";
-
-		// check that data directory does not exists
-		$result = $setup->dataDirectoryCheck($errorMessage);
-		$this->assertEquals($result, SiWeather\Webservice\DataDirectoryChecks::Success, $errorMessage);
-		$this->assertTrue(empty($errorMessage), "Error message \"". $errorMessage ."\" is not empty");
-		$errorMessage = "";
-
-		// check database directory
-		$result = $setup->databaseDirectoryCheck($errorMessage);
-		$this->assertEquals($result, SiWeather\Webservice\DatabaseChecks::Success, $errorMessage);
-		$this->assertTrue(empty($errorMessage), "Error message \"". $errorMessage ."\" is not empty");
-		
-		// check database file (or if it could be created)
-		$result = $setup->databaseFileCheck($errorMessage);
-		$this->assertEquals($result, SiWeather\Webservice\DatabaseChecks::Success, $errorMessage);
-		$this->assertTrue(empty($errorMessage), "Error message \"". $errorMessage ."\" is not empty");
-		
-		// open database connection (and configure the database, if necessary)
-		$this->assertTrue($setup->databaseConnection($errorMessage), $errorMessage);
-		$this->assertTrue(empty($errorMessage), "Error message \"". $errorMessage ."\" is not empty");
-
-		$prefix = "Database up and running";
-		$versionSqlite = $setup->databaseVersionSqlite($errorMessage);
-		$this->assertLessThan($versionSqlite, 0, $prefix ." (Could not determine SQLite version: ". $errorMessage .")");
-		$this->assertTrue(empty($errorMessage), "Error message \"". $errorMessage ."\" is not empty");
-
-		$versionSpatalite = $setup->databaseVersionSpatalite($errorMessage);
-		$this->assertLessThan($versionSpatalite, 0, $prefix ." (Could not determine Spatalite version: ". $errorMessage .")");
-		$this->assertTrue(empty($errorMessage), "Error message \"". $errorMessage ."\" is not empty");
-
-		$result = $setup->apiCheckWithoutRewrite($errorMessage);
-		$this->assertTrue($result, $errorMessage);
-	}
-   
-	protected static $_webserviceConfig;
-	protected static $_dataDirectory;
-	protected static $_testconfig;
-}
-?>
Index: src/webservice/tests/SpatialiteTest.php
===================================================================
--- src/webservice/tests/SpatialiteTest.php	(revision 4b09d68494ca3be62fedf1006b53f3df1248aa54)
+++ 	(revision )
@@ -1,208 +1,0 @@
-<?php
-/*
-    Copyright (C) 2015 EngSaS - Engineering Solutions and Services Langenbach. All rights reserved.
-
-    This library is free software; you can redistribute it and/or
-    modify it under the terms of the GNU Lesser General Public
-    License as published by the Free Software Foundation; either
-    version 2.1 of the License, or (at your option) any later version.
-
-    This library is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-    Lesser General Public License for more details.
-
-    You should have received a copy of the GNU Lesser General Public
-    License along with this library; if not, write to the Free Software
-    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
-    MA 02110-1301  USA.
-*/
-
-class SpatialiteTest extends PHPUnit_Framework_TestCase
-{
-	public static function setUpBeforeClass()
-	{
-		global $testconfig;
-
-		$file = __DIR__ ."/testconfig/testconfig.php";
-		self::assertFileExists($file);
-		require($file);
-		require_once($testconfig["webserviceDirectory"] ."/SiWeather/Webservice/WebserviceConfig.php");
-		self::$_webserviceConfig = new SiWeather\Webservice\WebserviceConfig();
-		self::assertNotNull(self::$_webserviceConfig);
-		
-		self::$_databaseFile = tempnam(sys_get_temp_dir(), "siw");
-		# PDO SQlite is not able to load extensions (caused by the sqlite pdo driver)
-		# therefore we use PHP SQlite module
-		self::$_database = new SQLite3(self::$_databaseFile);
-	}
-	
-	public static function tearDownAfterClass()
-	{
-		self::assertTrue(self::$_database->close());
-		self::assertTrue(unlink(self::$_databaseFile));
-		self::$_database = null;
-		self::$_databaseFile = null;
-	}
-
-	public function testLoadSpatialite()
-	{
-		$this->assertInstanceOf("SQLite3", self::$_database);
-
-		# loading SpatiaLite as an extension
-		if(!self::$_database->loadExtension(self::$_webserviceConfig->getConfig("spatialiteExtension"))){
-			echo "Could not load SpatialLite extension: ". self::$_database->lastErrorMsg();
-			return;
-		}
-		
-		$this->assertTrue(self::$_database->exec("BEGIN"));
-		$this->assertTrue(self::$_database->exec("SELECT InitSpatialMetadata()"));
-		$this->assertTrue(self::$_database->exec("COMMIT"));
-		
-		# reporting some version info
-		$rs = self::$_database->query("SELECT spatialite_version()");
-		$this->assertInstanceOf('SQLite3Result', $rs);
-		$row = $rs->fetchArray();
-		$this->assertInternalType("array", $row);
-		$this->assertGreaterThan(1, count($row));
-		$this->assertTrue(!empty($row[0]));
-		$row = $rs->fetchArray();
-		$this->assertTrue(!$row);
-	}
-	
-	public function testDistance()
-	{
-		$this->assertInstanceOf("SQLite3", self::$_database);
-
-		$table = "cities";
-		
-		# creating a POINT table
-		$sql  = "CREATE TABLE ". $table ." (";
-		$sql .= "id INTEGER NOT NULL PRIMARY KEY,";
-		$sql .= "name TEXT NOT NULL)";
-		$this->assertTrue(self::$_database->exec($sql));
-
-		# creating a POINT Geometry column named center,
-		# taking two coordinates in SRID 4326 (WGS84) format
-		$sql  = "SELECT AddGeometryColumn(\"". $table ."\", ";
-		$sql .= "\"center\", 4326, \"POINT\", \"XY\")";
-		$this->assertTrue(self::$_database->exec($sql));
-		
-		# insert some cities
-		# the center must be described in WKT (s. http://giswiki.org/wiki/WKT) format for a point.
-		# Since we use WGS84 with SRID 4326 as a coordinate system, it expects POINT(LONGITUDE LATITUDE)
-		# as values.
-		# CITY, LATITUDE, LONGITUDE
-		# example Berlin:
-		#   52°31′7″N, 13°24′30″E
-		#   --> 52.518611° Latitude and 13.408333° Longitude
-		#   --> $values[] = array("name" => "Berlin", "latitude" => 52.518611, "longitude" => 13.408333);
-		#   --> POINT("13.408333 52.518611")
-		$values = array();
-		$values[] = array("name" => "Berlin", 			"latitude" => 52.518611, 	"longitude" => 13.408333);
-		$values[] = array("name" => "Potsdam", 			"latitude" => 52.395833, 	"longitude" => 13.061389);
-		$values[] = array("name" => "Hamburg", 			"latitude" => 53.550556, 	"longitude" => 9.993333);
-		$values[] = array("name" => "Dresden", 			"latitude" => 51.049259, 	"longitude" => 13.73836);
-		$values[] = array("name" => "Cape Town",		"latitude" => -33.922667, 	"longitude" => 18.416689);
-		$values[] = array("name" => "New York City", 	"latitude" => 40.712778, 	"longitude" => -74.005833);
-		$values[] = array("name" => "Sydney", 			"latitude" => -33.85, 		"longitude" => 151.2);
-		
-		# distances in meter
-		$distances = array();
-		$distances["Berlin"] = array();
-		$distances["Berlin"]["Potsdam"] = 27185;
-		$distances["Berlin"]["Hamburg"] = 255518;
-		$distances["Berlin"]["Dresden"] = 164954;
-		$distances["Berlin"]["Cape Town"] = 9624137;
-		$distances["Berlin"]["New York City"] = 6385266;
-		$distances["Berlin"]["Sydney"] = 16092238;
-		
-		$distances["Potsdam"] = array();
-		$distances["Potsdam"]["Hamburg"] = 242231;
-		$distances["Potsdam"]["Dresden"] = 156823;
-		$distances["Potsdam"]["Cape Town"] =9612288;
-		$distances["Potsdam"]["New York City"] = 6370104;
-		$distances["Potsdam"]["Sydney"] = 16118486;
-		
-		$distances["Hamburg"] = array();
-		$distances["Hamburg"]["Dresden"] = 377003;
-		$distances["Hamburg"]["Cape Town"] = 9760489;
-		$distances["Hamburg"]["New York City"] = 6129909;
-		$distances["Hamburg"]["Sydney"] = 16275543;
-		
-		$distances["Dresden"] = array();
-		$distances["Dresden"]["Cape Town"] = 9459562;
-		$distances["Dresden"]["New York City"] = 6478589;
-		$distances["Dresden"]["Sydney"] = 16109156;
-		
-		$distances["Cape Town"] = array();
-		$distances["Cape Town"]["New York City"] = 12564111;
-		$distances["Cape Town"]["Sydney"] = 11013398;
-		
-		$distances["New York City"] = array();
-		$distances["New York City"]["Sydney"] = 15988687;
-		
-		$this->assertTrue(self::$_database->exec("BEGIN"));
-		$sql  = "INSERT INTO ". $table ." (name, center) VALUES(:name, GeomFromText(:center, 4326))";
-		$sqlStatement = self::$_database->prepare($sql);
-		foreach ($values as $value){
-			$sqlStatement->clear();
-			$this->assertEquals(3, count($value));
-			$this->assertTrue($sqlStatement->bindValue(":name", $value["name"]));
-			$this->assertTrue($sqlStatement->bindValue(":center", "POINT(". $value["longitude"] ." ". $value["latitude"] .")"));
-			$this->assertInstanceOf("SQLite3Result", $sqlStatement->execute());
-			$sqlStatement->reset();
-		}
-		$this->assertTrue(self::$_database->exec("COMMIT"));
-		
-		# check the inserts
-		$sql  = "SELECT id, name, X(center) as longitude, Y(center) as latitude FROM ". $table ." WHERE name=:name";
-		$sqlStatement = self::$_database->prepare($sql);
-		foreach ($values as $value){
-			$sqlStatement->clear();
-			$this->assertEquals(3, count($value));
-			$this->assertTrue($sqlStatement->bindValue(":name", $value["name"]));
-			$result = $sqlStatement->execute();
-			$this->assertInstanceOf("SQLite3Result", $result);
-			while($row = $result->fetchArray()){
-				$this->assertGreaterThan(4, count($row));
-				$this->assertGreaterThan(-1, $row[0]);
-				$this->assertEquals($value["name"], $row[1]);
-				$this->assertEquals($value["longitude"], $row[2]);
-				$this->assertEquals($value["latitude"], $row[3]);
-			}
-			$sqlStatement->reset();
-		}
-
-		# calculate the distances
-		# Calling Distance() with three parameters, which returns distance in Meter
-		$sql  = "SELECT t1.name, t2.name, Round(Distance(t1.center, t2.center, 1), 0) As distance";
-		$sql .= "  FROM ". $table ." AS t1, ". $table ." AS t2";
-		$sql .= "  WHERE t1.name=:from AND t2.name=:to";
-		$sqlStatement = self::$_database->prepare($sql);
-		foreach(array_keys($distances) as $start){
-			foreach(array_keys($distances[$start]) as $end){
-				$sqlStatement->clear();
-				# Calculate distance from start --> end
-				$this->assertTrue($sqlStatement->bindValue(":from", $start));
-				$this->assertTrue($sqlStatement->bindValue(":to", $end));
-				$result = $sqlStatement->execute();
-				$this->assertInstanceOf("SQLite3Result", $result);
-				while($row = $result->fetchArray()){
-					$this->assertGreaterThan(3, count($row));
-					$this->assertEquals($start, $row[0]);
-					$this->assertEquals($end, $row[1]);
-					# 0.5% difference of the distance is accepted
-					$delta = abs($distances[$start][$end] - $row[2])/$distances[$start][$end];
-					$this->assertLessThan(0.005, $delta, $start ." --> ". $end .":\n  Expected: ". $distances[$start][$end] ."\n  Is: ". $row[2]);
-				}
-				$sqlStatement->reset();
-			}
-		}
-	}
-
-	protected static $_databaseFile;
-	protected static $_database;
-	protected static $_webserviceConfig;
-}
-?>
Index: src/webservice/tests/StationsTest.php
===================================================================
--- src/webservice/tests/StationsTest.php	(revision 4b09d68494ca3be62fedf1006b53f3df1248aa54)
+++ 	(revision )
@@ -1,149 +1,0 @@
-<?php
-/*
-    Copyright (C) 2015 EngSaS - Engineering Solutions and Services Langenbach. All rights reserved.
-
-    This library is free software; you can redistribute it and/or
-    modify it under the terms of the GNU Lesser General Public
-    License as published by the Free Software Foundation; either
-    version 2.1 of the License, or (at your option) any later version.
-
-    This library is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-    Lesser General Public License for more details.
-
-    You should have received a copy of the GNU Lesser General Public
-    License along with this library; if not, write to the Free Software
-    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
-    MA 02110-1301  USA.
-*/
-
-require_once(__DIR__ ."/TestHelpers/TestSetup.php");
-
-class StationsTest extends PHPUnit_Framework_TestCase
-{
-	protected function setUp(){
-		$file = __DIR__ ."/testconfig/testconfig.php";
-		$this->assertFileExists($file);
-		require($file);
-		$this->_testconfig = $testconfig; 
-		$this->assertNotNull($this->_testconfig);
-		
-		require($testconfig["webserviceDirectory"] ."/inc/envsetup.php");
-		require_once($testconfig["webserviceDirectory"] ."/SiWeather/Webservice/WebserviceConfig.php");
-		
-		$this->_webserviceConfig = new SiWeather\Webservice\WebserviceConfig();
-		$this->assertNotNull($this->_webserviceConfig);
-
-		$this->_dataDirectory = $this->_webserviceConfig->getConfig("dataDirectory");
-		$this->assertInternaltype("string", $this->_dataDirectory);
-		$this->assertTrue(!empty($this->_dataDirectory));
-		if(file_exists($this->_dataDirectory))
-			$this->assertTrue(TestHelpers\TestSetup::wipeDataDirectory());
-		$this->assertTrue(TestHelpers\TestSetup::databaseSetup());
-	}
-    
-	protected function tearDown(){
-		if(file_exists($this->_dataDirectory))
-			$this->assertTrue(TestHelpers\TestSetup::wipeDataDirectory());
-	}
-
-	public function testEmptyStations()
-	{
-		$stations = $this->query("index.php/stations");
-
-		$this->assertInternalType("array", $stations);
-		$message = "";
-		if(array_key_exists("message", $stations))
-			$message = $stations["message"];
-		$this->assertTrue(!array_key_exists("result", $stations), $message);
-		$this->assertEquals(count($stations), 0);
-	}
-
-	public function testRegisterStationUnprovenLocation()
-	{
-		$baseUrl = TestHelpers\TestSetup::webserviceTestBaseUrl();
-		$this->assertInternalType('string', $baseUrl, "baseUrl is not of type string: ". $baseUrl);
-		$this->assertTrue(!empty($baseUrl), "baseUrl is empty: ". $baseUrl);
-		$client = new GuzzleHttp\Client
-		(
-			[
-				"base_uri" => $baseUrl,
-				"timeout" => 5.0,
-				"http_errors" => false,
-			]
-		);
-
-		// sending must failing register request, caused by unproven location
-		$response = $client->post("index.php/stations/register",
-			[ "json" => ["name" => "Cool Station", "longitude" => 23.2, "latitude" => 90, "city" => "Nice town", "type" => "testing", "email" => "test@example.org"]]
-		);
-		$this->assertEquals($response->getStatusCode(), 200, $response->getReasonPhrase());
-		$json = json_decode($response->getBody(), true);
-		$this->assertTrue(array_key_exists("result", $json));
-		$this->assertTrue(array_key_exists("message", $json));
-		$this->assertEquals("unprovenlocation", $json["result"], $json["message"]);
-	}
-
-	public function testRegisterStation()
-	{
-		$baseUrl = TestHelpers\TestSetup::webserviceTestBaseUrl();
-		$this->assertInternalType('string', $baseUrl, "baseUrl is not of type string: ". $baseUrl);
-		$this->assertTrue(!empty($baseUrl), "baseUrl is empty: ". $baseUrl);
-		$client = new GuzzleHttp\Client
-		(
-			[
-				"base_uri" => $baseUrl,
-				"timeout" => 5.0,
-				"http_errors" => false,
-			]
-		);
-
-		$response = $client->post("index.php/stations/register",
-			[ "json" => ["name" => "My Weather Station", "city" => "Clausthal-Zellerfeld", "longitude" => 10.28152, "latitude" => 51.8281, "type" => "testing", "email" => "test@example.org"]]
-		);
-		$this->assertEquals(200, $response->getStatusCode(), $response->getReasonPhrase());
-		$json = json_decode($response->getBody(), true);
-		$this->assertTrue(array_key_exists("result", $json));
-		$this->assertEquals("success", $json["result"], $json["message"]);
-		$this->assertTrue(array_key_exists("uuid", $json));
-		$this->assertTrue(!empty($json["uuid"]));
-		$this->assertTrue(array_key_exists("message", $json));
-		$this->assertTrue(!empty($json["message"]));
-
-		$stations = $this->query("index.php/stations");
-		$this->assertInternalType("array", $stations);
-		$this->assertEquals(1, count($stations));
-		$this->assertTrue(array_key_exists("uuid", $stations[0]));
-		$this->assertEquals($json["uuid"], $stations[0]["uuid"]);
-	}
-	
-	protected function query($url){
-		$baseUrl = TestHelpers\TestSetup::webserviceTestBaseUrl();
-		$this->assertInternalType('string', $baseUrl, "baseUrl is not of type string: ". $baseUrl);
-		$this->assertTrue(!empty($baseUrl), "baseUrl is empty: ". $baseUrl);
-		$client = new GuzzleHttp\Client
-		(
-			[
-				"base_uri" => $baseUrl,
-				"timeout" => 2.0,
-				"http_errors" => false,
-			]
-		);
-		$response = $client->get($url);
-		$this->assertNotNull($response, "Response is empty. Url: ". $baseUrl . $url);
-		$this->assertEquals($response->getStatusCode(), 200, "Status code != 200. Url: ". $baseUrl . $url);
-		$this->assertEquals($response->getReasonPhrase(), "OK", "Reason phrase not empty. Url: ". $baseUrl . $url);
-
-		$body = $response->getBody();
-		$this->assertTrue(!empty($body), "Response body is empty. Url: ". $baseUrl . $url);
-		$json = json_decode($body, true);
-		$this->assertNotNull($json, "Json decode returned null. Url: ". $baseUrl . $url ."\nBody: ". $body);
-		return $json;
-	}
-	
-	protected $_testconfig;
-	protected $_webserviceConfig;
-	protected $_dataDirectory;
-}
-?>
Index: src/webservice/tests/TestHelpers/TestSetup.php
===================================================================
--- src/webservice/tests/TestHelpers/TestSetup.php	(revision 4b09d68494ca3be62fedf1006b53f3df1248aa54)
+++ 	(revision )
@@ -1,139 +1,0 @@
-<?php
-/*
-    Copyright (C) 2015 EngSaS - Engineering Solutions and Services Langenbach. All rights reserved.
-
-    This library is free software; you can redistribute it and/or
-    modify it under the terms of the GNU Lesser General Public
-    License as published by the Free Software Foundation; either
-    version 2.1 of the License, or (at your option) any later version.
-
-    This library is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-    Lesser General Public License for more details.
-
-    You should have received a copy of the GNU Lesser General Public
-    License along with this library; if not, write to the Free Software
-    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
-    MA 02110-1301  USA.
-*/
-
-namespace TestHelpers;
-
-class TestSetup {
-	
-	public static function webserviceTestBaseUrl(){
-		$file = __DIR__ ."/../testconfig/testconfig.php";
-		if(!file_exists($file)){
-			error_log("testconfig file ". $file ." not found");
-			return false;
-		}
-		require($file);
-		if(is_null($testconfig)){
-			error_log("No testconfig found");
-			return false;
-		}
-		require($testconfig["webserviceDirectory"] ."/inc/envsetup.php");
-		require_once($testconfig["webserviceDirectory"] ."/SiWeather/Webservice/WebserviceConfig.php");
-		
-		$webserviceConfig = new \SiWeather\Webservice\WebserviceConfig();
-		if(is_null($webserviceConfig)){
-			error_log("No webservice config created");
-			return false;
-		}
-		$webserviceBaseUrl =  $webserviceConfig->webserviceBaseUrl();
-		if(empty($webserviceBaseUrl) || preg_match("/^https?:\/\/localhost/", $webserviceBaseUrl) != 1){
-			error_log("NOT TESTING AGAINST REMOTE WEBSERVICE. INSTALL WEBSERVICE ON LOCALHOST TO TEST IT!");
-			return false;
-		}
-		return $webserviceBaseUrl;
-	}
-
-	/**
-	  * @brief Configures the database of the webservice which is used for the tests.
-	  *
-	  * @note This function checks whether the webservice base url starts with localhost. If not,
-	  *       false is returned and the remote webservice is not touched. We do not touch remote
-	  *       webservices, not on localhost for testing purposes.
-	  */
-	public static function databaseSetup(){
-		$file = __DIR__ ."/../testconfig/testconfig.php";
-		if(!file_exists($file)){
-			error_log("testconfig file ". $file ." not found");
-			return false;
-		}
-		require($file);
-		if(is_null($testconfig)){
-			error_log("No testconfig found");
-			return false;
-		}
-		
-		require($testconfig["webserviceDirectory"] ."/inc/envsetup.php");
-		require_once($testconfig["webserviceDirectory"] ."/SiWeather/Webservice/WebserviceConfig.php");
-		
-		$webserviceConfig = new \SiWeather\Webservice\WebserviceConfig();
-		if(is_null($webserviceConfig)){
-			error_log("No webservice config created");
-			return false;
-		}
-
-		$webserviceBaseUrl = self::webserviceTestBaseUrl();
-		if(!$webserviceBaseUrl){
-			error_log("Got no webservice test base url");
-			return false;
-		}
-
-		$client = new \GuzzleHttp\Client
-		(
-			[
-				"base_uri" => $webserviceBaseUrl,
-				"timeout" => 15.0,					// Needs some time to create the database!
-				"http_errors" => false,
-			]
-		);
-		$response = $client->get("setup.php");
-		if($response->getStatusCode() !=  200){
-			error_log("Failed to setup webservice database: ". $response->getReasonPhrase());
-			return false;
-		}
-		$body = $response->getBody();
-		if(empty($body)){
-			error_log("Failed to setup webservice database: Empty response!");
-			return false;
-		}
-		
-		// since rewrite api is not working, we get an error here!
-// 		if(strpos($body, "error")){
-// 			error_log("Failed to setup webservice database: Found error in reply (". $body .")");
-// 			return false;
-// 		}
-
-		return true;
-	}
-
-	public static function wipeDataDirectory(){
-		$webserviceConfig = new \SiWeather\Webservice\WebserviceConfig();
-		$dataDirectory = $webserviceConfig->dataDirectory();
-		if(!file_exists($dataDirectory))
-			return true;
-
-		// clear data directory (not recursive, because there should be only a database file in it
-		$content = scandir($dataDirectory);
-		if(!is_array($content)){
-			error_log("result of scandir is not an array");
-			return false;
-		}
-		foreach($content as $file){
-			if(!in_array($file, array(".",".."))){
-				$file = $dataDirectory ."/". $file;
-				if(!unlink($file)){
-					error_log("Failed to delete file ". $file);
-					return false;
-				}
-			}
-		}
-		return rmdir($dataDirectory);
-	}
-}
-
-?>
Index: src/webservice/tests/bootstrap.php
===================================================================
--- src/webservice/tests/bootstrap.php	(revision 4b09d68494ca3be62fedf1006b53f3df1248aa54)
+++ 	(revision )
@@ -1,49 +1,0 @@
-<?php
-/*
-    Copyright (C) 2015 EngSaS - Engineering Solutions and Services Langenbach. All rights reserved.
-
-    This library is free software; you can redistribute it and/or
-    modify it under the terms of the GNU Lesser General Public
-    License as published by the Free Software Foundation; either
-    version 2.1 of the License, or (at your option) any later version.
-
-    This library is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-    Lesser General Public License for more details.
-
-    You should have received a copy of the GNU Lesser General Public
-    License along with this library; if not, write to the Free Software
-    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
-    MA 02110-1301  USA.
-    
-    Followed the guide at http://tech.vg.no/2013/07/19/using-phps-built-in-web-server-in-your-test-suites/
-*/
-
-// Command that starts the built-in web server
-$command = sprintf(
-    'php -S %s:%d -t %s >/tmp/php-dev-server.log 2>&1 & echo $!',
-    WEBSERVICE_SERVER_HOST,
-    WEBSERVICE_SERVER_PORT,
-    WEBSERVICE_SERVER_DOCROOT
-);
- 
-// Execute the command and store the process ID
-$output = array(); 
-exec($command, $output);
-$pid = (int) $output[0];
- 
-echo sprintf(
-    '%s - Web server started on %s:%d with PID %d', 
-    date('r'),
-    WEBSERVICE_SERVER_HOST, 
-    WEBSERVICE_SERVER_PORT, 
-    $pid
-) . PHP_EOL;
- 
-// Kill the web server when the process ends
-register_shutdown_function(function() use ($pid) {
-    echo sprintf('%s - Killing process with ID %d', date('r'), $pid) . PHP_EOL;
-    exec('kill ' . $pid);
-});
-?>
