package com.tandbergtv.watchpoint.pmm.title.conf.specs;

import java.io.File;

import com.tandbergtv.watchpoint.pmm.entities.Title;
import com.tandbergtv.watchpoint.pmm.title.conf.IMetadataConverter;

/**
 * Converter class for ADI metadata.
 * This class helps to convert between Title object and ADI metadata.
 * 
 * @author Raj Prakash
 */
public class ADIMetadataConverter implements IMetadataConverter {

	/**
	 * @see com.tandbergtv.watchpoint.pmm.title.conf.IMetadataConverter#marshal(com.tandbergtv.watchpoint.pmm.entities.Title, java.io.File)
	 */
	public void marshal(Title title, File metadataFile) throws Exception {
		throw new UnsupportedOperationException("This method is not yet implemented");
	}

	/**
	 * @see com.tandbergtv.watchpoint.pmm.title.conf.IMetadataConverter#unmarshal(java.io.File)
	 * @see ADIImporter#importTitle(String)
	 */
	public Title unmarshal(File metadataFile) throws Exception {
		return new ADIImporter().importTitle(metadataFile.getAbsolutePath());
	}
	
}
