Merge branch 'release/#180'

This commit is contained in:
stubbfel
2013-08-28 10:53:56 +02:00
39 changed files with 548 additions and 31 deletions

View File

@@ -32,11 +32,29 @@ class PisSqlManager extends SQLManager {
*/
public static $infValue = "iValue";
/**
* Fieldname of the parendId
* @var string
*/
public static $parentId = "parent";
/**
* Fieldname of the refpoint
* @var string
*/
public static $refpoint = "refpoint";
/**
* String for the select part of the query
* @var string
*/
private static $selectTerm = "SELECT pid, iName, iValue FROM pis WHERE ";
private static $selectTerm = "SELECT pid, parent, refpoint, iName, iValue FROM pis WHERE ";
/**
* String for the select all part of the query
* @var string
*/
private static $selectAllTerm = "SELECT pid, parent, refpoint, iName, iValue FROM pis ";
/**
* String for the orderby part of the query
@@ -83,19 +101,24 @@ class PisSqlManager extends SQLManager {
$query .= self::$openBracket;
$query .= \utiliy\ArrayManager::toSqlWhereString($pidList, self::$orTerm, self::$pidTerm);
$query .= self::$closeBracket;
} else {
} else if ($pidList[0] != "*") {
return null;
}
if (count($iNameList) > 0 && \utiliy\ArrayManager::validAlphaNumList($iNameList)) {
$query .= self::$andTerm;
if ($query != self::$selectTerm) {
$query .= self::$andTerm;
}
$query .= self::$openBracket;
$query .= \utiliy\ArrayManager::toSqlWhereString($iNameList, self::$orTerm, self::$iNameTerm);
$query .= self::$closeBracket;
}
if ($query == self::$selectTerm) {
$query = self::$selectAllTerm;
}
$query .= self::$orderByTerm;
// send query
return $this->query($query);
}

View File

@@ -38,11 +38,29 @@ class PssSqlManager extends SQLManager {
*/
public static $srvRequest = "request";
/**
* Fieldname of the parendId
* @var string
*/
public static $parentId = "parent";
/**
* Fieldname of the refpoint
* @var string
*/
public static $refpoint = "refpoint";
/**
* String for the select part of the query
* @var string
*/
private static $selectTerm = "SELECT pid, sName, sap, request FROM pss WHERE ";
private static $selectTerm = "SELECT pid, parent, refpoint, sName, sap, request FROM pss WHERE ";
/**
* String for the select all part of the query
* @var string
*/
private static $selectAllTerm = "SELECT pid, parent, refpoint, sName, sap, request FROM pss ";
/**
* String for the orderby part of the query
@@ -89,17 +107,23 @@ class PssSqlManager extends SQLManager {
$query .= self::$openBracket;
$query .= \utiliy\ArrayManager::toSqlWhereString($pidList, self::$orTerm, self::$pidTerm);
$query .= self::$closeBracket;
} else {
} else if ($pidList[0] != "*") {
return null;
}
if (count($sNameList) > 0 && \utiliy\ArrayManager::validAlphaNumList($sNameList)) {
$query .= self::$andTerm;
if ($query != self::$selectTerm) {
$query .= self::$andTerm;
}
$query .= self::$openBracket;
$query .= \utiliy\ArrayManager::toSqlWhereString($sNameList, self::$orTerm, self::$sNameTerm);
$query .= self::$closeBracket;
}
if ($query == self::$selectTerm) {
$query = self::$selectAllTerm;
}
$query .= self::$orderByTerm;
// send query

View File

@@ -82,10 +82,12 @@ class JsonManager implements SerialManager {
* @return json-string
*/
public static function arrayToPisJson($result) {
$infos = array();
$infos = array();
foreach ($result as $row) {
// fetch the place id of the row
$placeId = $row[\database\PisSqlManager::$placeId];
$placeId = $row[\database\PisSqlManager::$placeId];
$infos[$placeId][self::$parentIdName] = $row[\database\PisSqlManager::$parentId];
$infos[$placeId][self::$refpointName] = $row[\database\PisSqlManager::$refpoint];
$infos[$placeId][$row[\database\PisSqlManager::$infName]] = utf8_encode($row[\database\PisSqlManager::$infValue]);
}
return json_encode($infos);
@@ -103,6 +105,8 @@ class JsonManager implements SerialManager {
// fetch the place id of the row
$placeId = $row[\database\PssSqlManager::$placeId];
$placeSrv = array(self::$placeSapName => $row[\database\PssSqlManager::$srvSap], self::$placeRequestName => $row[\database\PssSqlManager::$srvRequest]);
$services[$placeId][self::$parentIdName] = $row[\database\PssSqlManager::$parentId];
$services[$placeId][self::$refpointName] = $row[\database\PssSqlManager::$refpoint];
$services[$placeId][$row[\database\PssSqlManager::$srvName]] = $placeSrv;
}
return json_encode($services);

View File

@@ -120,6 +120,8 @@ class XmlManager implements SerialManager {
$actPlace = $placeId;
$place = $xml->addChild(self::$placeElementName);
$place->addAttribute(self::$placeIdAttrName, $placeId);
$place->addAttribute(self::$parentIdAttrName, $row[\database\PisSqlManager::$parentId]);
$place->addAttribute(self::$refpointAttrName, $row[\database\PisSqlManager::$refpoint]);
}
// add placeinformation elment
@@ -155,6 +157,8 @@ class XmlManager implements SerialManager {
$actPlace = $placeId;
$place = $xml->addChild(self::$placeElementName);
$place->addAttribute(self::$placeIdAttrName, $placeId);
$place->addAttribute(self::$parentIdAttrName, $row[\database\PssSqlManager::$parentId]);
$place->addAttribute(self::$refpointAttrName, $row[\database\PssSqlManager::$refpoint]);
}
// add placeservice elment

View File

@@ -2,10 +2,10 @@ The files in this archive have been created from OpenStreetMap data
and are licensed under the Open Database 1.0 License. See
www.openstreetmap.org for details about the project.
This file contains OpenStreetMap data as of 2013-08-13T19:00:01Z. Every day
This file contains OpenStreetMap data as of 2013-08-27T13:21:02Z. Every day
a new version of this file will be made available at:
http://download.geofabrik.de/osm/europe/germany/brandenburg-130813.shp.zip
http://download.geofabrik.de/osm/europe/germany/brandenburg-130827.shp.zip
Geofabrik also makes extended shapefiles to order; please see
http://www.geofabrik.de/data/shapefiles.html for details and example

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1 @@
http://download.geofabrik.de/europe/germany/brandenburg-latest.shp.zip

View File

@@ -4,10 +4,10 @@
<mapcanvas>
<units>degrees</units>
<extent>
<xmin>14.320259</xmin>
<ymin>51.765855</ymin>
<xmax>14.322504</xmax>
<ymax>51.766989</ymax>
<xmin>14.248768</xmin>
<ymin>51.731125</ymin>
<xmax>14.392448</xmax>
<ymax>51.803706</ymax>
</extent>
<projections>0</projections>
<destinationsrs>
@@ -24,13 +24,13 @@
</destinationsrs>
</mapcanvas>
<legend updateDrawingOrder="false">
<legendlayer drawingOrder="0" open="true" checked="Qt::Unchecked" name="roads" showFeatureCount="0">
<filegroup open="true" hidden="false">
<legendlayer drawingOrder="0" open="false" checked="Qt::Unchecked" name="roads" showFeatureCount="0">
<filegroup open="false" hidden="false">
<legendlayerfile isInOverview="0" layerid="roads20130724135342476" visible="0"/>
</filegroup>
</legendlayer>
<legendlayer drawingOrder="1" open="true" checked="Qt::Unchecked" name="buildings" showFeatureCount="0">
<filegroup open="true" hidden="false">
<legendlayer drawingOrder="1" open="false" checked="Qt::Unchecked" name="buildings" showFeatureCount="0">
<filegroup open="false" hidden="false">
<legendlayerfile isInOverview="0" layerid="buildings20130814151114116" visible="0"/>
</filegroup>
</legendlayer>
@@ -49,8 +49,8 @@
<legendlayerfile isInOverview="0" layerid="campus_senftenberg_strassen20130709121948701" visible="0"/>
</filegroup>
</legendlayer>
<legendlayer drawingOrder="5" open="true" checked="Qt::Unchecked" name="campus-cottbus-nord-strassen" showFeatureCount="0">
<filegroup open="true" hidden="false">
<legendlayer drawingOrder="5" open="false" checked="Qt::Unchecked" name="campus-cottbus-nord-strassen" showFeatureCount="0">
<filegroup open="false" hidden="false">
<legendlayerfile isInOverview="0" layerid="campus_cottbus_nord_strassen20130709130942093" visible="0"/>
</filegroup>
</legendlayer>
@@ -64,8 +64,8 @@
<legendlayerfile isInOverview="0" layerid="campus_cottbus_süd_gebäude20130709114420373" visible="1"/>
</filegroup>
</legendlayer>
<legendlayer drawingOrder="8" open="false" checked="Qt::Checked" name="campus-senftenberg-gebäude" showFeatureCount="0">
<filegroup open="false" hidden="false">
<legendlayer drawingOrder="8" open="true" checked="Qt::Checked" name="campus-senftenberg-gebäude" showFeatureCount="0">
<filegroup open="true" hidden="false">
<legendlayerfile isInOverview="0" layerid="campus_senftenberg_gebäude20130709121511731" visible="1"/>
</filegroup>
</legendlayer>
@@ -206,10 +206,31 @@
<multilineenabled fieldname="" on=""/>
<selectedonly on=""/>
</labelattributes>
<edittypes>
<edittype type="0" name="name"/>
<edittype type="0" name="osm_id"/>
<edittype type="0" name="parent"/>
<edittype type="0" name="shortName"/>
<edittype type="0" name="type"/>
</edittypes>
<editform>.</editform>
<editforminit></editforminit>
<annotationform>.</annotationform>
<aliases>
<alias field="shortName" index="4" name=""/>
</aliases>
<attributeactions/>
<overlay display="false" type="diagram">
<renderer item_interpretation="linear">
<diagramitem size="0" value="0"/>
<diagramitem size="0" value="0"/>
</renderer>
<factory sizeUnits="MM" type="Pie">
<wellknownname>Pie</wellknownname>
<classificationfield>0</classificationfield>
</factory>
<scalingAttribute>0</scalingAttribute>
</overlay>
</maplayer>
<maplayer minimumScale="0" maximumScale="1e+08" geometry="Line" type="vector" hasScaleBasedVisibilityFlag="0">
<id>campus_cottbus_mitte_strassen20130709115740721</id>
@@ -338,10 +359,32 @@
<multilineenabled fieldname="" on=""/>
<selectedonly on=""/>
</labelattributes>
<edittypes>
<edittype type="0" name="name"/>
<edittype type="0" name="osm_id"/>
<edittype type="0" name="parent"/>
<edittype type="0" name="shortName"/>
<edittype type="0" name="type"/>
</edittypes>
<editform>.</editform>
<editforminit></editforminit>
<annotationform>.</annotationform>
<aliases>
<alias field="parent" index="3" name=""/>
<alias field="shortName" index="4" name=""/>
</aliases>
<attributeactions/>
<overlay display="false" type="diagram">
<renderer item_interpretation="linear">
<diagramitem size="0" value="0"/>
<diagramitem size="0" value="0"/>
</renderer>
<factory sizeUnits="MM" type="Pie">
<wellknownname>Pie</wellknownname>
<classificationfield>0</classificationfield>
</factory>
<scalingAttribute>0</scalingAttribute>
</overlay>
</maplayer>
<maplayer minimumScale="0" maximumScale="1e+08" geometry="Line" type="vector" hasScaleBasedVisibilityFlag="0">
<id>campus_cottbus_nord_strassen20130709130942093</id>
@@ -602,10 +645,32 @@
<multilineenabled fieldname="" on=""/>
<selectedonly on=""/>
</labelattributes>
<edittypes>
<edittype type="0" name="name"/>
<edittype type="0" name="osm_id"/>
<edittype type="0" name="parent"/>
<edittype type="0" name="shortName"/>
<edittype type="0" name="type"/>
</edittypes>
<editform>.</editform>
<editforminit></editforminit>
<annotationform>.</annotationform>
<aliases>
<alias field="parent" index="3" name=""/>
<alias field="shortName" index="4" name=""/>
</aliases>
<attributeactions/>
<overlay display="false" type="diagram">
<renderer item_interpretation="linear">
<diagramitem size="0" value="0"/>
<diagramitem size="0" value="0"/>
</renderer>
<factory sizeUnits="MM" type="Pie">
<wellknownname>Pie</wellknownname>
<classificationfield>0</classificationfield>
</factory>
<scalingAttribute>0</scalingAttribute>
</overlay>
</maplayer>
<maplayer minimumScale="0" maximumScale="1e+08" geometry="Line" type="vector" hasScaleBasedVisibilityFlag="0">
<id>campus_senftenberg_strassen20130709121948701</id>
@@ -737,11 +802,17 @@
<edittypes>
<edittype type="0" name="name"/>
<edittype type="0" name="osm_id"/>
<edittype type="0" name="parent"/>
<edittype type="0" name="shortName"/>
<edittype type="0" name="type"/>
</edittypes>
<editform>.</editform>
<editforminit></editforminit>
<annotationform>.</annotationform>
<aliases>
<alias field="parent" index="3" name=""/>
<alias field="shortName" index="4" name=""/>
</aliases>
<attributeactions/>
<overlay display="false" type="diagram">
<renderer item_interpretation="linear">

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

15
map/createCSV.txt Normal file
View File

@@ -0,0 +1,15 @@
Export a copy of qq.shp to CSV geographic format
Comma seperated value, CSV , format is a type of delimited text format where fields are seperated by
commas and records are seperated by line returns. Generally, if a field value contains commas,
double quotes or certain other special characters then the value is surrounded by double quotes.
Then if the value contains double quotes, each double quote is converted to a pair of consecutive double quotes".
This delimited text format is sometimes called Microsoft Excel csv format.
1.Right click on qq in the projects TOC and select Save As...
2.In Save Vector Layer As dialog enter the following for the fields:
- Format: Comma Separated Value
- Save As: path and the file name, qq2.csv
- Layer: GEOMETRY=AS_WKT
(use default values for other fields)
3. Open the file you just created using Add Vector Layer button.

View File

@@ -0,0 +1,374 @@
-- phpMyAdmin SQL Dump
-- version 4.0.4.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Erstellungszeit: 19. Aug 2013 um 17:33
-- Server Version: 5.5.32
-- PHP-Version: 5.4.16
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
--
-- Datenbank: `geodb`
--
CREATE DATABASE IF NOT EXISTS `geodb` DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;
USE `geodb`;
-- --------------------------------------------------------
--
-- Tabellenstruktur für Tabelle `domain`
--
-- Erzeugt am: 19. Aug 2013 um 15:04
--
DROP TABLE IF EXISTS `domain`;
CREATE TABLE IF NOT EXISTS `domain` (
`id` int(32) NOT NULL AUTO_INCREMENT,
`name` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=4 ;
-- --------------------------------------------------------
--
-- Tabellenstruktur für Tabelle `information`
--
-- Erzeugt am: 19. Aug 2013 um 15:04
--
DROP TABLE IF EXISTS `information`;
CREATE TABLE IF NOT EXISTS `information` (
`id` int(32) NOT NULL AUTO_INCREMENT,
`name` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=5 ;
-- --------------------------------------------------------
--
-- Stellvertreter-Struktur des Views `pis`
--
DROP VIEW IF EXISTS `pis`;
CREATE TABLE IF NOT EXISTS `pis` (
`pid` int(32)
,`parent` int(32)
,`refpoint` mediumtext
,`iid` int(32)
,`iName` varchar(50)
,`iValue` varchar(500)
);
-- --------------------------------------------------------
--
-- Tabellenstruktur für Tabelle `place`
--
-- Erzeugt am: 19. Aug 2013 um 15:04
--
DROP TABLE IF EXISTS `place`;
CREATE TABLE IF NOT EXISTS `place` (
`id` int(32) NOT NULL AUTO_INCREMENT,
`plan` geometry NOT NULL,
`parent` int(32) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=183190823 ;
-- --------------------------------------------------------
--
-- Tabellenstruktur für Tabelle `placealias`
--
-- Erzeugt am: 19. Aug 2013 um 15:04
--
DROP TABLE IF EXISTS `placealias`;
CREATE TABLE IF NOT EXISTS `placealias` (
`aid` int(32) NOT NULL AUTO_INCREMENT,
`pid` int(32) NOT NULL,
`alias` varchar(250) COLLATE utf8_unicode_ci NOT NULL,
PRIMARY KEY (`aid`,`pid`),
KEY `pid` (`pid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=172 ;
--
-- RELATIONEN DER TABELLE `placealias`:
-- `pid`
-- `place` -> `id`
--
-- --------------------------------------------------------
--
-- Stellvertreter-Struktur des Views `placealiasview`
--
DROP VIEW IF EXISTS `placealiasview`;
CREATE TABLE IF NOT EXISTS `placealiasview` (
`alias` varchar(250)
,`plan` geometry
,`aid` int(32)
,`pid` int(32)
,`parent` int(32)
);
-- --------------------------------------------------------
--
-- Tabellenstruktur für Tabelle `placedomain`
--
-- Erzeugt am: 19. Aug 2013 um 15:04
--
DROP TABLE IF EXISTS `placedomain`;
CREATE TABLE IF NOT EXISTS `placedomain` (
`pid` int(32) NOT NULL,
`did` int(32) NOT NULL,
PRIMARY KEY (`pid`,`did`),
KEY `did` (`did`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
--
-- RELATIONEN DER TABELLE `placedomain`:
-- `pid`
-- `place` -> `id`
-- `did`
-- `domain` -> `id`
--
-- --------------------------------------------------------
--
-- Stellvertreter-Struktur des Views `placedomainview`
--
DROP VIEW IF EXISTS `placedomainview`;
CREATE TABLE IF NOT EXISTS `placedomainview` (
`pid` int(32)
,`did` int(32)
,`name` varchar(50)
);
-- --------------------------------------------------------
--
-- Tabellenstruktur für Tabelle `placeinformation`
--
-- Erzeugt am: 19. Aug 2013 um 15:04
--
DROP TABLE IF EXISTS `placeinformation`;
CREATE TABLE IF NOT EXISTS `placeinformation` (
`pid` int(32) NOT NULL,
`iid` int(32) NOT NULL,
`value` varchar(500) COLLATE utf8_unicode_ci NOT NULL,
PRIMARY KEY (`pid`,`iid`),
KEY `iid` (`iid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
--
-- RELATIONEN DER TABELLE `placeinformation`:
-- `pid`
-- `place` -> `id`
-- `iid`
-- `information` -> `id`
--
-- --------------------------------------------------------
--
-- Stellvertreter-Struktur des Views `placeinformationview`
--
DROP VIEW IF EXISTS `placeinformationview`;
CREATE TABLE IF NOT EXISTS `placeinformationview` (
`pid` int(32)
,`iid` int(32)
,`name` varchar(50)
,`value` varchar(500)
);
-- --------------------------------------------------------
--
-- Tabellenstruktur für Tabelle `placeservice`
--
-- Erzeugt am: 19. Aug 2013 um 15:04
--
DROP TABLE IF EXISTS `placeservice`;
CREATE TABLE IF NOT EXISTS `placeservice` (
`pid` int(32) NOT NULL,
`sid` int(32) NOT NULL,
`request` varchar(250) COLLATE utf8_unicode_ci NOT NULL,
PRIMARY KEY (`pid`,`sid`),
KEY `sid` (`sid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
--
-- RELATIONEN DER TABELLE `placeservice`:
-- `pid`
-- `place` -> `id`
-- `sid`
-- `service` -> `id`
--
-- --------------------------------------------------------
--
-- Stellvertreter-Struktur des Views `placeserviceview`
--
DROP VIEW IF EXISTS `placeserviceview`;
CREATE TABLE IF NOT EXISTS `placeserviceview` (
`pid` int(32)
,`sid` int(32)
,`name` varchar(50)
,`sap` varchar(250)
,`request` varchar(250)
);
-- --------------------------------------------------------
--
-- Stellvertreter-Struktur des Views `pss`
--
DROP VIEW IF EXISTS `pss`;
CREATE TABLE IF NOT EXISTS `pss` (
`pid` int(32)
,`parent` int(32)
,`refpoint` mediumtext
,`sid` int(32)
,`sName` varchar(50)
,`sap` varchar(250)
,`request` varchar(250)
);
-- --------------------------------------------------------
--
-- Tabellenstruktur für Tabelle `service`
--
-- Erzeugt am: 19. Aug 2013 um 15:04
--
DROP TABLE IF EXISTS `service`;
CREATE TABLE IF NOT EXISTS `service` (
`id` int(32) NOT NULL AUTO_INCREMENT,
`name` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
`sap` varchar(250) COLLATE utf8_unicode_ci NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=2 ;
-- --------------------------------------------------------
--
-- Stellvertreter-Struktur des Views `sps`
--
DROP VIEW IF EXISTS `sps`;
CREATE TABLE IF NOT EXISTS `sps` (
`id` int(32)
,`plan` geometry
,`refpoint` mediumtext
,`parent` int(32)
,`did` int(32)
,`dName` varchar(50)
,`aid` int(32)
,`alias` varchar(250)
);
-- --------------------------------------------------------
--
-- Struktur des Views `pis`
--
DROP TABLE IF EXISTS `pis`;
CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `pis` AS select `placeinformation`.`pid` AS `pid`,`place`.`parent` AS `parent`,astext(centroid(`place`.`plan`)) AS `refpoint`,`placeinformation`.`iid` AS `iid`,`information`.`name` AS `iName`,`placeinformation`.`value` AS `iValue` from ((`placeinformation` left join `place` on((`place`.`id` = `placeinformation`.`pid`))) left join `information` on((`information`.`id` = `placeinformation`.`iid`)));
-- --------------------------------------------------------
--
-- Struktur des Views `placealiasview`
--
DROP TABLE IF EXISTS `placealiasview`;
CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `placealiasview` AS select `placealias`.`alias` AS `alias`,`place`.`plan` AS `plan`,`placealias`.`aid` AS `aid`,`placealias`.`pid` AS `pid`,`place`.`parent` AS `parent` from (`place` left join `placealias` on((`place`.`id` = `placealias`.`pid`)));
-- --------------------------------------------------------
--
-- Struktur des Views `placedomainview`
--
DROP TABLE IF EXISTS `placedomainview`;
CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `placedomainview` AS select `placedomain`.`pid` AS `pid`,`placedomain`.`did` AS `did`,`domain`.`name` AS `name` from ((`placedomain` left join `place` on((`place`.`id` = `placedomain`.`pid`))) left join `domain` on((`domain`.`id` = `placedomain`.`did`)));
-- --------------------------------------------------------
--
-- Struktur des Views `placeinformationview`
--
DROP TABLE IF EXISTS `placeinformationview`;
CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `placeinformationview` AS select `placeinformation`.`pid` AS `pid`,`placeinformation`.`iid` AS `iid`,`information`.`name` AS `name`,`placeinformation`.`value` AS `value` from ((`placeinformation` left join `place` on((`place`.`id` = `placeinformation`.`pid`))) left join `information` on((`information`.`id` = `placeinformation`.`iid`)));
-- --------------------------------------------------------
--
-- Struktur des Views `placeserviceview`
--
DROP TABLE IF EXISTS `placeserviceview`;
CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `placeserviceview` AS select `placeservice`.`pid` AS `pid`,`placeservice`.`sid` AS `sid`,`service`.`name` AS `name`,`service`.`sap` AS `sap`,`placeservice`.`request` AS `request` from ((`placeservice` left join `service` on((`service`.`id` = `placeservice`.`sid`))) left join `place` on((`place`.`id` = `placeservice`.`pid`)));
-- --------------------------------------------------------
--
-- Struktur des Views `pss`
--
DROP TABLE IF EXISTS `pss`;
CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `pss` AS select `placeservice`.`pid` AS `pid`,`place`.`parent` AS `parent`,astext(centroid(`place`.`plan`)) AS `refpoint`,`placeservice`.`sid` AS `sid`,`service`.`name` AS `sName`,`service`.`sap` AS `sap`,`placeservice`.`request` AS `request` from ((`placeservice` left join `service` on((`service`.`id` = `placeservice`.`sid`))) left join `place` on((`place`.`id` = `placeservice`.`pid`)));
-- --------------------------------------------------------
--
-- Struktur des Views `sps`
--
DROP TABLE IF EXISTS `sps`;
CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `sps` AS select `place`.`id` AS `id`,`place`.`plan` AS `plan`,astext(centroid(`place`.`plan`)) AS `refpoint`,`place`.`parent` AS `parent`,`placedomain`.`did` AS `did`,`domain`.`name` AS `dName`,`placealias`.`aid` AS `aid`,`placealias`.`alias` AS `alias` from (((`place` left join `placedomain` on((`place`.`id` = `placedomain`.`pid`))) left join `domain` on((`domain`.`id` = `placedomain`.`did`))) left join `placealias` on((`place`.`id` = `placealias`.`pid`)));
--
-- Constraints der exportierten Tabellen
--
--
-- Constraints der Tabelle `placealias`
--
ALTER TABLE `placealias`
ADD CONSTRAINT `placealias_ibfk_1` FOREIGN KEY (`pid`) REFERENCES `place` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
--
-- Constraints der Tabelle `placedomain`
--
ALTER TABLE `placedomain`
ADD CONSTRAINT `placedomain_ibfk_1` FOREIGN KEY (`pid`) REFERENCES `place` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `placedomain_ibfk_2` FOREIGN KEY (`did`) REFERENCES `domain` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
--
-- Constraints der Tabelle `placeinformation`
--
ALTER TABLE `placeinformation`
ADD CONSTRAINT `placeinformation_ibfk_1` FOREIGN KEY (`pid`) REFERENCES `place` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `placeinformation_ibfk_2` FOREIGN KEY (`iid`) REFERENCES `information` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
--
-- Constraints der Tabelle `placeservice`
--
ALTER TABLE `placeservice`
ADD CONSTRAINT `placeservice_ibfk_1` FOREIGN KEY (`pid`) REFERENCES `place` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `placeservice_ibfk_2` FOREIGN KEY (`sid`) REFERENCES `service` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;

View File

@@ -455,6 +455,14 @@ INSERT INTO `placeinformation` (`pid`, `iid`, `value`) VALUES
(183190820, 3, 'Lehrgebäude 4/2'),
(183190822, 3, 'Lehrgebäude 4/5');
--
-- Daten für Tabelle `service`
--
INSERT INTO `service` (`id`, `name`, `sap`) VALUES
(1, 'website', 'http://www.');
--
-- Daten für Tabelle `placeservice`
--
@@ -465,13 +473,6 @@ INSERT INTO `placeservice` (`pid`, `sid`, `request`) VALUES
(3, 1, 'hslausitz.de/start.html'),
(4, 1, 'tucottbus.de/btu/');
--
-- Daten für Tabelle `service`
--
INSERT INTO `service` (`id`, `name`, `sap`) VALUES
(1, 'website', 'http://www.');
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;