/**\r
* Copyright (C) 2007 EDIT\r
-* European Distributed Institute of Taxonomy \r
+* European Distributed Institute of Taxonomy\r
* http://www.e-taxonomy.eu\r
-* \r
+*\r
* The contents of this file are subject to the Mozilla Public License Version 1.1\r
* See LICENSE.TXT at the top of this package for the full license terms.\r
*/\r
\r
package eu.etaxonomy.cdm.io.redlist.bfnXml;\r
\r
-//import static junit.framework.Assert.assertNotNull;\r
-//import static junit.framework.Assert.assertTrue;\r
//\r
//import java.net.URISyntaxException;\r
//import java.net.URL;\r
//\r
// @SpringBeanByType\r
// INameService nameService;\r
-// \r
+//\r
// @SpringBeanByType\r
// ITaxonService taxonService;\r
//\r
// @SpringBeanByType\r
// IClassificationService classificationService;\r
-// \r
+//\r
// private IImportConfigurator configurator;\r
-// \r
+//\r
// @Before(value = "")\r
// public void setUp() throws URISyntaxException {\r
-// \r
+//\r
// String inputFile = "/eu/etaxonomy/cdm/io/bfnXml/bfnXmlTest-input.xml";\r
// URL url = this.getClass().getResource(inputFile);\r
// assertNotNull("URL for the test file '" + inputFile + "' does not exist", url);\r
// configurator = BfnXmlImportConfigurator.NewInstance(url.toURI(), null);\r
// assertNotNull("Configurator could not be created", configurator);\r
// }\r
-// \r
+//\r
// @Test\r
// public void testInit() {\r
// assertNotNull("cdmTcsXmlImport should not be null", defaultImport);\r
// assertNotNull("nameService should not be null", nameService);\r
// }\r
-// \r
+//\r
// @Test\r
// public void testDoInvoke() {\r
// boolean result = defaultImport.invoke(configurator);\r
// assertTrue("Return value for import.invoke should be true", result);\r
- \r
- \r
- \r
- \r
- \r
+\r
+\r
+\r
+\r
+\r
// List<Classification> classificationList = classificationService.list(Classification.class, null, null, null, null);\r
// if(classificationList != null && !classificationList.isEmpty()){\r
// for(Classification classification:classificationList){\r
// }\r
// List<TaxonBase> taxonBaseList = taxonService.list(TaxonBase.class, null, null, null, null);\r
// for(TaxonBase taxon:taxonBaseList){\r
-// \r
+//\r
// if(taxon instanceof Taxon){\r
// logger.info("Taxon: "+taxon.getTitleCache());\r
// }\r
return CdmDataSource.NewH2EmbeddedInstance("cdm", "sa", "");
}
- public static ICdmDataSource localH2(String database, String username, String filePath){
- return CdmDataSource.NewH2EmbeddedInstance(database, "sa", "", filePath);
- }
-
-
public static ICdmDataSource localH2EuroMed(){
return CdmDataSource.NewH2EmbeddedInstance("euroMed", "sa", "");
}
}
if (taxonErms != null){
- List<Synonym> synsTaxonFaunaEu = appCtrInit.getTaxonService().getSynonyms(taxonFaunaEu, null, 1000, 0, null, null);
+ Pager<Synonym> synsTaxonFaunaEuPager = appCtrInit.getTaxonService().getSynonyms(taxonFaunaEu, null, null, null, null, null);
+ List<Synonym> synsTaxonFaunaEu = synsTaxonFaunaEuPager.getRecords();
- List<Synonym> synsTaxonErms = appCtrInit.getTaxonService().getSynonyms(taxonErms, null, 1000, 0, null, null);
+ Pager<Synonym> synsTaxonErmsPager = appCtrInit.getTaxonService().getSynonyms(taxonErms, null, null, null, null, null);
+ List<Synonym> synsTaxonErms = synsTaxonErmsPager.getRecords();
List<Synonym> deleteRel = new ArrayList<>();
for (Synonym synFauEu: synsTaxonFaunaEu){