[Mapbender-commits] r4525 - in branches/mifan_dev/mapbender/http: javascripts php

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Sun Aug 16 01:59:29 EDT 2009


Author: mifan
Date: 2009-08-16 01:59:29 -0400 (Sun, 16 Aug 2009)
New Revision: 4525

Modified:
   branches/mifan_dev/mapbender/http/javascripts/mod_searchCSW_ajax.php
   branches/mifan_dev/mapbender/http/php/mod_searchCatQueryBuilder_server.php
Log:
changs to handle addvanced queries

Modified: branches/mifan_dev/mapbender/http/javascripts/mod_searchCSW_ajax.php
===================================================================
--- branches/mifan_dev/mapbender/http/javascripts/mod_searchCSW_ajax.php	2009-08-14 07:23:15 UTC (rev 4524)
+++ branches/mifan_dev/mapbender/http/javascripts/mod_searchCSW_ajax.php	2009-08-16 05:59:29 UTC (rev 4525)
@@ -520,7 +520,7 @@
 	<?php include("../include/dyn_css.php"); ?>
 	<script type="text/javascript">
 
-	var CatName = '<?php echo _mb("Record NTitle");?>';
+	var CatName = '<?php echo _mb("Record Title");?>';
 	var CatAbstract = '<?php echo _mb("Record Abstract");?>';
 	var CatTitle = '<?php echo _mb("Returned Results...");?>';
 

Modified: branches/mifan_dev/mapbender/http/php/mod_searchCatQueryBuilder_server.php
===================================================================
--- branches/mifan_dev/mapbender/http/php/mod_searchCatQueryBuilder_server.php	2009-08-14 07:23:15 UTC (rev 4524)
+++ branches/mifan_dev/mapbender/http/php/mod_searchCatQueryBuilder_server.php	2009-08-16 05:59:29 UTC (rev 4525)
@@ -82,6 +82,7 @@
 	}
 	
 	//main controller
+	//loop for each catalog
 	foreach($catalogIDs as $catalog_id=>$url){
 		//$cat_obj = new csw();
 		//$cat_obj->createCatObjFromDB($catalogs);
@@ -93,6 +94,7 @@
 		$RecordObj->createCSWRecordFromXML($getrecordsurl,$getrecordsxml);
 		
 		//Populate JSON for each summary record for each catalog
+		//Loop for each Summary Record
 		foreach ($RecordObj->SummaryRecordsArray as $SummaryRecordObj){
 			$title = $SummaryRecordObj->getTitle();
 			$abstract = $SummaryRecordObj->getAbstract();
@@ -111,6 +113,36 @@
 function getrecords_build_query($getrecords_url){
 	
 	//CHECK FOR COMMAND, GET POST. HANDLE THINGS HERE
+	
+	$url = null;
+	$xml = null;
+	
+	$request = 'GetRecords';
+	$version = '2.0.2';
+	$resulttype = 'results';
+	$typename = 'csw:Record';
+	$service='CSW';
+	
+	switch(mb_strtolower($getrecords_type)){
+		case 'get':
+			$url = $getrecords_url.'?request='.$request.'&service='.$service.'&ResultType='.$resulttype.'&TypeNames='.$typename.'&version='.$version;
+			if($command=='getrecordssimple'){
+				//Simple GetRecords via GET
+				$url .= (isset($simplesearch) && $simplesearch!="")?'&constraintlanguage=CQLTEXT&constraint=csw:AnyText Like %'.$simplesearch.'%':'';
+			}
+			else {
+				//Advanced GetRecords via GET
+				$url .= (isset($simplesearch) && $simplesearch!="")?'&constraintlanguage=CQLTEXT&constraint=csw:AnyText Like %'.$simplesearch.'%':'';
+			}
+			break;
+		case 'post':
+			$url = $getrecords_url;
+			break;
+		case 'soap':
+			break;
+		default:
+	}
+	
 	return array('url'=>$url,'xml'=>$xml);
 }
 
@@ -132,14 +164,6 @@
 	return $list_of_cat;
 }
 
-function get_url_for_operation($catalog_id,$operation_type,$fetch_mode){
-	
-}
-
-function do_getrecords_get($catalog_id_array){
-	
-}
-
 /**
  * http://geomatics.nlr.nl/excat/csw?request=GetRecords&service=CSW&version=2.0.2&ResultType=results&TypeName=csw:Record&TYPENAMES=csw:dataset
  * @param $url
@@ -221,12 +245,7 @@
 	
 }
 
-function build_simple_query_get()
-{
-		
-}
 
-
 function getrecords_post ($url, $postData) {
 	 	$connection = new connector();
         $connection->set("httpType", "post");



More information about the Mapbender_commits mailing list