Search in sources :

Example 1 with WriteBranchSkosBDD

use of mom.trd.opentheso.core.imports.old.WriteBranchSkosBDD in project opentheso by miledrousset.

the class TestImportBranch method TestImportMultiBranchUnderGroup.

/**
 * Test of Tabulate reading.
 */
/*    @org.junit.Test

    public void testImportBranchAfterGroup() {    
        HikariDataSource conn = openConnexionPool();
        
        String idTheso = "";
        String idGroup = "";
        String path = "/Users/Miled/ownCloud_cnrs/Projets/OpenTheso/artefacts/25.xml";
       
        String dateFromat = "yyyy-MM-dd";
        boolean useArk = false;
        String adresseSite = "http://localhost";      
        int idUser = 1;


        
        FileInputStream file = readFile(path); 
        
        SKOSXmlDocument sKOSXmlDocument = readSkosFile(conn,
                file,
                dateFromat,
                useArk,
                adresseSite);
                

        // permet d'importer une branche entière sous un domaine avec l'alignement automatique à la source
        WriteBranchSkosBDD writeBranchSkosBDD = new WriteBranchSkosBDD(conn);
        //idGroup, idThesaurus, sKOSXmlDocument, dateFormat, ark, adressSite, user);
        writeBranchSkosBDD.importBranchAfterGroup(
                idGroup,
                idTheso,
                sKOSXmlDocument, dateFromat, useArk,
                adresseSite, idUser);
    }*/
/**
 * Test of Tabulate reading.
 */
@org.junit.Test
public void TestImportMultiBranchUnderGroup() {
    HikariDataSource conn = openConnexionPool();
    String idTheso = "1";
    String idGroup = "";
    String path = "/Users/Miled/ownCloud_cnrs/GDS_FRANTIQ/Pactols/2016-11-15/Sujets.xml";
    String dateFromat = "yyyy-MM-dd";
    boolean useArk = false;
    String adresseSite = "http://localhost";
    int idUser = 1;
    FileInputStream file = readFile(path);
    SKOSXmlDocument sKOSXmlDocument = readSkosFile(conn, file, dateFromat, useArk, adresseSite);
    // permet d'importer une branche entière avec son domaine en intégrant l'alignement à la source
    WriteBranchSkosBDD writeBranchSkosBDD = new WriteBranchSkosBDD(conn);
    // idGroup, idThesaurus, sKOSXmlDocument, dateFormat, ark, adressSite, user);
    writeBranchSkosBDD.importMultiBranchUnderGroup(idTheso, idGroup, sKOSXmlDocument, dateFromat, useArk, adresseSite, idUser);
}
Also used : HikariDataSource(com.zaxxer.hikari.HikariDataSource) WriteBranchSkosBDD(mom.trd.opentheso.core.imports.old.WriteBranchSkosBDD) SKOSXmlDocument(skos.SKOSXmlDocument) FileInputStream(java.io.FileInputStream)

Aggregations

HikariDataSource (com.zaxxer.hikari.HikariDataSource)1 FileInputStream (java.io.FileInputStream)1 WriteBranchSkosBDD (mom.trd.opentheso.core.imports.old.WriteBranchSkosBDD)1 SKOSXmlDocument (skos.SKOSXmlDocument)1