Select Git revision
Layers.class.inc
Metadata.class.inc 2.59 KiB
<?php
require_once 'Vmap4MapServer.class.inc';
require_once dirname($_SERVER['SCRIPT_FILENAME']) . '/class/vitis_lib/Connection.class.inc';
/**
* \file Metadata.class.inc
* \class Metadata
*
* \author Armand Bahi <armand.bahi@veremes.com>.
*
* \brief This file contains the Metadata php class
*
* This class defines operation for one metadata
*
*/
class Metadata extends Vmap4MapServer {
public $oError;
/**
* construct
* @param type $aPath url of the request
* @param type $aValues parameters of the request
* @param type $properties properties
* @param type $bShortcut false to reinit variables
* @param type $oConnection connection object
*/
function __construct($aPath, $aValues, $properties, $bShortcut = false, $oConnection = false) {
parent::__construct($aPath, $aValues, $properties, $bShortcut, $oConnection);
$this->aSelectedFields = Array("metadata_id", "name", "definition");
}
/**
* @SWG\Get(path="/metadatas/{metadata_id}",
* tags={"Metadatas"},
* summary="Get metadata",
* description="Request to get metadata by id",
* operationId="GET",
* produces={"application/xml", "application/json", "application/x-vm-json"},
* @SWG\Parameter(
* name="token",
* in="query",
* description="user token",
* required=true,
* type="string"
* ),
* @SWG\Parameter(
* name="metadata_id",
* in="path",
* description="metadata id",
* required=true,
* type="integer",
* format = "int32"
* ),
* @SWG\Response(
* response=200,
* description="Poprerties Response",
* @SWG\Schema(ref="#/definitions/metadatas")
* )
* )
*/
/**
* get informations about metadata
*/
function GET() {
require $this->sRessourcesFile;
$this->aFields = $this->getFields($this->aProperties['schema_vm4ms'], 'metadata', 'metadata_id');
}