package eu.dnetlib.exporter;

import java.sql.SQLException;

public class MainApp {
	public static void main(String[] args) throws ClassNotFoundException, SQLException {
		
		if(args.length >1){
			String operation= args[0];
			String dbName= args[1];
			SubscriptionExporter sb= new SubscriptionExporter(dbName);
			if("list".equals(operation)){
		        sb.ShowSubscription();
			}
			else if ("export".equals(operation)){
				if (args.length==4){
					String oldURL= args[2];
					String newURL= args[3];
					sb.Export(dbName, oldURL, newURL);
				}
				else
				{
					sb.Export(dbName, "","");
				}				
			}
		}        
	}

}
