DownloadObjectRequestDataClass.php 1.52 KB
<?php

/**
 * @class DownloadObjectTypeEnumClass
 * @brief Enumerate for download request type
 * @details
 */
abstract class DownloadObjectTypeEnumClass
{
	const UNKNOWN  = "";
    const ASTROIMG = "astro_image";
}

/**
 * @class DownloadObjectFormatEnumClass
 * @brief Enumerate for download extention request type
 * @details
 */
abstract class DownloadObjectFormatEnumClass
{
	const UNKNOWN  = "";
    const ZIP = "zip";
}


/**
 * @class DownloadObjectRequestDataClass
 * @brief Data for a download request
 * @details
 */
class DownloadObjectRequestDataClass extends RequestDataClass
{
    private $type        = DownloadObjectTypeEnumClass::UNKNOWN;
    private $files       = array();
    private $compression = DownloadObjectFormatEnumClass::ZIP;
	private $workingPath = "";
	private $outputPath  = "";


    public function getType()
	{
		return $this->type;
	}

	public function setType($type)
	{
		$this->type = $type;
	}

    public function getFiles()
	{
		return $this->files;
	}

	public function addFile($name, $url)
	{
		$this->files[$name] = $url;
	}

	public function getWorkingPath()
	{
		return $this->workingPath;
	}

	public function setWorkingPath($workingPath)
	{
		$this->workingPath = $workingPath;
	}

	public function getOutputPath()
	{
		return $this->outputPath;
	}

	public function setOutputPath($outputPath)
	{
		$this->outputPath = $outputPath;
	}

    public function getCompressionFormat()
	{
		return $this->compression;
	}

	public function setCompressionFormat($compression)
	{
		$this->compression = $compression;
	}

}