<commit_before><?php
/**
 * @package api
 * @subpackage filters
 */
class KalturaBatchJobFilter extends KalturaBatchJobBaseFilter
{
	protected function toDynamicJobSubTypeValues($jobType, $jobSubTypeIn)
	{
		$data = new KalturaJobData();
		switch($jobType)
		{
			case KalturaBatchJobType::BULKUPLOAD:
				$data = new KalturaBulkUploadJobData();
				break;
				
			case KalturaBatchJobType::CONVERT:
				$data = new KalturaConvertJobData();
				break;
				
			case KalturaBatchJobType::CONVERT_PROFILE:
				$data = new KalturaConvertProfileJobData();
				break;
				
			case KalturaBatchJobType::EXTRACT_MEDIA:
				$data = new KalturaExtractMediaJobData();
				break;
				
			case KalturaBatchJobType::IMPORT:
				$data = new KalturaImportJobData();
				break;
				
			case KalturaBatchJobType::POSTCONVERT:
				$data = new KalturaPostConvertJobData();
				break;
				
			case KalturaBatchJobType::PULL:
				$data = new KalturaPullJobData();
				break;
				
			case KalturaBatchJobType::REMOTE_CONVERT:
				$data = new KalturaRemoteConvertJobData();
				break;
				
			case KalturaBatchJobType::MAIL:
				$data = new KalturaMailJobData();
				break;
				
			case KalturaBatchJobType::NOTIFICATION:
				$data = new KalturaNotificationJobData();
				break;
				
			case KalturaBatchJobType::BULKDOWNLOAD:
				$data = new KalturaBulkDownloadJobData();
				break;
				
			case KalturaBatchJobType::FLATTEN:
				$data = new KalturaFlattenJobData();
				break;
				
			case KalturaBatchJobType::PROVISION_PROVIDE:
			case KalturaBatchJobType::PROVISION_DELETE:
				$data = new KalturaProvisionJobData();
				break;
				
			case KalturaBatchJobType::CONVERT_COLLECTION:
				$data = new KalturaConvertCollectionJobData();
				break;
				
			case KalturaBatchJobType::STORAGE_EXPORT:
				$data = new KalturaStorageExportJobData();
				break;
				
			case KalturaBatchJobType::STORAGE_DELETE:
				$data = new KalturaStorageDeleteJobData();
				break;
				
			default:
				$data = KalturaPluginManager::loadObject('KalturaJobData', $jobType);
		}
		
		$jobSubTypeArray = explode(baseObjectFilter::IN_SEPARATOR, $jobSubTypeIn);
		$dbJobSubTypeArray = array();
		foreach($jobSubTypeArray as $jobSubType)
			$dbJobSubTypeArray[] = $data->toSubType();
			
		return implode(baseObjectFilter::IN_SEPARATOR, $dbJobSubTypeArray);
	}
	
	/**
	 * @param int $jobType
	 * @return BatchJobFilter
	 */
	public function toFilter($jobType = null)
	{
		$batchJobFilter = $this->toObject(new BatchJobFilter());
		
		if(!is_null($jobType) && !is_null($this->jobSubTypeIn))
		{<commit_msg>Filter translate the job sub types according to job type<commit_after><?php
/**
 * @package api
 * @subpackage filters
 */
class KalturaBatchJobFilter extends KalturaBatchJobBaseFilter
{
	protected function toDynamicJobSubTypeValues($jobType, $jobSubTypeIn)
	{
		$data = new KalturaJobData();
		switch($jobType)
		{
			case KalturaBatchJobType::BULKUPLOAD:
				$data = new KalturaBulkUploadJobData();
				break;
				
			case KalturaBatchJobType::CONVERT:
				$data = new KalturaConvertJobData();
				break;
				
			case KalturaBatchJobType::CONVERT_PROFILE:
				$data = new KalturaConvertProfileJobData();
				break;
				
			case KalturaBatchJobType::EXTRACT_MEDIA:
				$data = new KalturaExtractMediaJobData();
				break;
				
			case KalturaBatchJobType::IMPORT:
				$data = new KalturaImportJobData();
				break;
				
			case KalturaBatchJobType::POSTCONVERT:
				$data = new KalturaPostConvertJobData();
				break;
				
			case KalturaBatchJobType::PULL:
				$data = new KalturaPullJobData();
				break;
				
			case KalturaBatchJobType::REMOTE_CONVERT:
				$data = new KalturaRemoteConvertJobData();
				break;
				
			case KalturaBatchJobType::MAIL:
				$data = new KalturaMailJobData();
				break;
				
			case KalturaBatchJobType::NOTIFICATION:
				$data = new KalturaNotificationJobData();
				break;
				
			case KalturaBatchJobType::BULKDOWNLOAD:
				$data = new KalturaBulkDownloadJobData();
				break;
				
			case KalturaBatchJobType::FLATTEN:
				$data = new KalturaFlattenJobData();
				break;
				
			case KalturaBatchJobType::PROVISION_PROVIDE:
			case KalturaBatchJobType::PROVISION_DELETE:
				$data = new KalturaProvisionJobData();
				break;
				
			case KalturaBatchJobType::CONVERT_COLLECTION:
				$data = new KalturaConvertCollectionJobData();
				break;
				
			case KalturaBatchJobType::STORAGE_EXPORT:
				$data = new KalturaStorageExportJobData();
				break;
				
			case KalturaBatchJobType::STORAGE_DELETE:
				$data = new KalturaStorageDeleteJobData();
				break;
				
			default:
				$data = KalturaPluginManager::loadObject('KalturaJobData', $jobType);
		}
		
		$jobSubTypeArray = explode(baseObjectFilter::IN_SEPARATOR, $jobSubTypeIn);
		$dbJobSubTypeArray = array();
		foreach($jobSubTypeArray as $jobSubType)
			$dbJobSubTypeArray[] = $data->toSubType($jobSubType);
			
		return implode(baseObjectFilter::IN_SEPARATOR, $dbJobSubTypeArray);
	}
	
	/**
	 * @param int $jobType
	 * @return BatchJobFilter
	 */
	public function toFilter($jobType = null)
	{
		$batchJobFilter = $this->toObject(new BatchJobFilter());
		
		if(!is_null($jobType) && !is_null($this->jobSubTypeIn))
		{
{'fraction_non_alphanumeric': 0.10309477756286267, 'fraction_numerical': 0.0, 'mean_word_length': 4.030155642023346, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4889141', 'n_tokens_mistral': 2178, 'n_tokens_neox': 1729, 'n_words': 301}