Skip to content

Commit

Permalink
adds UCTE to the HistoImporter (#230)
Browse files Browse the repository at this point in the history
  • Loading branch information
CBiasuzzi authored and mathbagu committed Mar 29, 2017
1 parent 2535f38 commit adc1523
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 31 deletions.
9 changes: 8 additions & 1 deletion histoDB/histodb-dataserver/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@
<groupId>eu.itesla_project</groupId>
<artifactId>cim1-import</artifactId>
<version>${ipstentsoe.version}</version>
<scope>runtime</scope>
</dependency>

<dependency>
Expand All @@ -152,12 +153,18 @@
<version>${ipstcore.version}</version>
</dependency>

<dependency>
<groupId>eu.itesla_project</groupId>
<artifactId>ucte-import</artifactId>
<version>${ipstentsoe.version}</version>
<scope>runtime</scope>
</dependency>

<dependency>
<groupId>joda-time</groupId>
<artifactId>joda-time</artifactId>
</dependency>


<dependency>
<groupId>be.pepite.dataserver</groupId>
<artifactId>dataserver-core</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
package eu.itesla_project.histodb.server;

import be.pepite.dataserver.api.ColumnDescriptor;
import eu.itesla_project.computation.ComputationManager;
import eu.itesla_project.computation.local.LocalComputationManager;
import eu.itesla_project.iidm.datasource.GenericReadOnlyDataSource;
import eu.itesla_project.iidm.import_.Importer;
import eu.itesla_project.iidm.import_.Importers;
Expand All @@ -20,8 +18,8 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.io.*;
import java.lang.RuntimeException;
import java.io.File;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.*;
Expand All @@ -39,32 +37,7 @@ public class CimHistoImporter {

private ITeslaDatasource datasource;

private static final ComputationManager computationManager;

private static final Importer importerCim;
private static final Importer importerXml;
private static final List<Importer> importers;

static {
try {
importers=new ArrayList<>();
computationManager = new LocalComputationManager();
importerCim = Importers.getImporter("CIM1", computationManager);
if (importerCim!=null) {
importers.add(importerCim);
} else {
log.warn("CIM importer implementation not found");
}
importerXml = Importers.getImporter("XIIDM", computationManager);
if (importerXml!=null) {
importers.add(importerXml);
} else {
log.warn("iidm-xml importer implementation not found");
}
} catch (IOException e) {
throw new RuntimeException(e);
}
}
private static final Collection<Importer> importers = Importers.list();

public CimHistoImporter(ITeslaDatasource datasource) {
this.datasource = datasource;
Expand Down

0 comments on commit adc1523

Please sign in to comment.