opensearch! $searchTextOS = str_replace(",","+",$searchText); if ($searchTextOS ==='false' || $searchTextOS ==='*'){ $searchTextOS = '*'; } $openSearchFilter = ""; //generate portalu search filter: //needed filter criteria: //1. searchText - anyText Field //2. isoCategories //3. regTimeBegin //4. regTimeEnd //5. searchBbox //6. searchTypeBbox //7. timeBegin //8. timeEnd //9. orderBy //check if orderBy is set // if (isset($regTimeBegin) & ($regTimeBegin != 'false')){ $openSearchFilter .= "+t1:".$regTimeBegin; } if (isset($regTimeEnd) & ($regTimeEnd != 'false')){ $openSearchFilter .= "+t2:".$regTimeEnd; } if (isset($searchBbox) & ($searchBbox != 'false')){ //parse bbox $spatialFilterCoords = explode(',',$searchBbox); //definition of the spatial filter $openSearchFilter .= "+x1:".$spatialFilterCoords[0]; $openSearchFilter .= "+x2:".$spatialFilterCoords[2]; $openSearchFilter .= "+y1:".$spatialFilterCoords[1]; $openSearchFilter .= "+y2:".$spatialFilterCoords[3]; } if (isset($searchTypeBbox) & ($searchTypeBbox != 'false')){ if ($searchTypeBbox == 'intersects') { $openSearchFilter .= "+coord:intersect"; } if ($searchTypeBbox == 'outside') { $openSearchFilter .= "+coord:outside"; } if ($searchTypeBbox == 'inside') { $openSearchFilter .= "+coord:inside"; } } if (isset($orderBy) & ($orderBy != 'false')){ if ($orderBy == 'rank') { $openSearchFilter .= "+ranking:score"; } if ($orderBy == 'date') { $openSearchFilter .= "+ranking:date"; } if ($orderBy == 'title') { $openSearchFilter .= "+ranking:title"; } } else { $openSearchFilter .= "+ranking:score"; } //apply filter //following part is only set if the portalu opensearch is used! $searchTextOS .= $openSearchFilter; // check if some extended is requested - in the old version this is defined by one parameter. The new interface would not distinguish between this two kind of search cases. Every search is a also an extented search. See mod_callMetadata.php #Geometry search: $exec = "php5 /data/mapbender/http/geoportal/gaz_geom.php '".$userId."' '".$searchText."' '".$searchEPSG."' > ".$resdir."/".$searchId."_geom.xml &"; exec($exec); #wiki search: $exec = "php5 /data/mapbender/http/geoportal/gaz_wiki.php '".$searchText."' > ".$resdir."/".$searchId."_wiki.xml &"; exec($exec); #OpenSearch Search over distributed instances of Portal-U - configuration in mapbender database //$exec = "php5 /data/mapbender/http/geoportal/mod_readOpenSearchResults.php '".$searchId."' '".$searchTextOS."' > ".$resdir."/request_".$searchId."_opensearch.xml &"; #Search via CSW 2.0.2 AP ISO 1.0 Interfaces: $exec = "php5 /data/mapbender/http/geoportal/mod_readCSWResults.php '".$searchId."' '".$searchTextOS."' > ".$resdir."/request_".$searchId."_opensearch.xml &"; //$exec = "php5 /data/mapbender/http/x_geoportal/mod_readOpenSearchResults.php '".$searchId."' '".$searchTextOS."' '+t1:2006-05-01+t2:2010-07-01' > ".$resdir."/request_".$id."_opensearch.xml &"; exec($exec); ?>