[Mapbender-commits] r4301 -
branches/mifan_dev/mapbender/http/classes
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Sat Jul 4 15:03:30 EDT 2009
Author: mifan
Date: 2009-07-04 15:03:29 -0400 (Sat, 04 Jul 2009)
New Revision: 4301
Modified:
branches/mifan_dev/mapbender/http/classes/class_csw.php
Log:
add to object
Modified: branches/mifan_dev/mapbender/http/classes/class_csw.php
===================================================================
--- branches/mifan_dev/mapbender/http/classes/class_csw.php 2009-07-04 15:48:13 UTC (rev 4300)
+++ branches/mifan_dev/mapbender/http/classes/class_csw.php 2009-07-04 19:03:29 UTC (rev 4301)
@@ -114,6 +114,66 @@
}
xml_parser_free($parser);
+
+ foreach($value_array as $element){
+ //Version
+ if(mb_strtoupper($element[tag]) == "csw:Capabilities" && $element[type] == "open"){
+ $this->cat_version = $element[attributes][version];
+ }
+ //Title
+ if(mb_strtoupper($element[tag]) == "ows:Title" && $element[level] == '3'){
+ $this->cat_title = $this->stripEndlineAndCarriageReturn($element[value]);
+ }
+ //Abstract
+ if(mb_strtoupper($element[tag]) == "ows:Abstract" && $element[level] == '3'){
+ $this->cat_abstract = $this->stripEndlineAndCarriageReturn($element[value]);
+ }
+ //fees
+ if(mb_strtolower($element[tag]) == "ows:Fees"){
+ $this->fees = $element[value];
+ }
+ //
+ if(mb_strtolower($element[tag]) == "ows:AccessConstraints"){
+ $this->accessconstraints = $element[value];
+ }
+ if(mb_strtolower($element[tag]) == "contactperson"){
+ $this->contactperson = $element[value];
+ }
+ if(mb_strtolower($element[tag]) == "contactposition"){
+ $this->contactposition = $element[value];
+ }
+ if(mb_strtolower($element[tag]) == "contactorganization"){
+ $this->contactorganization = $element[value];
+ }
+ if(mb_strtolower($element[tag]) == "address"){
+ $this->address = $element[value];
+ }
+ if(mb_strtolower($element[tag]) == "city"){
+ $this->city = $element[value];
+ }
+ if(mb_strtolower($element[tag]) == "stateorprovince"){
+ $this->stateorprovince = $element[value];
+ }
+ if(mb_strtolower($element[tag]) == "postcode"){
+ $this->postcode = $element[value];
+ }
+ if(mb_strtolower($element[tag]) == "country"){
+ $this->country = $element[value];
+ }
+ if(mb_strtolower($element[tag]) == "ows:Voice"){
+ $this->contactvoicetelephone = $element[value];
+ }
+ if(mb_strtolower($element[tag]) == "contactfacsimiletelephone"){
+ $this->contactfacsimiletelephone = $element[value];
+ }
+ if(mb_strtolower($element[tag]) == "ows:ElectronicMailAddress"){
+ $this->contactelectronicmailaddress = $element[value];
+ }
+ if(mb_strtolower($element[tag]) == "keyword" && $section != 'layer'){
+ $this->wms_keyword[count($this->wms_keyword)] = $element[value];
+ }
+
+ }
}
/**
@@ -135,8 +195,54 @@
{
global $con;
db_begin();
- $sql = "INSERT INTO cat ()"
+ $sql = "INSERT INTO cat ()";
}
+ public function displayCatalog(){
+ echo "<br>id: " . $this->wms_id . " <br>";
+ echo "version: " . $this->wms_version . " <br>";
+ echo "title: " . $this->wms_title . " <br>";
+ echo "abstract: " . $this->wms_abstract . " <br>";
+ echo "maprequest: " . $this->wms_getmap . " <br>";
+ echo "capabilitiesrequest: " . $this->wms_getcapabilities . " <br>";
+ echo "featureinforequest: " . $this->wms_getfeatureinfo . " <br>";
+ echo "gui_wms_mapformat: " . $this->gui_wms_mapformat . " <br>";
+ echo "gui_wms_featureinfoformat: " . $this->gui_wms_featureinfoformat . " <br>";
+ echo "gui_wms_exceptionformat: " . $this->gui_wms_exceptionformat . " <br>";
+ echo "gui_wms_epsg: " . $this->gui_wms_epsg . " <br>";
+ echo "wms_srs: " . $this->objLayer[0]->wms_srs1 . " <br>";
+ echo "gui_wms_visible: " . $this->gui_wms_visible . " <br>";
+ echo "gui_wms_opacity: " . $this->gui_wms_opacity . " <br>";
+ echo "support_sld: " . $this->wms_supportsld . " <br>";
+
+ for($i=0; $i<count($this->data_type);$i++){
+ echo $this->data_type[$i]. " -> ".$this->data_format[$i]. "<br>";
+ }
+ for($i=0; $i<count($this->objLayer); $i++){
+ echo "<hr>";
+ echo "id: <b>".$this->objLayer[$i]->layer_id ."</b> parent: <b>".$this->objLayer[$i]->layer_parent."</b> name: <b>".$this->objLayer[$i]->layer_name;
+ echo "</b> title: <b>".$this->objLayer[$i]->layer_title. "</b> queryable: <b>".$this->objLayer[$i]->layer_queryable."</b> minScale: <b>". $this->objLayer[$i]->layer_minscale."</b> maxScale: <b>".$this->objLayer[$i]->layer_maxscale."</b>";
+ echo "<br>dataurl: <b>".$this->objLayer[$i]->layer_dataurl_href. "</b>";
+ echo "<br>metadataurl: <b>".$this->objLayer[$i]->layer_metadataurl. "</b>";
+ echo "<table border='1'>";
+ for($j=0; $j<count($this->objLayer[$i]->layer_epsg);$j++){
+ echo "<tr><td>".$this->objLayer[$i]->layer_epsg[$j][epsg]."</td><td>".$this->objLayer[$i]->layer_epsg[$j][minx]."</td>";
+ echo "<td>".$this->objLayer[$i]->layer_epsg[$j][miny]."</td><td>".$this->objLayer[$i]->layer_epsg[$j][maxx]."</td>";
+ echo "<td>".$this->objLayer[$i]->layer_epsg[$j][maxy]."</td></tr>";
+ }
+ echo "</table>";
+ echo "layerstyle:";
+ echo "<table border='1'>";
+ echo "<tr><td>name</td><td>title</td><td>legendurl</td><td>legendurlformat</td></tr>";
+ for($j=0; $j<count($this->objLayer[$i]->layer_style);$j++){
+ echo "<tr><td>".$this->objLayer[$i]->layer_style[$j][name]."</td><td>".$this->objLayer[$i]->layer_style[$j][title]."</td><td>".$this->objLayer[$i]->layer_style[$j][legendurl]."</td><td>".$this->objLayer[$i]->layer_style[$j][legendurlformat]."</td></tr>";
+ }
+ echo "</table>";
+ echo "<hr>";
+ echo "<hr>";
+ }
+ }
+
+
}
?>
\ No newline at end of file
More information about the Mapbender_commits
mailing list