package db;

/**
 *
 * @author Gonzalo
 */
public class DBTest {


    public static void main(String[] args) {
        DBAccess dba = DBAccessImplementation.getInstance();
        dba.storeLastSco("","MANIFEST-D2FC8B8B-D75F-EAB4-055E-F83698ED57EB", "john", "ITEM-C6BEB01B-255A-A280-2E0B-BA82F5A3C5EA", "ORG-EE97748F-5B07-81CA-02DD-F8C53D4FB419 ITEM-CDB52BA7-6169-5DE4-E468-87BA1214AECD ITEM-36B590F2-E780-3E11-CA59-2123602D12AB", "25.3547");
        String scoId = dba.getLastScoId("MANIFEST-D2FC8B8B-D75F-EAB4-055E-F83698ED57EB", "john");
        String path = dba.getScoPath(scoId);
        String scoPoint = dba.getScoPoint(scoId, "john");
        /*if (!dba.deleteLastSco("MANIFEST-D2FC8B8B-D75F-EAB4-055E-F83698ED57EB", "john")) {
            System.out.println("no se puedo eliminar la entrada del curso");
        }*/
        String splittedPath[] = path.split(" ");
        System.out.println("El último SCO es:");
        String indent = "";
        for (String branch : splittedPath) {
            System.out.println(indent+"-"+branch);
            indent += "  ";
        }
        System.out.println(indent+"-"+scoId);
        System.out.println("y el punto de reproducción es: "+scoPoint);
    }

}
