package com.tandbergtv.watchpoint.pmm.title.conf;

import java.io.File;

import com.tandbergtv.watchpoint.pmm.entities.Title;

/**
 * Interface for implementations that would convert metadata of one specification to
 * a PMM title object and vice-versa.
 * 
 * @author Raj Prakash
 */
public interface IMetadataConverter {
	
	/**
	 * Converts metadata of a specification to a PMM title object.
	 * 
	 * @param metadataFile	the file that contains the metadata
	 * @return				the converted PMM title
	 * @throws Exception 
	 */
	Title unmarshal(File metadataFile) throws Exception;
	
	/**
	 * Converts the PMM title object to a specification format metadata.
	 * 
	 * @param title			the title to convert
	 * @param metadataFile	the file to write the converted metadata
	 * @throws Exception 
	 */
	void marshal(Title title, File metadataFile) throws Exception;
}
