package com.systemincloud.ext.vip.modeler.upgrade.v0_3_5.to.v0_3_6;

import java.io.IOException;

import javax.xml.transform.TransformerException;

import org.apache.commons.io.IOUtils;

import com.systemincloud.ext.vip.modeler.upgrade.common.AbstractVipExecute;
import com.systemincloud.modeler.upgrade.common.AbstractExecute;
import com.systemincloud.modeler.upgrade.common.IExtExecute;

public class VipExecute extends AbstractVipExecute implements IExtExecute {
	
	@Override
	public String executeOnFile(String xml) {
		try {
			xml = super.executeOnSic(xml);
			xml = updateTaskVerColorMap     (xml, "0.1.4");
			xml = updateTaskVerImageFromFile(xml, "0.1.5");
			xml = updateTaskVerImageFromUrl (xml, "0.1.5");
			xml = updateTaskVerImageToFile  (xml, "0.1.5");
			xml = updateTaskVerTv           (xml, "0.1.6");
			xml = updateTaskVerVideoFromFile(xml, "0.1.5");
			xml = updateTaskVerVideoFromUrl (xml, "0.1.5");
			xml = updateTaskVerVideoToFile  (xml, "0.1.6");
			xml = updateTaskVerWebcam       (xml, "0.1.6");
			
			xml = addOnlyLocalAttribute(xml);
			
		} catch (TransformerException | IOException e) { }
		return xml;
	}
	
	public String addOnlyLocalAttribute(String xml) throws TransformerException, IOException {
		return AbstractExecute.transform(xml, IOUtils.toString(VipExecute.class.getResourceAsStream("only-local.xsl"), "UTF-8"), null);
	}
	
	@Override
	public boolean executeOnRoot(String root) {
		return super.executeOnRoot(root);
	}
	
	@Override
	public String executeOnPom(String pom) throws TransformerException{
		return pom;
	}
}

@@ -66,37 +66,8 @@
 6;%0A%0A
-import java.io.IOException;%0A%0A
 impo
@@ -116,47 +116,8 @@
 n;%0A%0A
-import org.apache.commons.io.IOUtils;%0A%0A
 impo
@@ -192,73 +192,8 @@
 te;%0A
-import com.systemincloud.modeler.upgrade.common.AbstractExecute;%0A
 impo
@@ -891,49 +891,8 @@
 %09%09%09%0A
-%09%09%09xml = addOnlyLocalAttribute(xml);%0A%09%09%09%0A
 %09%09%7D 
@@ -923,22 +923,8 @@
 ion 
-%7C IOException 
 e) %7B
@@ -949,235 +949,8 @@
 %7D%0A%09%0A
-%09public String addOnlyLocalAttribute(String xml) throws TransformerException, IOException %7B%0A%09%09return AbstractExecute.transform(xml, IOUtils.toString(VipExecute.class.getResourceAsStream(%22only-local.xsl%22), %22UTF-8%22), null);%0A%09%7D%0A%09%0A
 %09@Ov

remove unuseful transformation