public Object[] conectarOlib(String url, String titleno) throws ClassNotFoundException, SQLException {
        // retorna un arreglo con 2 arreglos en su interior [  [arreglo 1] , [arreglo 2]  ]
        // arreglo 1: arreglo de cadenas [nombres de archivo]
        // arreglo 2: arreglo de cadenas [cadenas con dublin core]

        Class.forName("oracle.jdbc.driver.OracleDriver");
        Connection conn = DriverManager.getConnection(url, usuario, contraseña);
        conn.setAutoCommit(false);

        Statement stmt = conn.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_READ_ONLY);
        //consulta (restringida a pdfs por politica de biblioteca)
        //String consulta= "select count ('a') from titleobjs t_o, titles t, objects o, mediatps m where t_o.titleno = t.titleno and t_o.objectno = o.objectno and t.mediatp = m.mediatp and t.titleno = " + articleno + " and lower(o.locator) like '%.pdf' UNION select count(*) from titleobjs t_o, titles t, objects o, mediatps m where t_o.titleno = t.titleno and t_o.objectno = o.objectno and t.mediatp = m.mediatp and t.titleno = " + articleno + " and lower(o.locator) like '%.pdf'";
        String consulta= "select count ('a') from  titles t, mediatps m where  t.mediatp = m.mediatp and t.titleno = " + titleno + " UNION select count(*) from titles t,  mediatps m where t.mediatp = m.mediatp and t.titleno = " + titleno + " ";
        //System.out.println("conectarOlib"+ consulta);
        ResultSet rsetA = stmt.executeQuery(consulta);
        int filas = 0;
        while (rsetA.next()) {
            filas += rsetA.getInt(1);
        }
        rsetA.close();

        //consulta (restringida a pdfs politica de biblioteca)
        //consulta = "select distinct replace(o.locator,'http://www.icesi.edu.co/esn/contenido/pdfs/',''), '<?xml version=\"1.0\" encoding=\"ISO-8859-1\" standalone=\"no\"?><dublin_core>' ||' <dcvalue element=\"title\" qualifier=\"none\">'||t.title||decode(t.subtitle,null,null,' : '||t.subtitle)||'</dcvalue>' ||decode(t.isbn,null,null,' <dcvalue element=\"identifier\" qualifier=\"isbn\">'||t.isbn||'</dcvalue>') ||'<dcvalue element=\"identifier\" qualifier=\"other\">'||t.titleno||'</dcvalue>' ||fbib_dc_autores(t.titleno) ||fbib_dc_abstract(t.titleno) ||' <dcvalue element=\"language\" qualifier=\"iso\">es</dcvalue>' ||' <dcvalue element=\"date\" qualifier=\"accessioned\">'||to_char(nvl(fbibbus_fecha_pub(t.titleno),sysdate),'yyyy-mm-dd')||'</dcvalue>' ||' <dcvalue element=\"date\" qualifier=\"available\">'||to_char(nvl(fbibbus_fecha_pub(t.titleno),sysdate),'yyyy-mm-dd')||'</dcvalue>'||' <dcvalue element=\"date\" qualifier=\"issued\">'||to_char(nvl(fbibbus_fecha_pub(t.titleno),sysdate),'yyyy-mm-dd')||'</dcvalue>' ||fbib_dc_altertitulo(t.titleno) ||fbib_dc_publicador(t.titleno) ||fbib_dc_subject(t.titleno) ||fbib_dc_sponsors(t.titleno) ||fbib_dc_type(t.titleno) ||' </dublin_core>' dc_info from titleobjs t_o, titles t, objects o, mediatps m where t_o.titleno = t.titleno and t_o.objectno = o.objectno and t.mediatp = m.mediatp and t.articleno = "+ articleno +" and lower(o.locator) like '%.pdf' UNION select distinct replace(o.locator,'http://www.icesi.edu.co/esn/contenido/pdfs/',''), '<?xml version=\"1.0\" encoding=\"ISO-8859-1\" standalone=\"no\"?><dublin_core>' ||' <dcvalue element=\"title\" qualifier=\"none\">'||t.title||decode(t.subtitle,null,null,' : '||t.subtitle)||'</dcvalue>' ||decode(t.isbn,null,null,' <dcvalue element=\"identifier\" qualifier=\"isbn\">'||t.isbn||'</dcvalue>') ||'<dcvalue element=\"identifier\" qualifier=\"other\">'||t.titleno||'</dcvalue>' ||fbib_dc_autores(t.titleno) ||fbib_dc_abstract(t.titleno) ||' <dcvalue element=\"language\" qualifier=\"iso\">es</dcvalue>' ||' <dcvalue element=\"date\" qualifier=\"accessioned\">'||to_char(nvl(fbibbus_fecha_pub(t.titleno),sysdate),'yyyy-mm-dd')||'</dcvalue>' ||' <dcvalue element=\"date\" qualifier=\"available\">'||to_char(nvl(fbibbus_fecha_pub(t.titleno),sysdate),'yyyy-mm-dd')||'</dcvalue>'||' <dcvalue element=\"date\" qualifier=\"issued\">'||to_char(nvl(fbibbus_fecha_pub(t.titleno),sysdate),'yyyy-mm-dd')||'</dcvalue>' ||fbib_dc_altertitulo(t.titleno) ||fbib_dc_publicador(t.titleno) ||fbib_dc_subject(t.titleno) ||fbib_dc_sponsors(t.titleno) ||fbib_dc_type(t.titleno) ||' </dublin_core>' dc_info from titleobjs t_o, titles t, objects o, mediatps m where t_o.titleno = t.titleno and t_o.objectno = o.objectno and t.mediatp = m.mediatp and t.titleno = "+ articleno +" and lower(o.locator) like '%.pdf'";
        //consulta = "select distinct replace(o.locator,'http://www.icesi.edu.co/esn/contenido/pdfs/',''), '<?xml version=\"1.0\" encoding=\"ISO-8859-1\" standalone=\"no\"?><dublin_core>' ||' <dcvalue element=\"title\" qualifier=\"none\">'||t.title||decode(t.subtitle,null,null,' : '||t.subtitle)||'</dcvalue>' ||decode(t.isbn,null,null,' <dcvalue element=\"identifier\" qualifier=\"isbn\">'||t.isbn||'</dcvalue>') ||'<dcvalue element=\"identifier\" qualifier=\"other\">'||t.titleno||'</dcvalue>' ||olib.fbib_dc_autores(t.titleno) ||olib.fbib_dc_abstract(t.titleno) ||' <dcvalue element=\"language\" qualifier=\"iso\">es</dcvalue>' ||' <dcvalue element=\"date\" qualifier=\"accessioned\">'||to_char(nvl(olib.fbibbus_fecha_pub(t.titleno),sysdate),'yyyy-mm-dd')||'</dcvalue>' ||' <dcvalue element=\"date\" qualifier=\"available\">'||to_char(nvl(olib.fbibbus_fecha_pub(t.titleno),sysdate),'yyyy-mm-dd')||'</dcvalue>'||' <dcvalue element=\"date\" qualifier=\"issued\">'||to_char(nvl(olib.fbibbus_fecha_pub(t.titleno),sysdate),'yyyy-mm-dd')||'</dcvalue>' ||olib.fbib_dc_altertitulo(t.titleno) ||olib.fbib_dc_publicador(t.titleno) ||olib.fbib_dc_subject(t.titleno) ||olib.fbib_dc_sponsors(t.titleno) ||olib.fbib_dc_type(t.titleno) ||' </dublin_core>' dc_info from titleobjs t_o, titles t, objects o, mediatps m where t_o.titleno = t.titleno and t_o.objectno = o.objectno and t.mediatp = m.mediatp and t.articleno = "+ articleno +" and lower(o.locator) like '%.pdf' UNION select distinct replace(o.locator,'http://www.icesi.edu.co/esn/contenido/pdfs/',''), '<?xml version=\"1.0\" encoding=\"ISO-8859-1\" standalone=\"no\"?><dublin_core>' ||' <dcvalue element=\"title\" qualifier=\"none\">'||t.title||decode(t.subtitle,null,null,' : '||t.subtitle)||'</dcvalue>' ||decode(t.isbn,null,null,' <dcvalue element=\"identifier\" qualifier=\"isbn\">'||t.isbn||'</dcvalue>') ||'<dcvalue element=\"identifier\" qualifier=\"other\">'||t.titleno||'</dcvalue>' ||olib.fbib_dc_autores(t.titleno) ||olib.fbib_dc_abstract(t.titleno) ||' <dcvalue element=\"language\" qualifier=\"iso\">es</dcvalue>' ||' <dcvalue element=\"date\" qualifier=\"accessioned\">'||to_char(nvl(olib.fbibbus_fecha_pub(t.titleno),sysdate),'yyyy-mm-dd')||'</dcvalue>' ||' <dcvalue element=\"date\" qualifier=\"available\">'||to_char(nvl(olib.fbibbus_fecha_pub(t.titleno),sysdate),'yyyy-mm-dd')||'</dcvalue>'||' <dcvalue element=\"date\" qualifier=\"issued\">'||to_char(nvl(olib.fbibbus_fecha_pub(t.titleno),sysdate),'yyyy-mm-dd')||'</dcvalue>' ||olib.fbib_dc_altertitulo(t.titleno) ||olib.fbib_dc_publicador(t.titleno) ||olib.fbib_dc_subject(t.titleno) ||olib.fbib_dc_sponsors(t.titleno) ||olib.fbib_dc_type(t.titleno) ||' </dublin_core>' dc_info from titleobjs t_o, titles t, objects o, mediatps m where t_o.titleno = t.titleno and t_o.objectno = o.objectno and t.mediatp = m.mediatp and t.titleno = "+ articleno +" and lower(o.locator) like '%.pdf'";
        
        /*Gavarela: La consulta original sacaba todo el dublin core en una sola columna,
         * esto generaba problemas ya que el límite de retorno de un VARCHAR2 es de 4000,
         * por eso se partió el dublin core en 3 columnas, dejando la descripción como columna aparte*/
           /*"SELECT DISTINCT REPLACE(o.locator, 'http://www.icesi.edu.co/esn/contenido/pdfs/', '')" +
                ",'<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?><dublin_core>' || "+
                "' <dcvalue element=\"title\" qualifier=\"none\">' || t.title || decode(t.subtitle,   NULL,   NULL,   ' : ' || t.subtitle) || '</dcvalue>' ||"+
                " decode(t.isbn,   NULL,   NULL,   ' <dcvalue element=\"identifier\" qualifier=\"isbn\">' || t.isbn || '</dcvalue>') || "+
                "'<dcvalue element=\"identifier\" qualifier=\"other\">' || t.titleno || '</dcvalue>' || "+"olib.fbib_dc_autores(t.titleno)" +
                ", olib.fbib_dc_abstract(t.titleno)|| "+
                "' <dcvalue element=\"identifier\" qualifier=\"OLIB\">http://biblioteca2.icesi.edu.co/cgi-olib?infile=details.glu&loid=' || t.titleno || '</dcvalue>' ||" +
                "' <dcvalue element=\"language\" qualifier=\"iso\">spa</dcvalue>' || "+
                "' <dcvalue element=\"date\" qualifier=\"available\">' || "+
                " to_char(nvl(olib.fbibbus_fecha_pub(t.titleno),   sysdate),   'yyyy-mm-dd') || '</dcvalue>' || "+
                "' <dcvalue element=\"date\" qualifier=\"issued\">' || to_char(nvl(olib.fbibbus_fecha_pub(t.titleno),   sysdate),   'yyyy-mm-dd') || '</dcvalue>' ||"+
                " olib.fbib_dc_altertitulo(t.titleno) || decode(t.isbn,   NULL,   NULL,   '<dcvalue element=\"pubplace\" qualifier=\"none\">' || tp.pubplace || '</dcvalue>') ||"+
                " olib.fbib_dc_publicador(t.titleno) || olib.fbib_dc_subject(t.titleno) || olib.fbib_dc_sponsors(t.titleno) || olib.fbib_dc_type(t.titleno) || "+
                "' </dublin_core>' dc_info" +
                " FROM titleobjs t_o, titles t, objects o, mediatps m, titlepub tp" +
                " WHERE t_o.titleno = t.titleno" +
                " AND t_o.objectno = o.objectno" +
                " AND t.mediatp = m.mediatp" +
                //" AND t.articleno = "+ articleno +
                " AND t.titleno = "+ articleno +
                " AND tp.titleno = "+ articleno +
                " AND LOWER(o.locator) LIKE '%.pdf'" +
                " UNION" +*/
                
                /*" SELECT DISTINCT REPLACE(o.locator, 'http://www.icesi.edu.co/esn/contenido/pdfs/', '')" +
                ", '<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?><dublin_core>' || ' <dcvalue element=\"title\" qualifier=\"none\">' || t.title || decode(t.subtitle,   NULL,   NULL,   ' : ' || t.subtitle) || '</dcvalue>' || decode(t.isbn,   NULL,   NULL,   ' <dcvalue element=\"identifier\" qualifier=\"isbn\">' || t.isbn || '</dcvalue>') || '<dcvalue element=\"identifier\" qualifier=\"other\">' || t.titleno || '</dcvalue>' || olib.fbib_dc_autores(t.titleno)" +
                ", olib.fbib_dc_abstract(t.titleno) || ' <dcvalue element=\"identifier\" qualifier=\"OLIB\">http://biblioteca2.icesi.edu.co/cgi-olib?infile=details.glu&loid=' || t.titleno||'</dcvalue>' ||" +
                "'<dcvalue element=\"language\" qualifier=\"iso\">es</dcvalue>' || '</dcvalue>' || ' <dcvalue element=\"date\" qualifier=\"available\">' || to_char(nvl(olib.fbibbus_fecha_pub(t.titleno),   sysdate),   'yyyy-mm-dd') || '</dcvalue>' || ' <dcvalue element=\"date\" qualifier=\"issued\">' || to_char(nvl(olib.fbibbus_fecha_pub(t.titleno),   sysdate),   'yyyy-mm-dd') || '</dcvalue>' || olib.fbib_dc_altertitulo(t.titleno) || decode(t.isbn,   NULL,   NULL,   '<dcvalue element=\"pubplace\" qualifier=\"none\">' || tp.pubplace || '</dcvalue>') || olib.fbib_dc_publicador(t.titleno) || olib.fbib_dc_subject(t.titleno) || olib.fbib_dc_sponsors(t.titleno) || olib.fbib_dc_type(t.titleno) || ' </dublin_core>' dc_info" +
                " FROM titleobjs t_o, titles t, objects o, mediatps m, titlepub tp" +
                " WHERE t_o.titleno = t.titleno" +
                " AND t_o.objectno = o.objectno" +
                " AND t.mediatp = m.mediatp" +
                " AND t.titleno = "+ articleno +
                " AND tp.titleno = "+ articleno +
                " AND LOWER(o.locator) LIKE '%.pdf'";*/
                
                consulta =  " SELECT DISTINCT " +
                "'<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?><dublin_core>' || ' <dcvalue element=\"title\" qualifier=\"none\">' || t.title || decode(t.subtitle,   NULL,   NULL,   ' : ' || t.subtitle) || '</dcvalue>' || decode(t.isbn,   NULL,   NULL,   ' <dcvalue element=\"identifier\" qualifier=\"isbn\">' || t.isbn || '</dcvalue>') || '<dcvalue element=\"identifier\" qualifier=\"other\">' || t.titleno || '</dcvalue>' || olib.fbib_dc_autores(t.titleno)" +
                " || ' <dcvalue element=\"identifier\" qualifier=\"OLIB\">http://biblioteca2.icesi.edu.co/cgi-olib?oid=' || t.titleno||'</dcvalue>' ||" +
                "'<dcvalue element=\"language\" qualifier=\"iso\">spa</dcvalue>' || ' <dcvalue element=\"date\" qualifier=\"available\">' || to_char(nvl(olib.fbibbus_fecha_pub(t.titleno),   sysdate),   'yyyy-mm-dd') || '</dcvalue>' || ' <dcvalue element=\"date\" qualifier=\"issued\">' || to_char(nvl(olib.fbibbus_fecha_pub(t.titleno),   sysdate),   'yyyy-mm-dd') || '</dcvalue>' || olib.fbib_dc_altertitulo(t.titleno) || decode(t.isbn,   NULL,   NULL,   '<dcvalue element=\"pubplace\" qualifier=\"none\">' || tp.pubplace || '</dcvalue>') || olib.fbib_dc_subject(t.titleno) || "
                +"'<dcvalue element=\"format\" qualifier=\"none\">PDF</dcvalue>' || '<dcvalue element=\"format\" qualifier=\"medium\">Digital</dcvalue>' || '<dcvalue element=\"relation\" qualifier=\"hasversion\">publishedVersion</dcvalue>' || "
                +"'<dcvalue element=\"coverage\" qualifier=\"none\">Cali de Lat: 03 24 00 N degrees minutes Lat: 3.4000 decimal degrees Long: 076 30 00 W degrees minutes Long: -76.5000 decimal degrees.</dcvalue>' || "
                +"'<dcvalue element=\"rights\" qualifier=\"accessRights\">openAccess</dcvalue>' || "
                +" olib.fbib_dc_contributors(t.titleno) || olib.fbib_dc_departament(t.titleno) || olib.fbib_dc_faculty(t.titleno) dc_info , "
                +" olib.fbib_dc_type_title(t.titleno) || "
                +"'<dcvalue element=\"format\" qualifier=\"mimetype\">Application PDF</dcvalue>' || "
                +"'<dcvalue element=\"publisher\" qualifier=\"none\">Universidad Icesi</dcvalue>' || "
                +" olib.fbib_dc_pubplace(t.titleno) || "
                +" olib.fbib_dc_format_extent(t.titleno) dc_info1 , "
                +" olib.fbib_dc_abstract(t.titleno) || "
                + "' </dublin_core>' " +
                " FROM  titles t,  mediatps m, titlepub tp" +
                " WHERE t.mediatp = m.mediatp" +
                " AND t.titleno = "+ titleno +
                " AND tp.titleno = "+ titleno ;
               
                  
        //System.out.println(consulta);
        ResultSet rset = stmt.executeQuery(consulta);

        String dir[] = new String[filas];
        String dublin[] = new String[filas];
        int cont = 0;
        while (rset.next()) {
         
            /*String dc = rset.getString(2);
            dc += rset.getString(3);
            dc += rset.getString(4);*/
             
            String dc= rset.getString(1);
            dc+= rset.getString(2);
            dc += rset.getString(3);
     
           
            //AQUI MACHETE! :)  EN CASO DE QUE LA CONSULTA RETORNE UNA CADENA HEXADECIMAL
            /*if (!dc.startsWith("<")) {
                int a = dc.indexOf("x");
                if (a != -1) {
                    dc = dc.substring(a + 1);
                    dc = convertToUnicodeString(dc);
                }
            }*/
            
            //Reemplasar caracter '%' por 'Porciento' y '&' por 'y' (causan problemas en la importacion)
            //dc = dc.replace("&", "&amp;");
            //dc = dc.replace("%", "porciento");

            //dir[cont] = rset.getString(1);
            dublin[cont] = dc;
            cont++;
        }
        stmt.close();
        
       /* Se recorre el arreglo de archivos de tipo pdf que contiene el directorio */
         for(int i=0; i< archivos.length; i++)
         {
             dir[i]= archivos[i];
         }
        
        Object[] resultado = new Object[2];
        resultado[0] = dir;
        resultado[1] = dublin;
        return resultado;
    }