Blame view

src/Request/ParamsRequestImpl/Nodes/Requests/RequestOutputDownloadPostProcessingNodeClass.php 1006 Bytes
22521f1c   Benjamin Renard   First commit
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<?php

define ("REQUESTOUTPUTDOWNLOADPOSTPROCESSING_NAME", "postProcess");


abstract class DownloadPostProcessingEnum
{
	const UNKNOWN = "";
	const ZIP  = "zip";
	const TAR  = "tar";
	const GZIP = "gzip";
}

/**
 * @class RequestOutputDownloadPostProcessingNodeClass
 * @brief Definition of a request post processing node for AMDA_Kernel
 * @details
 */
class RequestOutputDownloadPostProcessingNodeClass extends NodeClass
{
	public function __construct()
	{
		parent::__construct(REQUESTOUTPUTDOWNLOADPOSTPROCESSING_NAME);
	}

	public function addPostProcessing($type)
	{
		$this->getChildInstanceByName($type, true);
	}

	public function isPostProcessing($type)
	{
		if ($type == DownloadPostProcessingEnum::UNKNOWN)
			return false;
		return ($this->getChildInstanceByName($type) != NULL);
	}
966bd5f8   Benjamin Renard   Add request to ge...
37
38
39
40
41
42
43
	
	public function loadFromNode($xmlNode)
	{
		foreach ($this->getXmlNodeChildren($xmlNode) as $postProcessingXmlNode) {
			$this->addPostProcessing($this->getXmlNodeName($postProcessingXmlNode));
		}
	}
22521f1c   Benjamin Renard   First commit
44
45
46
}

?>