Subversion Repositories eFlore/Applications.cel

Rev

Rev 1425 | Rev 1468 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
416 aurelien 1
<?php
2
/**
892 aurelien 3
* PHP Version 5
4
*
5
* @category  PHP
6
* @package   jrest
7
* @author    David Delon <david.delon@clapas.net>
8
* @copyright 2010 Tela-Botanica
9
* @license   http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt Licence CECILL
10
* @version   SVN: <svn_id>
11
* @link      /doc/jrest/
12
*/
416 aurelien 13
 
892 aurelien 14
/**
15
* NameMap.php
16
*
17
* in utf8
18
* out utf8
19
*
20
* Cas d'utilisation :
21
* Service recherche d'image a partir d'un numero nomenclatural
22
*
23
* 1: Le service recoit un numero nomenclatural
24
* 2: Le service calcul le numero taxonomique associe
25
* 3: Le service recherche une carte disponible
26
* 		A: Pas de carte disponible, generation de l'image
27
*/
416 aurelien 28
 
892 aurelien 29
// TODO: externaliser ceci dans le fichier de config
416 aurelien 30
/** Constante stockant l'URL o. sont accessible les cartes. Le %s correspond au nom du fichier.*/
31
define('EF_URL_CARTO', 'http://www.tela-botanica.org/sites/eflore/generique/images/cartes/');
32
// france_BDNFF_4.02_nt8523.png
33
/** Constante stockant l'URL d'appel du module chorologie*/
34
define('EF_URL_CHORO', 'http://www.tela-botanica.org/eflore/BDNFF/4.02/nn/');
35
// 182/chorologie
36
 
877 aurelien 37
class NameMap extends Cel  {
416 aurelien 38
 
39
	function getElement($uid){
40
 
877 aurelien 41
		$nt = null;
416 aurelien 42
 
892 aurelien 43
		if(isset($uid[0])) {
877 aurelien 44
        $retour = array('');
1426 aurelien 45
        	$file = 'http://localhost/service:eflore:0.1/chorodep/cartes/nn%3A'.$uid[0].'?retour.format=587&retour=image%2Fpng';
877 aurelien 46
			$retour = array($file);
47
        }
48
 
1014 aurelien 49
		$this->envoyerJson($retour);
50
		return true;
416 aurelien 51
	}
52
}
53
/* +--Fin du code ---------------------------------------------------------------------------------------+
54
* $Log$
55
* Revision 1.1  2008-01-30 08:57:28  ddelon
56
* fin mise en place mygwt
57
*
58
* Revision 1.1  2007-06-06 13:31:16  ddelon
59
* v0.09
60
*/
877 aurelien 61
?>