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);
}
Aggregations