From 2ed3eedad873d35f6c672e4fa7888bb628ed017b Mon Sep 17 00:00:00 2001 From: Niklas Steffan Date: Thu, 29 Apr 2021 09:55:47 +0200 Subject: [PATCH 001/157] init branch --- .../ie3/datamodel/io/naming/HierarchicFileNamingStrategy.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/edu/ie3/datamodel/io/naming/HierarchicFileNamingStrategy.java b/src/main/java/edu/ie3/datamodel/io/naming/HierarchicFileNamingStrategy.java index 5df0b2927..d193250b4 100644 --- a/src/main/java/edu/ie3/datamodel/io/naming/HierarchicFileNamingStrategy.java +++ b/src/main/java/edu/ie3/datamodel/io/naming/HierarchicFileNamingStrategy.java @@ -106,4 +106,4 @@ Optional getDirectoryPath(T timeSeries) { return Optional.of(directoryPath); } } -} +} \ No newline at end of file From d8358b3f2e2e80d92ee2733d4c7256bd6b61d142 Mon Sep 17 00:00:00 2001 From: Niklas Steffan Date: Thu, 29 Apr 2021 16:19:15 +0200 Subject: [PATCH 002/157] created FileNamingStrategy, small changes in EntityPersistenceNamingStrategy --- .../ie3/datamodel/io/FileNamingStrategy.java | 20 +++++++++++++++ .../EntityPersistenceNamingStrategy.java | 25 ++++++++++++++----- 2 files changed, 39 insertions(+), 6 deletions(-) create mode 100644 src/main/java/edu/ie3/datamodel/io/FileNamingStrategy.java diff --git a/src/main/java/edu/ie3/datamodel/io/FileNamingStrategy.java b/src/main/java/edu/ie3/datamodel/io/FileNamingStrategy.java new file mode 100644 index 000000000..0d8c961eb --- /dev/null +++ b/src/main/java/edu/ie3/datamodel/io/FileNamingStrategy.java @@ -0,0 +1,20 @@ +package edu.ie3.datamodel.io; + +import edu.ie3.datamodel.io.csv.DefaultDirectoryHierarchy; +import edu.ie3.datamodel.io.naming.EntityPersistenceNamingStrategy; + +public abstract class FileNamingStrategy { + + private final EntityPersistenceNamingStrategy entityPersistenceNamingStrategy; + + private final DefaultDirectoryHierarchy defaultDirectoryHierarchy; + + private final String fileExtension; + + public FileNamingStrategy(EntityPersistenceNamingStrategy entityPersistenceNamingStrategy, DefaultDirectoryHierarchy defaultDirectoryHierarchy, String fileExtension) { + this.entityPersistenceNamingStrategy = entityPersistenceNamingStrategy; + this.defaultDirectoryHierarchy = defaultDirectoryHierarchy; + this.fileExtension = fileExtension; + } + +} diff --git a/src/main/java/edu/ie3/datamodel/io/naming/EntityPersistenceNamingStrategy.java b/src/main/java/edu/ie3/datamodel/io/naming/EntityPersistenceNamingStrategy.java index e1211de2a..6b4f29b81 100644 --- a/src/main/java/edu/ie3/datamodel/io/naming/EntityPersistenceNamingStrategy.java +++ b/src/main/java/edu/ie3/datamodel/io/naming/EntityPersistenceNamingStrategy.java @@ -155,7 +155,7 @@ private static String prepareSuffix(String suffix) { * * @param cls Targeted class of the given file * @return An optional sub path to the actual file - * @deprecated This class should foremost provide namings for the entities and nothing around file + * @deprecated This class should foremost provide namings for the entities and nothing around file // TODO Niklas * naming or pathing in specific. This method will be moved from this class, when this issue is * addressed @@ -175,7 +175,7 @@ public Optional getFilePath(Class cls) { * @param fileName File name * @param subDirectories Sub directory path * @return Concatenation of sub directory structure and file name - * @deprecated This class should foremost provide namings for the entities and nothing around file + * @deprecated This class should foremost provide namings for the entities and nothing around file // TODO Niklas * naming or pathing in specific. This method will be moved from this class, when this issue is * addressed @@ -199,6 +199,8 @@ public Optional getEntityName(Class cls) { return getInputEntityName(cls.asSubclass(InputEntity.class)); if (ResultEntity.class.isAssignableFrom(cls)) return getResultEntityName(cls.asSubclass(ResultEntity.class)); + if (CharacteristicInput.class.isAssignableFrom(cls)) + return getAssetCharacteristicsEntityName(cls.asSubclass(CharacteristicInput.class)); logger.error("There is no naming strategy defined for {}", cls.getSimpleName()); return Optional.empty(); } @@ -214,10 +216,8 @@ public Optional getInputEntityName(Class cls) { return getTypeEntityName(cls.asSubclass(AssetTypeInput.class)); if (AssetInput.class.isAssignableFrom(cls)) return getAssetInputEntityName(cls.asSubclass(AssetInput.class)); - if (RandomLoadParameters.class.isAssignableFrom(cls)) { - String loadParamString = camelCaseToSnakeCase(cls.getSimpleName()); - return Optional.of(addPrefixAndSuffix(loadParamString.concat("_input"))); - } + if (RandomLoadParameters.class.isAssignableFrom(cls)) + return getRandomLoadParametersEntityName(cls.asSubclass(RandomLoadParameters.class)); if (GraphicInput.class.isAssignableFrom(cls)) return getGraphicsInputEntityName(cls.asSubclass(GraphicInput.class)); if (OperatorInput.class.isAssignableFrom(cls)) @@ -275,6 +275,19 @@ public Optional getAssetCharacteristicsEntityName( return Optional.of(addPrefixAndSuffix(assetCharString)); } + /** + * Get the entity name for all {@link RandomLoadParameters} + * + * @param randomLoadParamClass the random load parameters class an entity name string should be generated + * from + * @return the entity name string + */ + public Optional getRandomLoadParametersEntityName( + Class randomLoadParamClass) { + String loadParamString = camelCaseToSnakeCase(randomLoadParamClass.getSimpleName()); + return Optional.of(addPrefixAndSuffix(loadParamString.concat("_input"))); + } + /** * Converts a given camel case string to its snake case representation * From f7ac7b7a5f02bc8b5094ba7017bcb8d36d54f9b6 Mon Sep 17 00:00:00 2001 From: Niklas Steffan Date: Wed, 5 May 2021 15:42:46 +0200 Subject: [PATCH 003/157] created FileNamingStrategyTest --- .../ie3/datamodel/io/FileNamingStrategy.java | 2 +- .../io/FileNamingStrategyTest.groovy | 35 +++++++++++++++++++ 2 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 src/test/groovy/edu/ie3/datamodel/io/FileNamingStrategyTest.groovy diff --git a/src/main/java/edu/ie3/datamodel/io/FileNamingStrategy.java b/src/main/java/edu/ie3/datamodel/io/FileNamingStrategy.java index 0d8c961eb..df62a1056 100644 --- a/src/main/java/edu/ie3/datamodel/io/FileNamingStrategy.java +++ b/src/main/java/edu/ie3/datamodel/io/FileNamingStrategy.java @@ -9,7 +9,7 @@ public abstract class FileNamingStrategy { private final DefaultDirectoryHierarchy defaultDirectoryHierarchy; - private final String fileExtension; + private final String fileExtension = "csv"; public FileNamingStrategy(EntityPersistenceNamingStrategy entityPersistenceNamingStrategy, DefaultDirectoryHierarchy defaultDirectoryHierarchy, String fileExtension) { this.entityPersistenceNamingStrategy = entityPersistenceNamingStrategy; diff --git a/src/test/groovy/edu/ie3/datamodel/io/FileNamingStrategyTest.groovy b/src/test/groovy/edu/ie3/datamodel/io/FileNamingStrategyTest.groovy new file mode 100644 index 000000000..43c1aa98e --- /dev/null +++ b/src/test/groovy/edu/ie3/datamodel/io/FileNamingStrategyTest.groovy @@ -0,0 +1,35 @@ +package edu.ie3.datamodel.io + +import edu.ie3.datamodel.io.csv.timeseries.ColumnScheme +import edu.ie3.datamodel.io.csv.timeseries.IndividualTimeSeriesMetaInformation +import spock.lang.Specification + +import java.nio.file.Paths + +class FileNamingStrategyTest extends Specification{ + + def "The FileNamingStrategy extracts correct meta information from a valid individual time series file name"() { + given: + def fns = new edu.ie3.datamodel.io.csv.FileNamingStrategy() + def path = Paths.get(pathString) + + when: + def metaInformation = fns.extractTimeSeriesMetaInformation(path) + + then: + IndividualTimeSeriesMetaInformation.isAssignableFrom(metaInformation.getClass()) + (metaInformation as IndividualTimeSeriesMetaInformation).with { + assert it.uuid == UUID.fromString("4881fda2-bcee-4f4f-a5bb-6a09bf785276") + assert it.columnScheme == expectedColumnScheme + } + + where: + pathString || expectedColumnScheme + "/bla/foo/its_c_4881fda2-bcee-4f4f-a5bb-6a09bf785276.csv" || ColumnScheme.ENERGY_PRICE + "/bla/foo/its_p_4881fda2-bcee-4f4f-a5bb-6a09bf785276.csv" || ColumnScheme.ACTIVE_POWER + "/bla/foo/its_pq_4881fda2-bcee-4f4f-a5bb-6a09bf785276.csv" || ColumnScheme.APPARENT_POWER + "/bla/foo/its_h_4881fda2-bcee-4f4f-a5bb-6a09bf785276.csv" || ColumnScheme.HEAT_DEMAND + "/bla/foo/its_ph_4881fda2-bcee-4f4f-a5bb-6a09bf785276.csv" || ColumnScheme.ACTIVE_POWER_AND_HEAT_DEMAND + "/bla/foo/its_pqh_4881fda2-bcee-4f4f-a5bb-6a09bf785276.csv" || ColumnScheme.APPARENT_POWER_AND_HEAT_DEMAND + "/bla/foo/its_weather_4881fda2-bcee-4f4f-a5bb-6a09bf785276.csv" || ColumnScheme.WEATHER +} From 9c8a3e282f16ab680a2e2fdcf5d74f493bfc7137 Mon Sep 17 00:00:00 2001 From: Niklas Steffan Date: Thu, 6 May 2021 17:14:09 +0200 Subject: [PATCH 004/157] created FlatDirectoryHierarchy, extended new FileNamingStrategy --- .../ie3/datamodel/io/FileNamingStrategy.java | 131 +++++++++++++++++- .../io/csv/DefaultDirectoryHierarchy.java | 2 +- .../io/csv/DirectoryNamingStrategy.java | 11 ++ .../io/csv/FlatDirectoryHierarchy.java | 27 ++++ .../io/FileNamingStrategyTest.groovy | 51 ++++--- 5 files changed, 192 insertions(+), 30 deletions(-) create mode 100644 src/main/java/edu/ie3/datamodel/io/csv/DirectoryNamingStrategy.java create mode 100644 src/main/java/edu/ie3/datamodel/io/csv/FlatDirectoryHierarchy.java diff --git a/src/main/java/edu/ie3/datamodel/io/FileNamingStrategy.java b/src/main/java/edu/ie3/datamodel/io/FileNamingStrategy.java index df62a1056..33993d3be 100644 --- a/src/main/java/edu/ie3/datamodel/io/FileNamingStrategy.java +++ b/src/main/java/edu/ie3/datamodel/io/FileNamingStrategy.java @@ -1,20 +1,139 @@ package edu.ie3.datamodel.io; import edu.ie3.datamodel.io.csv.DefaultDirectoryHierarchy; +import edu.ie3.datamodel.io.csv.DirectoryNamingStrategy; +import edu.ie3.datamodel.io.csv.FlatDirectoryHierarchy; import edu.ie3.datamodel.io.naming.EntityPersistenceNamingStrategy; +import edu.ie3.datamodel.models.UniqueEntity; +import edu.ie3.datamodel.models.timeseries.TimeSeries; +import edu.ie3.datamodel.models.timeseries.TimeSeriesEntry; +import edu.ie3.datamodel.models.value.Value; +import org.apache.commons.io.FilenameUtils; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; -public abstract class FileNamingStrategy { +import java.io.File; +import java.util.Optional; - private final EntityPersistenceNamingStrategy entityPersistenceNamingStrategy; +public class FileNamingStrategy { + + protected static final Logger logger = + LogManager.getLogger(FileNamingStrategy.class); - private final DefaultDirectoryHierarchy defaultDirectoryHierarchy; + private static final String FILE_SEPARATOR_REGEX = "[\\\\/]"; + private static final String FILE_SEPARATOR_REPLACEMENT = + File.separator.equals("\\") ? "\\\\" : "/"; - private final String fileExtension = "csv"; + private final EntityPersistenceNamingStrategy entityPersistenceNamingStrategy; + private final DirectoryNamingStrategy directoryNamingStrategy; + private final String fileExtension; - public FileNamingStrategy(EntityPersistenceNamingStrategy entityPersistenceNamingStrategy, DefaultDirectoryHierarchy defaultDirectoryHierarchy, String fileExtension) { + + public FileNamingStrategy(EntityPersistenceNamingStrategy entityPersistenceNamingStrategy, DirectoryNamingStrategy directoryNamingStrategy, String fileExtension) { this.entityPersistenceNamingStrategy = entityPersistenceNamingStrategy; - this.defaultDirectoryHierarchy = defaultDirectoryHierarchy; + this.directoryNamingStrategy = directoryNamingStrategy; this.fileExtension = fileExtension; } + public FileNamingStrategy(EntityPersistenceNamingStrategy entityPersistenceNamingStrategy) { + this.entityPersistenceNamingStrategy = entityPersistenceNamingStrategy; + this.directoryNamingStrategy = new FlatDirectoryHierarchy(); + this.fileExtension = ".csv"; + } + + + /** + * Get the full path to the file with regard to some (not explicitly specified) base directory. + * The path does NOT start or end with any of the known file separators or file extension. + * + * @param cls Targeted class of the given file + * @return An optional sub path to the actual file + */ + public Optional getFilePath(Class cls) { + // do not adapt orElseGet, see https://www.baeldung.com/java-optional-or-else-vs-or-else-get for + // details + return getFilePath( + entityPersistenceNamingStrategy.getEntityName(cls).orElseGet(() -> ""), getDirectoryPath(cls).orElseGet(() -> "")); + } + + /** + * Get the full path to the file with regard to some (not explicitly specified) base directory. + * The path does NOT start or end with any of the known file separators or file extension. + * + * @param Type of the time series + * @param Type of the entry in the time series + * @param Type of the value, that is carried by the time series entry + * @param timeSeries Time series to derive naming information from + * @return An optional sub path to the actual file + */ + public , E extends TimeSeriesEntry, V extends Value> + Optional getFilePath(T timeSeries) { + // do not adapt orElseGet, see https://www.baeldung.com/java-optional-or-else-vs-or-else-get for + // details + return getFilePath( + entityPersistenceNamingStrategy.getEntityName(timeSeries).orElseGet(() -> ""), + getDirectoryPath(timeSeries).orElseGet(() -> "")); + } + + /** + * Compose a full file path from directory name and file name. Additionally perform some checks, + * like if the file name itself actually is available + * + * @param fileName File name + * @param subDirectories Sub directory path + * @return Concatenation of sub directory structure and file name + */ + private Optional getFilePath(String fileName, String subDirectories) { + if (fileName.isEmpty()) return Optional.empty(); + if (!subDirectories.isEmpty()) + return Optional.of(FilenameUtils.concat(subDirectories, fileName)); + else return Optional.of(fileName); + } + + + + /** + * Returns the sub directory structure with regard to some (not explicitly specified) base + * directory. The path does NOT start or end with any of the known file separators. + * + * @param cls Targeted class of the given file + * @return An optional sub directory path + */ + public Optional getDirectoryPath(Class cls) { + Optional maybeDirectoryName = directoryNamingStrategy.getSubDirectory(cls); + String directoryPath; + if (!maybeDirectoryName.isPresent()) { + logger.debug("Cannot determine directory name for class '{}'.", cls); + return Optional.empty(); + } else { + /* Make sure, the directory path does not start or end with file separator and in between the separator is harmonized */ + directoryPath = + maybeDirectoryName + .get() + .replaceFirst("^" + FILE_SEPARATOR_REGEX, "") + .replaceAll(FILE_SEPARATOR_REGEX + "$", "") + .replaceAll(FILE_SEPARATOR_REGEX, FILE_SEPARATOR_REPLACEMENT); + return Optional.of(directoryPath); + } + } + + public , E extends TimeSeriesEntry, V extends Value> + Optional getDirectoryPath(T timeSeries) { + Optional maybeDirectoryName = directoryNamingStrategy.getSubDirectory(timeSeries.getClass()); + String directoryPath; + if (!maybeDirectoryName.isPresent()) { + logger.debug("Cannot determine directory name for time series '{}'.", timeSeries); + return Optional.empty(); + } else { + /* Make sure, the directory path does not start or end with file separator and in between the separator is harmonized */ + directoryPath = + maybeDirectoryName + .get() + .replaceFirst("^" + FILE_SEPARATOR_REGEX, "") + .replaceAll(FILE_SEPARATOR_REGEX + "$", "") + .replaceAll(FILE_SEPARATOR_REGEX, FILE_SEPARATOR_REPLACEMENT); + return Optional.of(directoryPath); + } + } + } diff --git a/src/main/java/edu/ie3/datamodel/io/csv/DefaultDirectoryHierarchy.java b/src/main/java/edu/ie3/datamodel/io/csv/DefaultDirectoryHierarchy.java index 48d60243d..0610bd2e4 100644 --- a/src/main/java/edu/ie3/datamodel/io/csv/DefaultDirectoryHierarchy.java +++ b/src/main/java/edu/ie3/datamodel/io/csv/DefaultDirectoryHierarchy.java @@ -45,7 +45,7 @@ import org.slf4j.LoggerFactory; /** Default directory hierarchy for input models */ -public class DefaultDirectoryHierarchy implements FileHierarchy { +public class DefaultDirectoryHierarchy implements DirectoryNamingStrategy { private static final Logger logger = LoggerFactory.getLogger(DefaultDirectoryHierarchy.class); /** Use the unix file separator here. */ diff --git a/src/main/java/edu/ie3/datamodel/io/csv/DirectoryNamingStrategy.java b/src/main/java/edu/ie3/datamodel/io/csv/DirectoryNamingStrategy.java new file mode 100644 index 000000000..f4f8303f4 --- /dev/null +++ b/src/main/java/edu/ie3/datamodel/io/csv/DirectoryNamingStrategy.java @@ -0,0 +1,11 @@ +package edu.ie3.datamodel.io.csv; + +import edu.ie3.datamodel.models.UniqueEntity; + +import java.util.Optional; + +public interface DirectoryNamingStrategy extends FileHierarchy { + + Optional getSubDirectory(Class cls, String fileSeparator); + +} diff --git a/src/main/java/edu/ie3/datamodel/io/csv/FlatDirectoryHierarchy.java b/src/main/java/edu/ie3/datamodel/io/csv/FlatDirectoryHierarchy.java new file mode 100644 index 000000000..34abc8dac --- /dev/null +++ b/src/main/java/edu/ie3/datamodel/io/csv/FlatDirectoryHierarchy.java @@ -0,0 +1,27 @@ +package edu.ie3.datamodel.io.csv; + +import edu.ie3.datamodel.models.UniqueEntity; + +import java.util.Optional; + +/** Default directory hierarchy for input models */ +public class FlatDirectoryHierarchy implements DirectoryNamingStrategy { + + /** + * Empty constructor + */ + public FlatDirectoryHierarchy() {} + + /** + * Gives empty sub directory. + * + * @param cls Class to define the sub directory for + * @param fileSeparator The file separator to use + * @return An Option to the regarding sub directory as a string + */ + @Override + public Optional getSubDirectory(Class cls, String fileSeparator) { + return Optional.empty(); + } + +} diff --git a/src/test/groovy/edu/ie3/datamodel/io/FileNamingStrategyTest.groovy b/src/test/groovy/edu/ie3/datamodel/io/FileNamingStrategyTest.groovy index 43c1aa98e..8a2e950f2 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/FileNamingStrategyTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/FileNamingStrategyTest.groovy @@ -1,35 +1,40 @@ package edu.ie3.datamodel.io -import edu.ie3.datamodel.io.csv.timeseries.ColumnScheme -import edu.ie3.datamodel.io.csv.timeseries.IndividualTimeSeriesMetaInformation +import edu.ie3.datamodel.io.csv.DefaultDirectoryHierarchy +import edu.ie3.datamodel.io.csv.FlatDirectoryHierarchy +import edu.ie3.datamodel.io.naming.EntityPersistenceNamingStrategy +import edu.ie3.datamodel.models.result.system.LoadResult import spock.lang.Specification import java.nio.file.Paths -class FileNamingStrategyTest extends Specification{ +class FileNamingStrategyTest extends Specification { - def "The FileNamingStrategy extracts correct meta information from a valid individual time series file name"() { + def "The FileNamingStrategy ..."() { given: - def fns = new edu.ie3.datamodel.io.csv.FileNamingStrategy() - def path = Paths.get(pathString) + def ens = new EntityPersistenceNamingStrategy() + def dns = new DefaultDirectoryHierarchy("/foo/test/", "testGrid") + def fns = new FileNamingStrategy(ens, dns, ".csv") + def path = Paths.get("/bla/foo/") when: - def metaInformation = fns.extractTimeSeriesMetaInformation(path) + def filePath = fns.getFilePath(LoadResult) then: - IndividualTimeSeriesMetaInformation.isAssignableFrom(metaInformation.getClass()) - (metaInformation as IndividualTimeSeriesMetaInformation).with { - assert it.uuid == UUID.fromString("4881fda2-bcee-4f4f-a5bb-6a09bf785276") - assert it.columnScheme == expectedColumnScheme - } - - where: - pathString || expectedColumnScheme - "/bla/foo/its_c_4881fda2-bcee-4f4f-a5bb-6a09bf785276.csv" || ColumnScheme.ENERGY_PRICE - "/bla/foo/its_p_4881fda2-bcee-4f4f-a5bb-6a09bf785276.csv" || ColumnScheme.ACTIVE_POWER - "/bla/foo/its_pq_4881fda2-bcee-4f4f-a5bb-6a09bf785276.csv" || ColumnScheme.APPARENT_POWER - "/bla/foo/its_h_4881fda2-bcee-4f4f-a5bb-6a09bf785276.csv" || ColumnScheme.HEAT_DEMAND - "/bla/foo/its_ph_4881fda2-bcee-4f4f-a5bb-6a09bf785276.csv" || ColumnScheme.ACTIVE_POWER_AND_HEAT_DEMAND - "/bla/foo/its_pqh_4881fda2-bcee-4f4f-a5bb-6a09bf785276.csv" || ColumnScheme.APPARENT_POWER_AND_HEAT_DEMAND - "/bla/foo/its_weather_4881fda2-bcee-4f4f-a5bb-6a09bf785276.csv" || ColumnScheme.WEATHER -} + filePath == "/bla/foo/xyz.csv" + } + + def "The FileNamingStrategy ... flat"() { + given: + def ens = new EntityPersistenceNamingStrategy() + def fns = new FileNamingStrategy(ens) + + when: + def filePath = fns.getFilePath(LoadResult) + + then: + filePath == "/bla/foo/xyz.csv" + } + + +} \ No newline at end of file From 4894f85f37a1cc06a010f5f96eba950b4b1f7fbb Mon Sep 17 00:00:00 2001 From: Niklas Steffan Date: Thu, 6 May 2021 18:13:53 +0200 Subject: [PATCH 005/157] first test working --- .../ie3/datamodel/io/FileNamingStrategy.java | 41 +++++++++++++++++-- .../io/FileNamingStrategyTest.groovy | 28 ++++++++----- 2 files changed, 54 insertions(+), 15 deletions(-) diff --git a/src/main/java/edu/ie3/datamodel/io/FileNamingStrategy.java b/src/main/java/edu/ie3/datamodel/io/FileNamingStrategy.java index 33993d3be..97536e077 100644 --- a/src/main/java/edu/ie3/datamodel/io/FileNamingStrategy.java +++ b/src/main/java/edu/ie3/datamodel/io/FileNamingStrategy.java @@ -1,12 +1,13 @@ package edu.ie3.datamodel.io; -import edu.ie3.datamodel.io.csv.DefaultDirectoryHierarchy; import edu.ie3.datamodel.io.csv.DirectoryNamingStrategy; import edu.ie3.datamodel.io.csv.FlatDirectoryHierarchy; import edu.ie3.datamodel.io.naming.EntityPersistenceNamingStrategy; import edu.ie3.datamodel.models.UniqueEntity; import edu.ie3.datamodel.models.timeseries.TimeSeries; import edu.ie3.datamodel.models.timeseries.TimeSeriesEntry; +import edu.ie3.datamodel.models.timeseries.individual.IndividualTimeSeries; +import edu.ie3.datamodel.models.timeseries.repetitive.LoadProfileInput; import edu.ie3.datamodel.models.value.Value; import org.apache.commons.io.FilenameUtils; import org.apache.logging.log4j.LogManager; @@ -14,6 +15,7 @@ import java.io.File; import java.util.Optional; +import java.util.regex.Pattern; public class FileNamingStrategy { @@ -28,6 +30,8 @@ public class FileNamingStrategy { private final DirectoryNamingStrategy directoryNamingStrategy; private final String fileExtension; + private final String defaultFileExtension = ".csv"; + public FileNamingStrategy(EntityPersistenceNamingStrategy entityPersistenceNamingStrategy, DirectoryNamingStrategy directoryNamingStrategy, String fileExtension) { this.entityPersistenceNamingStrategy = entityPersistenceNamingStrategy; @@ -35,10 +39,22 @@ public FileNamingStrategy(EntityPersistenceNamingStrategy entityPersistenceNamin this.fileExtension = fileExtension; } + public FileNamingStrategy(EntityPersistenceNamingStrategy entityPersistenceNamingStrategy, DirectoryNamingStrategy directoryNamingStrategy) { + this.entityPersistenceNamingStrategy = entityPersistenceNamingStrategy; + this.directoryNamingStrategy = directoryNamingStrategy; + this.fileExtension = defaultFileExtension; + } + public FileNamingStrategy(EntityPersistenceNamingStrategy entityPersistenceNamingStrategy) { this.entityPersistenceNamingStrategy = entityPersistenceNamingStrategy; this.directoryNamingStrategy = new FlatDirectoryHierarchy(); - this.fileExtension = ".csv"; + this.fileExtension = defaultFileExtension; + } + + public FileNamingStrategy(EntityPersistenceNamingStrategy entityPersistenceNamingStrategy, String fileExtension) { + this.entityPersistenceNamingStrategy = entityPersistenceNamingStrategy; + this.directoryNamingStrategy = new FlatDirectoryHierarchy(); + this.fileExtension = fileExtension; } @@ -86,8 +102,8 @@ Optional getFilePath(T timeSeries) { private Optional getFilePath(String fileName, String subDirectories) { if (fileName.isEmpty()) return Optional.empty(); if (!subDirectories.isEmpty()) - return Optional.of(FilenameUtils.concat(subDirectories, fileName)); - else return Optional.of(fileName); + return Optional.of(FilenameUtils.concat(subDirectories, fileName).concat(fileExtension)); + else return Optional.of(fileName.concat(fileExtension)); } @@ -136,4 +152,21 @@ Optional getDirectoryPath(T timeSeries) { } } + + public Pattern getIndividualTimeSeriesPattern() { + String subDirectory = directoryNamingStrategy.getSubDirectory(IndividualTimeSeries.class).orElse(""); + return subDirectory.isEmpty() + ? entityPersistenceNamingStrategy.getIndividualTimeSeriesPattern() + : Pattern.compile( + FilenameUtils.concat(subDirectory, entityPersistenceNamingStrategy.getIndividualTimeSeriesPattern().pattern())); + } + + public Pattern getLoadProfileTimeSeriesPattern() { + String subDirectory = directoryNamingStrategy.getSubDirectory(LoadProfileInput.class).orElse(""); + return subDirectory.isEmpty() + ? entityPersistenceNamingStrategy.getLoadProfileTimeSeriesPattern() + : Pattern.compile( + FilenameUtils.concat(subDirectory, entityPersistenceNamingStrategy.getLoadProfileTimeSeriesPattern().pattern())); + } + } diff --git a/src/test/groovy/edu/ie3/datamodel/io/FileNamingStrategyTest.groovy b/src/test/groovy/edu/ie3/datamodel/io/FileNamingStrategyTest.groovy index 8a2e950f2..f9d3a1351 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/FileNamingStrategyTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/FileNamingStrategyTest.groovy @@ -1,39 +1,45 @@ package edu.ie3.datamodel.io import edu.ie3.datamodel.io.csv.DefaultDirectoryHierarchy -import edu.ie3.datamodel.io.csv.FlatDirectoryHierarchy import edu.ie3.datamodel.io.naming.EntityPersistenceNamingStrategy import edu.ie3.datamodel.models.result.system.LoadResult import spock.lang.Specification -import java.nio.file.Paths - class FileNamingStrategyTest extends Specification { def "The FileNamingStrategy ..."() { given: - def ens = new EntityPersistenceNamingStrategy() - def dns = new DefaultDirectoryHierarchy("/foo/test/", "testGrid") - def fns = new FileNamingStrategy(ens, dns, ".csv") - def path = Paths.get("/bla/foo/") + def ens = new EntityPersistenceNamingStrategy("prefix", "suffix") + def dns = new DefaultDirectoryHierarchy("/foo/test/", "test_grid") + def fns = new FileNamingStrategy(ens, dns, ".TXT") when: - def filePath = fns.getFilePath(LoadResult) + def filePath = fns.getFilePath(modelClass) then: - filePath == "/bla/foo/xyz.csv" + filePath.present + filePath.get() == expectedString + + where: + modelClass || expectedString + LoadResult || "test_grid" + File.separator + "results" + File.separator + "participants" + File.separator + "prefix_load_res_suffix" + ".TXT" } def "The FileNamingStrategy ... flat"() { given: - def ens = new EntityPersistenceNamingStrategy() + def ens = new EntityPersistenceNamingStrategy("prefix", "suffix") def fns = new FileNamingStrategy(ens) when: def filePath = fns.getFilePath(LoadResult) then: - filePath == "/bla/foo/xyz.csv" + filePath.present + filePath.get() == expectedString + + where: + modelClass || expectedString + LoadResult || "prefix_load_res_suffix" + ".csv" } From 98f103c68c6a8e581467140209bd60af7ab30a7a Mon Sep 17 00:00:00 2001 From: Johannes Hiry Date: Fri, 21 May 2021 09:50:47 +0200 Subject: [PATCH 006/157] set version to 2.1.0 --- version.properties | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/version.properties b/version.properties index 1dc344a4f..7bd19cc05 100644 --- a/version.properties +++ b/version.properties @@ -1,8 +1,8 @@ #Generated by the Semver Plugin for Gradle -#Mon Sep 14 12:33:33 CEST 2020 +#Fri May 21 09:47:39 CEST 2021 version.buildmeta= version.major=2 -version.minor=0 +version.minor=1 version.patch=0 version.prerelease= -version.semver=2.0.0 +version.semver=2.1.0 From 4665871f61f142c067c29d17b4e94ac0d6fd8eee Mon Sep 17 00:00:00 2001 From: Johannes Hiry Date: Fri, 21 May 2021 10:07:35 +0200 Subject: [PATCH 007/157] print passed tests --- gradle/scripts/tests.gradle | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gradle/scripts/tests.gradle b/gradle/scripts/tests.gradle index 058d744f9..783a85c5c 100644 --- a/gradle/scripts/tests.gradle +++ b/gradle/scripts/tests.gradle @@ -1,7 +1,8 @@ test { useJUnitPlatform() testLogging { - events "skipped", "failed" + events "skipped", "failed", "passed" + } } From d43a54c51931522e32696a65b78f7afab3f25f8d Mon Sep 17 00:00:00 2001 From: Johannes Hiry Date: Fri, 21 May 2021 10:13:53 +0200 Subject: [PATCH 008/157] fmt --- gradle/scripts/tests.gradle | 1 - 1 file changed, 1 deletion(-) diff --git a/gradle/scripts/tests.gradle b/gradle/scripts/tests.gradle index 783a85c5c..44f17c2e0 100644 --- a/gradle/scripts/tests.gradle +++ b/gradle/scripts/tests.gradle @@ -2,7 +2,6 @@ test { useJUnitPlatform() testLogging { events "skipped", "failed", "passed" - } } From e8c360a296921ba55017bccdaab34c50776bff5e Mon Sep 17 00:00:00 2001 From: Johannes Hiry Date: Fri, 21 May 2021 10:18:30 +0200 Subject: [PATCH 009/157] print tests --- Jenkinsfile | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 0398745c8..83400c1bc 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -104,8 +104,8 @@ node { // test the project stage('run tests') { - gradle('--refresh-dependencies clean spotlessCheck pmdMain pmdTest spotbugsMain ' + - 'spotbugsTest test jacocoTestReport jacocoTestCoverageVerification', projectName) + println(gradle('--refresh-dependencies clean spotlessCheck pmdMain pmdTest spotbugsMain ' + + 'spotbugsTest test jacocoTestReport jacocoTestCoverageVerification', projectName)) // due to an issue with openjdk-8 we use openjdk-11 for javadocs generation sh(script: """set +x && cd $projectName""" + ''' set +x; ./gradlew clean javadoc -Dorg.gradle.java.home=/opt/java/openjdk''', returnStdout: true) @@ -150,7 +150,7 @@ node { */ sh( script: """set +x && cd $projectName""" + - ''' set +x; ./gradlew clean javadoc -Dorg.gradle.java.home=/opt/java/openjdk''', + ''' set +x; ./gradlew clean javadoc -Dorg.gradle.java.home=/opt/java/openjdk''', returnStdout: true ) @@ -706,8 +706,7 @@ def getBranchType(String branchName) { def main_pattern = ".*main" if (branchName =~ feature_pattern || branchName =~ dependabot_pattern) { return "feature" - } else - if (branchName =~ release_pattern) { + } else if (branchName =~ release_pattern) { return "release" } else if (branchName =~ main_pattern) { return "main" From 6edcb6a4e31dd01b7040bcbe24ce7f696004cf34 Mon Sep 17 00:00:00 2001 From: Johannes Hiry Date: Fri, 21 May 2021 10:22:30 +0200 Subject: [PATCH 010/157] remove printing again - useless as too many tests are executed --- Jenkinsfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 83400c1bc..9795189bb 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -104,8 +104,8 @@ node { // test the project stage('run tests') { - println(gradle('--refresh-dependencies clean spotlessCheck pmdMain pmdTest spotbugsMain ' + - 'spotbugsTest test jacocoTestReport jacocoTestCoverageVerification', projectName)) + gradle('--refresh-dependencies clean spotlessCheck pmdMain pmdTest spotbugsMain ' + + 'spotbugsTest test jacocoTestReport jacocoTestCoverageVerification', projectName) // due to an issue with openjdk-8 we use openjdk-11 for javadocs generation sh(script: """set +x && cd $projectName""" + ''' set +x; ./gradlew clean javadoc -Dorg.gradle.java.home=/opt/java/openjdk''', returnStdout: true) From d3f88ea8ef3618c59c8827807303713a50771e7b Mon Sep 17 00:00:00 2001 From: "Kittl, Chris" Date: Fri, 21 May 2021 16:45:54 +0200 Subject: [PATCH 011/157] Adapting CHANGELOG --- CHANGELOG.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 92cda87b4..2608fa232 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased/Snapshot] +## [2.0.0] - 2021-05-21 + ### Added - definition for a default input file directory structure - tarball utils to extract and compress files @@ -86,5 +88,6 @@ coordinates or multiple exactly equal coordinates possible - CsvDataSource now stops trying to get an operator for empty operator uuid field in entities - CsvDataSource now parsing multiple geoJson strings correctly -[Unreleased/Snapshot]: https://github.com/ie3-institute/powersystemdatamodel/compare/1.1.0...HEAD +[Unreleased/Snapshot]: https://github.com/ie3-institute/powersystemdatamodel/compare/2.0.0...HEAD +[2.0.0]: https://github.com/ie3-institute/powersystemdatamodel/compare/1.1.0...2.0.0 [1.1.0]: https://github.com/ie3-institute/powersystemdatamodel/compare/6a49bc514be8859ebd29a3595cd58cd000498f1e...1.1.0 From 5a6db2f1f1d886439d857f24c8032c2478c18f8a Mon Sep 17 00:00:00 2001 From: Sebastian <14994800+sebastian-peter@users.noreply.github.com> Date: Mon, 24 May 2021 17:16:21 +0200 Subject: [PATCH 012/157] Making InputContainer serializable --- .../ie3/datamodel/models/input/container/InputContainer.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/edu/ie3/datamodel/models/input/container/InputContainer.java b/src/main/java/edu/ie3/datamodel/models/input/container/InputContainer.java index fa8519239..4cf5a97de 100644 --- a/src/main/java/edu/ie3/datamodel/models/input/container/InputContainer.java +++ b/src/main/java/edu/ie3/datamodel/models/input/container/InputContainer.java @@ -6,10 +6,11 @@ package edu.ie3.datamodel.models.input.container; import edu.ie3.datamodel.models.input.InputEntity; +import java.io.Serializable; import java.util.List; /** Represents an aggregation of different entities */ -public interface InputContainer { +public interface InputContainer extends Serializable { /** @return unmodifiable List of all entities */ List allEntitiesAsList(); From 17a3261e2a8933237e275d37094ca454ae6bb92c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 26 May 2021 04:08:56 +0000 Subject: [PATCH 013/157] Bump commons-io from 2.8.0 to 2.9.0 Bumps commons-io from 2.8.0 to 2.9.0. Signed-off-by: dependabot[bot] --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 9460e5c00..5870d0b54 100644 --- a/build.gradle +++ b/build.gradle @@ -86,7 +86,7 @@ dependencies { runtimeOnly 'org.postgresql:postgresql:42.2.20' // postgresql jdbc driver required during runtime - compile 'commons-io:commons-io:2.8.0' // I/O functionalities + compile 'commons-io:commons-io:2.9.0' // I/O functionalities compile 'org.apache.commons:commons-compress:1.20' // I/O functionalities } From a2c5e2fe3a4a7429e55f34339d0ba44af5c1fdd7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 26 May 2021 04:09:10 +0000 Subject: [PATCH 014/157] Bump PowerSystemUtils from 1.5.2 to 1.5.3 Bumps [PowerSystemUtils](https://github.com/ie3-institute/PowerSystemUtils) from 1.5.2 to 1.5.3. - [Release notes](https://github.com/ie3-institute/PowerSystemUtils/releases) - [Changelog](https://github.com/ie3-institute/PowerSystemUtils/blob/master/CHANGELOG.md) - [Commits](https://github.com/ie3-institute/PowerSystemUtils/compare/v1.5.2...v1.5.3) Signed-off-by: dependabot[bot] --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 9460e5c00..d96513e24 100644 --- a/build.gradle +++ b/build.gradle @@ -52,7 +52,7 @@ repositories { dependencies { // ie³ power system utils - compile 'com.github.ie3-institute:PowerSystemUtils:1.5.2' + compile 'com.github.ie3-institute:PowerSystemUtils:1.5.3' implementation 'tech.units:indriya:2.1.2' From b9b287eae6ef95b2d465ebbd6645abeda352a96f Mon Sep 17 00:00:00 2001 From: Niklas Steffan Date: Wed, 26 May 2021 20:25:27 +0200 Subject: [PATCH 015/157] implemented all classes and tests, old stuff not deleted yet --- .../ie3/datamodel/io/FileNamingStrategy.java | 149 ++-- .../io/connectors/CsvFileConnector.java | 31 +- .../io/csv/DefaultDirectoryHierarchy.java | 2 +- .../datamodel/io/csv/DirectoryHierarchy.java | 14 + .../io/csv/DirectoryNamingStrategy.java | 11 - .../datamodel/io/csv/FileNamingStrategy.java | 12 +- .../io/csv/FlatDirectoryHierarchy.java | 54 +- ...trategy.java => EntityNamingStrategy.java} | 44 +- .../naming/HierarchicFileNamingStrategy.java | 15 +- .../ie3/datamodel/io/sink/CsvFileSink.java | 21 +- .../ie3/datamodel/io/sink/InfluxDbSink.java | 19 +- .../io/source/csv/CsvDataSource.java | 8 +- .../io/source/csv/CsvGraphicSource.java | 6 +- .../io/source/csv/CsvIdCoordinateSource.java | 6 +- .../io/source/csv/CsvRawGridSource.java | 6 +- .../csv/CsvSystemParticipantSource.java | 6 +- .../io/source/csv/CsvThermalSource.java | 6 +- .../csv/CsvTimeSeriesMappingSource.java | 8 +- .../io/source/csv/CsvTimeSeriesSource.java | 26 +- .../io/source/csv/CsvTypeSource.java | 8 +- .../io/source/csv/CsvWeatherSource.java | 19 +- .../io/FileNamingStrategyTest.groovy | 826 +++++++++++++++++- .../io/connectors/CsvFileConnectorTest.groovy | 14 +- .../io/csv/FlatDirectoryHierarchyTest.groovy | 109 +++ ...groovy => EntityNamingStrategyTest.groovy} | 423 +-------- .../datamodel/io/sink/CsvFileSinkTest.groovy | 12 +- .../datamodel/io/sink/InfluxDbSinkIT.groovy | 8 +- .../io/source/csv/CsvDataSourceTest.groovy | 8 +- .../io/source/csv/CsvTestDataMeta.groovy | 4 +- .../io/source/csv/CsvThermalSourceTest.groovy | 10 +- .../csv/CsvTimeSeriesMappingSourceIT.groovy | 4 +- .../source/csv/CsvTimeSeriesSourceIT.groovy | 6 +- .../source/csv/CsvTimeSeriesSourceTest.groovy | 4 +- .../io/source/csv/CsvTypeSourceTest.groovy | 22 +- .../csv/CsvWeatherSourceIconTest.groovy | 12 +- .../csv/CsvWeatherSourcePsdmTest.groovy | 12 +- 36 files changed, 1257 insertions(+), 688 deletions(-) create mode 100644 src/main/java/edu/ie3/datamodel/io/csv/DirectoryHierarchy.java delete mode 100644 src/main/java/edu/ie3/datamodel/io/csv/DirectoryNamingStrategy.java rename src/main/java/edu/ie3/datamodel/io/naming/{EntityPersistenceNamingStrategy.java => EntityNamingStrategy.java} (94%) create mode 100644 src/test/groovy/edu/ie3/datamodel/io/csv/FlatDirectoryHierarchyTest.groovy rename src/test/groovy/edu/ie3/datamodel/io/naming/{EntityPersistenceNamingStrategyTest.groovy => EntityNamingStrategyTest.groovy} (59%) diff --git a/src/main/java/edu/ie3/datamodel/io/FileNamingStrategy.java b/src/main/java/edu/ie3/datamodel/io/FileNamingStrategy.java index 97536e077..5127860a1 100644 --- a/src/main/java/edu/ie3/datamodel/io/FileNamingStrategy.java +++ b/src/main/java/edu/ie3/datamodel/io/FileNamingStrategy.java @@ -1,63 +1,72 @@ +/* + * © 2021. TU Dortmund University, + * Institute of Energy Systems, Energy Efficiency and Energy Economics, + * Research group Distribution grid planning and operation +*/ package edu.ie3.datamodel.io; -import edu.ie3.datamodel.io.csv.DirectoryNamingStrategy; -import edu.ie3.datamodel.io.csv.FlatDirectoryHierarchy; -import edu.ie3.datamodel.io.naming.EntityPersistenceNamingStrategy; +import edu.ie3.datamodel.io.csv.DirectoryHierarchy; +import edu.ie3.datamodel.io.naming.EntityNamingStrategy; import edu.ie3.datamodel.models.UniqueEntity; import edu.ie3.datamodel.models.timeseries.TimeSeries; import edu.ie3.datamodel.models.timeseries.TimeSeriesEntry; import edu.ie3.datamodel.models.timeseries.individual.IndividualTimeSeries; import edu.ie3.datamodel.models.timeseries.repetitive.LoadProfileInput; import edu.ie3.datamodel.models.value.Value; -import org.apache.commons.io.FilenameUtils; -import org.apache.logging.log4j.LogManager; -import org.apache.logging.log4j.Logger; - import java.io.File; import java.util.Optional; import java.util.regex.Pattern; +import org.apache.commons.io.FilenameUtils; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +/** + * A naming strategy, that combines an {@link EntityNamingStrategy} for naming entities, a {@link + * DirectoryHierarchy} for a folder structure, and a file extension. + */ public class FileNamingStrategy { - protected static final Logger logger = - LogManager.getLogger(FileNamingStrategy.class); + protected static final Logger logger = LogManager.getLogger(FileNamingStrategy.class); private static final String FILE_SEPARATOR_REGEX = "[\\\\/]"; private static final String FILE_SEPARATOR_REPLACEMENT = - File.separator.equals("\\") ? "\\\\" : "/"; + File.separator.equals("\\") ? "\\\\" : "/"; - private final EntityPersistenceNamingStrategy entityPersistenceNamingStrategy; - private final DirectoryNamingStrategy directoryNamingStrategy; + private final EntityNamingStrategy entityNamingStrategy; + private final DirectoryHierarchy directoryHierarchy; private final String fileExtension; + private final String defaultFileExtension = ""; - private final String defaultFileExtension = ".csv"; - - - public FileNamingStrategy(EntityPersistenceNamingStrategy entityPersistenceNamingStrategy, DirectoryNamingStrategy directoryNamingStrategy, String fileExtension) { - this.entityPersistenceNamingStrategy = entityPersistenceNamingStrategy; - this.directoryNamingStrategy = directoryNamingStrategy; + /** + * Constructor for building the file naming strategy + * + * @param entityNamingStrategy entity naming strategy + * @param directoryHierarchy directory hierarchy + * @param fileExtension file extension + */ + public FileNamingStrategy( + EntityNamingStrategy entityNamingStrategy, + DirectoryHierarchy directoryHierarchy, + String fileExtension) { + this.entityNamingStrategy = entityNamingStrategy; + this.directoryHierarchy = directoryHierarchy; this.fileExtension = fileExtension; } - public FileNamingStrategy(EntityPersistenceNamingStrategy entityPersistenceNamingStrategy, DirectoryNamingStrategy directoryNamingStrategy) { - this.entityPersistenceNamingStrategy = entityPersistenceNamingStrategy; - this.directoryNamingStrategy = directoryNamingStrategy; - this.fileExtension = defaultFileExtension; - } - - public FileNamingStrategy(EntityPersistenceNamingStrategy entityPersistenceNamingStrategy) { - this.entityPersistenceNamingStrategy = entityPersistenceNamingStrategy; - this.directoryNamingStrategy = new FlatDirectoryHierarchy(); + /** + * Constructor for building the file naming strategy. Since no file extension is provided, the + * default file extension is used. + * + * @param entityNamingStrategy entity naming strategy + * @param directoryHierarchy directory hierarchy + */ + public FileNamingStrategy( + EntityNamingStrategy entityNamingStrategy, DirectoryHierarchy directoryHierarchy) { + this.entityNamingStrategy = entityNamingStrategy; + this.directoryHierarchy = directoryHierarchy; this.fileExtension = defaultFileExtension; } - public FileNamingStrategy(EntityPersistenceNamingStrategy entityPersistenceNamingStrategy, String fileExtension) { - this.entityPersistenceNamingStrategy = entityPersistenceNamingStrategy; - this.directoryNamingStrategy = new FlatDirectoryHierarchy(); - this.fileExtension = fileExtension; - } - - /** * Get the full path to the file with regard to some (not explicitly specified) base directory. * The path does NOT start or end with any of the known file separators or file extension. @@ -69,7 +78,8 @@ public Optional getFilePath(Class cls) { // do not adapt orElseGet, see https://www.baeldung.com/java-optional-or-else-vs-or-else-get for // details return getFilePath( - entityPersistenceNamingStrategy.getEntityName(cls).orElseGet(() -> ""), getDirectoryPath(cls).orElseGet(() -> "")); + entityNamingStrategy.getEntityName(cls).orElseGet(() -> ""), + getDirectoryPath(cls).orElseGet(() -> "")); } /** @@ -83,12 +93,12 @@ public Optional getFilePath(Class cls) { * @return An optional sub path to the actual file */ public , E extends TimeSeriesEntry, V extends Value> - Optional getFilePath(T timeSeries) { + Optional getFilePath(T timeSeries) { // do not adapt orElseGet, see https://www.baeldung.com/java-optional-or-else-vs-or-else-get for // details return getFilePath( - entityPersistenceNamingStrategy.getEntityName(timeSeries).orElseGet(() -> ""), - getDirectoryPath(timeSeries).orElseGet(() -> "")); + entityNamingStrategy.getEntityName(timeSeries).orElseGet(() -> ""), + getDirectoryPath(timeSeries).orElseGet(() -> "")); } /** @@ -102,12 +112,11 @@ Optional getFilePath(T timeSeries) { private Optional getFilePath(String fileName, String subDirectories) { if (fileName.isEmpty()) return Optional.empty(); if (!subDirectories.isEmpty()) - return Optional.of(FilenameUtils.concat(subDirectories, fileName).concat(fileExtension)); - else return Optional.of(fileName.concat(fileExtension)); + return Optional.of( + FilenameUtils.concat(subDirectories, fileName)); // TODO: .concat(fileExtension) ? + else return Optional.of(fileName); // TODO: .concat(fileExtension) ? } - - /** * Returns the sub directory structure with regard to some (not explicitly specified) base * directory. The path does NOT start or end with any of the known file separators. @@ -116,7 +125,7 @@ private Optional getFilePath(String fileName, String subDirectories) { * @return An optional sub directory path */ public Optional getDirectoryPath(Class cls) { - Optional maybeDirectoryName = directoryNamingStrategy.getSubDirectory(cls); + Optional maybeDirectoryName = directoryHierarchy.getSubDirectory(cls); String directoryPath; if (!maybeDirectoryName.isPresent()) { logger.debug("Cannot determine directory name for class '{}'.", cls); @@ -124,18 +133,28 @@ public Optional getDirectoryPath(Class cls) { } else { /* Make sure, the directory path does not start or end with file separator and in between the separator is harmonized */ directoryPath = - maybeDirectoryName - .get() - .replaceFirst("^" + FILE_SEPARATOR_REGEX, "") - .replaceAll(FILE_SEPARATOR_REGEX + "$", "") - .replaceAll(FILE_SEPARATOR_REGEX, FILE_SEPARATOR_REPLACEMENT); + maybeDirectoryName + .get() + .replaceFirst("^" + FILE_SEPARATOR_REGEX, "") + .replaceAll(FILE_SEPARATOR_REGEX + "$", "") + .replaceAll(FILE_SEPARATOR_REGEX, FILE_SEPARATOR_REPLACEMENT); return Optional.of(directoryPath); } } + /** + * Returns the sub directory structure with regard to some (not explicitly specified) base + * directory. The path does NOT start or end with any of the known file separators. + * + * @param Type of the time series + * @param Type of the entry in the time series + * @param Type of the value, that is carried by the time series entry + * @param timeSeries Time series to derive naming information from + * @return An optional sub directory path + */ public , E extends TimeSeriesEntry, V extends Value> - Optional getDirectoryPath(T timeSeries) { - Optional maybeDirectoryName = directoryNamingStrategy.getSubDirectory(timeSeries.getClass()); + Optional getDirectoryPath(T timeSeries) { + Optional maybeDirectoryName = directoryHierarchy.getSubDirectory(timeSeries.getClass()); String directoryPath; if (!maybeDirectoryName.isPresent()) { logger.debug("Cannot determine directory name for time series '{}'.", timeSeries); @@ -143,30 +162,30 @@ Optional getDirectoryPath(T timeSeries) { } else { /* Make sure, the directory path does not start or end with file separator and in between the separator is harmonized */ directoryPath = - maybeDirectoryName - .get() - .replaceFirst("^" + FILE_SEPARATOR_REGEX, "") - .replaceAll(FILE_SEPARATOR_REGEX + "$", "") - .replaceAll(FILE_SEPARATOR_REGEX, FILE_SEPARATOR_REPLACEMENT); + maybeDirectoryName + .get() + .replaceFirst("^" + FILE_SEPARATOR_REGEX, "") + .replaceAll(FILE_SEPARATOR_REGEX + "$", "") + .replaceAll(FILE_SEPARATOR_REGEX, FILE_SEPARATOR_REPLACEMENT); return Optional.of(directoryPath); } } - public Pattern getIndividualTimeSeriesPattern() { - String subDirectory = directoryNamingStrategy.getSubDirectory(IndividualTimeSeries.class).orElse(""); + String subDirectory = directoryHierarchy.getSubDirectory(IndividualTimeSeries.class).orElse(""); return subDirectory.isEmpty() - ? entityPersistenceNamingStrategy.getIndividualTimeSeriesPattern() - : Pattern.compile( - FilenameUtils.concat(subDirectory, entityPersistenceNamingStrategy.getIndividualTimeSeriesPattern().pattern())); + ? entityNamingStrategy.getIndividualTimeSeriesPattern() + : Pattern.compile( + FilenameUtils.concat( + subDirectory, entityNamingStrategy.getIndividualTimeSeriesPattern().pattern())); } public Pattern getLoadProfileTimeSeriesPattern() { - String subDirectory = directoryNamingStrategy.getSubDirectory(LoadProfileInput.class).orElse(""); + String subDirectory = directoryHierarchy.getSubDirectory(LoadProfileInput.class).orElse(""); return subDirectory.isEmpty() - ? entityPersistenceNamingStrategy.getLoadProfileTimeSeriesPattern() - : Pattern.compile( - FilenameUtils.concat(subDirectory, entityPersistenceNamingStrategy.getLoadProfileTimeSeriesPattern().pattern())); + ? entityNamingStrategy.getLoadProfileTimeSeriesPattern() + : Pattern.compile( + FilenameUtils.concat( + subDirectory, entityNamingStrategy.getLoadProfileTimeSeriesPattern().pattern())); } - } diff --git a/src/main/java/edu/ie3/datamodel/io/connectors/CsvFileConnector.java b/src/main/java/edu/ie3/datamodel/io/connectors/CsvFileConnector.java index a63fceb05..ad83db516 100644 --- a/src/main/java/edu/ie3/datamodel/io/connectors/CsvFileConnector.java +++ b/src/main/java/edu/ie3/datamodel/io/connectors/CsvFileConnector.java @@ -9,7 +9,7 @@ import edu.ie3.datamodel.io.csv.*; import edu.ie3.datamodel.io.csv.timeseries.ColumnScheme; import edu.ie3.datamodel.io.csv.timeseries.IndividualTimeSeriesMetaInformation; -import edu.ie3.datamodel.io.naming.EntityPersistenceNamingStrategy; +import edu.ie3.datamodel.io.naming.EntityNamingStrategy; import edu.ie3.datamodel.models.UniqueEntity; import edu.ie3.datamodel.models.timeseries.TimeSeries; import edu.ie3.datamodel.models.timeseries.TimeSeriesEntry; @@ -41,7 +41,7 @@ public class CsvFileConnector implements DataConnector { private final Map timeSeriesWriters = new HashMap<>(); // ATTENTION: Do not finalize. It's meant for lazy evaluation. private Map individualTimeSeriesMetaInformation; - private final EntityPersistenceNamingStrategy entityPersistenceNamingStrategy; + private final EntityNamingStrategy entityNamingStrategy; private final String baseDirectoryName; private static final String FILE_ENDING = ".csv"; @@ -49,10 +49,9 @@ public class CsvFileConnector implements DataConnector { private static final String FILE_SEPARATOR_REPLACEMENT = File.separator.equals("\\") ? "\\\\" : "/"; - public CsvFileConnector( - String baseDirectoryName, EntityPersistenceNamingStrategy entityPersistenceNamingStrategy) { + public CsvFileConnector(String baseDirectoryName, EntityNamingStrategy entityNamingStrategy) { this.baseDirectoryName = baseDirectoryName; - this.entityPersistenceNamingStrategy = entityPersistenceNamingStrategy; + this.entityNamingStrategy = entityNamingStrategy; } public synchronized BufferedCsvWriter getOrInitWriter( @@ -138,8 +137,7 @@ private BufferedCsvWriter initWriter(String baseDirectory, CsvFileDefinition fil /** * Initializes a file reader for the given class that should be read in. The expected file name is - * determined based on {@link EntityPersistenceNamingStrategy} of the this {@link - * CsvFileConnector} instance + * determined based on {@link EntityNamingStrategy} of the this {@link CsvFileConnector} instance * * @param clz the class of the entity that should be read * @return the reader that contains information about the file to be read in @@ -149,7 +147,7 @@ public BufferedReader initReader(Class clz) throws FileN String filePath = null; try { filePath = - entityPersistenceNamingStrategy + entityNamingStrategy .getFilePath(clz) .orElseThrow( () -> @@ -212,8 +210,7 @@ public Optional getIndividualTimeSeriesMeta String filePathWithoutEnding = removeFileEnding(filePath); IndividualTimeSeriesMetaInformation metaInformation = (IndividualTimeSeriesMetaInformation) - entityPersistenceNamingStrategy.extractTimeSeriesMetaInformation( - filePathWithoutEnding); + entityNamingStrategy.extractTimeSeriesMetaInformation(filePathWithoutEnding); return new CsvIndividualTimeSeriesMetaInformation( metaInformation, filePathWithoutEnding); }) @@ -253,7 +250,7 @@ public Map> initTimeSeriesReader( * @throws FileNotFoundException If the file is not present */ public BufferedReader initIdCoordinateReader() throws FileNotFoundException { - String filePath = entityPersistenceNamingStrategy.getIdCoordinateEntityName(); + String filePath = entityNamingStrategy.getIdCoordinateEntityName(); return initReader(filePath); } @@ -271,7 +268,7 @@ private Set getIndividualTimeSeriesFilePaths() { .filter( path -> { String withoutEnding = removeFileEnding(path.toString()); - return entityPersistenceNamingStrategy + return entityNamingStrategy .getIndividualTimeSeriesPattern() .matcher(withoutEnding) .matches(); @@ -301,7 +298,7 @@ private Optional buildReadingData( String filePathString, ColumnScheme... columnSchemes) { try { FileNameMetaInformation metaInformation = - entityPersistenceNamingStrategy.extractTimeSeriesMetaInformation(filePathString); + entityNamingStrategy.extractTimeSeriesMetaInformation(filePathString); if (!IndividualTimeSeriesMetaInformation.class.isAssignableFrom(metaInformation.getClass())) { log.error( "The time series file '{}' does not represent an individual time series.", @@ -363,9 +360,9 @@ private String removeFileEnding(String input) { private , E extends TimeSeriesEntry, V extends Value> CsvFileDefinition buildFileDefinition(T timeSeries, String[] headLineElements, String csvSep) throws ConnectorException { - String directoryPath = entityPersistenceNamingStrategy.getDirectoryPath(timeSeries).orElse(""); + String directoryPath = entityNamingStrategy.getDirectoryPath(timeSeries).orElse(""); String fileName = - entityPersistenceNamingStrategy + entityNamingStrategy .getEntityName(timeSeries) .orElseThrow( () -> @@ -386,9 +383,9 @@ CsvFileDefinition buildFileDefinition(T timeSeries, String[] headLineElements, S private CsvFileDefinition buildFileDefinition( Class clz, String[] headLineElements, String csvSep) throws ConnectorException { - String directoryPath = entityPersistenceNamingStrategy.getDirectoryPath(clz).orElse(""); + String directoryPath = entityNamingStrategy.getDirectoryPath(clz).orElse(""); String fileName = - entityPersistenceNamingStrategy + entityNamingStrategy .getEntityName(clz) .orElseThrow( () -> diff --git a/src/main/java/edu/ie3/datamodel/io/csv/DefaultDirectoryHierarchy.java b/src/main/java/edu/ie3/datamodel/io/csv/DefaultDirectoryHierarchy.java index 0610bd2e4..9fc2d5149 100644 --- a/src/main/java/edu/ie3/datamodel/io/csv/DefaultDirectoryHierarchy.java +++ b/src/main/java/edu/ie3/datamodel/io/csv/DefaultDirectoryHierarchy.java @@ -45,7 +45,7 @@ import org.slf4j.LoggerFactory; /** Default directory hierarchy for input models */ -public class DefaultDirectoryHierarchy implements DirectoryNamingStrategy { +public class DefaultDirectoryHierarchy implements DirectoryHierarchy { private static final Logger logger = LoggerFactory.getLogger(DefaultDirectoryHierarchy.class); /** Use the unix file separator here. */ diff --git a/src/main/java/edu/ie3/datamodel/io/csv/DirectoryHierarchy.java b/src/main/java/edu/ie3/datamodel/io/csv/DirectoryHierarchy.java new file mode 100644 index 000000000..4319a0cbf --- /dev/null +++ b/src/main/java/edu/ie3/datamodel/io/csv/DirectoryHierarchy.java @@ -0,0 +1,14 @@ +/* + * © 2021. TU Dortmund University, + * Institute of Energy Systems, Energy Efficiency and Energy Economics, + * Research group Distribution grid planning and operation +*/ +package edu.ie3.datamodel.io.csv; + +import edu.ie3.datamodel.models.UniqueEntity; +import java.util.Optional; + +public interface DirectoryHierarchy extends FileHierarchy { + + Optional getSubDirectory(Class cls, String fileSeparator); +} diff --git a/src/main/java/edu/ie3/datamodel/io/csv/DirectoryNamingStrategy.java b/src/main/java/edu/ie3/datamodel/io/csv/DirectoryNamingStrategy.java deleted file mode 100644 index f4f8303f4..000000000 --- a/src/main/java/edu/ie3/datamodel/io/csv/DirectoryNamingStrategy.java +++ /dev/null @@ -1,11 +0,0 @@ -package edu.ie3.datamodel.io.csv; - -import edu.ie3.datamodel.models.UniqueEntity; - -import java.util.Optional; - -public interface DirectoryNamingStrategy extends FileHierarchy { - - Optional getSubDirectory(Class cls, String fileSeparator); - -} diff --git a/src/main/java/edu/ie3/datamodel/io/csv/FileNamingStrategy.java b/src/main/java/edu/ie3/datamodel/io/csv/FileNamingStrategy.java index ec58a13da..2d5ec6a30 100644 --- a/src/main/java/edu/ie3/datamodel/io/csv/FileNamingStrategy.java +++ b/src/main/java/edu/ie3/datamodel/io/csv/FileNamingStrategy.java @@ -8,7 +8,7 @@ import edu.ie3.datamodel.io.csv.timeseries.ColumnScheme; import edu.ie3.datamodel.io.csv.timeseries.IndividualTimeSeriesMetaInformation; import edu.ie3.datamodel.io.csv.timeseries.LoadProfileTimeSeriesMetaInformation; -import edu.ie3.datamodel.io.naming.EntityPersistenceNamingStrategy; +import edu.ie3.datamodel.io.naming.EntityNamingStrategy; import edu.ie3.datamodel.io.naming.HierarchicFileNamingStrategy; import edu.ie3.datamodel.io.source.TimeSeriesMappingSource; import edu.ie3.datamodel.models.UniqueEntity; @@ -41,7 +41,7 @@ * * @version 0.1 * @since 03.02.20 - * @deprecated replaced by {@link EntityPersistenceNamingStrategy} + * @deprecated replaced by {@link EntityNamingStrategy} */ @Deprecated public class FileNamingStrategy { @@ -123,12 +123,12 @@ public FileNamingStrategy(String prefix) { } /** - * Create a {@link EntityPersistenceNamingStrategy} from a {@link FileNamingStrategy} + * Create a {@link EntityNamingStrategy} from a {@link FileNamingStrategy} * - * @return an instance of {@link EntityPersistenceNamingStrategy} + * @return an instance of {@link EntityNamingStrategy} */ - public EntityPersistenceNamingStrategy asEntityPersistenceNamingStrategy() { - return new EntityPersistenceNamingStrategy(this.prefix, this.suffix); + public EntityNamingStrategy asEntityPersistenceNamingStrategy() { + return new EntityNamingStrategy(this.prefix, this.suffix); } /** diff --git a/src/main/java/edu/ie3/datamodel/io/csv/FlatDirectoryHierarchy.java b/src/main/java/edu/ie3/datamodel/io/csv/FlatDirectoryHierarchy.java index 34abc8dac..2c803aa43 100644 --- a/src/main/java/edu/ie3/datamodel/io/csv/FlatDirectoryHierarchy.java +++ b/src/main/java/edu/ie3/datamodel/io/csv/FlatDirectoryHierarchy.java @@ -1,16 +1,61 @@ +/* + * © 2021. TU Dortmund University, + * Institute of Energy Systems, Energy Efficiency and Energy Economics, + * Research group Distribution grid planning and operation +*/ package edu.ie3.datamodel.io.csv; +import edu.ie3.datamodel.exceptions.FileException; import edu.ie3.datamodel.models.UniqueEntity; - +import java.io.File; +import java.io.IOException; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; import java.util.Optional; +import org.apache.commons.io.FilenameUtils; /** Default directory hierarchy for input models */ -public class FlatDirectoryHierarchy implements DirectoryNamingStrategy { +public class FlatDirectoryHierarchy implements DirectoryHierarchy { + + /** Use the unix file separator here. */ + protected static final String FILE_SEPARATOR = File.separator; + + /** The project's directory beneath the {@code baseDirectory} */ + private final Path projectDirectory; + + public FlatDirectoryHierarchy(String baseDirectory, String gridName) { + /* Prepare the base path */ + String baseDirectoryNormalized = + FilenameUtils.normalizeNoEndSeparator(baseDirectory, true) + FILE_SEPARATOR; + this.projectDirectory = + Paths.get( + baseDirectoryNormalized + + FilenameUtils.normalizeNoEndSeparator(gridName, true) + + FILE_SEPARATOR) + .toAbsolutePath(); + } /** - * Empty constructor + * Checks, if the project directory beneath the base directory is okay. + * + * @throws FileException if not */ - public FlatDirectoryHierarchy() {} + public void validate() throws FileException { + if (!Files.exists(projectDirectory)) + throw new FileException("The path '" + projectDirectory + "' does not exist."); + if (!Files.isDirectory(projectDirectory)) + throw new FileException("The path '" + projectDirectory + "' has to be a directory."); + } + + /** + * Creates project directory of this flat directory hierarchy. + * + * @throws IOException If the creation of the project directory is not possible + */ + public void createDirs() throws IOException { + Files.createDirectories(projectDirectory); + } /** * Gives empty sub directory. @@ -23,5 +68,4 @@ public FlatDirectoryHierarchy() {} public Optional getSubDirectory(Class cls, String fileSeparator) { return Optional.empty(); } - } diff --git a/src/main/java/edu/ie3/datamodel/io/naming/EntityPersistenceNamingStrategy.java b/src/main/java/edu/ie3/datamodel/io/naming/EntityNamingStrategy.java similarity index 94% rename from src/main/java/edu/ie3/datamodel/io/naming/EntityPersistenceNamingStrategy.java rename to src/main/java/edu/ie3/datamodel/io/naming/EntityNamingStrategy.java index 6b4f29b81..c3de97bc9 100644 --- a/src/main/java/edu/ie3/datamodel/io/naming/EntityPersistenceNamingStrategy.java +++ b/src/main/java/edu/ie3/datamodel/io/naming/EntityNamingStrategy.java @@ -32,17 +32,14 @@ /** * Provides an easy to use standard way to name files, tables or any other persistent representation - * of models. Normal use cases are e.g., I/O operations with .csv files or databases. If a folder - * structure is required for file based I/O operations, one might consider using {@link - * HierarchicFileNamingStrategy} + * of models. Normal use cases are e.g., I/O operations with .csv files or databases. * * @version 0.1 * @since 03.02.20 */ -public class EntityPersistenceNamingStrategy { +public class EntityNamingStrategy { - protected static final Logger logger = - LogManager.getLogger(EntityPersistenceNamingStrategy.class); + protected static final Logger logger = LogManager.getLogger(EntityNamingStrategy.class); private static final String UUID_STRING = "[a-zA-Z0-9]{8}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{12}"; @@ -82,7 +79,7 @@ public class EntityPersistenceNamingStrategy { * Constructor for building the names of the data sinks without provided entities with prefix and * suffix */ - public EntityPersistenceNamingStrategy() { + public EntityNamingStrategy() { this("", ""); } @@ -91,7 +88,7 @@ public EntityPersistenceNamingStrategy() { * * @param prefix Prefix of the data sinks */ - public EntityPersistenceNamingStrategy(String prefix) { + public EntityNamingStrategy(String prefix) { this(prefix, ""); } @@ -101,7 +98,7 @@ public EntityPersistenceNamingStrategy(String prefix) { * @param prefix Prefix of the data sinks * @param suffix Suffixes of the data sinks */ - public EntityPersistenceNamingStrategy(String prefix, String suffix) { + public EntityNamingStrategy(String prefix, String suffix) { this.prefix = preparePrefix(prefix); this.suffix = prepareSuffix(suffix); @@ -155,12 +152,12 @@ private static String prepareSuffix(String suffix) { * * @param cls Targeted class of the given file * @return An optional sub path to the actual file - * @deprecated This class should foremost provide namings for the entities and nothing around file // TODO Niklas - * naming or pathing in specific. This method will be moved from this class, when this issue is - * addressed + * @deprecated This class should foremost provide namings for the entities and nothing around file + * // TODO Niklas naming or pathing in specific. This method will be moved from this class, + * when this + * issue is addressed */ - @Deprecated + @Deprecated // TODO: wurde in FileNamingStrategy übernommen -> hier entfernen public Optional getFilePath(Class cls) { // do not adapt orElseGet, see https://www.baeldung.com/java-optional-or-else-vs-or-else-get for // details @@ -175,12 +172,12 @@ public Optional getFilePath(Class cls) { * @param fileName File name * @param subDirectories Sub directory path * @return Concatenation of sub directory structure and file name - * @deprecated This class should foremost provide namings for the entities and nothing around file // TODO Niklas - * naming or pathing in specific. This method will be moved from this class, when this issue is - * addressed + * @deprecated This class should foremost provide namings for the entities and nothing around file + * // TODO Niklas naming or pathing in specific. This method will be moved from this class, + * when this + * issue is addressed */ - @Deprecated + @Deprecated // TODO: wurde in FileNamingStrategy übernommen -> hier entfernen private Optional getFilePath(String fileName, String subDirectories) { if (fileName.isEmpty()) return Optional.empty(); if (!subDirectories.isEmpty()) @@ -278,12 +275,12 @@ public Optional getAssetCharacteristicsEntityName( /** * Get the entity name for all {@link RandomLoadParameters} * - * @param randomLoadParamClass the random load parameters class an entity name string should be generated - * from + * @param randomLoadParamClass the random load parameters class an entity name string should be + * generated from * @return the entity name string */ public Optional getRandomLoadParametersEntityName( - Class randomLoadParamClass) { + Class randomLoadParamClass) { String loadParamString = camelCaseToSnakeCase(randomLoadParamClass.getSimpleName()); return Optional.of(addPrefixAndSuffix(loadParamString.concat("_input"))); } @@ -357,6 +354,7 @@ public Optional getTimeSeriesMappingEntityName() { * @param cls Targeted class of the given file * @return An optional sub directory path */ + @Deprecated // TODO: wurde in FileNamingStrategy übernommen -> hier entfernen public Optional getDirectoryPath(Class cls) { return Optional.empty(); } @@ -371,6 +369,7 @@ public Optional getDirectoryPath(Class cls) { * @param timeSeries Time series to derive naming information from * @return An optional sub path to the actual file */ + @Deprecated // TODO: wurde in FileNamingStrategy übernommen -> hier entfernen public , E extends TimeSeriesEntry, V extends Value> Optional getFilePath(T timeSeries) { // do not adapt orElseGet, see https://www.baeldung.com/java-optional-or-else-vs-or-else-get for @@ -440,6 +439,7 @@ Optional getEntityName(T timeSeries) { * @param timeSeries Time series to derive naming information from * @return An optional sub directory path */ + @Deprecated // TODO: Entfernen public , E extends TimeSeriesEntry, V extends Value> Optional getDirectoryPath(T timeSeries) { return Optional.empty(); diff --git a/src/main/java/edu/ie3/datamodel/io/naming/HierarchicFileNamingStrategy.java b/src/main/java/edu/ie3/datamodel/io/naming/HierarchicFileNamingStrategy.java index d193250b4..e22cbc0bd 100644 --- a/src/main/java/edu/ie3/datamodel/io/naming/HierarchicFileNamingStrategy.java +++ b/src/main/java/edu/ie3/datamodel/io/naming/HierarchicFileNamingStrategy.java @@ -21,9 +21,12 @@ /** * A naming strategy, that takes hierarchic order of sub folders into account. For the standard * structure that can be found in the documentation {@link DefaultDirectoryHierarchy} can be used + * + * @deprecated will be replaced by {@link edu.ie3.datamodel.io.FileNamingStrategy} and {@link + * DefaultDirectoryHierarchy} */ -public class HierarchicFileNamingStrategy extends EntityPersistenceNamingStrategy { - private static final String FILE_SEPARATOR_REGEX = "[\\\\/]"; +public class HierarchicFileNamingStrategy extends EntityNamingStrategy { + @Deprecated private static final String FILE_SEPARATOR_REGEX = "[\\\\/]"; private static final String FILE_SEPARATOR_REPLACEMENT = File.separator.equals("\\") ? "\\\\" : "/"; @@ -44,6 +47,7 @@ public HierarchicFileNamingStrategy(String prefix, FileHierarchy hierarchy) { } @Override + @Deprecated public Pattern getIndividualTimeSeriesPattern() { String subDirectory = hierarchy.getSubDirectory(IndividualTimeSeries.class).orElse(""); return subDirectory.isEmpty() @@ -53,6 +57,7 @@ public Pattern getIndividualTimeSeriesPattern() { } @Override + @Deprecated public Pattern getLoadProfileTimeSeriesPattern() { String subDirectory = hierarchy.getSubDirectory(LoadProfileInput.class).orElse(""); return subDirectory.isEmpty() @@ -68,7 +73,7 @@ public Pattern getLoadProfileTimeSeriesPattern() { * @param cls Targeted class of the given file * @return An optional sub directory path */ - @Override + @Deprecated public Optional getDirectoryPath(Class cls) { Optional maybeDirectoryName = hierarchy.getSubDirectory(cls); String directoryPath; @@ -87,7 +92,7 @@ public Optional getDirectoryPath(Class cls) { } } - @Override + @Deprecated public , E extends TimeSeriesEntry, V extends Value> Optional getDirectoryPath(T timeSeries) { Optional maybeDirectoryName = hierarchy.getSubDirectory(timeSeries.getClass()); @@ -106,4 +111,4 @@ Optional getDirectoryPath(T timeSeries) { return Optional.of(directoryPath); } } -} \ No newline at end of file +} diff --git a/src/main/java/edu/ie3/datamodel/io/sink/CsvFileSink.java b/src/main/java/edu/ie3/datamodel/io/sink/CsvFileSink.java index c7b8c1eb9..a2a2986f7 100644 --- a/src/main/java/edu/ie3/datamodel/io/sink/CsvFileSink.java +++ b/src/main/java/edu/ie3/datamodel/io/sink/CsvFileSink.java @@ -13,7 +13,7 @@ import edu.ie3.datamodel.io.csv.BufferedCsvWriter; import edu.ie3.datamodel.io.extractor.Extractor; import edu.ie3.datamodel.io.extractor.NestedEntity; -import edu.ie3.datamodel.io.naming.EntityPersistenceNamingStrategy; +import edu.ie3.datamodel.io.naming.EntityNamingStrategy; import edu.ie3.datamodel.io.processor.ProcessorProvider; import edu.ie3.datamodel.io.processor.timeseries.TimeSeriesProcessorKey; import edu.ie3.datamodel.models.UniqueEntity; @@ -59,7 +59,7 @@ public class CsvFileSink implements InputDataSink, OutputDataSink { private final String csvSep; public CsvFileSink(String baseFolderPath) { - this(baseFolderPath, new EntityPersistenceNamingStrategy(), false, ","); + this(baseFolderPath, new EntityNamingStrategy(), false, ","); } /** @@ -68,7 +68,7 @@ public CsvFileSink(String baseFolderPath) { * starting several sinks and use them for specific entities. * * @param baseFolderPath the base folder path where the files should be put into - * @param entityPersistenceNamingStrategy the data sink naming strategy that should be used + * @param entityNamingStrategy the data sink naming strategy that should be used * @param initFiles true if the files should be created during initialization (might create files, * that only consist of a headline, because no data will be written into them), false * otherwise @@ -76,15 +76,10 @@ public CsvFileSink(String baseFolderPath) { */ public CsvFileSink( String baseFolderPath, - EntityPersistenceNamingStrategy entityPersistenceNamingStrategy, + EntityNamingStrategy entityNamingStrategy, boolean initFiles, String csvSep) { - this( - baseFolderPath, - new ProcessorProvider(), - entityPersistenceNamingStrategy, - initFiles, - csvSep); + this(baseFolderPath, new ProcessorProvider(), entityNamingStrategy, initFiles, csvSep); } /** @@ -98,7 +93,7 @@ public CsvFileSink( * * @param baseFolderPath the base folder path where the files should be put into * @param processorProvider the processor provided that should be used for entity de-serialization - * @param entityPersistenceNamingStrategy the data sink naming strategy that should be used + * @param entityNamingStrategy the data sink naming strategy that should be used * @param initFiles true if the files should be created during initialization (might create files, * that only consist of a headline, because no data will be written into them), false * otherwise @@ -107,12 +102,12 @@ public CsvFileSink( public CsvFileSink( String baseFolderPath, ProcessorProvider processorProvider, - EntityPersistenceNamingStrategy entityPersistenceNamingStrategy, + EntityNamingStrategy entityNamingStrategy, boolean initFiles, String csvSep) { this.csvSep = csvSep; this.processorProvider = processorProvider; - this.connector = new CsvFileConnector(baseFolderPath, entityPersistenceNamingStrategy); + this.connector = new CsvFileConnector(baseFolderPath, entityNamingStrategy); if (initFiles) initFiles(processorProvider, connector); } diff --git a/src/main/java/edu/ie3/datamodel/io/sink/InfluxDbSink.java b/src/main/java/edu/ie3/datamodel/io/sink/InfluxDbSink.java index 6164a1cb3..94218da0c 100644 --- a/src/main/java/edu/ie3/datamodel/io/sink/InfluxDbSink.java +++ b/src/main/java/edu/ie3/datamodel/io/sink/InfluxDbSink.java @@ -7,7 +7,7 @@ import edu.ie3.datamodel.exceptions.SinkException; import edu.ie3.datamodel.io.connectors.InfluxDbConnector; -import edu.ie3.datamodel.io.naming.EntityPersistenceNamingStrategy; +import edu.ie3.datamodel.io.naming.EntityNamingStrategy; import edu.ie3.datamodel.io.processor.ProcessorProvider; import edu.ie3.datamodel.io.processor.timeseries.TimeSeriesProcessorKey; import edu.ie3.datamodel.models.UniqueEntity; @@ -33,20 +33,18 @@ public class InfluxDbSink implements OutputDataSink { private static final String FIELD_NAME_INPUT = "inputModel"; private final InfluxDbConnector connector; - private final EntityPersistenceNamingStrategy entityPersistenceNamingStrategy; + private final EntityNamingStrategy entityNamingStrategy; private final ProcessorProvider processorProvider; /** * Initializes a new InfluxDbWeatherSource * * @param connector needed for database connection - * @param entityPersistenceNamingStrategy needed to create measurement names for entities + * @param entityNamingStrategy needed to create measurement names for entities */ - public InfluxDbSink( - InfluxDbConnector connector, - EntityPersistenceNamingStrategy entityPersistenceNamingStrategy) { + public InfluxDbSink(InfluxDbConnector connector, EntityNamingStrategy entityNamingStrategy) { this.connector = connector; - this.entityPersistenceNamingStrategy = entityPersistenceNamingStrategy; + this.entityNamingStrategy = entityNamingStrategy; this.processorProvider = new ProcessorProvider( ProcessorProvider.allResultEntityProcessors(), @@ -59,7 +57,7 @@ public InfluxDbSink( * @param connector needed for database connection */ public InfluxDbSink(InfluxDbConnector connector) { - this(connector, new EntityPersistenceNamingStrategy()); + this(connector, new EntityNamingStrategy()); } @Override @@ -108,8 +106,7 @@ public void flush() { * @param entity the entity to transform */ private Optional transformToPoint(ResultEntity entity) { - Optional measurementName = - entityPersistenceNamingStrategy.getResultEntityName(entity.getClass()); + Optional measurementName = entityNamingStrategy.getResultEntityName(entity.getClass()); if (!measurementName.isPresent()) log.warn( "I could not get a measurement name for class {}. I am using its simple name instead.", @@ -168,7 +165,7 @@ private Optional transformToPoint(ResultEntity entity, String measurement private , V extends Value> Set transformToPoints( TimeSeries timeSeries) { if (timeSeries.getEntries().isEmpty()) return Collections.emptySet(); - Optional measurementName = entityPersistenceNamingStrategy.getEntityName(timeSeries); + Optional measurementName = entityNamingStrategy.getEntityName(timeSeries); if (!measurementName.isPresent()) { String valueClassName = timeSeries.getEntries().iterator().next().getValue().getClass().getSimpleName(); diff --git a/src/main/java/edu/ie3/datamodel/io/source/csv/CsvDataSource.java b/src/main/java/edu/ie3/datamodel/io/source/csv/CsvDataSource.java index e2d291cf5..faba98fe0 100644 --- a/src/main/java/edu/ie3/datamodel/io/source/csv/CsvDataSource.java +++ b/src/main/java/edu/ie3/datamodel/io/source/csv/CsvDataSource.java @@ -10,7 +10,7 @@ import edu.ie3.datamodel.io.factory.EntityFactory; import edu.ie3.datamodel.io.factory.input.AssetInputEntityData; import edu.ie3.datamodel.io.factory.input.NodeAssetInputEntityData; -import edu.ie3.datamodel.io.naming.EntityPersistenceNamingStrategy; +import edu.ie3.datamodel.io.naming.EntityNamingStrategy; import edu.ie3.datamodel.models.UniqueEntity; import edu.ie3.datamodel.models.input.AssetInput; import edu.ie3.datamodel.models.input.AssetTypeInput; @@ -65,11 +65,9 @@ public abstract class CsvDataSource { @Deprecated private boolean notYetLoggedWarning = true; public CsvDataSource( - String csvSep, - String folderPath, - EntityPersistenceNamingStrategy entityPersistenceNamingStrategy) { + String csvSep, String folderPath, EntityNamingStrategy entityNamingStrategy) { this.csvSep = csvSep; - this.connector = new CsvFileConnector(folderPath, entityPersistenceNamingStrategy); + this.connector = new CsvFileConnector(folderPath, entityNamingStrategy); } /** diff --git a/src/main/java/edu/ie3/datamodel/io/source/csv/CsvGraphicSource.java b/src/main/java/edu/ie3/datamodel/io/source/csv/CsvGraphicSource.java index 3052c8114..d6715143e 100644 --- a/src/main/java/edu/ie3/datamodel/io/source/csv/CsvGraphicSource.java +++ b/src/main/java/edu/ie3/datamodel/io/source/csv/CsvGraphicSource.java @@ -9,7 +9,7 @@ import edu.ie3.datamodel.io.factory.input.graphics.LineGraphicInputFactory; import edu.ie3.datamodel.io.factory.input.graphics.NodeGraphicInputEntityData; import edu.ie3.datamodel.io.factory.input.graphics.NodeGraphicInputFactory; -import edu.ie3.datamodel.io.naming.EntityPersistenceNamingStrategy; +import edu.ie3.datamodel.io.naming.EntityNamingStrategy; import edu.ie3.datamodel.io.source.GraphicSource; import edu.ie3.datamodel.io.source.RawGridSource; import edu.ie3.datamodel.io.source.TypeSource; @@ -49,10 +49,10 @@ public class CsvGraphicSource extends CsvDataSource implements GraphicSource { public CsvGraphicSource( String csvSep, String folderPath, - EntityPersistenceNamingStrategy entityPersistenceNamingStrategy, + EntityNamingStrategy entityNamingStrategy, TypeSource typeSource, RawGridSource rawGridSource) { - super(csvSep, folderPath, entityPersistenceNamingStrategy); + super(csvSep, folderPath, entityNamingStrategy); this.typeSource = typeSource; this.rawGridSource = rawGridSource; diff --git a/src/main/java/edu/ie3/datamodel/io/source/csv/CsvIdCoordinateSource.java b/src/main/java/edu/ie3/datamodel/io/source/csv/CsvIdCoordinateSource.java index a6b6dff9b..bd07da633 100644 --- a/src/main/java/edu/ie3/datamodel/io/source/csv/CsvIdCoordinateSource.java +++ b/src/main/java/edu/ie3/datamodel/io/source/csv/CsvIdCoordinateSource.java @@ -7,7 +7,7 @@ import edu.ie3.datamodel.io.factory.SimpleFactoryData; import edu.ie3.datamodel.io.factory.timeseries.IdCoordinateFactory; -import edu.ie3.datamodel.io.naming.EntityPersistenceNamingStrategy; +import edu.ie3.datamodel.io.naming.EntityNamingStrategy; import edu.ie3.datamodel.io.source.IdCoordinateSource; import java.io.BufferedReader; import java.io.IOException; @@ -32,9 +32,9 @@ public class CsvIdCoordinateSource extends CsvDataSource implements IdCoordinate public CsvIdCoordinateSource( String csvSep, String folderPath, - EntityPersistenceNamingStrategy entityPersistenceNamingStrategy, + EntityNamingStrategy entityNamingStrategy, IdCoordinateFactory factory) { - super(csvSep, folderPath, entityPersistenceNamingStrategy); + super(csvSep, folderPath, entityNamingStrategy); this.factory = factory; diff --git a/src/main/java/edu/ie3/datamodel/io/source/csv/CsvRawGridSource.java b/src/main/java/edu/ie3/datamodel/io/source/csv/CsvRawGridSource.java index e802cabeb..a137ae1bb 100644 --- a/src/main/java/edu/ie3/datamodel/io/source/csv/CsvRawGridSource.java +++ b/src/main/java/edu/ie3/datamodel/io/source/csv/CsvRawGridSource.java @@ -7,7 +7,7 @@ import edu.ie3.datamodel.io.factory.EntityFactory; import edu.ie3.datamodel.io.factory.input.*; -import edu.ie3.datamodel.io.naming.EntityPersistenceNamingStrategy; +import edu.ie3.datamodel.io.naming.EntityNamingStrategy; import edu.ie3.datamodel.io.source.RawGridSource; import edu.ie3.datamodel.io.source.TypeSource; import edu.ie3.datamodel.models.UniqueEntity; @@ -54,9 +54,9 @@ public class CsvRawGridSource extends CsvDataSource implements RawGridSource { public CsvRawGridSource( String csvSep, String gridFolderPath, - EntityPersistenceNamingStrategy entityPersistenceNamingStrategy, + EntityNamingStrategy entityNamingStrategy, TypeSource typeSource) { - super(csvSep, gridFolderPath, entityPersistenceNamingStrategy); + super(csvSep, gridFolderPath, entityNamingStrategy); this.typeSource = typeSource; // init factories diff --git a/src/main/java/edu/ie3/datamodel/io/source/csv/CsvSystemParticipantSource.java b/src/main/java/edu/ie3/datamodel/io/source/csv/CsvSystemParticipantSource.java index 4d944885a..43e25579d 100644 --- a/src/main/java/edu/ie3/datamodel/io/source/csv/CsvSystemParticipantSource.java +++ b/src/main/java/edu/ie3/datamodel/io/source/csv/CsvSystemParticipantSource.java @@ -8,7 +8,7 @@ import edu.ie3.datamodel.io.factory.EntityFactory; import edu.ie3.datamodel.io.factory.input.NodeAssetInputEntityData; import edu.ie3.datamodel.io.factory.input.participant.*; -import edu.ie3.datamodel.io.naming.EntityPersistenceNamingStrategy; +import edu.ie3.datamodel.io.naming.EntityNamingStrategy; import edu.ie3.datamodel.io.source.RawGridSource; import edu.ie3.datamodel.io.source.SystemParticipantSource; import edu.ie3.datamodel.io.source.ThermalSource; @@ -67,11 +67,11 @@ public class CsvSystemParticipantSource extends CsvDataSource implements SystemP public CsvSystemParticipantSource( String csvSep, String participantsFolderPath, - EntityPersistenceNamingStrategy entityPersistenceNamingStrategy, + EntityNamingStrategy entityNamingStrategy, TypeSource typeSource, ThermalSource thermalSource, RawGridSource rawGridSource) { - super(csvSep, participantsFolderPath, entityPersistenceNamingStrategy); + super(csvSep, participantsFolderPath, entityNamingStrategy); this.typeSource = typeSource; this.rawGridSource = rawGridSource; this.thermalSource = thermalSource; diff --git a/src/main/java/edu/ie3/datamodel/io/source/csv/CsvThermalSource.java b/src/main/java/edu/ie3/datamodel/io/source/csv/CsvThermalSource.java index c541dd09d..1db7c91bd 100644 --- a/src/main/java/edu/ie3/datamodel/io/source/csv/CsvThermalSource.java +++ b/src/main/java/edu/ie3/datamodel/io/source/csv/CsvThermalSource.java @@ -6,7 +6,7 @@ package edu.ie3.datamodel.io.source.csv; import edu.ie3.datamodel.io.factory.input.*; -import edu.ie3.datamodel.io.naming.EntityPersistenceNamingStrategy; +import edu.ie3.datamodel.io.naming.EntityNamingStrategy; import edu.ie3.datamodel.io.source.ThermalSource; import edu.ie3.datamodel.io.source.TypeSource; import edu.ie3.datamodel.models.input.OperatorInput; @@ -46,9 +46,9 @@ public class CsvThermalSource extends CsvDataSource implements ThermalSource { public CsvThermalSource( String csvSep, String thermalUnitsFolderPath, - EntityPersistenceNamingStrategy entityPersistenceNamingStrategy, + EntityNamingStrategy entityNamingStrategy, TypeSource typeSource) { - super(csvSep, thermalUnitsFolderPath, entityPersistenceNamingStrategy); + super(csvSep, thermalUnitsFolderPath, entityNamingStrategy); this.typeSource = typeSource; // init factories diff --git a/src/main/java/edu/ie3/datamodel/io/source/csv/CsvTimeSeriesMappingSource.java b/src/main/java/edu/ie3/datamodel/io/source/csv/CsvTimeSeriesMappingSource.java index 63ecdb2fd..ca724d071 100644 --- a/src/main/java/edu/ie3/datamodel/io/source/csv/CsvTimeSeriesMappingSource.java +++ b/src/main/java/edu/ie3/datamodel/io/source/csv/CsvTimeSeriesMappingSource.java @@ -8,7 +8,7 @@ import edu.ie3.datamodel.io.csv.timeseries.IndividualTimeSeriesMetaInformation; import edu.ie3.datamodel.io.factory.SimpleEntityData; import edu.ie3.datamodel.io.factory.timeseries.TimeSeriesMappingFactory; -import edu.ie3.datamodel.io.naming.EntityPersistenceNamingStrategy; +import edu.ie3.datamodel.io.naming.EntityNamingStrategy; import edu.ie3.datamodel.io.source.TimeSeriesMappingSource; import java.util.Map; import java.util.Optional; @@ -22,10 +22,8 @@ public class CsvTimeSeriesMappingSource extends CsvDataSource implements TimeSer private final Map mapping; public CsvTimeSeriesMappingSource( - String csvSep, - String folderPath, - EntityPersistenceNamingStrategy entityPersistenceNamingStrategy) { - super(csvSep, folderPath, entityPersistenceNamingStrategy); + String csvSep, String folderPath, EntityNamingStrategy entityNamingStrategy) { + super(csvSep, folderPath, entityNamingStrategy); /* Build the map */ mapping = diff --git a/src/main/java/edu/ie3/datamodel/io/source/csv/CsvTimeSeriesSource.java b/src/main/java/edu/ie3/datamodel/io/source/csv/CsvTimeSeriesSource.java index d09ffcafd..03a904da0 100644 --- a/src/main/java/edu/ie3/datamodel/io/source/csv/CsvTimeSeriesSource.java +++ b/src/main/java/edu/ie3/datamodel/io/source/csv/CsvTimeSeriesSource.java @@ -8,7 +8,7 @@ import edu.ie3.datamodel.exceptions.SourceException; import edu.ie3.datamodel.io.connectors.CsvFileConnector; import edu.ie3.datamodel.io.factory.timeseries.*; -import edu.ie3.datamodel.io.naming.EntityPersistenceNamingStrategy; +import edu.ie3.datamodel.io.naming.EntityNamingStrategy; import edu.ie3.datamodel.io.source.TimeSeriesSource; import edu.ie3.datamodel.models.timeseries.individual.IndividualTimeSeries; import edu.ie3.datamodel.models.timeseries.individual.TimeBasedValue; @@ -33,8 +33,7 @@ public class CsvTimeSeriesSource extends CsvDataSource * * @param csvSep the separator string for csv columns * @param folderPath path to the folder holding the time series files - * @param entityPersistenceNamingStrategy strategy for the naming of time series files / data - * sinks + * @param entityNamingStrategy strategy for the naming of time series files / data sinks * @param metaInformation The given meta information * @throws SourceException If the given meta information are not supported * @return The source @@ -42,7 +41,7 @@ public class CsvTimeSeriesSource extends CsvDataSource public static CsvTimeSeriesSource getSource( String csvSep, String folderPath, - EntityPersistenceNamingStrategy entityPersistenceNamingStrategy, + EntityNamingStrategy entityNamingStrategy, CsvFileConnector.CsvIndividualTimeSeriesMetaInformation metaInformation) throws SourceException { switch (metaInformation.getColumnScheme()) { @@ -52,7 +51,7 @@ public static CsvTimeSeriesSource getSource( return new CsvTimeSeriesSource<>( csvSep, folderPath, - entityPersistenceNamingStrategy, + entityNamingStrategy, metaInformation.getUuid(), metaInformation.getFullFilePath(), PValue.class, @@ -63,7 +62,7 @@ public static CsvTimeSeriesSource getSource( return new CsvTimeSeriesSource<>( csvSep, folderPath, - entityPersistenceNamingStrategy, + entityNamingStrategy, metaInformation.getUuid(), metaInformation.getFullFilePath(), SValue.class, @@ -74,7 +73,7 @@ public static CsvTimeSeriesSource getSource( return new CsvTimeSeriesSource<>( csvSep, folderPath, - entityPersistenceNamingStrategy, + entityNamingStrategy, metaInformation.getUuid(), metaInformation.getFullFilePath(), EnergyPriceValue.class, @@ -85,7 +84,7 @@ public static CsvTimeSeriesSource getSource( return new CsvTimeSeriesSource<>( csvSep, folderPath, - entityPersistenceNamingStrategy, + entityNamingStrategy, metaInformation.getUuid(), metaInformation.getFullFilePath(), HeatAndSValue.class, @@ -96,7 +95,7 @@ public static CsvTimeSeriesSource getSource( return new CsvTimeSeriesSource<>( csvSep, folderPath, - entityPersistenceNamingStrategy, + entityNamingStrategy, metaInformation.getUuid(), metaInformation.getFullFilePath(), HeatAndPValue.class, @@ -107,7 +106,7 @@ public static CsvTimeSeriesSource getSource( return new CsvTimeSeriesSource<>( csvSep, folderPath, - entityPersistenceNamingStrategy, + entityNamingStrategy, metaInformation.getUuid(), metaInformation.getFullFilePath(), HeatDemandValue.class, @@ -123,8 +122,7 @@ public static CsvTimeSeriesSource getSource( * * @param csvSep the separator string for csv columns * @param folderPath path to the folder holding the time series files - * @param entityPersistenceNamingStrategy strategy for the naming of time series files / data - * sinks + * @param entityNamingStrategy strategy for the naming of time series files / data sinks * @param timeSeriesUuid Unique identifier of the time series * @param filePath Path of the file, excluding extension and being relative to {@code folderPath} * @param valueClass Class of the value @@ -133,12 +131,12 @@ public static CsvTimeSeriesSource getSource( public CsvTimeSeriesSource( String csvSep, String folderPath, - EntityPersistenceNamingStrategy entityPersistenceNamingStrategy, + EntityNamingStrategy entityNamingStrategy, UUID timeSeriesUuid, String filePath, Class valueClass, TimeBasedSimpleValueFactory factory) { - super(csvSep, folderPath, entityPersistenceNamingStrategy); + super(csvSep, folderPath, entityNamingStrategy); /* Read in the full time series */ try { diff --git a/src/main/java/edu/ie3/datamodel/io/source/csv/CsvTypeSource.java b/src/main/java/edu/ie3/datamodel/io/source/csv/CsvTypeSource.java index 4b83856f6..ba2dd6d8f 100644 --- a/src/main/java/edu/ie3/datamodel/io/source/csv/CsvTypeSource.java +++ b/src/main/java/edu/ie3/datamodel/io/source/csv/CsvTypeSource.java @@ -12,7 +12,7 @@ import edu.ie3.datamodel.io.factory.typeinput.SystemParticipantTypeInputFactory; import edu.ie3.datamodel.io.factory.typeinput.Transformer2WTypeInputFactory; import edu.ie3.datamodel.io.factory.typeinput.Transformer3WTypeInputFactory; -import edu.ie3.datamodel.io.naming.EntityPersistenceNamingStrategy; +import edu.ie3.datamodel.io.naming.EntityNamingStrategy; import edu.ie3.datamodel.io.source.TypeSource; import edu.ie3.datamodel.models.input.InputEntity; import edu.ie3.datamodel.models.input.OperatorInput; @@ -41,10 +41,8 @@ public class CsvTypeSource extends CsvDataSource implements TypeSource { private final SystemParticipantTypeInputFactory systemParticipantTypeInputFactory; public CsvTypeSource( - String csvSep, - String typeFolderPath, - EntityPersistenceNamingStrategy entityPersistenceNamingStrategy) { - super(csvSep, typeFolderPath, entityPersistenceNamingStrategy); + String csvSep, String typeFolderPath, EntityNamingStrategy entityNamingStrategy) { + super(csvSep, typeFolderPath, entityNamingStrategy); // init factories operatorInputFactory = new OperatorInputFactory(); diff --git a/src/main/java/edu/ie3/datamodel/io/source/csv/CsvWeatherSource.java b/src/main/java/edu/ie3/datamodel/io/source/csv/CsvWeatherSource.java index 123aab015..d87b8abf8 100644 --- a/src/main/java/edu/ie3/datamodel/io/source/csv/CsvWeatherSource.java +++ b/src/main/java/edu/ie3/datamodel/io/source/csv/CsvWeatherSource.java @@ -10,7 +10,7 @@ import edu.ie3.datamodel.io.factory.timeseries.IdCoordinateFactory; import edu.ie3.datamodel.io.factory.timeseries.TimeBasedWeatherValueData; import edu.ie3.datamodel.io.factory.timeseries.TimeBasedWeatherValueFactory; -import edu.ie3.datamodel.io.naming.EntityPersistenceNamingStrategy; +import edu.ie3.datamodel.io.naming.EntityNamingStrategy; import edu.ie3.datamodel.io.source.IdCoordinateSource; import edu.ie3.datamodel.io.source.WeatherSource; import edu.ie3.datamodel.models.UniqueEntity; @@ -43,8 +43,7 @@ public class CsvWeatherSource extends CsvDataSource implements WeatherSource { * * @param csvSep the separator string for csv columns * @param folderPath path to the folder holding the time series files - * @param entityPersistenceNamingStrategy strategy for the naming of time series files / data - * sinks + * @param entityNamingStrategy strategy for the naming of time series files / data sinks * @param weatherFactory factory to transfer field to value mapping into actual java object * instances * @param coordinateFactory factory to build coordinate id to coordinate mapping @@ -52,15 +51,14 @@ public class CsvWeatherSource extends CsvDataSource implements WeatherSource { public CsvWeatherSource( String csvSep, String folderPath, - EntityPersistenceNamingStrategy entityPersistenceNamingStrategy, + EntityNamingStrategy entityNamingStrategy, TimeBasedWeatherValueFactory weatherFactory, IdCoordinateFactory coordinateFactory) { this( csvSep, folderPath, - entityPersistenceNamingStrategy, - new CsvIdCoordinateSource( - csvSep, folderPath, entityPersistenceNamingStrategy, coordinateFactory), + entityNamingStrategy, + new CsvIdCoordinateSource(csvSep, folderPath, entityNamingStrategy, coordinateFactory), weatherFactory); } @@ -70,8 +68,7 @@ public CsvWeatherSource( * * @param csvSep the separator string for csv columns * @param folderPath path to the folder holding the time series files - * @param entityPersistenceNamingStrategy strategy for the naming of time series files / data - * sinks + * @param entityNamingStrategy strategy for the naming of time series files / data sinks * @param coordinateSource a coordinate source to map ids to points * @param weatherFactory factory to transfer field to value mapping into actual java object * instances @@ -79,10 +76,10 @@ public CsvWeatherSource( public CsvWeatherSource( String csvSep, String folderPath, - EntityPersistenceNamingStrategy entityPersistenceNamingStrategy, + EntityNamingStrategy entityNamingStrategy, IdCoordinateSource coordinateSource, TimeBasedWeatherValueFactory weatherFactory) { - super(csvSep, folderPath, entityPersistenceNamingStrategy); + super(csvSep, folderPath, entityNamingStrategy); this.coordinateSource = coordinateSource; this.weatherFactory = weatherFactory; diff --git a/src/test/groovy/edu/ie3/datamodel/io/FileNamingStrategyTest.groovy b/src/test/groovy/edu/ie3/datamodel/io/FileNamingStrategyTest.groovy index f9d3a1351..f784dc49a 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/FileNamingStrategyTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/FileNamingStrategyTest.groovy @@ -1,46 +1,816 @@ +/* + * © 2021. TU Dortmund University, + * Institute of Energy Systems, Energy Efficiency and Energy Economics, + * Research group Distribution grid planning and operation + */ package edu.ie3.datamodel.io import edu.ie3.datamodel.io.csv.DefaultDirectoryHierarchy -import edu.ie3.datamodel.io.naming.EntityPersistenceNamingStrategy +import edu.ie3.datamodel.io.csv.FlatDirectoryHierarchy +import edu.ie3.datamodel.io.naming.EntityNamingStrategy +import edu.ie3.datamodel.io.naming.HierarchicFileNamingStrategy +import edu.ie3.datamodel.io.source.TimeSeriesMappingSource +import edu.ie3.datamodel.models.BdewLoadProfile +import edu.ie3.datamodel.models.UniqueEntity +import edu.ie3.datamodel.models.input.MeasurementUnitInput +import edu.ie3.datamodel.models.input.NodeInput +import edu.ie3.datamodel.models.input.RandomLoadParameters +import edu.ie3.datamodel.models.input.connector.LineInput +import edu.ie3.datamodel.models.input.connector.SwitchInput +import edu.ie3.datamodel.models.input.connector.Transformer2WInput +import edu.ie3.datamodel.models.input.connector.Transformer3WInput +import edu.ie3.datamodel.models.input.connector.type.LineTypeInput +import edu.ie3.datamodel.models.input.connector.type.Transformer2WTypeInput +import edu.ie3.datamodel.models.input.connector.type.Transformer3WTypeInput +import edu.ie3.datamodel.models.input.graphics.LineGraphicInput +import edu.ie3.datamodel.models.input.graphics.NodeGraphicInput +import edu.ie3.datamodel.models.input.system.BmInput +import edu.ie3.datamodel.models.input.system.ChpInput +import edu.ie3.datamodel.models.input.system.EvInput +import edu.ie3.datamodel.models.input.system.EvcsInput +import edu.ie3.datamodel.models.input.system.FixedFeedInInput +import edu.ie3.datamodel.models.input.system.HpInput +import edu.ie3.datamodel.models.input.system.LoadInput +import edu.ie3.datamodel.models.input.system.PvInput +import edu.ie3.datamodel.models.input.system.StorageInput +import edu.ie3.datamodel.models.input.system.WecInput +import edu.ie3.datamodel.models.input.system.type.BmTypeInput +import edu.ie3.datamodel.models.input.system.type.ChpTypeInput +import edu.ie3.datamodel.models.input.system.type.EvTypeInput +import edu.ie3.datamodel.models.input.system.type.HpTypeInput +import edu.ie3.datamodel.models.input.system.type.StorageTypeInput +import edu.ie3.datamodel.models.input.system.type.WecTypeInput +import edu.ie3.datamodel.models.input.thermal.CylindricalStorageInput +import edu.ie3.datamodel.models.input.thermal.ThermalHouseInput +import edu.ie3.datamodel.models.result.NodeResult +import edu.ie3.datamodel.models.result.connector.LineResult +import edu.ie3.datamodel.models.result.connector.SwitchResult +import edu.ie3.datamodel.models.result.connector.Transformer2WResult +import edu.ie3.datamodel.models.result.connector.Transformer3WResult +import edu.ie3.datamodel.models.result.system.BmResult +import edu.ie3.datamodel.models.result.system.ChpResult +import edu.ie3.datamodel.models.result.system.EvResult +import edu.ie3.datamodel.models.result.system.EvcsResult +import edu.ie3.datamodel.models.result.system.FixedFeedInResult import edu.ie3.datamodel.models.result.system.LoadResult +import edu.ie3.datamodel.models.result.system.PvResult +import edu.ie3.datamodel.models.result.system.StorageResult +import edu.ie3.datamodel.models.result.system.WecResult +import edu.ie3.datamodel.models.result.thermal.CylindricalStorageResult +import edu.ie3.datamodel.models.result.thermal.ThermalHouseResult +import edu.ie3.datamodel.models.timeseries.individual.IndividualTimeSeries +import edu.ie3.datamodel.models.timeseries.individual.TimeBasedValue +import edu.ie3.datamodel.models.timeseries.repetitive.LoadProfileInput +import edu.ie3.datamodel.models.value.EnergyPriceValue +import edu.ie3.util.quantities.PowerSystemUnits +import spock.lang.Shared import spock.lang.Specification +import tech.units.indriya.quantity.Quantities + +import java.nio.file.Files +import java.time.ZonedDateTime class FileNamingStrategyTest extends Specification { - def "The FileNamingStrategy ..."() { - given: - def ens = new EntityPersistenceNamingStrategy("prefix", "suffix") - def dns = new DefaultDirectoryHierarchy("/foo/test/", "test_grid") - def fns = new FileNamingStrategy(ens, dns, ".TXT") - when: - def filePath = fns.getFilePath(modelClass) + @Shared + DefaultDirectoryHierarchy defaultHierarchy + FlatDirectoryHierarchy flatHierarchy + EntityNamingStrategy simpleEntityNaming + + def setup() { + def tmpPath = Files.createTempDirectory("psdm_file_naming_strategy") + defaultHierarchy = new DefaultDirectoryHierarchy(tmpPath.toString(), "test_grid") + flatHierarchy = new FlatDirectoryHierarchy(tmpPath.toString(), "test_grid") + simpleEntityNaming = new EntityNamingStrategy() + } + + + // TESTS FOR DEFAULT HIERARCHY + + def "A FileNamingStrategy with DefaultHierarchy and without pre- or suffixes should return valid directory paths for all result models"() { + given: "a file naming strategy without pre- or suffixes" + def strategy = new FileNamingStrategy(simpleEntityNaming, defaultHierarchy) + + when: + def res = strategy.getDirectoryPath(modelClass) + + then: + res.present + res.get() == expectedString + + where: + modelClass || expectedString + LoadResult || "test_grid" + File.separator + "results" + File.separator + "participants" + FixedFeedInResult || "test_grid" + File.separator + "results" + File.separator + "participants" + BmResult || "test_grid" + File.separator + "results" + File.separator + "participants" + PvResult || "test_grid" + File.separator + "results" + File.separator + "participants" + ChpResult || "test_grid" + File.separator + "results" + File.separator + "participants" + WecResult || "test_grid" + File.separator + "results" + File.separator + "participants" + StorageResult || "test_grid" + File.separator + "results" + File.separator + "participants" + EvcsResult || "test_grid" + File.separator + "results" + File.separator + "participants" + EvResult || "test_grid" + File.separator + "results" + File.separator + "participants" + Transformer2WResult || "test_grid" + File.separator + "results" + File.separator + "grid" + Transformer3WResult || "test_grid" + File.separator + "results" + File.separator + "grid" + LineResult || "test_grid" + File.separator + "results" + File.separator + "grid" + SwitchResult || "test_grid" + File.separator + "results" + File.separator + "grid" + NodeResult || "test_grid" + File.separator + "results" + File.separator + "grid" + CylindricalStorageResult || "test_grid" + File.separator + "results" + File.separator + "thermal" + ThermalHouseResult || "test_grid" + File.separator + "results" + File.separator + "thermal" + } + + def "A FileNamingStrategy with DefaultHierarchy and without pre- or suffixes should return valid directory paths for all input assets models"() { + given: "a file naming strategy without pre- or suffixes" + def strategy = new FileNamingStrategy(simpleEntityNaming, defaultHierarchy) + + when: + def res = strategy.getDirectoryPath(modelClass) + + then: + res.present + res.get() == expectedString + + where: + modelClass || expectedString + FixedFeedInInput || "test_grid" + File.separator + "input" + File.separator + "participants" + PvInput || "test_grid" + File.separator + "input" + File.separator + "participants" + WecInput || "test_grid" + File.separator + "input" + File.separator + "participants" + ChpInput || "test_grid" + File.separator + "input" + File.separator + "participants" + BmInput || "test_grid" + File.separator + "input" + File.separator + "participants" + EvInput || "test_grid" + File.separator + "input" + File.separator + "participants" + EvcsInput || "test_grid" + File.separator + "input" + File.separator + "participants" + LoadInput || "test_grid" + File.separator + "input" + File.separator + "participants" + StorageInput || "test_grid" + File.separator + "input" + File.separator + "participants" + HpInput || "test_grid" + File.separator + "input" + File.separator + "participants" + LineInput || "test_grid" + File.separator + "input" + File.separator + "grid" + SwitchInput || "test_grid" + File.separator + "input" + File.separator + "grid" + NodeInput || "test_grid" + File.separator + "input" + File.separator + "grid" + MeasurementUnitInput || "test_grid" + File.separator + "input" + File.separator + "grid" + Transformer2WInput || "test_grid" + File.separator + "input" + File.separator + "grid" + Transformer3WInput || "test_grid" + File.separator + "input" + File.separator + "grid" + CylindricalStorageInput || "test_grid" + File.separator + "input" + File.separator + "thermal" + ThermalHouseInput || "test_grid" + File.separator + "input" + File.separator + "thermal" + } + + def "A FileNamingStrategy with DefaultHierarchy and without pre- or suffixes should return valid directory paths for all input types models"() { + given: "a file naming strategy without pre- or suffixes" + def strategy = new FileNamingStrategy(simpleEntityNaming, defaultHierarchy) + + when: + def res = strategy.getDirectoryPath(modelClass) + + then: + res.present + res.get() == expectedString + + where: + modelClass || expectedString + BmTypeInput || "test_grid" + File.separator + "input" + File.separator + "global" + ChpTypeInput || "test_grid" + File.separator + "input" + File.separator + "global" + EvTypeInput || "test_grid" + File.separator + "input" + File.separator + "global" + HpTypeInput || "test_grid" + File.separator + "input" + File.separator + "global" + StorageTypeInput || "test_grid" + File.separator + "input" + File.separator + "global" + WecTypeInput || "test_grid" + File.separator + "input" + File.separator + "global" + LineTypeInput || "test_grid" + File.separator + "input" + File.separator + "global" + Transformer2WTypeInput || "test_grid" + File.separator + "input" + File.separator + "global" + Transformer3WTypeInput || "test_grid" + File.separator + "input" + File.separator + "global" + } + + def "A FileNamingStrategy with DefaultHierarchy and without pre- or suffixes should return valid directory paths for a graphic input Model"() { + given: "a file naming strategy without pre- or suffixes" + def strategy = new FileNamingStrategy(simpleEntityNaming, defaultHierarchy) + + when: + def res = strategy.getDirectoryPath(modelClass) + + then: + res.present + res.get() == expectedString + + where: + modelClass || expectedString + NodeGraphicInput || "test_grid" + File.separator + "input" + File.separator + "graphics" + LineGraphicInput || "test_grid" + File.separator + "input" + File.separator + "graphics" + } + + def "A FileNamingStrategy with DefaultHierarchy and without pre- or suffix should return valid directory path for load profile time series"() { + given: + def strategy = new FileNamingStrategy(simpleEntityNaming, defaultHierarchy) + def timeSeries = Mock(LoadProfileInput) + + when: + def actual = strategy.getDirectoryPath(timeSeries) + + then: + actual.present + actual.get() == expected + + where: + clazz || expected + LoadProfileInput || "test_grid" + File.separator + "input" + File.separator + "global" + } + + def "A FileNamingStrategy with DefaultHierarchy and should return valid directory path for individual time series"() { + given: + def strategy = new FileNamingStrategy(simpleEntityNaming, defaultHierarchy) + IndividualTimeSeries timeSeries = Mock(IndividualTimeSeries) + + when: + def actual = strategy.getDirectoryPath(timeSeries) + + then: + actual.present + actual.get() == expected + + where: + clazz || expected + IndividualTimeSeries || "test_grid" + File.separator + "input" + File.separator + "participants" + File.separator + "time_series" + } + + def "A FileNamingStrategy with DefaultHierarchy and without pre- or suffixes should return valid file paths for all result models"() { + given: "a file naming strategy without pre- or suffixes" + def strategy = new FileNamingStrategy(simpleEntityNaming, defaultHierarchy) + + when: + def res = strategy.getFilePath(modelClass) + + then: + res.present + res.get() == expectedString + + where: + modelClass || expectedString + LoadResult || "test_grid" + File.separator + "results" + File.separator + "participants" + File.separator + "load_res" + FixedFeedInResult || "test_grid" + File.separator + "results" + File.separator + "participants" + File.separator + "fixed_feed_in_res" + BmResult || "test_grid" + File.separator + "results" + File.separator + "participants" + File.separator + "bm_res" + PvResult || "test_grid" + File.separator + "results" + File.separator + "participants" + File.separator + "pv_res" + ChpResult || "test_grid" + File.separator + "results" + File.separator + "participants" + File.separator + "chp_res" + WecResult || "test_grid" + File.separator + "results" + File.separator + "participants" + File.separator + "wec_res" + StorageResult || "test_grid" + File.separator + "results" + File.separator + "participants" + File.separator + "storage_res" + EvcsResult || "test_grid" + File.separator + "results" + File.separator + "participants" + File.separator + "evcs_res" + EvResult || "test_grid" + File.separator + "results" + File.separator + "participants" + File.separator + "ev_res" + Transformer2WResult || "test_grid" + File.separator + "results" + File.separator + "grid" + File.separator + "transformer_2_w_res" + Transformer3WResult || "test_grid" + File.separator + "results" + File.separator + "grid" + File.separator + "transformer_3_w_res" + LineResult || "test_grid" + File.separator + "results" + File.separator + "grid" + File.separator + "line_res" + SwitchResult || "test_grid" + File.separator + "results" + File.separator + "grid" + File.separator + "switch_res" + NodeResult || "test_grid" + File.separator + "results" + File.separator + "grid" + File.separator + "node_res" + CylindricalStorageResult || "test_grid" + File.separator + "results" + File.separator + "thermal" + File.separator + "cylindrical_storage_res" + ThermalHouseResult || "test_grid" + File.separator + "results" + File.separator + "thermal" + File.separator + "thermal_house_res" + } + + def "A FileNamingStrategy with DefaultHierarchy and without pre- or suffixes should return valid file paths for all other input assets models"() { + given: "a file naming strategy without pre- or suffixes" + def strategy = new FileNamingStrategy(simpleEntityNaming, defaultHierarchy) + + when: + def res = strategy.getFilePath(modelClass) + + then: + res.present + res.get() == expectedString + + where: + modelClass || expectedString + LineInput || "test_grid" + File.separator + "input" + File.separator + "grid" + File.separator + "line_input" + SwitchInput || "test_grid" + File.separator + "input" + File.separator + "grid" + File.separator + "switch_input" + NodeInput || "test_grid" + File.separator + "input" + File.separator + "grid" + File.separator + "node_input" + MeasurementUnitInput || "test_grid" + File.separator + "input" + File.separator + "grid" + File.separator + "measurement_unit_input" + Transformer2WInput || "test_grid" + File.separator + "input" + File.separator + "grid" + File.separator + "transformer_2_w_input" + Transformer3WInput || "test_grid" + File.separator + "input" + File.separator + "grid" + File.separator + "transformer_3_w_input" + CylindricalStorageInput || "test_grid" + File.separator + "input" + File.separator + "thermal" + File.separator + "cylindrical_storage_input" + ThermalHouseInput || "test_grid" + File.separator + "input" + File.separator + "thermal" + File.separator + "thermal_house_input" + } + + def "A FileNamingStrategy with DefaultHierarchy and without pre- or suffixes should return valid file paths for all system input assets models"() { + given: "a file naming strategy without pre- or suffixes" + def strategy = new FileNamingStrategy(simpleEntityNaming, defaultHierarchy) + + when: + def res = strategy.getFilePath(modelClass) + + then: + res.present + res.get() == expectedString + + where: + modelClass || expectedString + FixedFeedInInput || "test_grid" + File.separator + "input" + File.separator + "participants" + File.separator + "fixed_feed_in_input" + PvInput || "test_grid" + File.separator + "input" + File.separator + "participants" + File.separator + "pv_input" + WecInput || "test_grid" + File.separator + "input" + File.separator + "participants" + File.separator + "wec_input" + ChpInput || "test_grid" + File.separator + "input" + File.separator + "participants" + File.separator + "chp_input" + BmInput || "test_grid" + File.separator + "input" + File.separator + "participants" + File.separator + "bm_input" + EvInput || "test_grid" + File.separator + "input" + File.separator + "participants" + File.separator + "ev_input" + LoadInput || "test_grid" + File.separator + "input" + File.separator + "participants" + File.separator + "load_input" + StorageInput || "test_grid" + File.separator + "input" + File.separator + "participants" + File.separator + "storage_input" + HpInput || "test_grid" + File.separator + "input" + File.separator + "participants" + File.separator + "hp_input" + EvcsInput || "test_grid" + File.separator + "input" + File.separator + "participants" + File.separator + "evcs_input" + } + + def "A FileNamingStrategy with DefaultHierarchy and without pre- or suffixes should return valid file paths for all input types models"() { + given: "a file naming strategy without pre- or suffixes" + def strategy = new FileNamingStrategy(simpleEntityNaming, defaultHierarchy) + + when: + def res = strategy.getFilePath(modelClass) + + then: + res.present + res.get() == expectedString + + where: + modelClass || expectedString + BmTypeInput || "test_grid" + File.separator + "input" + File.separator + "global" + File.separator + "bm_type_input" + ChpTypeInput || "test_grid" + File.separator + "input" + File.separator + "global" + File.separator + "chp_type_input" + EvTypeInput || "test_grid" + File.separator + "input" + File.separator + "global" + File.separator + "ev_type_input" + HpTypeInput || "test_grid" + File.separator + "input" + File.separator + "global" + File.separator + "hp_type_input" + LineTypeInput || "test_grid" + File.separator + "input" + File.separator + "global" + File.separator + "line_type_input" + StorageTypeInput || "test_grid" + File.separator + "input" + File.separator + "global" + File.separator + "storage_type_input" + Transformer2WTypeInput || "test_grid" + File.separator + "input" + File.separator + "global" + File.separator + "transformer_2_w_type_input" + Transformer3WTypeInput || "test_grid" + File.separator + "input" + File.separator + "global" + File.separator + "transformer_3_w_type_input" + WecTypeInput || "test_grid" + File.separator + "input" + File.separator + "global" + File.separator + "wec_type_input" + } + + def "A FileNamingStrategy with DefaultHierarchy and without pre- or suffixes should return valid directory path for a Load Parameter Model"() { + given: "a file naming strategy without pre- or suffixes" + def strategy = new FileNamingStrategy(simpleEntityNaming, defaultHierarchy) + + when: + def res = strategy.getDirectoryPath(modelClass) + + then: + res.present + res.get() == expectedString + + where: + modelClass || expectedString + RandomLoadParameters || "test_grid" + File.separator + "input" + File.separator + "global" + } + + def "A FileNamingStrategy with DefaultHierarchy and without pre- or suffixes should return valid file path for a Load Parameter Model"() { + given: "a file naming strategy without pre- or suffixes" + def strategy = new FileNamingStrategy(simpleEntityNaming, defaultHierarchy) + + when: + def res = strategy.getFilePath(modelClass) + + then: + res.present + res.get() == expectedString + + where: + modelClass || expectedString + RandomLoadParameters || "test_grid" + File.separator + "input" + File.separator + "global" + File.separator + "random_load_parameters_input" + } + + def "A FileNamingStrategy with DefaultHierarchy and without pre- or suffixes should return valid file paths for a graphic input Model"() { + given: "a file naming strategy without pre- or suffixes" + def strategy = new FileNamingStrategy(simpleEntityNaming, defaultHierarchy) + + when: + def res = strategy.getFilePath(modelClass) + + then: + res.present + res.get() == expectedString + + where: + modelClass || expectedString + NodeGraphicInput || "test_grid" + File.separator + "input" + File.separator + "graphics" + File.separator + "node_graphic_input" + LineGraphicInput || "test_grid" + File.separator + "input" + File.separator + "graphics" + File.separator + "line_graphic_input" + } + + def "A FileNamingStrategy with DefaultHierarchy and without pre- or suffix should return valid file path for individual time series"() { + given: + def strategy = new FileNamingStrategy(simpleEntityNaming, defaultHierarchy) + def entries = [ + new TimeBasedValue(ZonedDateTime.now(), new EnergyPriceValue(Quantities.getQuantity(500d, PowerSystemUnits.EURO_PER_MEGAWATTHOUR)))] as SortedSet + IndividualTimeSeries timeSeries = Mock(IndividualTimeSeries) + timeSeries.uuid >> uuid + timeSeries.entries >> entries + + when: + def actual = strategy.getFilePath(timeSeries) + + then: + actual.present + actual.get() == expectedFilePath + + where: + clazz | uuid || expectedFilePath + IndividualTimeSeries | UUID.fromString("4881fda2-bcee-4f4f-a5bb-6a09bf785276") || "test_grid" + File.separator + "input" + File.separator + "participants" + File.separator + "time_series" + File.separator + "its_c_4881fda2-bcee-4f4f-a5bb-6a09bf785276" + } + + def "A FileNamingStrategy with DefaultHierarchy and with pre- or suffix should return valid file path for individual time series"() { + given: + def strategy = new FileNamingStrategy(new EntityNamingStrategy("aa", "zz"), defaultHierarchy) + def entries = [ + new TimeBasedValue(ZonedDateTime.now(), new EnergyPriceValue(Quantities.getQuantity(500d, PowerSystemUnits.EURO_PER_MEGAWATTHOUR)))] as SortedSet + IndividualTimeSeries timeSeries = Mock(IndividualTimeSeries) + timeSeries.uuid >> uuid + timeSeries.entries >> entries + + when: + def actual = strategy.getFilePath(timeSeries) + + then: + actual.present + actual.get() == expectedFileName + + where: + clazz | uuid || expectedFileName + IndividualTimeSeries | UUID.fromString("4881fda2-bcee-4f4f-a5bb-6a09bf785276") || "test_grid" + File.separator + "input" + File.separator + "participants" + File.separator + "time_series" + File.separator + "aa_its_c_4881fda2-bcee-4f4f-a5bb-6a09bf785276_zz" + } + + def "A FileNamingStrategy with DefaultHierarchy and without pre- or suffix should return valid file path for load profile time series"() { + given: + def strategy = new FileNamingStrategy(simpleEntityNaming, defaultHierarchy) + def timeSeries = Mock(LoadProfileInput) + timeSeries.uuid >> uuid + timeSeries.type >> type + + when: + def actual = strategy.getFilePath(timeSeries) + + then: + actual.present + actual.get() == expectedFileName + + where: + clazz | uuid | type || expectedFileName + LoadProfileInput | UUID.fromString("bee0a8b6-4788-4f18-bf72-be52035f7304") | BdewLoadProfile.G3 || "test_grid" + File.separator + "input" + File.separator + "global" + File.separator + "lpts_g3_bee0a8b6-4788-4f18-bf72-be52035f7304" + } + + def "A FileNamingStrategy with DefaultHierarchy and without pre- or suffixes should return valid directory path for time series mapping"() { + given: "a file naming strategy without pre- or suffixes" + def strategy = new FileNamingStrategy(simpleEntityNaming, defaultHierarchy) + + when: + def res = strategy.getDirectoryPath(TimeSeriesMappingSource.MappingEntry) + + then: + res.present + res.get() == "test_grid" + File.separator + "input" + File.separator + "participants" + File.separator + "time_series" + } + + def "A FileNamingStrategy with DefaultHierarchy and without pre- or suffixes should return valid file path for time series mapping"() { + given: "a file naming strategy without pre- or suffixes" + def strategy = new FileNamingStrategy(simpleEntityNaming, defaultHierarchy) + + when: + def res = strategy.getFilePath(TimeSeriesMappingSource.MappingEntry) + + then: + res.present + res.get() == "test_grid" + File.separator + "input" + File.separator + "participants" + File.separator + "time_series" + File.separator + "time_series_mapping" + } + + def "A FileNamingStrategy with DefaultHierarchy and pre- and suffix should return valid file path for time series mapping"() { + given: "a file naming strategy without pre- or suffixes" + def strategy = new FileNamingStrategy(new EntityNamingStrategy("prefix", "suffix"), defaultHierarchy) + + when: + def res = strategy.getFilePath(TimeSeriesMappingSource.MappingEntry) + + then: + res.present + res.get() == "test_grid" + File.separator + "input" + File.separator + "participants" + File.separator + "time_series" + File.separator + "prefix_time_series_mapping_suffix" + } + + + // TESTS FOR FLAT HIERARCHY + + def "A FileNamingStrategy with FlatHierarchy does return empty sub directory path for any result class"() { + given: "a file naming strategy without pre- or suffixes" + def strategy = new FileNamingStrategy(simpleEntityNaming, flatHierarchy) + + when: + def actual = strategy.getDirectoryPath(modelClass as Class) + + then: + actual == expected + + where: + modelClass || expected + LoadResult || Optional.empty() + FixedFeedInResult || Optional.empty() + BmResult || Optional.empty() + PvResult || Optional.empty() + ChpResult || Optional.empty() + WecResult || Optional.empty() + StorageResult || Optional.empty() + EvcsResult || Optional.empty() + EvResult || Optional.empty() + Transformer2WResult || Optional.empty() + Transformer3WResult || Optional.empty() + LineResult || Optional.empty() + SwitchResult || Optional.empty() + NodeResult || Optional.empty() + CylindricalStorageResult || Optional.empty() + ThermalHouseResult || Optional.empty() + } + + def "A FileNamingStrategy with FlatHierarchy does return empty sub directory path for all input asset models"() { + given: "a naming strategy without pre- or suffixes" + def strategy = new FileNamingStrategy(simpleEntityNaming, flatHierarchy) + + when: + def actual = strategy.getDirectoryPath(modelClass as Class) + + then: + actual == expected + + where: + modelClass || expected + FixedFeedInInput || Optional.empty() + PvInput || Optional.empty() + WecInput || Optional.empty() + ChpInput || Optional.empty() + BmInput || Optional.empty() + EvInput || Optional.empty() + EvcsInput || Optional.empty() + LoadInput || Optional.empty() + StorageInput || Optional.empty() + HpInput || Optional.empty() + LineInput || Optional.empty() + SwitchInput || Optional.empty() + NodeInput || Optional.empty() + MeasurementUnitInput || Optional.empty() + Transformer2WInput || Optional.empty() + Transformer3WInput || Optional.empty() + CylindricalStorageInput || Optional.empty() + ThermalHouseInput || Optional.empty() + } + + def "A FileNamingStrategy with FlatHierarchy does return empty sub directory path for system type and model input classes"() { + given: "a file naming strategy without pre- or suffixes" + def strategy = new FileNamingStrategy(simpleEntityNaming, flatHierarchy) + + when: + def actual = strategy.getDirectoryPath(modelClass as Class) + + then: + actual == expected + + where: + modelClass || expected + BmTypeInput || Optional.empty() + ChpTypeInput || Optional.empty() + EvTypeInput || Optional.empty() + HpTypeInput || Optional.empty() + StorageTypeInput || Optional.empty() + WecTypeInput || Optional.empty() + LineTypeInput || Optional.empty() + Transformer2WTypeInput || Optional.empty() + Transformer3WTypeInput || Optional.empty() + } + + def "A FileNamingStrategy with FlatHierarchy does return empty sub directory path for graphics model input classes"() { + given: "a naming strategy without pre- or suffixes" + def strategy = new FileNamingStrategy(simpleEntityNaming, flatHierarchy) + + when: + def actual = strategy.getDirectoryPath(modelClass as Class) + + then: + actual == expected + + where: + modelClass || expected + NodeGraphicInput || Optional.empty() + LineGraphicInput || Optional.empty() + } + + def "A FileNamingStrategy with FlatHierarchy does return empty sub directory path for any other model classes"() { + given: "a naming strategy without pre- or suffixes" + def strategy = new FileNamingStrategy(simpleEntityNaming, flatHierarchy) + + when: + def actual = strategy.getDirectoryPath(modelClass as Class) + + then: + actual == expected + + where: + modelClass || expected + RandomLoadParameters || Optional.empty() + TimeSeriesMappingSource.MappingEntry || Optional.empty() + } + + def "A FileNamingStrategy with FlatHierarchy does return empty sub directory path for load profile time series"() { + given: "a naming strategy without pre- or suffixes" + def strategy = new FileNamingStrategy(simpleEntityNaming, flatHierarchy) + def timeSeries = Mock(LoadProfileInput) + + when: + def actual = strategy.getDirectoryPath(timeSeries) + + then: + actual == Optional.empty() + } + + def "A FileNamingStrategy with FlatHierarchy does return empty sub directory path for individual time series"() { + given: "a naming strategy without pre- or suffixes" + def strategy = new FileNamingStrategy(simpleEntityNaming, flatHierarchy) + def timeSeries = Mock(IndividualTimeSeries) + + when: + def actual = strategy.getDirectoryPath(timeSeries) + + then: + actual == Optional.empty() + } + + def "A FileNamingStrategy with FlatHierarchy and without pre- or suffixes should return valid file paths for all result classes"() { + given: "a naming strategy without pre- or suffixes" + def strategy = new FileNamingStrategy(simpleEntityNaming, flatHierarchy) + + when: + def res = strategy.getFilePath(modelClass as Class) + + then: + res.present + res.get() == expectedString + + where: + modelClass || expectedString + LoadResult || "load_res" + FixedFeedInResult || "fixed_feed_in_res" + BmResult || "bm_res" + PvResult || "pv_res" + ChpResult || "chp_res" + WecResult || "wec_res" + StorageResult || "storage_res" + EvcsResult || "evcs_res" + EvResult || "ev_res" + Transformer2WResult || "transformer_2_w_res" + Transformer3WResult || "transformer_3_w_res" + LineResult || "line_res" + SwitchResult || "switch_res" + NodeResult || "node_res" + CylindricalStorageResult || "cylindrical_storage_res" + ThermalHouseResult || "thermal_house_res" + } + + def "A FileNamingStrategy with FlatHierarchy and without pre- or suffixes should return valid file paths for all other system input classes"() { + given: "a naming strategy without pre- or suffixes" + def strategy = new FileNamingStrategy(simpleEntityNaming, flatHierarchy) + + when: + def res = strategy.getFilePath(modelClass as Class) + + then: + res.present + res.get() == expectedString + + where: + modelClass || expectedString + FixedFeedInInput || "fixed_feed_in_input" + PvInput || "pv_input" + WecInput || "wec_input" + ChpInput || "chp_input" + BmInput || "bm_input" + EvInput || "ev_input" + EvcsInput || "evcs_input" + LoadInput || "load_input" + StorageInput || "storage_input" + HpInput || "hp_input" + LineInput || "line_input" + SwitchInput || "switch_input" + NodeInput || "node_input" + MeasurementUnitInput || "measurement_unit_input" + Transformer2WInput || "transformer_2_w_input" + Transformer3WInput || "transformer_3_w_input" + CylindricalStorageInput || "cylindrical_storage_input" + ThermalHouseInput || "thermal_house_input" + } + + def "A FileNamingStrategy with FlatHierarchy and without pre- or suffixes should return valid file paths for all system characteristic and type input classes"() { + given: "a naming strategy without pre- or suffixes" + def strategy = new FileNamingStrategy(simpleEntityNaming, flatHierarchy) + + when: + def res = strategy.getFilePath(modelClass as Class) + + then: + res.present + res.get() == expectedString + + where: + modelClass || expectedString + BmTypeInput || "bm_type_input" + ChpTypeInput || "chp_type_input" + EvTypeInput || "ev_type_input" + HpTypeInput || "hp_type_input" + StorageTypeInput || "storage_type_input" + WecTypeInput || "wec_type_input" + LineTypeInput || "line_type_input" + Transformer2WTypeInput || "transformer_2_w_type_input" + Transformer3WTypeInput || "transformer_3_w_type_input" + } + + def "A FileNamingStrategy with FlatHierarchy and without pre- or suffixes should return valid file paths for all graphics input classes"() { + given: "a naming strategy without pre- or suffixes" + def strategy = new FileNamingStrategy(simpleEntityNaming, flatHierarchy) + + when: + def res = strategy.getFilePath(modelClass as Class) + + then: + res.present + res.get() == expectedString + + where: + modelClass || expectedString + NodeGraphicInput || "node_graphic_input" + LineGraphicInput || "line_graphic_input" + } + + def "A FileNamingStrategy with FlatHierarchy does return valid file path for load profile time series"() { + given: "a naming strategy without pre- or suffixes" + def strategy = new FileNamingStrategy(simpleEntityNaming, flatHierarchy) + def timeSeries = Mock(LoadProfileInput) + timeSeries.uuid >> uuid + timeSeries.type >> type + + when: + def actual = strategy.getFilePath(timeSeries) + + then: + actual.present + actual.get() == expectedFilePath + + where: + clazz | uuid | type || expectedFilePath + LoadProfileInput | UUID.fromString("bee0a8b6-4788-4f18-bf72-be52035f7304") | BdewLoadProfile.G3 || "lpts_g3_bee0a8b6-4788-4f18-bf72-be52035f7304" + } + + def "A FileNamingStrategy with FlatHierarchy does return valid file path for individual time series"() { + given: "a naming strategy without pre- or suffixes" + def strategy = new FileNamingStrategy(simpleEntityNaming, flatHierarchy) + def entries = [ + new TimeBasedValue(ZonedDateTime.now(), new EnergyPriceValue(Quantities.getQuantity(500d, PowerSystemUnits.EURO_PER_MEGAWATTHOUR)))] as SortedSet + def timeSeries = Mock(IndividualTimeSeries) + timeSeries.uuid >> uuid + timeSeries.entries >> entries + + when: + def actual = strategy.getFilePath(timeSeries) + + then: + actual.present + actual.get() == expectedFilePath + + where: + clazz | uuid || expectedFilePath + IndividualTimeSeries | UUID.fromString("4881fda2-bcee-4f4f-a5bb-6a09bf785276") || "its_c_4881fda2-bcee-4f4f-a5bb-6a09bf785276" + } + + + //TODO: Fix me! + def "A FileNamingStrategy with DefaultHierarchy returns correct individual time series file name pattern"() { + given: "a naming strategy without pre- or suffixes" + def strategy = new FileNamingStrategy(simpleEntityNaming, defaultHierarchy) + + when: + def actual = strategy.getIndividualTimeSeriesPattern() + + then: + actual == "test_grid" + File.separator + "input" + File.separator + "participants" + File.separator + "time_series" + File.separator + "its_(?[a-zA-Z]{1,11})_(?[a-zA-Z0-9]{8}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{12})" + } + + //TODO: Fix me! + def "A FileNamingStrategy with DefaultHierarchy returns correct load profile time series file name pattern"() { + given: "a naming strategy without pre- or suffixes" + def strategy = new FileNamingStrategy(simpleEntityNaming, defaultHierarchy) + + when: + def actual = strategy.getLoadProfileTimeSeriesPattern() + + then: + actual == "test_grid" + File.separator + "input" + File.separator + "global" + File.separator + "lpts_(?[a-zA-Z][0-9])_(?[a-zA-Z0-9]{8}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{12})" + } - then: - filePath.present - filePath.get() == expectedString - where: - modelClass || expectedString - LoadResult || "test_grid" + File.separator + "results" + File.separator + "participants" + File.separator + "prefix_load_res_suffix" + ".TXT" - } + def "A FileNamingStrategy with FlatHierarchy returns correct individual time series file name pattern"() { + given: "a naming strategy without pre- or suffixes" + def strategy = new FileNamingStrategy(simpleEntityNaming, flatHierarchy) - def "The FileNamingStrategy ... flat"() { - given: - def ens = new EntityPersistenceNamingStrategy("prefix", "suffix") - def fns = new FileNamingStrategy(ens) + when: + def actual = strategy.getIndividualTimeSeriesPattern() - when: - def filePath = fns.getFilePath(LoadResult) + then: + actual.toString() == "its_(?[a-zA-Z]{1,11})_(?[a-zA-Z0-9]{8}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{12})" + } - then: - filePath.present - filePath.get() == expectedString + def "A FileNamingStrategy with FlatHierarchy returns correct load profile time series file name pattern"() { + given: "a naming strategy without pre- or suffixes" + def strategy = new FileNamingStrategy(simpleEntityNaming, flatHierarchy) - where: - modelClass || expectedString - LoadResult || "prefix_load_res_suffix" + ".csv" - } + when: + def actual = strategy.getLoadProfileTimeSeriesPattern() + then: + actual.toString() == "lpts_(?[a-zA-Z][0-9])_(?[a-zA-Z0-9]{8}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{12})" + } } \ No newline at end of file diff --git a/src/test/groovy/edu/ie3/datamodel/io/connectors/CsvFileConnectorTest.groovy b/src/test/groovy/edu/ie3/datamodel/io/connectors/CsvFileConnectorTest.groovy index 8b73dabcf..7166f7b09 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/connectors/CsvFileConnectorTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/connectors/CsvFileConnectorTest.groovy @@ -10,7 +10,7 @@ import edu.ie3.datamodel.io.csv.CsvFileDefinition import edu.ie3.datamodel.io.csv.DefaultDirectoryHierarchy import edu.ie3.datamodel.io.naming.HierarchicFileNamingStrategy import edu.ie3.datamodel.io.csv.timeseries.ColumnScheme -import edu.ie3.datamodel.io.naming.EntityPersistenceNamingStrategy +import edu.ie3.datamodel.io.naming.EntityNamingStrategy import edu.ie3.datamodel.models.StandardUnits import edu.ie3.datamodel.models.input.NodeInput import edu.ie3.datamodel.models.timeseries.individual.IndividualTimeSeries @@ -45,7 +45,7 @@ class CsvFileConnectorTest extends Specification { def setupSpec() { tmpDirectory = Files.createTempDirectory("psdm_csv_file_connector_") - cfc = new CsvFileConnector(tmpDirectory.toString(), new EntityPersistenceNamingStrategy()) + cfc = new CsvFileConnector(tmpDirectory.toString(), new EntityNamingStrategy()) def gridPaths = ["node_input.csv"] timeSeriesPaths = [ "its_pq_53990eea-1b5d-47e8-9134-6d8de36604bf.csv", @@ -211,7 +211,7 @@ class CsvFileConnectorTest extends Specification { def "The csv file connector is able to init writers utilizing no directory hierarchy"() { given: "a suitable connector" def baseDirectory = FilenameUtils.concat(tmpDirectory.toString(), "directoryHierarchy") - def entityPersistenceNamingStrategy = new EntityPersistenceNamingStrategy() + def entityPersistenceNamingStrategy = new EntityNamingStrategy() def connector = new CsvFileConnector(baseDirectory, entityPersistenceNamingStrategy) and: "expected results" @@ -230,7 +230,7 @@ class CsvFileConnectorTest extends Specification { def "The csv file connector throws ConnectorException if no csv file definition can be built from class information"() { given: def baseDirectory = tmpDirectory.toString() - def entityPersistenceNamingStrategy = new EntityPersistenceNamingStrategy() + def entityPersistenceNamingStrategy = new EntityNamingStrategy() def connector = new CsvFileConnector(baseDirectory, entityPersistenceNamingStrategy) when: @@ -244,7 +244,7 @@ class CsvFileConnectorTest extends Specification { def "The csv file connector is able to build correct csv file definition from class upon request"() { given: def baseDirectory = tmpDirectory.toString() - def entityPersistenceNamingStrategy = new EntityPersistenceNamingStrategy() + def entityPersistenceNamingStrategy = new EntityNamingStrategy() def connector = new CsvFileConnector(baseDirectory, entityPersistenceNamingStrategy) def expected = new CsvFileDefinition("node_input.csv", "", ["a", "b", "c"] as String[], ",") @@ -272,7 +272,7 @@ class CsvFileConnectorTest extends Specification { def "The csv file connector throws ConnectorException if no csv file definition can be built from time series"() { given: "a suitable connector" def baseDirectory = tmpDirectory.toString() - def entityPersistenceNamingStrategy = new EntityPersistenceNamingStrategy() + def entityPersistenceNamingStrategy = new EntityNamingStrategy() def connector = new CsvFileConnector(baseDirectory, entityPersistenceNamingStrategy) and: "credible input" @@ -289,7 +289,7 @@ class CsvFileConnectorTest extends Specification { def "The csv file connector is able to build correct csv file definition from time series upon request"() { given: "a suitable connector" def baseDirectory = tmpDirectory.toString() - def entityPersistenceNamingStrategy = new EntityPersistenceNamingStrategy() + def entityPersistenceNamingStrategy = new EntityNamingStrategy() def connector = new CsvFileConnector(baseDirectory, entityPersistenceNamingStrategy) def expected = new CsvFileDefinition("its_c_0c03ce9f-ab0e-4715-bc13-f9d903f26dbf.csv", "", ["a", "b", "c"] as String[], ",") diff --git a/src/test/groovy/edu/ie3/datamodel/io/csv/FlatDirectoryHierarchyTest.groovy b/src/test/groovy/edu/ie3/datamodel/io/csv/FlatDirectoryHierarchyTest.groovy new file mode 100644 index 000000000..7f41816e0 --- /dev/null +++ b/src/test/groovy/edu/ie3/datamodel/io/csv/FlatDirectoryHierarchyTest.groovy @@ -0,0 +1,109 @@ +/* + * © 2021. TU Dortmund University, + * Institute of Energy Systems, Energy Efficiency and Energy Economics, + * Research group Distribution grid planning and operation + */ +package edu.ie3.datamodel.io.csv + +import edu.ie3.datamodel.exceptions.FileException +import edu.ie3.util.io.FileIOUtils +import org.apache.commons.io.FilenameUtils +import org.testcontainers.shaded.org.bouncycastle.util.test.TestFailedException +import spock.lang.Shared +import spock.lang.Specification + +import java.nio.file.Files +import java.nio.file.Path +import java.nio.file.Paths +import java.util.stream.Collectors +import java.util.stream.Stream + +class FlatDirectoryHierarchyTest extends Specification { + @Shared + Path tmpDirectory + + def setup() { + tmpDirectory = Files.createTempDirectory("psdm_flat_input_hierarchy") + } + + def basePathString(String gridName) { + FilenameUtils.concat(tmpDirectory.toString(), gridName) + } + + def cleanup() { + FileIOUtils.deleteRecursively(tmpDirectory) + } + + def "A FlatDirectoryHierarchy is set up correctly"() { + given: + def gridName = "test_grid" + def basePath = basePathString(gridName) + + when: + def fdh = new FlatDirectoryHierarchy(tmpDirectory.toString(), gridName) + + then: + try { + fdh.projectDirectory == Paths.get(basePath) + } catch (TestFailedException e) { + FileIOUtils.deleteRecursively(tmpDirectory) + throw e + } + } + + def "A FlatDirectoryHierarchy is able to create a correct flat hierarchy of directories"() { + given: + def gridName = "test_grid" + def basePath = Paths.get(basePathString(gridName)) + def fdh = new FlatDirectoryHierarchy(tmpDirectory.toString(), gridName) + + when: + fdh.createDirs() + + then: + Files.exists(basePath) + Files.isDirectory(basePath) + } + + def "A FlatDirectoryHierarchy is able to validate a correct hierarchy of mandatory and optional directories"() { + given: + def gridName = "test_grid" + def fdh = new FlatDirectoryHierarchy(tmpDirectory.toString(), gridName) + fdh.createDirs() + + when: + fdh.validate() + + then: + noExceptionThrown() + } + + def "A FlatDirectoryHierarchy throws an exception when trying to validate a missing hierarchy of mandatory and optional directories"() { + given: + def gridName = "test_grid" + def basePath = Paths.get(basePathString(gridName)) + def fdh = new FlatDirectoryHierarchy(tmpDirectory.toString(), gridName) + + when: + fdh.validate() + + then: + def ex = thrown(FileException) + ex.message == "The path '" + basePath + "' does not exist." + } + + def "A FlatDirectoryHierarchy throws an exception when trying to validate a file instead of a hierarchy"() { + given: + def gridName = "test_grid" + def basePath = Paths.get(basePathString(gridName)) + def fdh = new FlatDirectoryHierarchy(tmpDirectory.toString(), gridName) + Files.createFile(basePath) + + when: + fdh.validate() + + then: + def ex = thrown(FileException) + ex.message == "The path '" + basePath + "' has to be a directory." + } +} diff --git a/src/test/groovy/edu/ie3/datamodel/io/naming/EntityPersistenceNamingStrategyTest.groovy b/src/test/groovy/edu/ie3/datamodel/io/naming/EntityNamingStrategyTest.groovy similarity index 59% rename from src/test/groovy/edu/ie3/datamodel/io/naming/EntityPersistenceNamingStrategyTest.groovy rename to src/test/groovy/edu/ie3/datamodel/io/naming/EntityNamingStrategyTest.groovy index f8c3d9672..1972f3055 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/naming/EntityPersistenceNamingStrategyTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/naming/EntityNamingStrategyTest.groovy @@ -71,11 +71,11 @@ import java.nio.file.Paths import java.time.ZonedDateTime import java.util.regex.Pattern -class EntityPersistenceNamingStrategyTest extends Specification { +class EntityNamingStrategyTest extends Specification { def "The uuid pattern actually matches a valid uuid"() { given: - def pattern = Pattern.compile(EntityPersistenceNamingStrategy.UUID_STRING) + def pattern = Pattern.compile(EntityNamingStrategy.UUID_STRING) def uuidString = UUID.randomUUID().toString() when: @@ -87,7 +87,7 @@ class EntityPersistenceNamingStrategyTest extends Specification { def "The pattern for an individual time series file name actually matches a valid file name and extracts the correct groups"() { given: - def fns = new EntityPersistenceNamingStrategy() + def fns = new EntityNamingStrategy() def validFileName = "its_c_4881fda2-bcee-4f4f-a5bb-6a09bf785276" when: @@ -106,7 +106,7 @@ class EntityPersistenceNamingStrategyTest extends Specification { def "The pattern for a repetitive load profile time series file name actually matches a valid file name and extracts the correct groups"() { given: - def fns = new EntityPersistenceNamingStrategy() + def fns = new EntityNamingStrategy() def validFileName = "lpts_g3_bee0a8b6-4788-4f18-bf72-be52035f7304" when: @@ -125,7 +125,7 @@ class EntityPersistenceNamingStrategyTest extends Specification { def "Trying to extract time series meta information throws an Exception, if it is provided a malformed string"() { given: - def fns = new EntityPersistenceNamingStrategy() + def fns = new EntityNamingStrategy() def path = Paths.get("/bla/foo") when: @@ -138,7 +138,7 @@ class EntityPersistenceNamingStrategyTest extends Specification { def "Trying to extract individual time series meta information throws an Exception, if it is provided a malformed string"() { given: - def fns = new EntityPersistenceNamingStrategy() + def fns = new EntityNamingStrategy() def fileName = "foo" when: @@ -151,7 +151,7 @@ class EntityPersistenceNamingStrategyTest extends Specification { def "Trying to extract load profile time series meta information throws an Exception, if it is provided a malformed string"() { given: - def fns = new EntityPersistenceNamingStrategy() + def fns = new EntityNamingStrategy() def fileName = "foo" when: @@ -164,7 +164,7 @@ class EntityPersistenceNamingStrategyTest extends Specification { def "The EntityPersistenceNamingStrategy extracts correct meta information from a valid individual time series file name"() { given: - def fns = new EntityPersistenceNamingStrategy() + def fns = new EntityNamingStrategy() def path = Paths.get(pathString) when: @@ -190,7 +190,7 @@ class EntityPersistenceNamingStrategyTest extends Specification { def "The EntityPersistenceNamingStrategy extracts correct meta information from a valid individual time series file name with pre- and suffix"() { given: - def fns = new EntityPersistenceNamingStrategy("prefix", "suffix") + def fns = new EntityNamingStrategy("prefix", "suffix") def path = Paths.get(pathString) when: @@ -216,7 +216,7 @@ class EntityPersistenceNamingStrategyTest extends Specification { def "The EntityPersistenceNamingStrategy throw an IllegalArgumentException, if the column scheme is malformed."() { given: - def fns = new EntityPersistenceNamingStrategy() + def fns = new EntityNamingStrategy() def path = Paths.get("/bla/foo/its_whoops_4881fda2-bcee-4f4f-a5bb-6a09bf785276.csv") when: @@ -229,7 +229,7 @@ class EntityPersistenceNamingStrategyTest extends Specification { def "The EntityPersistenceNamingStrategy extracts correct meta information from a valid load profile time series file name"() { given: - def fns = new EntityPersistenceNamingStrategy() + def fns = new EntityNamingStrategy() def path = Paths.get("/bla/foo/lpts_g3_bee0a8b6-4788-4f18-bf72-be52035f7304.csv") when: @@ -245,7 +245,7 @@ class EntityPersistenceNamingStrategyTest extends Specification { def "The EntityPersistenceNamingStrategy extracts correct meta information from a valid load profile time series file name with pre- and suffix"() { given: - def fns = new EntityPersistenceNamingStrategy("prefix", "suffix") + def fns = new EntityNamingStrategy("prefix", "suffix") def path = Paths.get("/bla/foo/prefix_lpts_g3_bee0a8b6-4788-4f18-bf72-be52035f7304_suffix.csv") when: @@ -261,7 +261,7 @@ class EntityPersistenceNamingStrategyTest extends Specification { def "The EntityPersistenceNamingStrategy is able to prepare the prefix properly"() { when: - String actual = EntityPersistenceNamingStrategy.preparePrefix(prefix) + String actual = EntityNamingStrategy.preparePrefix(prefix) then: actual == expected @@ -278,7 +278,7 @@ class EntityPersistenceNamingStrategyTest extends Specification { def "The EntityPersistenceNamingStrategy is able to prepare the suffix properly"() { when: - String actual = EntityPersistenceNamingStrategy.prepareSuffix(prefix) + String actual = EntityNamingStrategy.prepareSuffix(prefix) then: actual == suffix @@ -295,7 +295,7 @@ class EntityPersistenceNamingStrategyTest extends Specification { def "A EntityPersistenceNamingStrategy should recognize if empty strings are passed in the prefix/suffix constructor and don't add underlines then"() { given: "a naming strategy" - EntityPersistenceNamingStrategy strategy = new EntityPersistenceNamingStrategy("", "") + EntityNamingStrategy strategy = new EntityNamingStrategy("", "") expect: strategy.prefix == "" @@ -304,7 +304,7 @@ class EntityPersistenceNamingStrategyTest extends Specification { def "A EntityPersistenceNamingStrategy should correctly append and prepend underscores"() { given: "a naming strategy" - EntityPersistenceNamingStrategy strategy = new EntityPersistenceNamingStrategy("bla", "foo") + EntityNamingStrategy strategy = new EntityNamingStrategy("bla", "foo") expect: strategy.prefix == "bla_" @@ -313,7 +313,7 @@ class EntityPersistenceNamingStrategyTest extends Specification { def "A EntityPersistenceNamingStrategy should correctly append underscore, when only prefix is set"() { given: "a naming strategy" - EntityPersistenceNamingStrategy strategy = new EntityPersistenceNamingStrategy("bla") + EntityNamingStrategy strategy = new EntityNamingStrategy("bla") expect: strategy.prefix == "bla_" @@ -322,7 +322,7 @@ class EntityPersistenceNamingStrategyTest extends Specification { def "A EntityPersistenceNamingStrategy should return an empty optional on a invalid class"() { given: "a naming strategy" - EntityPersistenceNamingStrategy strategy = new EntityPersistenceNamingStrategy() + EntityNamingStrategy strategy = new EntityNamingStrategy() when: Optional res = strategy.getEntityName(String) @@ -333,7 +333,7 @@ class EntityPersistenceNamingStrategyTest extends Specification { def "A EntityPersistenceNamingStrategy without pre- or suffixes should return valid strings for all result models"() { given: "a naming strategy without pre- or suffixes" - EntityPersistenceNamingStrategy strategy = new EntityPersistenceNamingStrategy() + EntityNamingStrategy strategy = new EntityNamingStrategy() when: Optional res = strategy.getEntityName(modelClass) @@ -364,7 +364,7 @@ class EntityPersistenceNamingStrategyTest extends Specification { def "A EntityPersistenceNamingStrategy with pre- and suffixes should return valid strings for all result models"() { given: "a naming strategy with pre- or suffixes" - EntityPersistenceNamingStrategy strategy = new EntityPersistenceNamingStrategy("prefix", "suffix") + EntityNamingStrategy strategy = new EntityNamingStrategy("prefix", "suffix") when: Optional res = strategy.getEntityName(modelClass) @@ -395,7 +395,7 @@ class EntityPersistenceNamingStrategyTest extends Specification { def "A EntityPersistenceNamingStrategy without pre- or suffixes should return valid strings for all input assets models"() { given: "a naming strategy without pre- or suffixes" - EntityPersistenceNamingStrategy strategy = new EntityPersistenceNamingStrategy() + EntityNamingStrategy strategy = new EntityNamingStrategy() when: Optional res = strategy.getEntityName(modelClass) @@ -428,7 +428,7 @@ class EntityPersistenceNamingStrategyTest extends Specification { def "A EntityPersistenceNamingStrategy without pre- or suffixes should return valid strings for all input types models"() { given: "a naming strategy without pre- or suffixes" - EntityPersistenceNamingStrategy strategy = new EntityPersistenceNamingStrategy() + EntityNamingStrategy strategy = new EntityNamingStrategy() when: Optional res = strategy.getEntityName(modelClass) @@ -453,7 +453,7 @@ class EntityPersistenceNamingStrategyTest extends Specification { def "A EntityPersistenceNamingStrategy without pre- or suffixes should return valid strings for a Load Parameter Model"() { given: "a naming strategy without pre- or suffixes" - EntityPersistenceNamingStrategy strategy = new EntityPersistenceNamingStrategy() + EntityNamingStrategy strategy = new EntityNamingStrategy() when: Optional res = strategy.getEntityName(modelClass) @@ -469,7 +469,7 @@ class EntityPersistenceNamingStrategyTest extends Specification { def "A EntityPersistenceNamingStrategy without pre- or suffixes should return valid strings for a graphic input Model"() { given: "a naming strategy without pre- or suffixes" - EntityPersistenceNamingStrategy strategy = new EntityPersistenceNamingStrategy() + EntityNamingStrategy strategy = new EntityNamingStrategy() when: Optional res = strategy.getEntityName(modelClass) @@ -486,7 +486,7 @@ class EntityPersistenceNamingStrategyTest extends Specification { def "A EntityPersistenceNamingStrategy without pre- or suffix should return empty Optional, if the content of the time series is not covered"() { given: - EntityPersistenceNamingStrategy strategy = new EntityPersistenceNamingStrategy() + EntityNamingStrategy strategy = new EntityNamingStrategy() def entries = [ new TimeBasedValue(ZonedDateTime.now(), new IntValue(5)) ] as SortedSet @@ -503,7 +503,7 @@ class EntityPersistenceNamingStrategyTest extends Specification { def "A EntityPersistenceNamingStrategy without pre- or suffix should return empty Optional, if the time series is empty"() { given: - EntityPersistenceNamingStrategy strategy = new EntityPersistenceNamingStrategy() + EntityNamingStrategy strategy = new EntityNamingStrategy() def entries = [] as SortedSet IndividualTimeSeries timeSeries = Mock(IndividualTimeSeries) timeSeries.uuid >> UUID.randomUUID() @@ -518,7 +518,7 @@ class EntityPersistenceNamingStrategyTest extends Specification { def "A EntityPersistenceNamingStrategy without pre- or suffix should return valid file name for individual time series" () { given: - EntityPersistenceNamingStrategy strategy = new EntityPersistenceNamingStrategy() + EntityNamingStrategy strategy = new EntityNamingStrategy() def entries = [ new TimeBasedValue(ZonedDateTime.now(), new EnergyPriceValue(Quantities.getQuantity(500d, PowerSystemUnits.EURO_PER_MEGAWATTHOUR)))] as SortedSet IndividualTimeSeries timeSeries = Mock(IndividualTimeSeries) @@ -539,7 +539,7 @@ class EntityPersistenceNamingStrategyTest extends Specification { def "A EntityPersistenceNamingStrategy with pre- or suffix should return valid file name for individual time series" () { given: - EntityPersistenceNamingStrategy strategy = new EntityPersistenceNamingStrategy("aa", "zz") + EntityNamingStrategy strategy = new EntityNamingStrategy("aa", "zz") def entries = [] as SortedSet entries.add(new TimeBasedValue(ZonedDateTime.now(), new EnergyPriceValue(Quantities.getQuantity(500d, PowerSystemUnits.EURO_PER_MEGAWATTHOUR)))) IndividualTimeSeries timeSeries = Mock(IndividualTimeSeries) @@ -560,7 +560,7 @@ class EntityPersistenceNamingStrategyTest extends Specification { def "A EntityPersistenceNamingStrategy without pre- or suffix should return valid file name for load profile input" () { given: - EntityPersistenceNamingStrategy strategy = new EntityPersistenceNamingStrategy() + EntityNamingStrategy strategy = new EntityNamingStrategy() LoadProfileInput timeSeries = Mock(LoadProfileInput) timeSeries.uuid >> uuid timeSeries.type >> type @@ -579,7 +579,7 @@ class EntityPersistenceNamingStrategyTest extends Specification { def "A EntityPersistenceNamingStrategy returns empty Optional, when there is no naming defined for a given time series class"() { given: - EntityPersistenceNamingStrategy entityPersistenceNamingStrategy = new EntityPersistenceNamingStrategy() + EntityNamingStrategy entityPersistenceNamingStrategy = new EntityNamingStrategy() RepetitiveTimeSeries timeSeries = Mock(RepetitiveTimeSeries) when: @@ -591,7 +591,7 @@ class EntityPersistenceNamingStrategyTest extends Specification { def "A EntityPersistenceNamingStrategy without pre- or suffixes should return valid strings for time series mapping"() { given: "a naming strategy without pre- or suffixes" - EntityPersistenceNamingStrategy strategy = new EntityPersistenceNamingStrategy() + EntityNamingStrategy strategy = new EntityNamingStrategy() when: Optional res = strategy.getEntityName(TimeSeriesMappingSource.MappingEntry) @@ -603,7 +603,7 @@ class EntityPersistenceNamingStrategyTest extends Specification { def "A EntityPersistenceNamingStrategy with pre- and suffix should return valid strings for time series mapping"() { given: "a naming strategy without pre- or suffixes" - EntityPersistenceNamingStrategy strategy = new EntityPersistenceNamingStrategy("prefix", "suffix") + EntityNamingStrategy strategy = new EntityNamingStrategy("prefix", "suffix") when: Optional res = strategy.getEntityName(TimeSeriesMappingSource.MappingEntry) @@ -612,363 +612,4 @@ class EntityPersistenceNamingStrategyTest extends Specification { res.present res.get() == "prefix_time_series_mapping_suffix" } - - def "A simple file naming strategy does return empty sub directory path for system type and characteristic model input classes"() { - given: "a naming strategy without pre- or suffixes" - def strategy = new EntityPersistenceNamingStrategy() - - when: - def actual = strategy.getDirectoryPath(modelClass as Class) - - then: - actual == expected - - where: - modelClass || expected - BmTypeInput || Optional.empty() - ChpTypeInput || Optional.empty() - EvTypeInput || Optional.empty() - HpTypeInput || Optional.empty() - StorageTypeInput || Optional.empty() - WecTypeInput || Optional.empty() - } - - def "A simple file naming strategy does return empty sub directory path for other system model input classes"() { - given: "a naming strategy without pre- or suffixes" - def strategy = new EntityPersistenceNamingStrategy() - - when: - def actual = strategy.getDirectoryPath(modelClass as Class) - - then: - actual == expected - - where: - modelClass || expected - FixedFeedInInput || Optional.empty() - PvInput || Optional.empty() - WecInput || Optional.empty() - ChpInput || Optional.empty() - BmInput || Optional.empty() - EvInput || Optional.empty() - LoadInput || Optional.empty() - StorageInput || Optional.empty() - HpInput || Optional.empty() - EvcsInput || Optional.empty() - } - - def "A simple file naming strategy does return empty sub directory path for connector model input classes"() { - given: "a naming strategy without pre- or suffixes" - def strategy = new EntityPersistenceNamingStrategy() - - when: - def actual = strategy.getDirectoryPath(modelClass as Class) - - then: - actual == expected - - where: - modelClass || expected - LineInput || Optional.empty() - SwitchInput || Optional.empty() - Transformer2WInput || Optional.empty() - Transformer3WInput || Optional.empty() - LineTypeInput || Optional.empty() - Transformer2WTypeInput || Optional.empty() - Transformer3WTypeInput || Optional.empty() - } - - def "A simple file naming strategy does return empty sub directory path for graphics model input classes"() { - given: "a naming strategy without pre- or suffixes" - def strategy = new EntityPersistenceNamingStrategy() - - when: - def actual = strategy.getDirectoryPath(modelClass as Class) - - then: - actual == expected - - where: - modelClass || expected - NodeGraphicInput || Optional.empty() - LineGraphicInput || Optional.empty() - } - - def "A simple file naming strategy does return empty sub directory path for thermal model input classes"() { - given: "a naming strategy without pre- or suffixes" - def strategy = new EntityPersistenceNamingStrategy() - - when: - def actual = strategy.getDirectoryPath(modelClass as Class) - - then: - actual == expected - - where: - modelClass || expected - CylindricalStorageInput || Optional.empty() - ThermalHouseInput || Optional.empty() - } - - def "A simple file naming strategy does return empty sub directory path for any other model classes"() { - given: "a naming strategy without pre- or suffixes" - def strategy = new EntityPersistenceNamingStrategy() - - when: - def actual = strategy.getDirectoryPath(modelClass as Class) - - then: - actual == expected - - where: - modelClass || expected - NodeInput || Optional.empty() - MeasurementUnitInput || Optional.empty() - RandomLoadParameters || Optional.empty() - TimeSeriesMappingSource.MappingEntry || Optional.empty() - } - - def "A simple file naming strategy does return empty sub directory path for any result class"() { - given: "a naming strategy without pre- or suffixes" - def strategy = new EntityPersistenceNamingStrategy() - - when: - def actual = strategy.getDirectoryPath(modelClass as Class) - - then: - actual == expected - - where: - modelClass || expected - LoadResult || Optional.empty() - FixedFeedInResult || Optional.empty() - BmResult || Optional.empty() - PvResult || Optional.empty() - ChpResult || Optional.empty() - WecResult || Optional.empty() - StorageResult || Optional.empty() - EvcsResult || Optional.empty() - EvResult || Optional.empty() - Transformer2WResult || Optional.empty() - Transformer3WResult || Optional.empty() - LineResult || Optional.empty() - SwitchResult || Optional.empty() - NodeResult || Optional.empty() - CylindricalStorageResult || Optional.empty() - ThermalHouseResult || Optional.empty() - } - - def "A simple file naming strategy does return empty sub directory path for load profile time series"() { - given: "a naming strategy without pre- or suffixes" - def strategy = new EntityPersistenceNamingStrategy() - def timeSeries = Mock(LoadProfileInput) - - when: - def actual = strategy.getDirectoryPath(timeSeries) - - then: - actual == Optional.empty() - } - - def "A simple file naming strategy does return empty sub directory path for individual time series"() { - given: "a naming strategy without pre- or suffixes" - def strategy = new EntityPersistenceNamingStrategy() - def timeSeries = Mock(IndividualTimeSeries) - - when: - def actual = strategy.getDirectoryPath(timeSeries) - - then: - actual == Optional.empty() - } - - def "A EntityPersistenceNamingStrategy without pre- or suffixes should return valid file paths for all connector input classes"() { - given: "a naming strategy without pre- or suffixes" - def strategy = new EntityPersistenceNamingStrategy() - - when: - def res = strategy.getFilePath(modelClass as Class) - - then: - res.present - res.get() == expectedString - - where: - modelClass || expectedString - LineInput || "line_input" - SwitchInput || "switch_input" - Transformer2WInput || "transformer_2_w_input" - Transformer3WInput || "transformer_3_w_input" - LineTypeInput || "line_type_input" - Transformer2WTypeInput || "transformer_2_w_type_input" - Transformer3WTypeInput || "transformer_3_w_type_input" - } - - def "A EntityPersistenceNamingStrategy without pre- or suffixes should return valid file paths for all graphics input classes"() { - given: "a naming strategy without pre- or suffixes" - def strategy = new EntityPersistenceNamingStrategy() - - when: - def res = strategy.getFilePath(modelClass as Class) - - then: - res.present - res.get() == expectedString - - where: - modelClass || expectedString - NodeGraphicInput || "node_graphic_input" - LineGraphicInput || "line_graphic_input" - } - - def "A EntityPersistenceNamingStrategy without pre- or suffixes should return valid file paths for all thermal input classes"() { - given: "a naming strategy without pre- or suffixes" - def strategy = new EntityPersistenceNamingStrategy() - - when: - def res = strategy.getFilePath(modelClass as Class) - - then: - res.present - res.get() == expectedString - - where: - modelClass || expectedString - CylindricalStorageInput || "cylindrical_storage_input" - ThermalHouseInput || "thermal_house_input" - } - - def "A EntityPersistenceNamingStrategy without pre- or suffixes should return valid file paths for all system characteristic and type input classes"() { - given: "a naming strategy without pre- or suffixes" - def strategy = new EntityPersistenceNamingStrategy() - - when: - def res = strategy.getFilePath(modelClass as Class) - - then: - res.present - res.get() == expectedString - - where: - modelClass || expectedString - BmTypeInput || "bm_type_input" - ChpTypeInput || "chp_type_input" - EvTypeInput || "ev_type_input" - HpTypeInput || "hp_type_input" - StorageTypeInput || "storage_type_input" - WecTypeInput || "wec_type_input" - } - - def "A EntityPersistenceNamingStrategy without pre- or suffixes should return valid file paths for all other system input classes"() { - given: "a naming strategy without pre- or suffixes" - def strategy = new EntityPersistenceNamingStrategy() - - when: - def res = strategy.getFilePath(modelClass as Class) - - then: - res.present - res.get() == expectedString - - where: - modelClass || expectedString - FixedFeedInInput || "fixed_feed_in_input" - PvInput || "pv_input" - WecInput || "wec_input" - ChpInput || "chp_input" - BmInput || "bm_input" - EvInput || "ev_input" - LoadInput || "load_input" - StorageInput || "storage_input" - HpInput || "hp_input" - EvcsInput || "evcs_input" - } - - def "A EntityPersistenceNamingStrategy without pre- or suffixes should return valid file paths for all other input classes"() { - given: "a naming strategy without pre- or suffixes" - def strategy = new EntityPersistenceNamingStrategy() - - when: - def res = strategy.getFilePath(modelClass as Class) - - then: - res.present - res.get() == expectedString - - where: - modelClass || expectedString - NodeInput || "node_input" - MeasurementUnitInput || "measurement_unit_input" - } - - def "A EntityPersistenceNamingStrategy without pre- or suffixes should return valid file paths for all result classes"() { - given: "a naming strategy without pre- or suffixes" - def strategy = new EntityPersistenceNamingStrategy() - - when: - def res = strategy.getFilePath(modelClass as Class) - - then: - res.present - res.get() == expectedString - - where: - modelClass || expectedString - LoadResult || "load_res" - FixedFeedInResult || "fixed_feed_in_res" - BmResult || "bm_res" - PvResult || "pv_res" - ChpResult || "chp_res" - WecResult || "wec_res" - StorageResult || "storage_res" - EvcsResult || "evcs_res" - EvResult || "ev_res" - Transformer2WResult || "transformer_2_w_res" - Transformer3WResult || "transformer_3_w_res" - LineResult || "line_res" - SwitchResult || "switch_res" - NodeResult || "node_res" - CylindricalStorageResult || "cylindrical_storage_res" - ThermalHouseResult || "thermal_house_res" - } - - def "A simple file naming strategy does return valid file path for load profile time series"() { - given: "a naming strategy without pre- or suffixes" - def strategy = new EntityPersistenceNamingStrategy() - def timeSeries = Mock(LoadProfileInput) - timeSeries.uuid >> uuid - timeSeries.type >> type - - when: - def actual = strategy.getFilePath(timeSeries) - - then: - actual.present - actual.get() == expectedFilePath - - where: - clazz | uuid | type || expectedFilePath - LoadProfileInput | UUID.fromString("bee0a8b6-4788-4f18-bf72-be52035f7304") | BdewLoadProfile.G3 || "lpts_g3_bee0a8b6-4788-4f18-bf72-be52035f7304" - } - - def "A simple file naming strategy does return valid file path for individual time series"() { - given: "a naming strategy without pre- or suffixes" - def strategy = new EntityPersistenceNamingStrategy() - def entries = [ - new TimeBasedValue(ZonedDateTime.now(), new EnergyPriceValue(Quantities.getQuantity(500d, PowerSystemUnits.EURO_PER_MEGAWATTHOUR)))] as SortedSet - def timeSeries = Mock(IndividualTimeSeries) - timeSeries.uuid >> uuid - timeSeries.entries >> entries - - when: - def actual = strategy.getFilePath(timeSeries) - - then: - actual.present - actual.get() == expectedFilePath - - where: - clazz | uuid || expectedFilePath - IndividualTimeSeries | UUID.fromString("4881fda2-bcee-4f4f-a5bb-6a09bf785276") || "its_c_4881fda2-bcee-4f4f-a5bb-6a09bf785276" - } } diff --git a/src/test/groovy/edu/ie3/datamodel/io/sink/CsvFileSinkTest.groovy b/src/test/groovy/edu/ie3/datamodel/io/sink/CsvFileSinkTest.groovy index 1c79ad6c9..78e9faf30 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/sink/CsvFileSinkTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/sink/CsvFileSinkTest.groovy @@ -5,7 +5,7 @@ */ package edu.ie3.datamodel.io.sink -import edu.ie3.datamodel.io.naming.EntityPersistenceNamingStrategy +import edu.ie3.datamodel.io.naming.EntityNamingStrategy import edu.ie3.datamodel.io.processor.ProcessorProvider import edu.ie3.datamodel.io.processor.input.InputEntityProcessor import edu.ie3.datamodel.io.processor.result.ResultEntityProcessor @@ -85,7 +85,7 @@ class CsvFileSinkTest extends Specification implements TimeSeriesTestData { new ResultEntityProcessor(PvResult), new ResultEntityProcessor(EvResult) ], [] as Map), - new EntityPersistenceNamingStrategy(), + new EntityNamingStrategy(), true, ",") csvFileSink.shutdown() @@ -157,7 +157,7 @@ class CsvFileSinkTest extends Specification implements TimeSeriesTestData { new InputEntityProcessor(ThermalBusInput), new InputEntityProcessor(LineTypeInput) ], [] as Map), - new EntityPersistenceNamingStrategy(), + new EntityNamingStrategy(), false, ",") @@ -214,7 +214,7 @@ class CsvFileSinkTest extends Specification implements TimeSeriesTestData { CsvFileSink csvFileSink = new CsvFileSink(testBaseFolderPath, new ProcessorProvider([], timeSeriesProcessorMap), - new EntityPersistenceNamingStrategy(), + new EntityNamingStrategy(), false, ",") @@ -288,7 +288,7 @@ class CsvFileSinkTest extends Specification implements TimeSeriesTestData { new ProcessorProvider( ProcessorProvider.allEntityProcessors(), new HashMap, Value>, TimeSeriesEntry, Value>>()), - new EntityPersistenceNamingStrategy(), + new EntityNamingStrategy(), false, ",") @@ -308,7 +308,7 @@ class CsvFileSinkTest extends Specification implements TimeSeriesTestData { def csvFileSink = new CsvFileSink( testBaseFolderPath, new ProcessorProvider(), - new EntityPersistenceNamingStrategy(), + new EntityNamingStrategy(), false, ",") diff --git a/src/test/groovy/edu/ie3/datamodel/io/sink/InfluxDbSinkIT.groovy b/src/test/groovy/edu/ie3/datamodel/io/sink/InfluxDbSinkIT.groovy index e7252af42..0c8b9f631 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/sink/InfluxDbSinkIT.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/sink/InfluxDbSinkIT.groovy @@ -6,7 +6,7 @@ package edu.ie3.datamodel.io.sink import edu.ie3.datamodel.io.connectors.InfluxDbConnector -import edu.ie3.datamodel.io.naming.EntityPersistenceNamingStrategy +import edu.ie3.datamodel.io.naming.EntityNamingStrategy import edu.ie3.datamodel.models.StandardUnits import edu.ie3.datamodel.models.input.NodeInput import edu.ie3.datamodel.models.result.ResultEntity @@ -43,7 +43,7 @@ class InfluxDbSinkIT extends Specification { InfluxDbConnector connector @Shared - EntityPersistenceNamingStrategy entityPersistenceNamingStrategy + EntityNamingStrategy entityPersistenceNamingStrategy @Shared InfluxDbSink sink @@ -51,7 +51,7 @@ class InfluxDbSinkIT extends Specification { def setupSpec() { connector = new InfluxDbConnector(influxDbContainer.url,"test_out", "test_scenario") sink = new InfluxDbSink(connector) - entityPersistenceNamingStrategy = new EntityPersistenceNamingStrategy() + entityPersistenceNamingStrategy = new EntityNamingStrategy() } @@ -270,7 +270,7 @@ class InfluxDbSinkIT extends Specification { } //Always return an empty Optional for results - class EmptyFileNamingStrategy extends EntityPersistenceNamingStrategy { + class EmptyFileNamingStrategy extends EntityNamingStrategy { @Override Optional getResultEntityName(Class resultEntityClass) { return Optional.empty() diff --git a/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvDataSourceTest.groovy b/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvDataSourceTest.groovy index afdf91a81..7a96f6fd4 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvDataSourceTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvDataSourceTest.groovy @@ -6,7 +6,7 @@ package edu.ie3.datamodel.io.source.csv import edu.ie3.datamodel.io.factory.input.ThermalBusInputFactory -import edu.ie3.datamodel.io.naming.EntityPersistenceNamingStrategy +import edu.ie3.datamodel.io.naming.EntityNamingStrategy import edu.ie3.datamodel.models.UniqueEntity import edu.ie3.datamodel.models.input.NodeInput import edu.ie3.datamodel.models.input.OperatorInput @@ -31,7 +31,7 @@ class CsvDataSourceTest extends Specification { // methods in a public or protected method makes them available for testing private final class DummyCsvSource extends CsvDataSource { - DummyCsvSource(String csvSep, String folderPath, EntityPersistenceNamingStrategy entityPersistenceNamingStrategy) { + DummyCsvSource(String csvSep, String folderPath, EntityNamingStrategy entityPersistenceNamingStrategy) { super(csvSep, folderPath, entityPersistenceNamingStrategy) } @@ -64,7 +64,7 @@ class CsvDataSourceTest extends Specification { @Shared String csvSep = "," String testBaseFolderPath = new File(getClass().getResource('/testGridFiles').toURI()).getAbsolutePath() - EntityPersistenceNamingStrategy entityPersistenceNamingStrategy = new EntityPersistenceNamingStrategy() + EntityNamingStrategy entityPersistenceNamingStrategy = new EntityNamingStrategy() DummyCsvSource dummyCsvSource = new DummyCsvSource(csvSep, testBaseFolderPath, entityPersistenceNamingStrategy) @@ -90,7 +90,7 @@ class CsvDataSourceTest extends Specification { expect: dummyCsvSource.connector != null dummyCsvSource.connector.baseDirectoryName == testBaseFolderPath - dummyCsvSource.connector.entityPersistenceNamingStrategy == entityPersistenceNamingStrategy + dummyCsvSource.connector.entityNamingStrategy == entityPersistenceNamingStrategy dummyCsvSource.connector.entityWriters.isEmpty() } diff --git a/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvTestDataMeta.groovy b/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvTestDataMeta.groovy index 67999fad6..2424dbf74 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvTestDataMeta.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvTestDataMeta.groovy @@ -5,7 +5,7 @@ */ package edu.ie3.datamodel.io.source.csv -import edu.ie3.datamodel.io.naming.EntityPersistenceNamingStrategy +import edu.ie3.datamodel.io.naming.EntityNamingStrategy /** * Holds meta data for csv tests e.g. file and folder paths @@ -23,5 +23,5 @@ trait CsvTestDataMeta { static String coordinatesFolderPath = testParticipantsBaseFolderPath.concat(File.separator).concat("coordinates") static String csvSep = "," - static EntityPersistenceNamingStrategy entityPersistenceNamingStrategy = new EntityPersistenceNamingStrategy() + static EntityNamingStrategy entityPersistenceNamingStrategy = new EntityNamingStrategy() } \ No newline at end of file diff --git a/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvThermalSourceTest.groovy b/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvThermalSourceTest.groovy index ef9b9090d..87cd99f6a 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvThermalSourceTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvThermalSourceTest.groovy @@ -7,7 +7,7 @@ package edu.ie3.datamodel.io.source.csv import edu.ie3.datamodel.io.factory.input.AssetInputEntityData import edu.ie3.datamodel.io.factory.input.ThermalUnitInputEntityData -import edu.ie3.datamodel.io.naming.EntityPersistenceNamingStrategy +import edu.ie3.datamodel.io.naming.EntityNamingStrategy import edu.ie3.datamodel.models.input.OperatorInput import edu.ie3.datamodel.models.input.thermal.ThermalBusInput import edu.ie3.datamodel.models.input.thermal.ThermalUnitInput @@ -21,7 +21,7 @@ class CsvThermalSourceTest extends Specification implements CsvTestDataMeta { def "A CsvThermalSource should return ThermalBuses from valid and invalid input data as expected"() { given: - def csvTypeSource = new CsvTypeSource(",", typeFolderPath, new EntityPersistenceNamingStrategy()) + def csvTypeSource = new CsvTypeSource(",", typeFolderPath, new EntityNamingStrategy()) def csvThermalSource = new CsvThermalSource(csvSep, thermalFolderPath, entityPersistenceNamingStrategy, csvTypeSource) def operators = csvTypeSource.operators @@ -50,7 +50,7 @@ class CsvThermalSourceTest extends Specification implements CsvTestDataMeta { def "A CsvThermalSource should return a CylindricalStorageInput from valid and invalid input data as expected"() { given: - def csvTypeSource = new CsvTypeSource(",", typeFolderPath, new EntityPersistenceNamingStrategy()) + def csvTypeSource = new CsvTypeSource(",", typeFolderPath, new EntityNamingStrategy()) def csvThermalSource = new CsvThermalSource(csvSep, thermalFolderPath, entityPersistenceNamingStrategy, csvTypeSource) def operators = csvTypeSource.operators def thermalBuses = csvThermalSource.thermalBuses @@ -93,7 +93,7 @@ class CsvThermalSourceTest extends Specification implements CsvTestDataMeta { def "A CsvThermalSource should build thermal unit input entity from valid and invalid input data as expected"() { given: - def csvTypeSource = new CsvTypeSource(",", typeFolderPath, new EntityPersistenceNamingStrategy()) + def csvTypeSource = new CsvTypeSource(",", typeFolderPath, new EntityNamingStrategy()) def csvThermalSource = new CsvThermalSource(csvSep, thermalFolderPath, entityPersistenceNamingStrategy, csvTypeSource) def operator = new OperatorInput(UUID.fromString("8f9682df-0744-4b58-a122-f0dc730f6510"), "testOperator") def validFieldsToAttributes = [ @@ -135,7 +135,7 @@ class CsvThermalSourceTest extends Specification implements CsvTestDataMeta { def "A CsvThermalSource should return a ThermalHouseInput from valid and invalid input data as expected"() { given: - def csvTypeSource = new CsvTypeSource(",", typeFolderPath, new EntityPersistenceNamingStrategy()) + def csvTypeSource = new CsvTypeSource(",", typeFolderPath, new EntityNamingStrategy()) def csvThermalSource = new CsvThermalSource(csvSep, thermalFolderPath, entityPersistenceNamingStrategy, csvTypeSource) def operators = csvTypeSource.operators def thermalBuses = csvThermalSource.thermalBuses diff --git a/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvTimeSeriesMappingSourceIT.groovy b/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvTimeSeriesMappingSourceIT.groovy index 8382af87d..beb640006 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvTimeSeriesMappingSourceIT.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvTimeSeriesMappingSourceIT.groovy @@ -7,7 +7,7 @@ package edu.ie3.datamodel.io.source.csv import edu.ie3.datamodel.io.connectors.CsvFileConnector import edu.ie3.datamodel.io.csv.timeseries.ColumnScheme -import edu.ie3.datamodel.io.naming.EntityPersistenceNamingStrategy +import edu.ie3.datamodel.io.naming.EntityNamingStrategy import edu.ie3.datamodel.io.source.TimeSeriesMappingSource import spock.lang.Shared import spock.lang.Specification @@ -17,7 +17,7 @@ class CsvTimeSeriesMappingSourceIT extends Specification implements CsvTestDataM TimeSeriesMappingSource source def setupSpec() { - source = new CsvTimeSeriesMappingSource(";", timeSeriesFolderPath, new EntityPersistenceNamingStrategy()) + source = new CsvTimeSeriesMappingSource(";", timeSeriesFolderPath, new EntityNamingStrategy()) } def "The csv time series mapping source is able to provide a valid time series mapping from files"() { diff --git a/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvTimeSeriesSourceIT.groovy b/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvTimeSeriesSourceIT.groovy index f18b3f425..62744c2f3 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvTimeSeriesSourceIT.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvTimeSeriesSourceIT.groovy @@ -7,7 +7,7 @@ package edu.ie3.datamodel.io.source.csv import edu.ie3.datamodel.exceptions.SourceException import edu.ie3.datamodel.io.factory.timeseries.TimeBasedSimpleValueFactory -import edu.ie3.datamodel.io.naming.EntityPersistenceNamingStrategy +import edu.ie3.datamodel.io.naming.EntityNamingStrategy import edu.ie3.datamodel.models.StandardUnits import edu.ie3.datamodel.models.value.HeatAndPValue import edu.ie3.util.TimeUtil @@ -26,7 +26,7 @@ class CsvTimeSeriesSourceIT extends Specification implements CsvTestDataMeta { def setup() { factory = new TimeBasedSimpleValueFactory<>(HeatAndPValue) - source = new CsvTimeSeriesSource(";", timeSeriesFolderPath, new EntityPersistenceNamingStrategy(), UUID.fromString("76c9d846-797c-4f07-b7ec-2245f679f5c7"), "its_ph_76c9d846-797c-4f07-b7ec-2245f679f5c7", HeatAndPValue, factory) + source = new CsvTimeSeriesSource(";", timeSeriesFolderPath, new EntityNamingStrategy(), UUID.fromString("76c9d846-797c-4f07-b7ec-2245f679f5c7"), "its_ph_76c9d846-797c-4f07-b7ec-2245f679f5c7", HeatAndPValue, factory) } def "A csv time series source throw an Exception, if the file cannot be found"() { @@ -57,7 +57,7 @@ class CsvTimeSeriesSourceIT extends Specification implements CsvTestDataMeta { def "Construction a csv time series source with malicious parameters, leads to IllegalArgumentException"() { when: - new CsvTimeSeriesSource(";", timeSeriesFolderPath, new EntityPersistenceNamingStrategy(), UUID.fromString("fbc59b5b-9307-4fb4-a406-c1f08f26fee5"), "file/not/found", HeatAndPValue, factory) + new CsvTimeSeriesSource(";", timeSeriesFolderPath, new EntityNamingStrategy(), UUID.fromString("fbc59b5b-9307-4fb4-a406-c1f08f26fee5"), "file/not/found", HeatAndPValue, factory) then: def e = thrown(IllegalArgumentException) diff --git a/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvTimeSeriesSourceTest.groovy b/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvTimeSeriesSourceTest.groovy index 616e8cb3e..e093e19f0 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvTimeSeriesSourceTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvTimeSeriesSourceTest.groovy @@ -5,7 +5,7 @@ */ package edu.ie3.datamodel.io.source.csv -import edu.ie3.datamodel.io.naming.EntityPersistenceNamingStrategy +import edu.ie3.datamodel.io.naming.EntityNamingStrategy import static edu.ie3.datamodel.models.StandardUnits.ENERGY_PRICE @@ -32,7 +32,7 @@ class CsvTimeSeriesSourceTest extends Specification implements CsvTestDataMeta { def coordinateSource = Mock(IdCoordinateSource) coordinateSource.getCoordinate(5) >> defaultCoordinate def factory = new TimeBasedSimpleValueFactory(EnergyPriceValue) - def source = new CsvTimeSeriesSource(";", timeSeriesFolderPath, new EntityPersistenceNamingStrategy(), UUID.fromString("2fcb3e53-b94a-4b96-bea4-c469e499f1a1"), "its_c_2fcb3e53-b94a-4b96-bea4-c469e499f1a1", EnergyPriceValue, factory) + def source = new CsvTimeSeriesSource(";", timeSeriesFolderPath, new EntityNamingStrategy(), UUID.fromString("2fcb3e53-b94a-4b96-bea4-c469e499f1a1"), "its_c_2fcb3e53-b94a-4b96-bea4-c469e499f1a1", EnergyPriceValue, factory) def time = TimeUtil.withDefaults.toZonedDateTime("2019-01-01 00:00:00") def timeUtil = new TimeUtil(ZoneId.of("UTC"), Locale.GERMANY, "yyyy-MM-dd'T'HH:mm:ss[.S[S][S]]'Z'") def fieldToValue = [ diff --git a/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvTypeSourceTest.groovy b/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvTypeSourceTest.groovy index 63072d46b..581a27b56 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvTypeSourceTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvTypeSourceTest.groovy @@ -5,7 +5,7 @@ */ package edu.ie3.datamodel.io.source.csv -import edu.ie3.datamodel.io.naming.EntityPersistenceNamingStrategy +import edu.ie3.datamodel.io.naming.EntityNamingStrategy import edu.ie3.datamodel.models.input.OperatorInput import spock.lang.Specification import edu.ie3.test.common.GridTestData as gtd @@ -16,7 +16,7 @@ class CsvTypeSourceTest extends Specification implements CsvTestDataMeta { def "A CsvTypeSource should read and handle valid 2W Transformer type file as expected"() { given: - def typeSource = new CsvTypeSource(",", typeFolderPath, new EntityPersistenceNamingStrategy()) + def typeSource = new CsvTypeSource(",", typeFolderPath, new EntityNamingStrategy()) expect: def transformer2WTypes = typeSource.transformer2WTypes @@ -45,7 +45,7 @@ class CsvTypeSourceTest extends Specification implements CsvTestDataMeta { UUID.fromString("f15105c4-a2de-4ab8-a621-4bc98e372d92"), "Univ.-Prof. Dr. rer. hort. Klaus-Dieter Brokkoli") def secondOperator = new OperatorInput( UUID.fromString("8f9682df-0744-4b58-a122-f0dc730f6510"), "TestOperator") - def typeSource = new CsvTypeSource(",", typeFolderPath, new EntityPersistenceNamingStrategy()) + def typeSource = new CsvTypeSource(",", typeFolderPath, new EntityNamingStrategy()) expect: def operators = typeSource.operators @@ -57,7 +57,7 @@ class CsvTypeSourceTest extends Specification implements CsvTestDataMeta { def "A CsvTypeSource should read and handle valid line type file as expected"() { given: - def typeSource = new CsvTypeSource(",", typeFolderPath, new EntityPersistenceNamingStrategy()) + def typeSource = new CsvTypeSource(",", typeFolderPath, new EntityNamingStrategy()) expect: def lineTypes = typeSource.lineTypes @@ -73,7 +73,7 @@ class CsvTypeSourceTest extends Specification implements CsvTestDataMeta { def "A CsvTypeSource should read and handle valid 3W Transformer type file as expected"() { given: - def typeSource = new CsvTypeSource(",", typeFolderPath, new EntityPersistenceNamingStrategy()) + def typeSource = new CsvTypeSource(",", typeFolderPath, new EntityNamingStrategy()) expect: def transformer3WTypes = typeSource.transformer3WTypes @@ -102,7 +102,7 @@ class CsvTypeSourceTest extends Specification implements CsvTestDataMeta { def "A CsvTypeSource should read and handle valid bm type file as expected"() { given: - def typeSource = new CsvTypeSource(",", typeFolderPath, new EntityPersistenceNamingStrategy()) + def typeSource = new CsvTypeSource(",", typeFolderPath, new EntityNamingStrategy()) expect: def bmTypes = typeSource.bmTypes @@ -117,7 +117,7 @@ class CsvTypeSourceTest extends Specification implements CsvTestDataMeta { def "A CsvTypeSource should read and handle valid chp type file as expected"() { given: - def typeSource = new CsvTypeSource(",", typeFolderPath, new EntityPersistenceNamingStrategy()) + def typeSource = new CsvTypeSource(",", typeFolderPath, new EntityNamingStrategy()) expect: def chpTypes = typeSource.chpTypes @@ -134,7 +134,7 @@ class CsvTypeSourceTest extends Specification implements CsvTestDataMeta { def "A CsvTypeSource should read and handle valid hp type file as expected"() { given: - def typeSource = new CsvTypeSource(",", typeFolderPath, new EntityPersistenceNamingStrategy()) + def typeSource = new CsvTypeSource(",", typeFolderPath, new EntityNamingStrategy()) expect: def hpTypes = typeSource.hpTypes @@ -149,7 +149,7 @@ class CsvTypeSourceTest extends Specification implements CsvTestDataMeta { def "A CsvTypeSource should read and handle valid storage type file as expected"() { given: - def typeSource = new CsvTypeSource(",", typeFolderPath, new EntityPersistenceNamingStrategy()) + def typeSource = new CsvTypeSource(",", typeFolderPath, new EntityNamingStrategy()) expect: def storageTypes = typeSource.storageTypes @@ -170,7 +170,7 @@ class CsvTypeSourceTest extends Specification implements CsvTestDataMeta { def "A CsvTypeSource should read and handle valid wec type file as expected"() { given: - def typeSource = new CsvTypeSource(",", typeFolderPath, new EntityPersistenceNamingStrategy()) + def typeSource = new CsvTypeSource(",", typeFolderPath, new EntityNamingStrategy()) expect: def wecTypes = typeSource.wecTypes @@ -192,7 +192,7 @@ class CsvTypeSourceTest extends Specification implements CsvTestDataMeta { def "A CsvTypeSource should read and handle valid ev type file as expected"() { given: - def typeSource = new CsvTypeSource(",", typeFolderPath, new EntityPersistenceNamingStrategy()) + def typeSource = new CsvTypeSource(",", typeFolderPath, new EntityNamingStrategy()) expect: def evTypes = typeSource.evTypes diff --git a/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvWeatherSourceIconTest.groovy b/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvWeatherSourceIconTest.groovy index d72904c39..3bb496ac6 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvWeatherSourceIconTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvWeatherSourceIconTest.groovy @@ -6,7 +6,7 @@ package edu.ie3.datamodel.io.source.csv import edu.ie3.datamodel.io.factory.timeseries.IconTimeBasedWeatherValueFactory -import edu.ie3.datamodel.io.naming.EntityPersistenceNamingStrategy +import edu.ie3.datamodel.io.naming.EntityNamingStrategy import edu.ie3.datamodel.io.source.IdCoordinateSource import edu.ie3.datamodel.models.timeseries.individual.IndividualTimeSeries import edu.ie3.datamodel.models.timeseries.individual.TimeBasedValue @@ -36,7 +36,7 @@ class CsvWeatherSourceIconTest extends Specification implements CsvTestDataMeta, coordinateSource = WeatherTestData.coordinateSource def weatherFactory = new IconTimeBasedWeatherValueFactory() folderPath = new File(getClass().getResource('/weather/icon').toURI()).absolutePath - source = new CsvWeatherSource(",", folderPath, new EntityPersistenceNamingStrategy(), coordinateSource, weatherFactory) + source = new CsvWeatherSource(",", folderPath, new EntityNamingStrategy(), coordinateSource, weatherFactory) } def "A CsvWeatherSource can read and correctly parse a single value for a specific date and coordinate"() { @@ -106,7 +106,7 @@ class CsvWeatherSourceIconTest extends Specification implements CsvTestDataMeta, def coordinateSource = Mock(IdCoordinateSource) coordinateSource.getCoordinate(_) >> { args -> args[0] == 67775 ? Optional.of(expectedCoordinate) : Optional.empty() } def weatherFactory = new IconTimeBasedWeatherValueFactory() - def source = new CsvWeatherSource(",", folderPath, new EntityPersistenceNamingStrategy(), coordinateSource, weatherFactory) + def source = new CsvWeatherSource(",", folderPath, new EntityNamingStrategy(), coordinateSource, weatherFactory) def fieldToValues = new TreeMap<>(String.CASE_INSENSITIVE_ORDER) fieldToValues.putAll( [ @@ -153,7 +153,7 @@ class CsvWeatherSourceIconTest extends Specification implements CsvTestDataMeta, given: def coordinateSource = new WeatherTestData.DummyIdCoordinateSource() def weatherFactory = new IconTimeBasedWeatherValueFactory() - def source = new CsvWeatherSource(",", folderPath, new EntityPersistenceNamingStrategy(), coordinateSource, weatherFactory) + def source = new CsvWeatherSource(",", folderPath, new EntityNamingStrategy(), coordinateSource, weatherFactory) def fieldToValues = [ "datum" : "2019-08-01 01:00:00", "albRad" : "13.015240669", @@ -197,7 +197,7 @@ class CsvWeatherSourceIconTest extends Specification implements CsvTestDataMeta, given: def coordinateSource = new WeatherTestData.DummyIdCoordinateSource() def weatherFactory = new IconTimeBasedWeatherValueFactory() - def source = new CsvWeatherSource(",", folderPath, new EntityPersistenceNamingStrategy(), coordinateSource, weatherFactory) + def source = new CsvWeatherSource(",", folderPath, new EntityNamingStrategy(), coordinateSource, weatherFactory) def fieldToValues = [ "datum" : "2019-08-01 01:00:00", "albRad" : "13.015240669", @@ -240,7 +240,7 @@ class CsvWeatherSourceIconTest extends Specification implements CsvTestDataMeta, given: def coordinateSource = new WeatherTestData.DummyIdCoordinateSource() def weatherFactory = new IconTimeBasedWeatherValueFactory() - def source = new CsvWeatherSource(",", folderPath, new EntityPersistenceNamingStrategy(), coordinateSource, weatherFactory) + def source = new CsvWeatherSource(",", folderPath, new EntityNamingStrategy(), coordinateSource, weatherFactory) def fieldToValues = [ "datum" : "2019-08-01 01:00:00", "albrad" : "13.015240669", diff --git a/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvWeatherSourcePsdmTest.groovy b/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvWeatherSourcePsdmTest.groovy index 07ceff508..7f4826759 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvWeatherSourcePsdmTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvWeatherSourcePsdmTest.groovy @@ -5,7 +5,7 @@ */ package edu.ie3.datamodel.io.source.csv -import edu.ie3.datamodel.io.naming.EntityPersistenceNamingStrategy +import edu.ie3.datamodel.io.naming.EntityNamingStrategy import static edu.ie3.datamodel.models.StandardUnits.SOLAR_IRRADIANCE import static edu.ie3.datamodel.models.StandardUnits.TEMPERATURE @@ -42,7 +42,7 @@ class CsvWeatherSourcePsdmTest extends Specification implements CsvTestDataMeta, def setupSpec() { coordinateSource = PsdmWeatherTestData.coordinateSource def weatherFactory = new PsdmTimeBasedWeatherValueFactory() - source = new CsvWeatherSource(";", timeSeriesFolderPath, new EntityPersistenceNamingStrategy(), coordinateSource, weatherFactory) + source = new CsvWeatherSource(";", timeSeriesFolderPath, new EntityNamingStrategy(), coordinateSource, weatherFactory) } def "A CsvWeatherSource can read and correctly parse a single value for a specific date and coordinate"() { @@ -109,7 +109,7 @@ class CsvWeatherSourcePsdmTest extends Specification implements CsvTestDataMeta, def coordinateSource = Mock(IdCoordinateSource) coordinateSource.getCoordinate(_) >> { args -> args[0] == 5 ? Optional.of(defaultCoordinate) : Optional.empty() } def weatherFactory = new PsdmTimeBasedWeatherValueFactory() - def source = new CsvWeatherSource(";", timeSeriesFolderPath, new EntityPersistenceNamingStrategy(), coordinateSource, weatherFactory) + def source = new CsvWeatherSource(";", timeSeriesFolderPath, new EntityNamingStrategy(), coordinateSource, weatherFactory) def fieldToValues = [ "uuid" : "71a79f59-eebf-40c1-8358-ba7414077d57", "time" : "2020-10-16T12:40:42Z", @@ -153,7 +153,7 @@ class CsvWeatherSourcePsdmTest extends Specification implements CsvTestDataMeta, def coordinateSource = Mock(IdCoordinateSource) coordinateSource.getCoordinate(_) >> { args -> args[0] == 5 ? Optional.of(defaultCoordinate) : Optional.empty() } def weatherFactory = new PsdmTimeBasedWeatherValueFactory() - def source = new CsvWeatherSource(";", timeSeriesFolderPath, new EntityPersistenceNamingStrategy(), coordinateSource, weatherFactory) + def source = new CsvWeatherSource(";", timeSeriesFolderPath, new EntityNamingStrategy(), coordinateSource, weatherFactory) def fieldToValues = [ "uuid" : "71a79f59-eebf-40c1-8358-ba7414077d57", "time" : "2020-10-16T12:40:42Z", @@ -178,7 +178,7 @@ class CsvWeatherSourcePsdmTest extends Specification implements CsvTestDataMeta, def coordinateSource = Mock(IdCoordinateSource) coordinateSource.getCoordinate(_) >> { args -> args[0] == 5 ? Optional.of(defaultCoordinate) : Optional.empty() } def weatherFactory = new PsdmTimeBasedWeatherValueFactory() - def source = new CsvWeatherSource(";", timeSeriesFolderPath, new EntityPersistenceNamingStrategy(), coordinateSource, weatherFactory) + def source = new CsvWeatherSource(";", timeSeriesFolderPath, new EntityNamingStrategy(), coordinateSource, weatherFactory) def fieldToValues = [ "uuid" : "71a79f59-eebf-40c1-8358-ba7414077d57", "time" : "2020-10-16T12:40:42Z", @@ -201,7 +201,7 @@ class CsvWeatherSourcePsdmTest extends Specification implements CsvTestDataMeta, def coordinateSource = Mock(IdCoordinateSource) coordinateSource.getCoordinate(_) >> Optional.empty() def weatherFactory = new PsdmTimeBasedWeatherValueFactory() - def source = new CsvWeatherSource(";", timeSeriesFolderPath, new EntityPersistenceNamingStrategy(), coordinateSource, weatherFactory) + def source = new CsvWeatherSource(";", timeSeriesFolderPath, new EntityNamingStrategy(), coordinateSource, weatherFactory) def fieldToValues = [ "uuid" : "71a79f59-eebf-40c1-8358-ba7414077d57", "time" : "2020-10-16T12:40:42Z", From b814165ec3b89fa7cf7bacf045ae86702bd06c99 Mon Sep 17 00:00:00 2001 From: Niklas Steffan Date: Fri, 28 May 2021 11:44:12 +0200 Subject: [PATCH 016/157] before reducing FlatDirectoryHierarchy --- .../io/csv/FlatDirectoryHierarchy.java | 7 ++-- .../io/csv/FlatDirectoryHierarchyTest.groovy | 34 +++++++++---------- 2 files changed, 20 insertions(+), 21 deletions(-) diff --git a/src/main/java/edu/ie3/datamodel/io/csv/FlatDirectoryHierarchy.java b/src/main/java/edu/ie3/datamodel/io/csv/FlatDirectoryHierarchy.java index 2c803aa43..0b144e4b3 100644 --- a/src/main/java/edu/ie3/datamodel/io/csv/FlatDirectoryHierarchy.java +++ b/src/main/java/edu/ie3/datamodel/io/csv/FlatDirectoryHierarchy.java @@ -21,23 +21,22 @@ public class FlatDirectoryHierarchy implements DirectoryHierarchy { /** Use the unix file separator here. */ protected static final String FILE_SEPARATOR = File.separator; - /** The project's directory beneath the {@code baseDirectory} */ + /** The project's directory, which is the same as the {@code baseDirectory} for a flat hierarchy. */ private final Path projectDirectory; - public FlatDirectoryHierarchy(String baseDirectory, String gridName) { + public FlatDirectoryHierarchy(String baseDirectory) { /* Prepare the base path */ String baseDirectoryNormalized = FilenameUtils.normalizeNoEndSeparator(baseDirectory, true) + FILE_SEPARATOR; this.projectDirectory = Paths.get( baseDirectoryNormalized - + FilenameUtils.normalizeNoEndSeparator(gridName, true) + FILE_SEPARATOR) .toAbsolutePath(); } /** - * Checks, if the project directory beneath the base directory is okay. + * Checks, if the project directory is okay. * * @throws FileException if not */ diff --git a/src/test/groovy/edu/ie3/datamodel/io/csv/FlatDirectoryHierarchyTest.groovy b/src/test/groovy/edu/ie3/datamodel/io/csv/FlatDirectoryHierarchyTest.groovy index 7f41816e0..78ed849cf 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/csv/FlatDirectoryHierarchyTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/csv/FlatDirectoryHierarchyTest.groovy @@ -26,21 +26,21 @@ class FlatDirectoryHierarchyTest extends Specification { tmpDirectory = Files.createTempDirectory("psdm_flat_input_hierarchy") } - def basePathString(String gridName) { - FilenameUtils.concat(tmpDirectory.toString(), gridName) + def basePathString() { + tmpDirectory.toString() } def cleanup() { - FileIOUtils.deleteRecursively(tmpDirectory) + //FileIOUtils.deleteRecursively(tmpDirectory) } + /* def "A FlatDirectoryHierarchy is set up correctly"() { given: - def gridName = "test_grid" - def basePath = basePathString(gridName) + def basePath = basePathString() when: - def fdh = new FlatDirectoryHierarchy(tmpDirectory.toString(), gridName) + def fdh = new FlatDirectoryHierarchy(tmpDirectory.toString()) then: try { @@ -53,9 +53,8 @@ class FlatDirectoryHierarchyTest extends Specification { def "A FlatDirectoryHierarchy is able to create a correct flat hierarchy of directories"() { given: - def gridName = "test_grid" - def basePath = Paths.get(basePathString(gridName)) - def fdh = new FlatDirectoryHierarchy(tmpDirectory.toString(), gridName) + def basePath = Paths.get(basePathString()) + def fdh = new FlatDirectoryHierarchy(tmpDirectory.toString()) when: fdh.createDirs() @@ -67,8 +66,7 @@ class FlatDirectoryHierarchyTest extends Specification { def "A FlatDirectoryHierarchy is able to validate a correct hierarchy of mandatory and optional directories"() { given: - def gridName = "test_grid" - def fdh = new FlatDirectoryHierarchy(tmpDirectory.toString(), gridName) + def fdh = new FlatDirectoryHierarchy(tmpDirectory.toString()) fdh.createDirs() when: @@ -77,12 +75,13 @@ class FlatDirectoryHierarchyTest extends Specification { then: noExceptionThrown() } + */ + def "A FlatDirectoryHierarchy throws an exception when trying to validate a missing hierarchy of mandatory and optional directories"() { given: - def gridName = "test_grid" - def basePath = Paths.get(basePathString(gridName)) - def fdh = new FlatDirectoryHierarchy(tmpDirectory.toString(), gridName) + def basePath = Paths.get(basePathString()) + def fdh = new FlatDirectoryHierarchy(tmpDirectory.toString()) when: fdh.validate() @@ -94,9 +93,8 @@ class FlatDirectoryHierarchyTest extends Specification { def "A FlatDirectoryHierarchy throws an exception when trying to validate a file instead of a hierarchy"() { given: - def gridName = "test_grid" - def basePath = Paths.get(basePathString(gridName)) - def fdh = new FlatDirectoryHierarchy(tmpDirectory.toString(), gridName) + def basePath = Paths.get(basePathString()) + def fdh = new FlatDirectoryHierarchy(tmpDirectory.toString()) Files.createFile(basePath) when: @@ -106,4 +104,6 @@ class FlatDirectoryHierarchyTest extends Specification { def ex = thrown(FileException) ex.message == "The path '" + basePath + "' has to be a directory." } + + } From cc4b9e7fc85707062e558a9e6a72d34f24ec16f5 Mon Sep 17 00:00:00 2001 From: Niklas Steffan Date: Fri, 28 May 2021 11:55:41 +0200 Subject: [PATCH 017/157] after reducing FlatDirectoryHierarchy --- .../io/csv/FlatDirectoryHierarchy.java | 34 +------------- .../io/csv/FlatDirectoryHierarchyTest.groovy | 47 ++----------------- 2 files changed, 5 insertions(+), 76 deletions(-) diff --git a/src/main/java/edu/ie3/datamodel/io/csv/FlatDirectoryHierarchy.java b/src/main/java/edu/ie3/datamodel/io/csv/FlatDirectoryHierarchy.java index 0b144e4b3..541bd2419 100644 --- a/src/main/java/edu/ie3/datamodel/io/csv/FlatDirectoryHierarchy.java +++ b/src/main/java/edu/ie3/datamodel/io/csv/FlatDirectoryHierarchy.java @@ -18,42 +18,12 @@ /** Default directory hierarchy for input models */ public class FlatDirectoryHierarchy implements DirectoryHierarchy { - /** Use the unix file separator here. */ - protected static final String FILE_SEPARATOR = File.separator; - - /** The project's directory, which is the same as the {@code baseDirectory} for a flat hierarchy. */ - private final Path projectDirectory; - - public FlatDirectoryHierarchy(String baseDirectory) { - /* Prepare the base path */ - String baseDirectoryNormalized = - FilenameUtils.normalizeNoEndSeparator(baseDirectory, true) + FILE_SEPARATOR; - this.projectDirectory = - Paths.get( - baseDirectoryNormalized - + FILE_SEPARATOR) - .toAbsolutePath(); - } - - /** - * Checks, if the project directory is okay. - * - * @throws FileException if not - */ - public void validate() throws FileException { - if (!Files.exists(projectDirectory)) - throw new FileException("The path '" + projectDirectory + "' does not exist."); - if (!Files.isDirectory(projectDirectory)) - throw new FileException("The path '" + projectDirectory + "' has to be a directory."); - } /** - * Creates project directory of this flat directory hierarchy. + * Empty constructor. * - * @throws IOException If the creation of the project directory is not possible */ - public void createDirs() throws IOException { - Files.createDirectories(projectDirectory); + public FlatDirectoryHierarchy() { } /** diff --git a/src/test/groovy/edu/ie3/datamodel/io/csv/FlatDirectoryHierarchyTest.groovy b/src/test/groovy/edu/ie3/datamodel/io/csv/FlatDirectoryHierarchyTest.groovy index 78ed849cf..2c9264c35 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/csv/FlatDirectoryHierarchyTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/csv/FlatDirectoryHierarchyTest.groovy @@ -34,7 +34,6 @@ class FlatDirectoryHierarchyTest extends Specification { //FileIOUtils.deleteRecursively(tmpDirectory) } - /* def "A FlatDirectoryHierarchy is set up correctly"() { given: def basePath = basePathString() @@ -55,55 +54,15 @@ class FlatDirectoryHierarchyTest extends Specification { given: def basePath = Paths.get(basePathString()) def fdh = new FlatDirectoryHierarchy(tmpDirectory.toString()) + def x = 2 when: - fdh.createDirs() + //fdh.createDirs() + x = 3 then: Files.exists(basePath) Files.isDirectory(basePath) } - def "A FlatDirectoryHierarchy is able to validate a correct hierarchy of mandatory and optional directories"() { - given: - def fdh = new FlatDirectoryHierarchy(tmpDirectory.toString()) - fdh.createDirs() - - when: - fdh.validate() - - then: - noExceptionThrown() - } - */ - - - def "A FlatDirectoryHierarchy throws an exception when trying to validate a missing hierarchy of mandatory and optional directories"() { - given: - def basePath = Paths.get(basePathString()) - def fdh = new FlatDirectoryHierarchy(tmpDirectory.toString()) - - when: - fdh.validate() - - then: - def ex = thrown(FileException) - ex.message == "The path '" + basePath + "' does not exist." - } - - def "A FlatDirectoryHierarchy throws an exception when trying to validate a file instead of a hierarchy"() { - given: - def basePath = Paths.get(basePathString()) - def fdh = new FlatDirectoryHierarchy(tmpDirectory.toString()) - Files.createFile(basePath) - - when: - fdh.validate() - - then: - def ex = thrown(FileException) - ex.message == "The path '" + basePath + "' has to be a directory." - } - - } From f6217ccdc5f69dbc5b8d6f7d31ea6b068c866ea0 Mon Sep 17 00:00:00 2001 From: Niklas Steffan Date: Fri, 28 May 2021 13:48:04 +0200 Subject: [PATCH 018/157] refactored all csv --- .../ie3/datamodel/io/FileNamingStrategy.java | 88 +++++++++++++++---- .../io/connectors/CsvFileConnector.java | 28 +++--- .../io/csv/FlatDirectoryHierarchy.java | 7 -- .../ie3/datamodel/io/sink/CsvFileSink.java | 16 ++-- .../io/source/csv/CsvDataSource.java | 6 +- .../io/source/csv/CsvGraphicSource.java | 6 +- .../io/source/csv/CsvIdCoordinateSource.java | 6 +- .../io/source/csv/CsvRawGridSource.java | 6 +- .../csv/CsvSystemParticipantSource.java | 6 +- .../io/source/csv/CsvThermalSource.java | 6 +- .../csv/CsvTimeSeriesMappingSource.java | 6 +- .../io/source/csv/CsvTimeSeriesSource.java | 23 ++--- .../io/source/csv/CsvTypeSource.java | 6 +- .../io/source/csv/CsvWeatherSource.java | 16 ++-- .../io/FileNamingStrategyTest.groovy | 10 +-- .../io/connectors/CsvFileConnectorTest.groovy | 32 +++---- .../io/csv/FlatDirectoryHierarchyTest.groovy | 33 ++----- .../datamodel/io/sink/CsvFileSinkTest.groovy | 12 +-- .../datamodel/io/sink/InfluxDbSinkIT.groovy | 13 +-- .../csv/CosmoCsvIdCoordinateSourceIT.groovy | 2 +- .../io/source/csv/CsvDataSourceTest.groovy | 12 +-- .../io/source/csv/CsvGraphicSourceTest.groovy | 20 ++--- .../io/source/csv/CsvRawGridSourceTest.groovy | 12 +-- .../csv/CsvSystemParticipantSourceTest.groovy | 49 +++++------ .../io/source/csv/CsvTestDataMeta.groovy | 4 +- .../io/source/csv/CsvThermalSourceTest.groovy | 18 ++-- .../csv/CsvTimeSeriesMappingSourceIT.groovy | 4 +- .../source/csv/CsvTimeSeriesSourceIT.groovy | 6 +- .../source/csv/CsvTimeSeriesSourceTest.groovy | 8 +- .../io/source/csv/CsvTypeSourceTest.groovy | 22 ++--- .../csv/CsvWeatherSourceIconTest.groovy | 12 +-- .../csv/CsvWeatherSourcePsdmTest.groovy | 12 +-- .../csv/IconCsvIdCoordinateSourceIT.groovy | 2 +- 33 files changed, 268 insertions(+), 241 deletions(-) diff --git a/src/main/java/edu/ie3/datamodel/io/FileNamingStrategy.java b/src/main/java/edu/ie3/datamodel/io/FileNamingStrategy.java index 5127860a1..96da6efed 100644 --- a/src/main/java/edu/ie3/datamodel/io/FileNamingStrategy.java +++ b/src/main/java/edu/ie3/datamodel/io/FileNamingStrategy.java @@ -6,6 +6,8 @@ package edu.ie3.datamodel.io; import edu.ie3.datamodel.io.csv.DirectoryHierarchy; +import edu.ie3.datamodel.io.csv.FileNameMetaInformation; +import edu.ie3.datamodel.io.csv.FlatDirectoryHierarchy; import edu.ie3.datamodel.io.naming.EntityNamingStrategy; import edu.ie3.datamodel.models.UniqueEntity; import edu.ie3.datamodel.models.timeseries.TimeSeries; @@ -21,8 +23,8 @@ import org.apache.logging.log4j.Logger; /** - * A naming strategy, that combines an {@link EntityNamingStrategy} for naming entities, a {@link - * DirectoryHierarchy} for a folder structure, and a file extension. + * A naming strategy, that combines an {@link EntityNamingStrategy} for naming entities and a {@link + * DirectoryHierarchy} for a folder structure. */ public class FileNamingStrategy { @@ -34,37 +36,41 @@ public class FileNamingStrategy { private final EntityNamingStrategy entityNamingStrategy; private final DirectoryHierarchy directoryHierarchy; - private final String fileExtension; - private final String defaultFileExtension = ""; + /** - * Constructor for building the file naming strategy + * Constructor for building the file naming strategy. * * @param entityNamingStrategy entity naming strategy * @param directoryHierarchy directory hierarchy - * @param fileExtension file extension */ public FileNamingStrategy( - EntityNamingStrategy entityNamingStrategy, - DirectoryHierarchy directoryHierarchy, - String fileExtension) { + EntityNamingStrategy entityNamingStrategy, DirectoryHierarchy directoryHierarchy) { this.entityNamingStrategy = entityNamingStrategy; this.directoryHierarchy = directoryHierarchy; - this.fileExtension = fileExtension; } /** - * Constructor for building the file naming strategy. Since no file extension is provided, the - * default file extension is used. + * Constructor for building the file naming strategy. + * Since no directory hierarchy is provided, a flat directory hierarchy is used. * * @param entityNamingStrategy entity naming strategy - * @param directoryHierarchy directory hierarchy */ public FileNamingStrategy( - EntityNamingStrategy entityNamingStrategy, DirectoryHierarchy directoryHierarchy) { + EntityNamingStrategy entityNamingStrategy) { this.entityNamingStrategy = entityNamingStrategy; - this.directoryHierarchy = directoryHierarchy; - this.fileExtension = defaultFileExtension; + this.directoryHierarchy = new FlatDirectoryHierarchy(); + } + + /** + * Constructor for building the file naming strategy. + * Since no entity naming strategy is provided, the entity naming strategy is used. + * Since no directory hierarchy is provided, a flat directory hierarchy is used. + * + */ + public FileNamingStrategy() { + this.entityNamingStrategy = new EntityNamingStrategy(); + this.directoryHierarchy = new FlatDirectoryHierarchy(); } /** @@ -113,8 +119,8 @@ private Optional getFilePath(String fileName, String subDirectories) { if (fileName.isEmpty()) return Optional.empty(); if (!subDirectories.isEmpty()) return Optional.of( - FilenameUtils.concat(subDirectories, fileName)); // TODO: .concat(fileExtension) ? - else return Optional.of(fileName); // TODO: .concat(fileExtension) ? + FilenameUtils.concat(subDirectories, fileName)); + else return Optional.of(fileName); } /** @@ -188,4 +194,50 @@ public Pattern getLoadProfileTimeSeriesPattern() { FilenameUtils.concat( subDirectory, entityNamingStrategy.getLoadProfileTimeSeriesPattern().pattern())); } + + /** + * Extracts meta information from a file name, of a time series. Here, a file name without + * leading path has to be provided + * + * @param fileName File name + * @return The meeting meta information + */ + public FileNameMetaInformation extractTimeSeriesMetaInformation(String fileName) { + return entityNamingStrategy.extractTimeSeriesMetaInformation(fileName); + } + + /** + * Get the entity name for coordinates + * + * @return the entity name string + */ + public String getIdCoordinateEntityName() { + return entityNamingStrategy.getIdCoordinateEntityName(); + } + + /** + * Returns the name of the entity, that should be used for persistence. + * + * @param cls Targeted class of the given file + * @return The name of the entity + */ + public Optional getEntityName(Class cls) { + return entityNamingStrategy.getEntityName(cls); + } + + /** + * Builds a file name (and only the file name without any directories and extension) of the given + * information. + * + * @param Type of the time series + * @param Type of the entry in the time series + * @param Type of the value, that is carried by the time series entry + * @param timeSeries Time series to derive naming information from + * @return A file name for this particular time series + */ + public , E extends TimeSeriesEntry, V extends Value> + Optional getEntityName(T timeSeries) { + return entityNamingStrategy.getEntityName(timeSeries); + } + } diff --git a/src/main/java/edu/ie3/datamodel/io/connectors/CsvFileConnector.java b/src/main/java/edu/ie3/datamodel/io/connectors/CsvFileConnector.java index ad83db516..1c788da15 100644 --- a/src/main/java/edu/ie3/datamodel/io/connectors/CsvFileConnector.java +++ b/src/main/java/edu/ie3/datamodel/io/connectors/CsvFileConnector.java @@ -6,10 +6,10 @@ package edu.ie3.datamodel.io.connectors; import edu.ie3.datamodel.exceptions.ConnectorException; +import edu.ie3.datamodel.io.FileNamingStrategy; import edu.ie3.datamodel.io.csv.*; import edu.ie3.datamodel.io.csv.timeseries.ColumnScheme; import edu.ie3.datamodel.io.csv.timeseries.IndividualTimeSeriesMetaInformation; -import edu.ie3.datamodel.io.naming.EntityNamingStrategy; import edu.ie3.datamodel.models.UniqueEntity; import edu.ie3.datamodel.models.timeseries.TimeSeries; import edu.ie3.datamodel.models.timeseries.TimeSeriesEntry; @@ -41,7 +41,7 @@ public class CsvFileConnector implements DataConnector { private final Map timeSeriesWriters = new HashMap<>(); // ATTENTION: Do not finalize. It's meant for lazy evaluation. private Map individualTimeSeriesMetaInformation; - private final EntityNamingStrategy entityNamingStrategy; + private final FileNamingStrategy fileNamingStrategy; private final String baseDirectoryName; private static final String FILE_ENDING = ".csv"; @@ -49,9 +49,9 @@ public class CsvFileConnector implements DataConnector { private static final String FILE_SEPARATOR_REPLACEMENT = File.separator.equals("\\") ? "\\\\" : "/"; - public CsvFileConnector(String baseDirectoryName, EntityNamingStrategy entityNamingStrategy) { + public CsvFileConnector(String baseDirectoryName, FileNamingStrategy fileNamingStrategy) { this.baseDirectoryName = baseDirectoryName; - this.entityNamingStrategy = entityNamingStrategy; + this.fileNamingStrategy = fileNamingStrategy; } public synchronized BufferedCsvWriter getOrInitWriter( @@ -137,7 +137,7 @@ private BufferedCsvWriter initWriter(String baseDirectory, CsvFileDefinition fil /** * Initializes a file reader for the given class that should be read in. The expected file name is - * determined based on {@link EntityNamingStrategy} of the this {@link CsvFileConnector} instance + * determined based on {@link FileNamingStrategy} of the this {@link CsvFileConnector} instance * * @param clz the class of the entity that should be read * @return the reader that contains information about the file to be read in @@ -147,7 +147,7 @@ public BufferedReader initReader(Class clz) throws FileN String filePath = null; try { filePath = - entityNamingStrategy + fileNamingStrategy .getFilePath(clz) .orElseThrow( () -> @@ -210,7 +210,7 @@ public Optional getIndividualTimeSeriesMeta String filePathWithoutEnding = removeFileEnding(filePath); IndividualTimeSeriesMetaInformation metaInformation = (IndividualTimeSeriesMetaInformation) - entityNamingStrategy.extractTimeSeriesMetaInformation(filePathWithoutEnding); + fileNamingStrategy.extractTimeSeriesMetaInformation(filePathWithoutEnding); return new CsvIndividualTimeSeriesMetaInformation( metaInformation, filePathWithoutEnding); }) @@ -250,7 +250,7 @@ public Map> initTimeSeriesReader( * @throws FileNotFoundException If the file is not present */ public BufferedReader initIdCoordinateReader() throws FileNotFoundException { - String filePath = entityNamingStrategy.getIdCoordinateEntityName(); + String filePath = fileNamingStrategy.getIdCoordinateEntityName(); return initReader(filePath); } @@ -268,7 +268,7 @@ private Set getIndividualTimeSeriesFilePaths() { .filter( path -> { String withoutEnding = removeFileEnding(path.toString()); - return entityNamingStrategy + return fileNamingStrategy .getIndividualTimeSeriesPattern() .matcher(withoutEnding) .matches(); @@ -298,7 +298,7 @@ private Optional buildReadingData( String filePathString, ColumnScheme... columnSchemes) { try { FileNameMetaInformation metaInformation = - entityNamingStrategy.extractTimeSeriesMetaInformation(filePathString); + fileNamingStrategy.extractTimeSeriesMetaInformation(filePathString); if (!IndividualTimeSeriesMetaInformation.class.isAssignableFrom(metaInformation.getClass())) { log.error( "The time series file '{}' does not represent an individual time series.", @@ -360,9 +360,9 @@ private String removeFileEnding(String input) { private , E extends TimeSeriesEntry, V extends Value> CsvFileDefinition buildFileDefinition(T timeSeries, String[] headLineElements, String csvSep) throws ConnectorException { - String directoryPath = entityNamingStrategy.getDirectoryPath(timeSeries).orElse(""); + String directoryPath = fileNamingStrategy.getDirectoryPath(timeSeries).orElse(""); String fileName = - entityNamingStrategy + fileNamingStrategy .getEntityName(timeSeries) .orElseThrow( () -> @@ -383,9 +383,9 @@ CsvFileDefinition buildFileDefinition(T timeSeries, String[] headLineElements, S private CsvFileDefinition buildFileDefinition( Class clz, String[] headLineElements, String csvSep) throws ConnectorException { - String directoryPath = entityNamingStrategy.getDirectoryPath(clz).orElse(""); + String directoryPath = fileNamingStrategy.getDirectoryPath(clz).orElse(""); String fileName = - entityNamingStrategy + fileNamingStrategy .getEntityName(clz) .orElseThrow( () -> diff --git a/src/main/java/edu/ie3/datamodel/io/csv/FlatDirectoryHierarchy.java b/src/main/java/edu/ie3/datamodel/io/csv/FlatDirectoryHierarchy.java index 541bd2419..2ab724e9e 100644 --- a/src/main/java/edu/ie3/datamodel/io/csv/FlatDirectoryHierarchy.java +++ b/src/main/java/edu/ie3/datamodel/io/csv/FlatDirectoryHierarchy.java @@ -5,15 +5,8 @@ */ package edu.ie3.datamodel.io.csv; -import edu.ie3.datamodel.exceptions.FileException; import edu.ie3.datamodel.models.UniqueEntity; -import java.io.File; -import java.io.IOException; -import java.nio.file.Files; -import java.nio.file.Path; -import java.nio.file.Paths; import java.util.Optional; -import org.apache.commons.io.FilenameUtils; /** Default directory hierarchy for input models */ public class FlatDirectoryHierarchy implements DirectoryHierarchy { diff --git a/src/main/java/edu/ie3/datamodel/io/sink/CsvFileSink.java b/src/main/java/edu/ie3/datamodel/io/sink/CsvFileSink.java index a2a2986f7..b1b87bbc1 100644 --- a/src/main/java/edu/ie3/datamodel/io/sink/CsvFileSink.java +++ b/src/main/java/edu/ie3/datamodel/io/sink/CsvFileSink.java @@ -9,8 +9,10 @@ import edu.ie3.datamodel.exceptions.ExtractorException; import edu.ie3.datamodel.exceptions.ProcessorProviderException; import edu.ie3.datamodel.exceptions.SinkException; +import edu.ie3.datamodel.io.FileNamingStrategy; import edu.ie3.datamodel.io.connectors.CsvFileConnector; import edu.ie3.datamodel.io.csv.BufferedCsvWriter; +import edu.ie3.datamodel.io.csv.FlatDirectoryHierarchy; import edu.ie3.datamodel.io.extractor.Extractor; import edu.ie3.datamodel.io.extractor.NestedEntity; import edu.ie3.datamodel.io.naming.EntityNamingStrategy; @@ -59,7 +61,7 @@ public class CsvFileSink implements InputDataSink, OutputDataSink { private final String csvSep; public CsvFileSink(String baseFolderPath) { - this(baseFolderPath, new EntityNamingStrategy(), false, ","); + this(baseFolderPath, new FileNamingStrategy(), false, ","); } /** @@ -68,7 +70,7 @@ public CsvFileSink(String baseFolderPath) { * starting several sinks and use them for specific entities. * * @param baseFolderPath the base folder path where the files should be put into - * @param entityNamingStrategy the data sink naming strategy that should be used + * @param fileNamingStrategy the data sink file naming strategy that should be used * @param initFiles true if the files should be created during initialization (might create files, * that only consist of a headline, because no data will be written into them), false * otherwise @@ -76,10 +78,10 @@ public CsvFileSink(String baseFolderPath) { */ public CsvFileSink( String baseFolderPath, - EntityNamingStrategy entityNamingStrategy, + FileNamingStrategy fileNamingStrategy, boolean initFiles, String csvSep) { - this(baseFolderPath, new ProcessorProvider(), entityNamingStrategy, initFiles, csvSep); + this(baseFolderPath, new ProcessorProvider(), fileNamingStrategy, initFiles, csvSep); } /** @@ -93,7 +95,7 @@ public CsvFileSink( * * @param baseFolderPath the base folder path where the files should be put into * @param processorProvider the processor provided that should be used for entity de-serialization - * @param entityNamingStrategy the data sink naming strategy that should be used + * @param fileNamingStrategy the data sink file naming strategy that should be used * @param initFiles true if the files should be created during initialization (might create files, * that only consist of a headline, because no data will be written into them), false * otherwise @@ -102,12 +104,12 @@ public CsvFileSink( public CsvFileSink( String baseFolderPath, ProcessorProvider processorProvider, - EntityNamingStrategy entityNamingStrategy, + FileNamingStrategy fileNamingStrategy, boolean initFiles, String csvSep) { this.csvSep = csvSep; this.processorProvider = processorProvider; - this.connector = new CsvFileConnector(baseFolderPath, entityNamingStrategy); + this.connector = new CsvFileConnector(baseFolderPath, fileNamingStrategy); if (initFiles) initFiles(processorProvider, connector); } diff --git a/src/main/java/edu/ie3/datamodel/io/source/csv/CsvDataSource.java b/src/main/java/edu/ie3/datamodel/io/source/csv/CsvDataSource.java index faba98fe0..d43ec0527 100644 --- a/src/main/java/edu/ie3/datamodel/io/source/csv/CsvDataSource.java +++ b/src/main/java/edu/ie3/datamodel/io/source/csv/CsvDataSource.java @@ -6,11 +6,11 @@ package edu.ie3.datamodel.io.source.csv; import edu.ie3.datamodel.exceptions.SourceException; +import edu.ie3.datamodel.io.FileNamingStrategy; import edu.ie3.datamodel.io.connectors.CsvFileConnector; import edu.ie3.datamodel.io.factory.EntityFactory; import edu.ie3.datamodel.io.factory.input.AssetInputEntityData; import edu.ie3.datamodel.io.factory.input.NodeAssetInputEntityData; -import edu.ie3.datamodel.io.naming.EntityNamingStrategy; import edu.ie3.datamodel.models.UniqueEntity; import edu.ie3.datamodel.models.input.AssetInput; import edu.ie3.datamodel.models.input.AssetTypeInput; @@ -65,9 +65,9 @@ public abstract class CsvDataSource { @Deprecated private boolean notYetLoggedWarning = true; public CsvDataSource( - String csvSep, String folderPath, EntityNamingStrategy entityNamingStrategy) { + String csvSep, String folderPath, FileNamingStrategy fileNamingStrategy) { this.csvSep = csvSep; - this.connector = new CsvFileConnector(folderPath, entityNamingStrategy); + this.connector = new CsvFileConnector(folderPath, fileNamingStrategy); } /** diff --git a/src/main/java/edu/ie3/datamodel/io/source/csv/CsvGraphicSource.java b/src/main/java/edu/ie3/datamodel/io/source/csv/CsvGraphicSource.java index d6715143e..bef8b953e 100644 --- a/src/main/java/edu/ie3/datamodel/io/source/csv/CsvGraphicSource.java +++ b/src/main/java/edu/ie3/datamodel/io/source/csv/CsvGraphicSource.java @@ -5,11 +5,11 @@ */ package edu.ie3.datamodel.io.source.csv; +import edu.ie3.datamodel.io.FileNamingStrategy; import edu.ie3.datamodel.io.factory.input.graphics.LineGraphicInputEntityData; import edu.ie3.datamodel.io.factory.input.graphics.LineGraphicInputFactory; import edu.ie3.datamodel.io.factory.input.graphics.NodeGraphicInputEntityData; import edu.ie3.datamodel.io.factory.input.graphics.NodeGraphicInputFactory; -import edu.ie3.datamodel.io.naming.EntityNamingStrategy; import edu.ie3.datamodel.io.source.GraphicSource; import edu.ie3.datamodel.io.source.RawGridSource; import edu.ie3.datamodel.io.source.TypeSource; @@ -49,10 +49,10 @@ public class CsvGraphicSource extends CsvDataSource implements GraphicSource { public CsvGraphicSource( String csvSep, String folderPath, - EntityNamingStrategy entityNamingStrategy, + FileNamingStrategy fileNamingStrategy, TypeSource typeSource, RawGridSource rawGridSource) { - super(csvSep, folderPath, entityNamingStrategy); + super(csvSep, folderPath, fileNamingStrategy); this.typeSource = typeSource; this.rawGridSource = rawGridSource; diff --git a/src/main/java/edu/ie3/datamodel/io/source/csv/CsvIdCoordinateSource.java b/src/main/java/edu/ie3/datamodel/io/source/csv/CsvIdCoordinateSource.java index bd07da633..251985cc9 100644 --- a/src/main/java/edu/ie3/datamodel/io/source/csv/CsvIdCoordinateSource.java +++ b/src/main/java/edu/ie3/datamodel/io/source/csv/CsvIdCoordinateSource.java @@ -5,9 +5,9 @@ */ package edu.ie3.datamodel.io.source.csv; +import edu.ie3.datamodel.io.FileNamingStrategy; import edu.ie3.datamodel.io.factory.SimpleFactoryData; import edu.ie3.datamodel.io.factory.timeseries.IdCoordinateFactory; -import edu.ie3.datamodel.io.naming.EntityNamingStrategy; import edu.ie3.datamodel.io.source.IdCoordinateSource; import java.io.BufferedReader; import java.io.IOException; @@ -32,9 +32,9 @@ public class CsvIdCoordinateSource extends CsvDataSource implements IdCoordinate public CsvIdCoordinateSource( String csvSep, String folderPath, - EntityNamingStrategy entityNamingStrategy, + FileNamingStrategy fileNamingStrategy, IdCoordinateFactory factory) { - super(csvSep, folderPath, entityNamingStrategy); + super(csvSep, folderPath, fileNamingStrategy); this.factory = factory; diff --git a/src/main/java/edu/ie3/datamodel/io/source/csv/CsvRawGridSource.java b/src/main/java/edu/ie3/datamodel/io/source/csv/CsvRawGridSource.java index a137ae1bb..94204e8ef 100644 --- a/src/main/java/edu/ie3/datamodel/io/source/csv/CsvRawGridSource.java +++ b/src/main/java/edu/ie3/datamodel/io/source/csv/CsvRawGridSource.java @@ -5,9 +5,9 @@ */ package edu.ie3.datamodel.io.source.csv; +import edu.ie3.datamodel.io.FileNamingStrategy; import edu.ie3.datamodel.io.factory.EntityFactory; import edu.ie3.datamodel.io.factory.input.*; -import edu.ie3.datamodel.io.naming.EntityNamingStrategy; import edu.ie3.datamodel.io.source.RawGridSource; import edu.ie3.datamodel.io.source.TypeSource; import edu.ie3.datamodel.models.UniqueEntity; @@ -54,9 +54,9 @@ public class CsvRawGridSource extends CsvDataSource implements RawGridSource { public CsvRawGridSource( String csvSep, String gridFolderPath, - EntityNamingStrategy entityNamingStrategy, + FileNamingStrategy fileNamingStrategy, TypeSource typeSource) { - super(csvSep, gridFolderPath, entityNamingStrategy); + super(csvSep, gridFolderPath, fileNamingStrategy); this.typeSource = typeSource; // init factories diff --git a/src/main/java/edu/ie3/datamodel/io/source/csv/CsvSystemParticipantSource.java b/src/main/java/edu/ie3/datamodel/io/source/csv/CsvSystemParticipantSource.java index 43e25579d..d205b8434 100644 --- a/src/main/java/edu/ie3/datamodel/io/source/csv/CsvSystemParticipantSource.java +++ b/src/main/java/edu/ie3/datamodel/io/source/csv/CsvSystemParticipantSource.java @@ -5,10 +5,10 @@ */ package edu.ie3.datamodel.io.source.csv; +import edu.ie3.datamodel.io.FileNamingStrategy; import edu.ie3.datamodel.io.factory.EntityFactory; import edu.ie3.datamodel.io.factory.input.NodeAssetInputEntityData; import edu.ie3.datamodel.io.factory.input.participant.*; -import edu.ie3.datamodel.io.naming.EntityNamingStrategy; import edu.ie3.datamodel.io.source.RawGridSource; import edu.ie3.datamodel.io.source.SystemParticipantSource; import edu.ie3.datamodel.io.source.ThermalSource; @@ -67,11 +67,11 @@ public class CsvSystemParticipantSource extends CsvDataSource implements SystemP public CsvSystemParticipantSource( String csvSep, String participantsFolderPath, - EntityNamingStrategy entityNamingStrategy, + FileNamingStrategy fileNamingStrategy, TypeSource typeSource, ThermalSource thermalSource, RawGridSource rawGridSource) { - super(csvSep, participantsFolderPath, entityNamingStrategy); + super(csvSep, participantsFolderPath, fileNamingStrategy); this.typeSource = typeSource; this.rawGridSource = rawGridSource; this.thermalSource = thermalSource; diff --git a/src/main/java/edu/ie3/datamodel/io/source/csv/CsvThermalSource.java b/src/main/java/edu/ie3/datamodel/io/source/csv/CsvThermalSource.java index 1db7c91bd..83e6ad958 100644 --- a/src/main/java/edu/ie3/datamodel/io/source/csv/CsvThermalSource.java +++ b/src/main/java/edu/ie3/datamodel/io/source/csv/CsvThermalSource.java @@ -5,8 +5,8 @@ */ package edu.ie3.datamodel.io.source.csv; +import edu.ie3.datamodel.io.FileNamingStrategy; import edu.ie3.datamodel.io.factory.input.*; -import edu.ie3.datamodel.io.naming.EntityNamingStrategy; import edu.ie3.datamodel.io.source.ThermalSource; import edu.ie3.datamodel.io.source.TypeSource; import edu.ie3.datamodel.models.input.OperatorInput; @@ -46,9 +46,9 @@ public class CsvThermalSource extends CsvDataSource implements ThermalSource { public CsvThermalSource( String csvSep, String thermalUnitsFolderPath, - EntityNamingStrategy entityNamingStrategy, + FileNamingStrategy fileNamingStrategy, TypeSource typeSource) { - super(csvSep, thermalUnitsFolderPath, entityNamingStrategy); + super(csvSep, thermalUnitsFolderPath, fileNamingStrategy); this.typeSource = typeSource; // init factories diff --git a/src/main/java/edu/ie3/datamodel/io/source/csv/CsvTimeSeriesMappingSource.java b/src/main/java/edu/ie3/datamodel/io/source/csv/CsvTimeSeriesMappingSource.java index ca724d071..789b91935 100644 --- a/src/main/java/edu/ie3/datamodel/io/source/csv/CsvTimeSeriesMappingSource.java +++ b/src/main/java/edu/ie3/datamodel/io/source/csv/CsvTimeSeriesMappingSource.java @@ -5,10 +5,10 @@ */ package edu.ie3.datamodel.io.source.csv; +import edu.ie3.datamodel.io.FileNamingStrategy; import edu.ie3.datamodel.io.csv.timeseries.IndividualTimeSeriesMetaInformation; import edu.ie3.datamodel.io.factory.SimpleEntityData; import edu.ie3.datamodel.io.factory.timeseries.TimeSeriesMappingFactory; -import edu.ie3.datamodel.io.naming.EntityNamingStrategy; import edu.ie3.datamodel.io.source.TimeSeriesMappingSource; import java.util.Map; import java.util.Optional; @@ -22,8 +22,8 @@ public class CsvTimeSeriesMappingSource extends CsvDataSource implements TimeSer private final Map mapping; public CsvTimeSeriesMappingSource( - String csvSep, String folderPath, EntityNamingStrategy entityNamingStrategy) { - super(csvSep, folderPath, entityNamingStrategy); + String csvSep, String folderPath, FileNamingStrategy fileNamingStrategy) { + super(csvSep, folderPath, fileNamingStrategy); /* Build the map */ mapping = diff --git a/src/main/java/edu/ie3/datamodel/io/source/csv/CsvTimeSeriesSource.java b/src/main/java/edu/ie3/datamodel/io/source/csv/CsvTimeSeriesSource.java index 03a904da0..9926330ec 100644 --- a/src/main/java/edu/ie3/datamodel/io/source/csv/CsvTimeSeriesSource.java +++ b/src/main/java/edu/ie3/datamodel/io/source/csv/CsvTimeSeriesSource.java @@ -6,6 +6,7 @@ package edu.ie3.datamodel.io.source.csv; import edu.ie3.datamodel.exceptions.SourceException; +import edu.ie3.datamodel.io.FileNamingStrategy; import edu.ie3.datamodel.io.connectors.CsvFileConnector; import edu.ie3.datamodel.io.factory.timeseries.*; import edu.ie3.datamodel.io.naming.EntityNamingStrategy; @@ -33,7 +34,7 @@ public class CsvTimeSeriesSource extends CsvDataSource * * @param csvSep the separator string for csv columns * @param folderPath path to the folder holding the time series files - * @param entityNamingStrategy strategy for the naming of time series files / data sinks + * @param fileNamingStrategy strategy for the file naming of time series files / data sinks * @param metaInformation The given meta information * @throws SourceException If the given meta information are not supported * @return The source @@ -41,7 +42,7 @@ public class CsvTimeSeriesSource extends CsvDataSource public static CsvTimeSeriesSource getSource( String csvSep, String folderPath, - EntityNamingStrategy entityNamingStrategy, + FileNamingStrategy fileNamingStrategy, CsvFileConnector.CsvIndividualTimeSeriesMetaInformation metaInformation) throws SourceException { switch (metaInformation.getColumnScheme()) { @@ -51,7 +52,7 @@ public static CsvTimeSeriesSource getSource( return new CsvTimeSeriesSource<>( csvSep, folderPath, - entityNamingStrategy, + fileNamingStrategy, metaInformation.getUuid(), metaInformation.getFullFilePath(), PValue.class, @@ -62,7 +63,7 @@ public static CsvTimeSeriesSource getSource( return new CsvTimeSeriesSource<>( csvSep, folderPath, - entityNamingStrategy, + fileNamingStrategy, metaInformation.getUuid(), metaInformation.getFullFilePath(), SValue.class, @@ -73,7 +74,7 @@ public static CsvTimeSeriesSource getSource( return new CsvTimeSeriesSource<>( csvSep, folderPath, - entityNamingStrategy, + fileNamingStrategy, metaInformation.getUuid(), metaInformation.getFullFilePath(), EnergyPriceValue.class, @@ -84,7 +85,7 @@ public static CsvTimeSeriesSource getSource( return new CsvTimeSeriesSource<>( csvSep, folderPath, - entityNamingStrategy, + fileNamingStrategy, metaInformation.getUuid(), metaInformation.getFullFilePath(), HeatAndSValue.class, @@ -95,7 +96,7 @@ public static CsvTimeSeriesSource getSource( return new CsvTimeSeriesSource<>( csvSep, folderPath, - entityNamingStrategy, + fileNamingStrategy, metaInformation.getUuid(), metaInformation.getFullFilePath(), HeatAndPValue.class, @@ -106,7 +107,7 @@ public static CsvTimeSeriesSource getSource( return new CsvTimeSeriesSource<>( csvSep, folderPath, - entityNamingStrategy, + fileNamingStrategy, metaInformation.getUuid(), metaInformation.getFullFilePath(), HeatDemandValue.class, @@ -122,7 +123,7 @@ public static CsvTimeSeriesSource getSource( * * @param csvSep the separator string for csv columns * @param folderPath path to the folder holding the time series files - * @param entityNamingStrategy strategy for the naming of time series files / data sinks + * @param fileNamingStrategy strategy for the file naming of time series files / data sinks * @param timeSeriesUuid Unique identifier of the time series * @param filePath Path of the file, excluding extension and being relative to {@code folderPath} * @param valueClass Class of the value @@ -131,12 +132,12 @@ public static CsvTimeSeriesSource getSource( public CsvTimeSeriesSource( String csvSep, String folderPath, - EntityNamingStrategy entityNamingStrategy, + FileNamingStrategy fileNamingStrategy, UUID timeSeriesUuid, String filePath, Class valueClass, TimeBasedSimpleValueFactory factory) { - super(csvSep, folderPath, entityNamingStrategy); + super(csvSep, folderPath, fileNamingStrategy); /* Read in the full time series */ try { diff --git a/src/main/java/edu/ie3/datamodel/io/source/csv/CsvTypeSource.java b/src/main/java/edu/ie3/datamodel/io/source/csv/CsvTypeSource.java index ba2dd6d8f..0a21002be 100644 --- a/src/main/java/edu/ie3/datamodel/io/source/csv/CsvTypeSource.java +++ b/src/main/java/edu/ie3/datamodel/io/source/csv/CsvTypeSource.java @@ -5,6 +5,7 @@ */ package edu.ie3.datamodel.io.source.csv; +import edu.ie3.datamodel.io.FileNamingStrategy; import edu.ie3.datamodel.io.factory.EntityFactory; import edu.ie3.datamodel.io.factory.SimpleEntityData; import edu.ie3.datamodel.io.factory.input.OperatorInputFactory; @@ -12,7 +13,6 @@ import edu.ie3.datamodel.io.factory.typeinput.SystemParticipantTypeInputFactory; import edu.ie3.datamodel.io.factory.typeinput.Transformer2WTypeInputFactory; import edu.ie3.datamodel.io.factory.typeinput.Transformer3WTypeInputFactory; -import edu.ie3.datamodel.io.naming.EntityNamingStrategy; import edu.ie3.datamodel.io.source.TypeSource; import edu.ie3.datamodel.models.input.InputEntity; import edu.ie3.datamodel.models.input.OperatorInput; @@ -41,8 +41,8 @@ public class CsvTypeSource extends CsvDataSource implements TypeSource { private final SystemParticipantTypeInputFactory systemParticipantTypeInputFactory; public CsvTypeSource( - String csvSep, String typeFolderPath, EntityNamingStrategy entityNamingStrategy) { - super(csvSep, typeFolderPath, entityNamingStrategy); + String csvSep, String typeFolderPath, FileNamingStrategy fileNamingStrategy) { + super(csvSep, typeFolderPath, fileNamingStrategy); // init factories operatorInputFactory = new OperatorInputFactory(); diff --git a/src/main/java/edu/ie3/datamodel/io/source/csv/CsvWeatherSource.java b/src/main/java/edu/ie3/datamodel/io/source/csv/CsvWeatherSource.java index d87b8abf8..04dc6a16a 100644 --- a/src/main/java/edu/ie3/datamodel/io/source/csv/CsvWeatherSource.java +++ b/src/main/java/edu/ie3/datamodel/io/source/csv/CsvWeatherSource.java @@ -5,12 +5,12 @@ */ package edu.ie3.datamodel.io.source.csv; +import edu.ie3.datamodel.io.FileNamingStrategy; import edu.ie3.datamodel.io.connectors.CsvFileConnector; import edu.ie3.datamodel.io.csv.timeseries.ColumnScheme; import edu.ie3.datamodel.io.factory.timeseries.IdCoordinateFactory; import edu.ie3.datamodel.io.factory.timeseries.TimeBasedWeatherValueData; import edu.ie3.datamodel.io.factory.timeseries.TimeBasedWeatherValueFactory; -import edu.ie3.datamodel.io.naming.EntityNamingStrategy; import edu.ie3.datamodel.io.source.IdCoordinateSource; import edu.ie3.datamodel.io.source.WeatherSource; import edu.ie3.datamodel.models.UniqueEntity; @@ -43,7 +43,7 @@ public class CsvWeatherSource extends CsvDataSource implements WeatherSource { * * @param csvSep the separator string for csv columns * @param folderPath path to the folder holding the time series files - * @param entityNamingStrategy strategy for the naming of time series files / data sinks + * @param fileNamingStrategy strategy for the file naming of time series files / data sinks * @param weatherFactory factory to transfer field to value mapping into actual java object * instances * @param coordinateFactory factory to build coordinate id to coordinate mapping @@ -51,14 +51,14 @@ public class CsvWeatherSource extends CsvDataSource implements WeatherSource { public CsvWeatherSource( String csvSep, String folderPath, - EntityNamingStrategy entityNamingStrategy, + FileNamingStrategy fileNamingStrategy, TimeBasedWeatherValueFactory weatherFactory, IdCoordinateFactory coordinateFactory) { this( csvSep, folderPath, - entityNamingStrategy, - new CsvIdCoordinateSource(csvSep, folderPath, entityNamingStrategy, coordinateFactory), + fileNamingStrategy, + new CsvIdCoordinateSource(csvSep, folderPath, fileNamingStrategy, coordinateFactory), weatherFactory); } @@ -68,7 +68,7 @@ public CsvWeatherSource( * * @param csvSep the separator string for csv columns * @param folderPath path to the folder holding the time series files - * @param entityNamingStrategy strategy for the naming of time series files / data sinks + * @param fileNamingStrategy strategy for the file naming of time series files / data sinks * @param coordinateSource a coordinate source to map ids to points * @param weatherFactory factory to transfer field to value mapping into actual java object * instances @@ -76,10 +76,10 @@ public CsvWeatherSource( public CsvWeatherSource( String csvSep, String folderPath, - EntityNamingStrategy entityNamingStrategy, + FileNamingStrategy fileNamingStrategy, IdCoordinateSource coordinateSource, TimeBasedWeatherValueFactory weatherFactory) { - super(csvSep, folderPath, entityNamingStrategy); + super(csvSep, folderPath, fileNamingStrategy); this.coordinateSource = coordinateSource; this.weatherFactory = weatherFactory; diff --git a/src/test/groovy/edu/ie3/datamodel/io/FileNamingStrategyTest.groovy b/src/test/groovy/edu/ie3/datamodel/io/FileNamingStrategyTest.groovy index f784dc49a..6a2375300 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/FileNamingStrategyTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/FileNamingStrategyTest.groovy @@ -81,7 +81,7 @@ class FileNamingStrategyTest extends Specification { def setup() { def tmpPath = Files.createTempDirectory("psdm_file_naming_strategy") defaultHierarchy = new DefaultDirectoryHierarchy(tmpPath.toString(), "test_grid") - flatHierarchy = new FlatDirectoryHierarchy(tmpPath.toString(), "test_grid") + flatHierarchy = new FlatDirectoryHierarchy() simpleEntityNaming = new EntityNamingStrategy() } @@ -772,7 +772,7 @@ class FileNamingStrategyTest extends Specification { def strategy = new FileNamingStrategy(simpleEntityNaming, defaultHierarchy) when: - def actual = strategy.getIndividualTimeSeriesPattern() + def actual = strategy.getIndividualTimeSeriesPattern().pattern() then: actual == "test_grid" + File.separator + "input" + File.separator + "participants" + File.separator + "time_series" + File.separator + "its_(?[a-zA-Z]{1,11})_(?[a-zA-Z0-9]{8}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{12})" @@ -784,7 +784,7 @@ class FileNamingStrategyTest extends Specification { def strategy = new FileNamingStrategy(simpleEntityNaming, defaultHierarchy) when: - def actual = strategy.getLoadProfileTimeSeriesPattern() + def actual = strategy.getLoadProfileTimeSeriesPattern().pattern() then: actual == "test_grid" + File.separator + "input" + File.separator + "global" + File.separator + "lpts_(?[a-zA-Z][0-9])_(?[a-zA-Z0-9]{8}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{12})" @@ -796,7 +796,7 @@ class FileNamingStrategyTest extends Specification { def strategy = new FileNamingStrategy(simpleEntityNaming, flatHierarchy) when: - def actual = strategy.getIndividualTimeSeriesPattern() + def actual = strategy.getIndividualTimeSeriesPattern().pattern() then: actual.toString() == "its_(?[a-zA-Z]{1,11})_(?[a-zA-Z0-9]{8}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{12})" @@ -807,7 +807,7 @@ class FileNamingStrategyTest extends Specification { def strategy = new FileNamingStrategy(simpleEntityNaming, flatHierarchy) when: - def actual = strategy.getLoadProfileTimeSeriesPattern() + def actual = strategy.getLoadProfileTimeSeriesPattern().pattern() then: actual.toString() == "lpts_(?[a-zA-Z][0-9])_(?[a-zA-Z0-9]{8}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{12})" diff --git a/src/test/groovy/edu/ie3/datamodel/io/connectors/CsvFileConnectorTest.groovy b/src/test/groovy/edu/ie3/datamodel/io/connectors/CsvFileConnectorTest.groovy index 7166f7b09..4e4c74275 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/connectors/CsvFileConnectorTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/connectors/CsvFileConnectorTest.groovy @@ -6,9 +6,9 @@ package edu.ie3.datamodel.io.connectors import edu.ie3.datamodel.exceptions.ConnectorException +import edu.ie3.datamodel.io.FileNamingStrategy import edu.ie3.datamodel.io.csv.CsvFileDefinition import edu.ie3.datamodel.io.csv.DefaultDirectoryHierarchy -import edu.ie3.datamodel.io.naming.HierarchicFileNamingStrategy import edu.ie3.datamodel.io.csv.timeseries.ColumnScheme import edu.ie3.datamodel.io.naming.EntityNamingStrategy import edu.ie3.datamodel.models.StandardUnits @@ -45,7 +45,7 @@ class CsvFileConnectorTest extends Specification { def setupSpec() { tmpDirectory = Files.createTempDirectory("psdm_csv_file_connector_") - cfc = new CsvFileConnector(tmpDirectory.toString(), new EntityNamingStrategy()) + cfc = new CsvFileConnector(tmpDirectory.toString(), new FileNamingStrategy()) def gridPaths = ["node_input.csv"] timeSeriesPaths = [ "its_pq_53990eea-1b5d-47e8-9134-6d8de36604bf.csv", @@ -171,7 +171,7 @@ class CsvFileConnectorTest extends Specification { def "The csv file connector throws an Exception, if the foreseen file cannot be found"() { given: - def cfc = new CsvFileConnector(tmpDirectory.toString(), new HierarchicFileNamingStrategy(new DefaultDirectoryHierarchy(tmpDirectory.toString(), "test"))) + def cfc = new CsvFileConnector(tmpDirectory.toString(), new FileNamingStrategy(new EntityNamingStrategy(), new DefaultDirectoryHierarchy(tmpDirectory.toString(), "test"))) when: cfc.initReader(NodeInput) @@ -192,7 +192,7 @@ class CsvFileConnectorTest extends Specification { given: "a suitable connector" def baseDirectory = FilenameUtils.concat(tmpDirectory.toString(), "directoryHierarchy") def directoryHierarchy = new DefaultDirectoryHierarchy(baseDirectory, "test") - def fileNamingStrategy = new HierarchicFileNamingStrategy(directoryHierarchy) + def fileNamingStrategy = new FileNamingStrategy(new EntityNamingStrategy(), directoryHierarchy) def connector = new CsvFileConnector(baseDirectory, fileNamingStrategy) and: "expected results" @@ -211,8 +211,8 @@ class CsvFileConnectorTest extends Specification { def "The csv file connector is able to init writers utilizing no directory hierarchy"() { given: "a suitable connector" def baseDirectory = FilenameUtils.concat(tmpDirectory.toString(), "directoryHierarchy") - def entityPersistenceNamingStrategy = new EntityNamingStrategy() - def connector = new CsvFileConnector(baseDirectory, entityPersistenceNamingStrategy) + def fileNamingStrategy = new FileNamingStrategy() + def connector = new CsvFileConnector(baseDirectory, fileNamingStrategy) and: "expected results" def nodeFile = new File(FilenameUtils.concat(baseDirectory, "node_input.csv")) @@ -230,8 +230,8 @@ class CsvFileConnectorTest extends Specification { def "The csv file connector throws ConnectorException if no csv file definition can be built from class information"() { given: def baseDirectory = tmpDirectory.toString() - def entityPersistenceNamingStrategy = new EntityNamingStrategy() - def connector = new CsvFileConnector(baseDirectory, entityPersistenceNamingStrategy) + def fileNamingStrategy = new FileNamingStrategy() + def connector = new CsvFileConnector(baseDirectory, fileNamingStrategy) when: connector.buildFileDefinition(String, ["a", "b", "c"] as String[], ",") @@ -244,8 +244,8 @@ class CsvFileConnectorTest extends Specification { def "The csv file connector is able to build correct csv file definition from class upon request"() { given: def baseDirectory = tmpDirectory.toString() - def entityPersistenceNamingStrategy = new EntityNamingStrategy() - def connector = new CsvFileConnector(baseDirectory, entityPersistenceNamingStrategy) + def fileNamingStrategy = new FileNamingStrategy() + def connector = new CsvFileConnector(baseDirectory, fileNamingStrategy) def expected = new CsvFileDefinition("node_input.csv", "", ["a", "b", "c"] as String[], ",") when: @@ -258,7 +258,7 @@ class CsvFileConnectorTest extends Specification { def "The csv file connector is able to build correct csv file definition from class upon request, utilizing directory hierarchy"() { given: def baseDirectory = tmpDirectory.toString() - def fileNamingStrategy = new HierarchicFileNamingStrategy(new DefaultDirectoryHierarchy(tmpDirectory.toString(), "test")) + def fileNamingStrategy = new FileNamingStrategy(new EntityNamingStrategy(), new DefaultDirectoryHierarchy(tmpDirectory.toString(), "test")) def connector = new CsvFileConnector(baseDirectory, fileNamingStrategy) def expected = new CsvFileDefinition("node_input.csv", Stream.of("test", "input", "grid").collect(Collectors.joining(File.separator)), ["a", "b", "c"] as String[], ",") @@ -272,8 +272,8 @@ class CsvFileConnectorTest extends Specification { def "The csv file connector throws ConnectorException if no csv file definition can be built from time series"() { given: "a suitable connector" def baseDirectory = tmpDirectory.toString() - def entityPersistenceNamingStrategy = new EntityNamingStrategy() - def connector = new CsvFileConnector(baseDirectory, entityPersistenceNamingStrategy) + def fileNamingStrategy = new FileNamingStrategy() + def connector = new CsvFileConnector(baseDirectory, fileNamingStrategy) and: "credible input" def timeSeries = Mock(RepetitiveTimeSeries) @@ -289,8 +289,8 @@ class CsvFileConnectorTest extends Specification { def "The csv file connector is able to build correct csv file definition from time series upon request"() { given: "a suitable connector" def baseDirectory = tmpDirectory.toString() - def entityPersistenceNamingStrategy = new EntityNamingStrategy() - def connector = new CsvFileConnector(baseDirectory, entityPersistenceNamingStrategy) + def fileNamingStrategy = new FileNamingStrategy() + def connector = new CsvFileConnector(baseDirectory, fileNamingStrategy) def expected = new CsvFileDefinition("its_c_0c03ce9f-ab0e-4715-bc13-f9d903f26dbf.csv", "", ["a", "b", "c"] as String[], ",") and: "credible input" @@ -311,7 +311,7 @@ class CsvFileConnectorTest extends Specification { def "The csv file connector is able to build correct csv file definition from time series upon request, utilizing directory hierarchy"() { given: "a suitable connector" def baseDirectory = tmpDirectory.toString() - def fileNamingStrategy = new HierarchicFileNamingStrategy(new DefaultDirectoryHierarchy(tmpDirectory.toString(), "test")) + def fileNamingStrategy = new FileNamingStrategy(new EntityNamingStrategy(), new DefaultDirectoryHierarchy(tmpDirectory.toString(), "test")) def connector = new CsvFileConnector(baseDirectory, fileNamingStrategy) def expected = new CsvFileDefinition("its_c_0c03ce9f-ab0e-4715-bc13-f9d903f26dbf.csv", Stream.of("test", "input", "participants", "time_series").collect(Collectors.joining(File.separator)), ["a", "b", "c"] as String[], ",") diff --git a/src/test/groovy/edu/ie3/datamodel/io/csv/FlatDirectoryHierarchyTest.groovy b/src/test/groovy/edu/ie3/datamodel/io/csv/FlatDirectoryHierarchyTest.groovy index 2c9264c35..d09633a91 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/csv/FlatDirectoryHierarchyTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/csv/FlatDirectoryHierarchyTest.groovy @@ -5,18 +5,14 @@ */ package edu.ie3.datamodel.io.csv -import edu.ie3.datamodel.exceptions.FileException +import edu.ie3.datamodel.models.input.system.BmInput import edu.ie3.util.io.FileIOUtils -import org.apache.commons.io.FilenameUtils -import org.testcontainers.shaded.org.bouncycastle.util.test.TestFailedException import spock.lang.Shared import spock.lang.Specification import java.nio.file.Files import java.nio.file.Path import java.nio.file.Paths -import java.util.stream.Collectors -import java.util.stream.Stream class FlatDirectoryHierarchyTest extends Specification { @Shared @@ -31,38 +27,21 @@ class FlatDirectoryHierarchyTest extends Specification { } def cleanup() { - //FileIOUtils.deleteRecursively(tmpDirectory) + FileIOUtils.deleteRecursively(tmpDirectory) } def "A FlatDirectoryHierarchy is set up correctly"() { - given: - def basePath = basePathString() - - when: - def fdh = new FlatDirectoryHierarchy(tmpDirectory.toString()) - - then: - try { - fdh.projectDirectory == Paths.get(basePath) - } catch (TestFailedException e) { - FileIOUtils.deleteRecursively(tmpDirectory) - throw e - } - } - - def "A FlatDirectoryHierarchy is able to create a correct flat hierarchy of directories"() { given: def basePath = Paths.get(basePathString()) - def fdh = new FlatDirectoryHierarchy(tmpDirectory.toString()) - def x = 2 when: - //fdh.createDirs() - x = 3 + def fdh = new FlatDirectoryHierarchy() then: Files.exists(basePath) Files.isDirectory(basePath) - } + + fdh.getSubDirectory(BmInput) == Optional.empty(); + } } diff --git a/src/test/groovy/edu/ie3/datamodel/io/sink/CsvFileSinkTest.groovy b/src/test/groovy/edu/ie3/datamodel/io/sink/CsvFileSinkTest.groovy index 78e9faf30..ad327256d 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/sink/CsvFileSinkTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/sink/CsvFileSinkTest.groovy @@ -5,7 +5,7 @@ */ package edu.ie3.datamodel.io.sink -import edu.ie3.datamodel.io.naming.EntityNamingStrategy +import edu.ie3.datamodel.io.FileNamingStrategy import edu.ie3.datamodel.io.processor.ProcessorProvider import edu.ie3.datamodel.io.processor.input.InputEntityProcessor import edu.ie3.datamodel.io.processor.result.ResultEntityProcessor @@ -85,7 +85,7 @@ class CsvFileSinkTest extends Specification implements TimeSeriesTestData { new ResultEntityProcessor(PvResult), new ResultEntityProcessor(EvResult) ], [] as Map), - new EntityNamingStrategy(), + new FileNamingStrategy(), true, ",") csvFileSink.shutdown() @@ -157,7 +157,7 @@ class CsvFileSinkTest extends Specification implements TimeSeriesTestData { new InputEntityProcessor(ThermalBusInput), new InputEntityProcessor(LineTypeInput) ], [] as Map), - new EntityNamingStrategy(), + new FileNamingStrategy(), false, ",") @@ -214,7 +214,7 @@ class CsvFileSinkTest extends Specification implements TimeSeriesTestData { CsvFileSink csvFileSink = new CsvFileSink(testBaseFolderPath, new ProcessorProvider([], timeSeriesProcessorMap), - new EntityNamingStrategy(), + new FileNamingStrategy(), false, ",") @@ -288,7 +288,7 @@ class CsvFileSinkTest extends Specification implements TimeSeriesTestData { new ProcessorProvider( ProcessorProvider.allEntityProcessors(), new HashMap, Value>, TimeSeriesEntry, Value>>()), - new EntityNamingStrategy(), + new FileNamingStrategy(), false, ",") @@ -308,7 +308,7 @@ class CsvFileSinkTest extends Specification implements TimeSeriesTestData { def csvFileSink = new CsvFileSink( testBaseFolderPath, new ProcessorProvider(), - new EntityNamingStrategy(), + new FileNamingStrategy(), false, ",") diff --git a/src/test/groovy/edu/ie3/datamodel/io/sink/InfluxDbSinkIT.groovy b/src/test/groovy/edu/ie3/datamodel/io/sink/InfluxDbSinkIT.groovy index 0c8b9f631..089ba139b 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/sink/InfluxDbSinkIT.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/sink/InfluxDbSinkIT.groovy @@ -5,6 +5,7 @@ */ package edu.ie3.datamodel.io.sink +import edu.ie3.datamodel.io.FileNamingStrategy import edu.ie3.datamodel.io.connectors.InfluxDbConnector import edu.ie3.datamodel.io.naming.EntityNamingStrategy import edu.ie3.datamodel.models.StandardUnits @@ -43,7 +44,7 @@ class InfluxDbSinkIT extends Specification { InfluxDbConnector connector @Shared - EntityNamingStrategy entityPersistenceNamingStrategy + FileNamingStrategy fileNamingStrategy @Shared InfluxDbSink sink @@ -51,7 +52,7 @@ class InfluxDbSinkIT extends Specification { def setupSpec() { connector = new InfluxDbConnector(influxDbContainer.url,"test_out", "test_scenario") sink = new InfluxDbSink(connector) - entityPersistenceNamingStrategy = new EntityNamingStrategy() + fileNamingStrategy = new FileNamingStrategy() } @@ -73,7 +74,7 @@ class InfluxDbSinkIT extends Specification { when: sink.persist(lineResult1) sink.flush() - def key = entityPersistenceNamingStrategy.getEntityName(LineResult).get().trim().replaceAll("\\W", "_") + def key = fileNamingStrategy.getEntityName(LineResult).get().trim().replaceAll("\\W", "_") def queryResult = connector.getSession().query(new Query("SELECT * FROM " + key)) def parsedResults = InfluxDbConnector.parseQueryResult(queryResult) def fieldMap = parsedResults.get(key).first() @@ -125,8 +126,8 @@ class InfluxDbSinkIT extends Specification { ] when: sink.persistAll(entities) - def key_line = entityPersistenceNamingStrategy.getEntityName(LineResult).get().trim().replaceAll("\\W", "_") - def key_chp = entityPersistenceNamingStrategy.getEntityName(ChpResult).get().trim().replaceAll("\\W", "_") + def key_line = fileNamingStrategy.getEntityName(LineResult).get().trim().replaceAll("\\W", "_") + def key_chp = fileNamingStrategy.getEntityName(ChpResult).get().trim().replaceAll("\\W", "_") def queryResult = connector.getSession().query(new Query("SELECT * FROM " + key_line + ", " + key_chp)) def parsedResults = InfluxDbConnector.parseQueryResult(queryResult) def lineResults = parsedResults.get(key_line) @@ -154,7 +155,7 @@ class InfluxDbSinkIT extends Specification { IndividualTimeSeries timeSeries = new IndividualTimeSeries(UUID.randomUUID(), [p1, p2, p3] as Set) when: sink.persistTimeSeries(timeSeries) - def key = entityPersistenceNamingStrategy.getEntityName(timeSeries).get().trim().replaceAll("\\W", "_") + def key = fileNamingStrategy.getEntityName(timeSeries).get().trim().replaceAll("\\W", "_") def queryResult = connector.getSession().query(new Query("SELECT * FROM " + key)) def parsedResults = InfluxDbConnector.parseQueryResult(queryResult) def pValuesMap = parsedResults.get(key) diff --git a/src/test/groovy/edu/ie3/datamodel/io/source/csv/CosmoCsvIdCoordinateSourceIT.groovy b/src/test/groovy/edu/ie3/datamodel/io/source/csv/CosmoCsvIdCoordinateSourceIT.groovy index 65ccd473d..d495cf5c2 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/source/csv/CosmoCsvIdCoordinateSourceIT.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/source/csv/CosmoCsvIdCoordinateSourceIT.groovy @@ -20,7 +20,7 @@ class CosmoCsvIdCoordinateSourceIT extends Specification implements CsvTestDataM CsvIdCoordinateSource source def setupSpec() { - source = new CsvIdCoordinateSource(csvSep, coordinatesFolderPath + "_cosmo", entityPersistenceNamingStrategy, new CosmoIdCoordinateFactory()) + source = new CsvIdCoordinateSource(csvSep, coordinatesFolderPath + "_cosmo", fileNamingStrategy, new CosmoIdCoordinateFactory()) } def "The CsvCoordinateSource is able to create a valid stream from a coordinate file"() { diff --git a/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvDataSourceTest.groovy b/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvDataSourceTest.groovy index 7a96f6fd4..704a1e7d9 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvDataSourceTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvDataSourceTest.groovy @@ -5,8 +5,8 @@ */ package edu.ie3.datamodel.io.source.csv +import edu.ie3.datamodel.io.FileNamingStrategy import edu.ie3.datamodel.io.factory.input.ThermalBusInputFactory -import edu.ie3.datamodel.io.naming.EntityNamingStrategy import edu.ie3.datamodel.models.UniqueEntity import edu.ie3.datamodel.models.input.NodeInput import edu.ie3.datamodel.models.input.OperatorInput @@ -31,8 +31,8 @@ class CsvDataSourceTest extends Specification { // methods in a public or protected method makes them available for testing private final class DummyCsvSource extends CsvDataSource { - DummyCsvSource(String csvSep, String folderPath, EntityNamingStrategy entityPersistenceNamingStrategy) { - super(csvSep, folderPath, entityPersistenceNamingStrategy) + DummyCsvSource(String csvSep, String folderPath, FileNamingStrategy fileNamingStrategy) { + super(csvSep, folderPath, fileNamingStrategy) } Map buildFieldsToAttributes( @@ -64,9 +64,9 @@ class CsvDataSourceTest extends Specification { @Shared String csvSep = "," String testBaseFolderPath = new File(getClass().getResource('/testGridFiles').toURI()).getAbsolutePath() - EntityNamingStrategy entityPersistenceNamingStrategy = new EntityNamingStrategy() + FileNamingStrategy fileNamingStrategy = new FileNamingStrategy() - DummyCsvSource dummyCsvSource = new DummyCsvSource(csvSep, testBaseFolderPath, entityPersistenceNamingStrategy) + DummyCsvSource dummyCsvSource = new DummyCsvSource(csvSep, testBaseFolderPath, fileNamingStrategy) def "A csv data source is able to find the correct first entity by uuid"() { given: @@ -90,7 +90,7 @@ class CsvDataSourceTest extends Specification { expect: dummyCsvSource.connector != null dummyCsvSource.connector.baseDirectoryName == testBaseFolderPath - dummyCsvSource.connector.entityNamingStrategy == entityPersistenceNamingStrategy + dummyCsvSource.connector.fileNamingStrategy == fileNamingStrategy dummyCsvSource.connector.entityWriters.isEmpty() } diff --git a/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvGraphicSourceTest.groovy b/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvGraphicSourceTest.groovy index 43a81f910..6668bd2ef 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvGraphicSourceTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvGraphicSourceTest.groovy @@ -20,9 +20,9 @@ class CsvGraphicSourceTest extends Specification implements CsvTestDataMeta { def "A CsvGraphicSource should provide an instance of GraphicElements based on valid input data correctly"() { given: - def typeSource = new CsvTypeSource(csvSep, typeFolderPath, entityPersistenceNamingStrategy) - def rawGridSource = new CsvRawGridSource(csvSep, gridFolderPath, entityPersistenceNamingStrategy, typeSource) - def csvGraphicSource = new CsvGraphicSource(csvSep, graphicsFolderPath, entityPersistenceNamingStrategy, typeSource, rawGridSource) + def typeSource = new CsvTypeSource(csvSep, typeFolderPath, fileNamingStrategy) + def rawGridSource = new CsvRawGridSource(csvSep, gridFolderPath, fileNamingStrategy, typeSource) + def csvGraphicSource = new CsvGraphicSource(csvSep, graphicsFolderPath, fileNamingStrategy, typeSource, rawGridSource) when: def graphicElementsOpt = csvGraphicSource.getGraphicElements() @@ -38,9 +38,9 @@ class CsvGraphicSourceTest extends Specification implements CsvTestDataMeta { def "A CsvGraphicSource should process invalid input data as expected when requested to provide an instance of GraphicElements"() { given: - def typeSource = new CsvTypeSource(csvSep, typeFolderPath, entityPersistenceNamingStrategy) + def typeSource = new CsvTypeSource(csvSep, typeFolderPath, fileNamingStrategy) def rawGridSource = - new CsvRawGridSource(csvSep, gridFolderPath, entityPersistenceNamingStrategy, typeSource) { + new CsvRawGridSource(csvSep, gridFolderPath, fileNamingStrategy, typeSource) { @Override Set getNodes() { return Collections.emptySet() @@ -52,7 +52,7 @@ class CsvGraphicSourceTest extends Specification implements CsvTestDataMeta { } } - def csvGraphicSource = new CsvGraphicSource(csvSep, graphicsFolderPath, entityPersistenceNamingStrategy, typeSource, rawGridSource) + def csvGraphicSource = new CsvGraphicSource(csvSep, graphicsFolderPath, fileNamingStrategy, typeSource, rawGridSource) when: def graphicElementsOpt = csvGraphicSource.getGraphicElements() @@ -64,7 +64,7 @@ class CsvGraphicSourceTest extends Specification implements CsvTestDataMeta { def "A CsvGraphicSource should read and handle a valid node graphics file as expected"() { given: - def csvGraphicSource = new CsvGraphicSource(csvSep, graphicsFolderPath, entityPersistenceNamingStrategy, Mock(CsvTypeSource), Mock(CsvRawGridSource)) + def csvGraphicSource = new CsvGraphicSource(csvSep, graphicsFolderPath, fileNamingStrategy, Mock(CsvTypeSource), Mock(CsvRawGridSource)) def expectedNodeGraphicD = new NodeGraphicInput( gtd.nodeGraphicD.uuid, gtd.nodeGraphicD.graphicLayer, @@ -92,7 +92,7 @@ class CsvGraphicSourceTest extends Specification implements CsvTestDataMeta { def "A CsvGraphicSource should read and handle a valid line graphics file as expected"() { given: - def csvGraphicSource = new CsvGraphicSource(csvSep, graphicsFolderPath, entityPersistenceNamingStrategy, Mock(CsvTypeSource), Mock(CsvRawGridSource)) + def csvGraphicSource = new CsvGraphicSource(csvSep, graphicsFolderPath, fileNamingStrategy, Mock(CsvTypeSource), Mock(CsvRawGridSource)) when: def lineGraphics = csvGraphicSource.getLineGraphicInput([gtd.lineCtoD] as Set) @@ -104,7 +104,7 @@ class CsvGraphicSourceTest extends Specification implements CsvTestDataMeta { def "A CsvGraphicSource should build node graphic entity data from valid and invalid input data correctly"() { given: - def csvGraphicSource = new CsvGraphicSource(csvSep, graphicsFolderPath, entityPersistenceNamingStrategy, Mock(CsvTypeSource), Mock(CsvRawGridSource)) + def csvGraphicSource = new CsvGraphicSource(csvSep, graphicsFolderPath, fileNamingStrategy, Mock(CsvTypeSource), Mock(CsvRawGridSource)) def fieldsToAttributesMap = [ "uuid" : "09aec636-791b-45aa-b981-b14edf171c4c", "graphic_layer": "main", @@ -138,7 +138,7 @@ class CsvGraphicSourceTest extends Specification implements CsvTestDataMeta { def "A CsvGraphicSource should build line graphic entity data from valid and invalid input data correctly"() { given: - def csvGraphicSource = new CsvGraphicSource(csvSep, graphicsFolderPath, entityPersistenceNamingStrategy, Mock(CsvTypeSource), Mock(CsvRawGridSource)) + def csvGraphicSource = new CsvGraphicSource(csvSep, graphicsFolderPath, fileNamingStrategy, Mock(CsvTypeSource), Mock(CsvRawGridSource)) def fieldsToAttributesMap = [ "uuid" : "ece86139-3238-4a35-9361-457ecb4258b0", "graphic_layer": "main", diff --git a/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvRawGridSourceTest.groovy b/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvRawGridSourceTest.groovy index 07b235d10..c96156943 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvRawGridSourceTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvRawGridSourceTest.groovy @@ -27,8 +27,8 @@ class CsvRawGridSourceTest extends Specification implements CsvTestDataMeta { CsvRawGridSource source def setupSpec() { - CsvTypeSource typeSource = new CsvTypeSource(csvSep, typeFolderPath, entityPersistenceNamingStrategy) - source = new CsvRawGridSource(csvSep, gridFolderPath, entityPersistenceNamingStrategy, typeSource) + CsvTypeSource typeSource = new CsvTypeSource(csvSep, typeFolderPath, fileNamingStrategy) + source = new CsvRawGridSource(csvSep, gridFolderPath, fileNamingStrategy, typeSource) } def "The CsvRawGridSource is able to convert single valid AssetInputEntityData to ConnectorInputEntityData"() { @@ -742,8 +742,8 @@ class CsvRawGridSourceTest extends Specification implements CsvTestDataMeta { def "The CsvRawGridSource returns an empty Optional, if one mandatory element for the RawGridElements is missing"() { given: "a source pointing to malformed grid data" - CsvTypeSource typeSource = new CsvTypeSource(csvSep, typeFolderPath, entityPersistenceNamingStrategy) - source = new CsvRawGridSource(csvSep, gridFolderPath + "_malformed", entityPersistenceNamingStrategy, typeSource) + CsvTypeSource typeSource = new CsvTypeSource(csvSep, typeFolderPath, fileNamingStrategy) + source = new CsvRawGridSource(csvSep, gridFolderPath + "_malformed", fileNamingStrategy, typeSource) when: "loading a total grid structure from file" def actual = source.getGridData() @@ -754,8 +754,8 @@ class CsvRawGridSourceTest extends Specification implements CsvTestDataMeta { def "The CsvRawGridSource returns an empty Optional, if the RawGridElements contain no single element"() { given: "a source pointing to malformed grid data" - CsvTypeSource typeSource = new CsvTypeSource(csvSep, typeFolderPath, entityPersistenceNamingStrategy) - source = new CsvRawGridSource(csvSep, gridFolderPath + "_empty", entityPersistenceNamingStrategy, typeSource) + CsvTypeSource typeSource = new CsvTypeSource(csvSep, typeFolderPath, fileNamingStrategy) + source = new CsvRawGridSource(csvSep, gridFolderPath + "_empty", fileNamingStrategy, typeSource) when: "loading a total grid structure from file" def actual = source.getGridData() diff --git a/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvSystemParticipantSourceTest.groovy b/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvSystemParticipantSourceTest.groovy index dac895b8d..6058c9347 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvSystemParticipantSourceTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvSystemParticipantSourceTest.groovy @@ -25,18 +25,17 @@ import edu.ie3.datamodel.models.input.system.WecInput import edu.ie3.datamodel.models.input.thermal.ThermalBusInput import edu.ie3.datamodel.models.input.thermal.ThermalStorageInput import edu.ie3.test.common.SystemParticipantTestData as sptd -import org.apache.commons.lang3.NotImplementedException import spock.lang.Specification class CsvSystemParticipantSourceTest extends Specification implements CsvTestDataMeta { def "A CsvSystemParticipantSource should provide an instance of SystemParticipants based on valid input data correctly"() { given: - def typeSource = new CsvTypeSource(csvSep, typeFolderPath, entityPersistenceNamingStrategy) - def thermalSource = new CsvThermalSource(csvSep, participantsFolderPath, entityPersistenceNamingStrategy, typeSource) - def rawGridSource = new CsvRawGridSource(csvSep, gridFolderPath, entityPersistenceNamingStrategy, typeSource) + def typeSource = new CsvTypeSource(csvSep, typeFolderPath, fileNamingStrategy) + def thermalSource = new CsvThermalSource(csvSep, participantsFolderPath, fileNamingStrategy, typeSource) + def rawGridSource = new CsvRawGridSource(csvSep, gridFolderPath, fileNamingStrategy, typeSource) def csvSystemParticipantSource = new CsvSystemParticipantSource(csvSep, - participantsFolderPath, entityPersistenceNamingStrategy, typeSource, + participantsFolderPath, fileNamingStrategy, typeSource, thermalSource, rawGridSource) when: @@ -61,13 +60,13 @@ class CsvSystemParticipantSourceTest extends Specification implements CsvTestDat def "A CsvSystemParticipantSource should process invalid input data as expected when requested to provide an instance of SystemParticipants"() { given: - def typeSource = new CsvTypeSource(csvSep, typeFolderPath, entityPersistenceNamingStrategy) - def thermalSource = new CsvThermalSource(csvSep, participantsFolderPath, entityPersistenceNamingStrategy, typeSource) + def typeSource = new CsvTypeSource(csvSep, typeFolderPath, fileNamingStrategy) + def thermalSource = new CsvThermalSource(csvSep, participantsFolderPath, fileNamingStrategy, typeSource) def rawGridSource = Spy(CsvRawGridSource, constructorArgs: [ - csvSep, - gridFolderPath, - entityPersistenceNamingStrategy, - typeSource + csvSep, + gridFolderPath, + fileNamingStrategy, + typeSource ]) { // partly fake the return method of the csv raw grid source to always return empty node sets // -> elements to build NodeGraphicInputs are missing @@ -75,7 +74,7 @@ class CsvSystemParticipantSourceTest extends Specification implements CsvTestDat getNodes(_) >> new HashSet() } as RawGridSource def csvSystemParticipantSource = new CsvSystemParticipantSource(csvSep, - participantsFolderPath, entityPersistenceNamingStrategy, typeSource, + participantsFolderPath, fileNamingStrategy, typeSource, thermalSource, rawGridSource) when: @@ -88,7 +87,7 @@ class CsvSystemParticipantSourceTest extends Specification implements CsvTestDat def "A CsvSystemParticipantSource should build typed entity from valid and invalid input data as expected"() { given: def csvSystemParticipantSource = new CsvSystemParticipantSource(csvSep, - participantsFolderPath, entityPersistenceNamingStrategy, Mock(CsvTypeSource), + participantsFolderPath, fileNamingStrategy, Mock(CsvTypeSource), Mock(CsvThermalSource), Mock(CsvRawGridSource)) def nodeAssetInputEntityData = new NodeAssetInputEntityData(fieldsToAttributes, clazz, operator, node) @@ -114,7 +113,7 @@ class CsvSystemParticipantSourceTest extends Specification implements CsvTestDat def "A CsvSystemParticipantSource should build hp input entity from valid and invalid input data as expected"() { given: def csvSystemParticipantSource = new CsvSystemParticipantSource(csvSep, - participantsFolderPath, entityPersistenceNamingStrategy, Mock(CsvTypeSource), + participantsFolderPath, fileNamingStrategy, Mock(CsvTypeSource), Mock(CsvThermalSource), Mock(CsvRawGridSource)) def sysPartTypedEntityData = new SystemParticipantTypedEntityData<>(fieldsToAttributes, HpInput, sptd.hpInput.operator, sptd.hpInput.node, sptd.hpTypeInput) @@ -140,7 +139,7 @@ class CsvSystemParticipantSourceTest extends Specification implements CsvTestDat def "A CsvSystemParticipantSource should build chp input entity from valid and invalid input data as expected"(List thermalStorages, List thermalBuses, Map fieldsToAttributes, boolean resultIsPresent, ChpInputEntityData resultData) { given: def csvSystemParticipantSource = new CsvSystemParticipantSource(csvSep, - participantsFolderPath, entityPersistenceNamingStrategy, Mock(CsvTypeSource), + participantsFolderPath, fileNamingStrategy, Mock(CsvTypeSource), Mock(CsvThermalSource), Mock(CsvRawGridSource)) def sysPartTypedEntityData = new SystemParticipantTypedEntityData<>(fieldsToAttributes, ChpInput, sptd.chpInput.operator, sptd.chpInput.node, sptd.chpTypeInput) @@ -168,7 +167,7 @@ class CsvSystemParticipantSourceTest extends Specification implements CsvTestDat def "A CsvSystemParticipantSource should return data from a valid heat pump input file as expected"() { given: def csvSystemParticipantSource = new CsvSystemParticipantSource(csvSep, participantsFolderPath, - entityPersistenceNamingStrategy, Mock(CsvTypeSource), Mock(CsvThermalSource), Mock(CsvRawGridSource)) + fileNamingStrategy, Mock(CsvTypeSource), Mock(CsvThermalSource), Mock(CsvRawGridSource)) expect: def heatPumps = csvSystemParticipantSource.getHeatPumps(nodes as Set, operators as Set, types as Set, thermalBuses as Set) @@ -190,7 +189,7 @@ class CsvSystemParticipantSourceTest extends Specification implements CsvTestDat def "A CsvSystemParticipantSource should return data from a valid chp input file as expected"() { given: def csvSystemParticipantSource = new CsvSystemParticipantSource(csvSep, participantsFolderPath, - entityPersistenceNamingStrategy, Mock(CsvTypeSource), Mock(CsvThermalSource), Mock(CsvRawGridSource)) + fileNamingStrategy, Mock(CsvTypeSource), Mock(CsvThermalSource), Mock(CsvRawGridSource)) expect: def chpUnits = csvSystemParticipantSource.getChpPlants(nodes as Set, operators as Set, types as Set, thermalBuses as Set, thermalStorages as Set) @@ -214,7 +213,7 @@ class CsvSystemParticipantSourceTest extends Specification implements CsvTestDat def "A CsvSystemParticipantSource should return data from valid ev input file as expected"() { given: def csvSystemParticipantSource = new CsvSystemParticipantSource(csvSep, participantsFolderPath, - entityPersistenceNamingStrategy, Mock(CsvTypeSource), Mock(CsvThermalSource), Mock(CsvRawGridSource)) + fileNamingStrategy, Mock(CsvTypeSource), Mock(CsvThermalSource), Mock(CsvRawGridSource)) expect: def sysParts = csvSystemParticipantSource.getEvs(nodes as Set, operators as Set, types as Set) @@ -235,7 +234,7 @@ class CsvSystemParticipantSourceTest extends Specification implements CsvTestDat def "A CsvSystemParticipantSource should return data from valid wec input file as expected"() { given: def csvSystemParticipantSource = new CsvSystemParticipantSource(csvSep, participantsFolderPath, - entityPersistenceNamingStrategy, Mock(CsvTypeSource), Mock(CsvThermalSource), Mock(CsvRawGridSource)) + fileNamingStrategy, Mock(CsvTypeSource), Mock(CsvThermalSource), Mock(CsvRawGridSource)) expect: def sysParts = csvSystemParticipantSource.getWecPlants(nodes as Set, operators as Set, types as Set) @@ -256,7 +255,7 @@ class CsvSystemParticipantSourceTest extends Specification implements CsvTestDat def "A CsvSystemParticipantSource should return data from valid storage input file as expected"() { given: def csvSystemParticipantSource = new CsvSystemParticipantSource(csvSep, participantsFolderPath, - entityPersistenceNamingStrategy, Mock(CsvTypeSource), Mock(CsvThermalSource), Mock(CsvRawGridSource)) + fileNamingStrategy, Mock(CsvTypeSource), Mock(CsvThermalSource), Mock(CsvRawGridSource)) expect: def sysParts = csvSystemParticipantSource.getStorages(nodes as Set, operators as Set, types as Set) @@ -277,7 +276,7 @@ class CsvSystemParticipantSourceTest extends Specification implements CsvTestDat def "A CsvSystemParticipantSource should return data from valid bm input file as expected"() { given: def csvSystemParticipantSource = new CsvSystemParticipantSource(csvSep, participantsFolderPath, - entityPersistenceNamingStrategy, Mock(CsvTypeSource), Mock(CsvThermalSource), Mock(CsvRawGridSource)) + fileNamingStrategy, Mock(CsvTypeSource), Mock(CsvThermalSource), Mock(CsvRawGridSource)) expect: def sysParts = csvSystemParticipantSource.getBmPlants(nodes as Set, operators as Set, types as Set) @@ -298,7 +297,7 @@ class CsvSystemParticipantSourceTest extends Specification implements CsvTestDat def "A CsvSystemParticipantSource should return data from valid ev charging station input file as expected"() { given: def csvSystemParticipantSource = new CsvSystemParticipantSource(csvSep, participantsFolderPath, - entityPersistenceNamingStrategy, Mock(CsvTypeSource), Mock(CsvThermalSource), Mock(CsvRawGridSource)) + fileNamingStrategy, Mock(CsvTypeSource), Mock(CsvThermalSource), Mock(CsvRawGridSource)) expect: def sysParts = csvSystemParticipantSource.getEvCS(nodes as Set, operators as Set) @@ -318,7 +317,7 @@ class CsvSystemParticipantSourceTest extends Specification implements CsvTestDat def "A CsvSystemParticipantSource should return data from valid load input file as expected"() { given: def csvSystemParticipantSource = new CsvSystemParticipantSource(csvSep, participantsFolderPath, - entityPersistenceNamingStrategy, Mock(CsvTypeSource), Mock(CsvThermalSource), Mock(CsvRawGridSource)) + fileNamingStrategy, Mock(CsvTypeSource), Mock(CsvThermalSource), Mock(CsvRawGridSource)) expect: def sysParts = csvSystemParticipantSource.getLoads(nodes as Set, operators as Set) @@ -338,7 +337,7 @@ class CsvSystemParticipantSourceTest extends Specification implements CsvTestDat def "A CsvSystemParticipantSource should return data from valid pv input file as expected"() { given: def csvSystemParticipantSource = new CsvSystemParticipantSource(csvSep, participantsFolderPath, - entityPersistenceNamingStrategy, Mock(CsvTypeSource), Mock(CsvThermalSource), Mock(CsvRawGridSource)) + fileNamingStrategy, Mock(CsvTypeSource), Mock(CsvThermalSource), Mock(CsvRawGridSource)) expect: def sysParts = csvSystemParticipantSource.getPvPlants(nodes as Set, operators as Set) @@ -358,7 +357,7 @@ class CsvSystemParticipantSourceTest extends Specification implements CsvTestDat def "A CsvSystemParticipantSource should return data from valid fixedFeedIn input file as expected"() { given: def csvSystemParticipantSource = new CsvSystemParticipantSource(csvSep, participantsFolderPath, - entityPersistenceNamingStrategy, Mock(CsvTypeSource), Mock(CsvThermalSource), Mock(CsvRawGridSource)) + fileNamingStrategy, Mock(CsvTypeSource), Mock(CsvThermalSource), Mock(CsvRawGridSource)) expect: def sysParts = csvSystemParticipantSource.getFixedFeedIns(nodes as Set, operators as Set) diff --git a/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvTestDataMeta.groovy b/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvTestDataMeta.groovy index 2424dbf74..388a751b0 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvTestDataMeta.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvTestDataMeta.groovy @@ -5,7 +5,7 @@ */ package edu.ie3.datamodel.io.source.csv -import edu.ie3.datamodel.io.naming.EntityNamingStrategy +import edu.ie3.datamodel.io.FileNamingStrategy /** * Holds meta data for csv tests e.g. file and folder paths @@ -23,5 +23,5 @@ trait CsvTestDataMeta { static String coordinatesFolderPath = testParticipantsBaseFolderPath.concat(File.separator).concat("coordinates") static String csvSep = "," - static EntityNamingStrategy entityPersistenceNamingStrategy = new EntityNamingStrategy() + static FileNamingStrategy fileNamingStrategy = new FileNamingStrategy() } \ No newline at end of file diff --git a/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvThermalSourceTest.groovy b/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvThermalSourceTest.groovy index 87cd99f6a..feef1f3f4 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvThermalSourceTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvThermalSourceTest.groovy @@ -5,9 +5,9 @@ */ package edu.ie3.datamodel.io.source.csv +import edu.ie3.datamodel.io.FileNamingStrategy import edu.ie3.datamodel.io.factory.input.AssetInputEntityData import edu.ie3.datamodel.io.factory.input.ThermalUnitInputEntityData -import edu.ie3.datamodel.io.naming.EntityNamingStrategy import edu.ie3.datamodel.models.input.OperatorInput import edu.ie3.datamodel.models.input.thermal.ThermalBusInput import edu.ie3.datamodel.models.input.thermal.ThermalUnitInput @@ -21,8 +21,8 @@ class CsvThermalSourceTest extends Specification implements CsvTestDataMeta { def "A CsvThermalSource should return ThermalBuses from valid and invalid input data as expected"() { given: - def csvTypeSource = new CsvTypeSource(",", typeFolderPath, new EntityNamingStrategy()) - def csvThermalSource = new CsvThermalSource(csvSep, thermalFolderPath, entityPersistenceNamingStrategy, csvTypeSource) + def csvTypeSource = new CsvTypeSource(",", typeFolderPath, new FileNamingStrategy()) + def csvThermalSource = new CsvThermalSource(csvSep, thermalFolderPath, fileNamingStrategy, csvTypeSource) def operators = csvTypeSource.operators //test method when no operators are provided as constructor parameters @@ -50,8 +50,8 @@ class CsvThermalSourceTest extends Specification implements CsvTestDataMeta { def "A CsvThermalSource should return a CylindricalStorageInput from valid and invalid input data as expected"() { given: - def csvTypeSource = new CsvTypeSource(",", typeFolderPath, new EntityNamingStrategy()) - def csvThermalSource = new CsvThermalSource(csvSep, thermalFolderPath, entityPersistenceNamingStrategy, csvTypeSource) + def csvTypeSource = new CsvTypeSource(",", typeFolderPath, new FileNamingStrategy()) + def csvThermalSource = new CsvThermalSource(csvSep, thermalFolderPath, fileNamingStrategy, csvTypeSource) def operators = csvTypeSource.operators def thermalBuses = csvThermalSource.thermalBuses @@ -93,8 +93,8 @@ class CsvThermalSourceTest extends Specification implements CsvTestDataMeta { def "A CsvThermalSource should build thermal unit input entity from valid and invalid input data as expected"() { given: - def csvTypeSource = new CsvTypeSource(",", typeFolderPath, new EntityNamingStrategy()) - def csvThermalSource = new CsvThermalSource(csvSep, thermalFolderPath, entityPersistenceNamingStrategy, csvTypeSource) + def csvTypeSource = new CsvTypeSource(",", typeFolderPath, new FileNamingStrategy()) + def csvThermalSource = new CsvThermalSource(csvSep, thermalFolderPath, fileNamingStrategy, csvTypeSource) def operator = new OperatorInput(UUID.fromString("8f9682df-0744-4b58-a122-f0dc730f6510"), "testOperator") def validFieldsToAttributes = [ "uuid" : "717af017-cc69-406f-b452-e022d7fb516a", @@ -135,8 +135,8 @@ class CsvThermalSourceTest extends Specification implements CsvTestDataMeta { def "A CsvThermalSource should return a ThermalHouseInput from valid and invalid input data as expected"() { given: - def csvTypeSource = new CsvTypeSource(",", typeFolderPath, new EntityNamingStrategy()) - def csvThermalSource = new CsvThermalSource(csvSep, thermalFolderPath, entityPersistenceNamingStrategy, csvTypeSource) + def csvTypeSource = new CsvTypeSource(",", typeFolderPath, new FileNamingStrategy()) + def csvThermalSource = new CsvThermalSource(csvSep, thermalFolderPath, fileNamingStrategy, csvTypeSource) def operators = csvTypeSource.operators def thermalBuses = csvThermalSource.thermalBuses diff --git a/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvTimeSeriesMappingSourceIT.groovy b/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvTimeSeriesMappingSourceIT.groovy index beb640006..e5fec227c 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvTimeSeriesMappingSourceIT.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvTimeSeriesMappingSourceIT.groovy @@ -5,9 +5,9 @@ */ package edu.ie3.datamodel.io.source.csv +import edu.ie3.datamodel.io.FileNamingStrategy import edu.ie3.datamodel.io.connectors.CsvFileConnector import edu.ie3.datamodel.io.csv.timeseries.ColumnScheme -import edu.ie3.datamodel.io.naming.EntityNamingStrategy import edu.ie3.datamodel.io.source.TimeSeriesMappingSource import spock.lang.Shared import spock.lang.Specification @@ -17,7 +17,7 @@ class CsvTimeSeriesMappingSourceIT extends Specification implements CsvTestDataM TimeSeriesMappingSource source def setupSpec() { - source = new CsvTimeSeriesMappingSource(";", timeSeriesFolderPath, new EntityNamingStrategy()) + source = new CsvTimeSeriesMappingSource(";", timeSeriesFolderPath, new FileNamingStrategy()) } def "The csv time series mapping source is able to provide a valid time series mapping from files"() { diff --git a/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvTimeSeriesSourceIT.groovy b/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvTimeSeriesSourceIT.groovy index 62744c2f3..2a2b230e5 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvTimeSeriesSourceIT.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvTimeSeriesSourceIT.groovy @@ -6,8 +6,8 @@ package edu.ie3.datamodel.io.source.csv import edu.ie3.datamodel.exceptions.SourceException +import edu.ie3.datamodel.io.FileNamingStrategy import edu.ie3.datamodel.io.factory.timeseries.TimeBasedSimpleValueFactory -import edu.ie3.datamodel.io.naming.EntityNamingStrategy import edu.ie3.datamodel.models.StandardUnits import edu.ie3.datamodel.models.value.HeatAndPValue import edu.ie3.util.TimeUtil @@ -26,7 +26,7 @@ class CsvTimeSeriesSourceIT extends Specification implements CsvTestDataMeta { def setup() { factory = new TimeBasedSimpleValueFactory<>(HeatAndPValue) - source = new CsvTimeSeriesSource(";", timeSeriesFolderPath, new EntityNamingStrategy(), UUID.fromString("76c9d846-797c-4f07-b7ec-2245f679f5c7"), "its_ph_76c9d846-797c-4f07-b7ec-2245f679f5c7", HeatAndPValue, factory) + source = new CsvTimeSeriesSource(";", timeSeriesFolderPath, new FileNamingStrategy(), UUID.fromString("76c9d846-797c-4f07-b7ec-2245f679f5c7"), "its_ph_76c9d846-797c-4f07-b7ec-2245f679f5c7", HeatAndPValue, factory) } def "A csv time series source throw an Exception, if the file cannot be found"() { @@ -57,7 +57,7 @@ class CsvTimeSeriesSourceIT extends Specification implements CsvTestDataMeta { def "Construction a csv time series source with malicious parameters, leads to IllegalArgumentException"() { when: - new CsvTimeSeriesSource(";", timeSeriesFolderPath, new EntityNamingStrategy(), UUID.fromString("fbc59b5b-9307-4fb4-a406-c1f08f26fee5"), "file/not/found", HeatAndPValue, factory) + new CsvTimeSeriesSource(";", timeSeriesFolderPath, new FileNamingStrategy(), UUID.fromString("fbc59b5b-9307-4fb4-a406-c1f08f26fee5"), "file/not/found", HeatAndPValue, factory) then: def e = thrown(IllegalArgumentException) diff --git a/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvTimeSeriesSourceTest.groovy b/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvTimeSeriesSourceTest.groovy index e093e19f0..98ff49792 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvTimeSeriesSourceTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvTimeSeriesSourceTest.groovy @@ -5,7 +5,7 @@ */ package edu.ie3.datamodel.io.source.csv -import edu.ie3.datamodel.io.naming.EntityNamingStrategy +import edu.ie3.datamodel.io.FileNamingStrategy import static edu.ie3.datamodel.models.StandardUnits.ENERGY_PRICE @@ -32,7 +32,7 @@ class CsvTimeSeriesSourceTest extends Specification implements CsvTestDataMeta { def coordinateSource = Mock(IdCoordinateSource) coordinateSource.getCoordinate(5) >> defaultCoordinate def factory = new TimeBasedSimpleValueFactory(EnergyPriceValue) - def source = new CsvTimeSeriesSource(";", timeSeriesFolderPath, new EntityNamingStrategy(), UUID.fromString("2fcb3e53-b94a-4b96-bea4-c469e499f1a1"), "its_c_2fcb3e53-b94a-4b96-bea4-c469e499f1a1", EnergyPriceValue, factory) + def source = new CsvTimeSeriesSource(";", timeSeriesFolderPath, new FileNamingStrategy(), UUID.fromString("2fcb3e53-b94a-4b96-bea4-c469e499f1a1"), "its_c_2fcb3e53-b94a-4b96-bea4-c469e499f1a1", EnergyPriceValue, factory) def time = TimeUtil.withDefaults.toZonedDateTime("2019-01-01 00:00:00") def timeUtil = new TimeUtil(ZoneId.of("UTC"), Locale.GERMANY, "yyyy-MM-dd'T'HH:mm:ss[.S[S][S]]'Z'") def fieldToValue = [ @@ -59,7 +59,7 @@ class CsvTimeSeriesSourceTest extends Specification implements CsvTestDataMeta { def metaInformation = new CsvFileConnector.CsvIndividualTimeSeriesMetaInformation(UUID.fromString("8bc9120d-fb9b-4484-b4e3-0cdadf0feea9"), ColumnScheme.WEATHER, "its_weather_8bc9120d-fb9b-4484-b4e3-0cdadf0feea9") when: - CsvTimeSeriesSource.getSource(";", timeSeriesFolderPath, entityPersistenceNamingStrategy, metaInformation) + CsvTimeSeriesSource.getSource(";", timeSeriesFolderPath, fileNamingStrategy, metaInformation) then: def e = thrown(SourceException) @@ -71,7 +71,7 @@ class CsvTimeSeriesSourceTest extends Specification implements CsvTestDataMeta { def metaInformation = new CsvFileConnector.CsvIndividualTimeSeriesMetaInformation(uuid, columnScheme, path) when: - def actual = CsvTimeSeriesSource.getSource(";", timeSeriesFolderPath, entityPersistenceNamingStrategy, metaInformation) + def actual = CsvTimeSeriesSource.getSource(";", timeSeriesFolderPath, fileNamingStrategy, metaInformation) then: actual.timeSeries.entries.size() == amountOfEntries diff --git a/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvTypeSourceTest.groovy b/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvTypeSourceTest.groovy index 581a27b56..e8f06009c 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvTypeSourceTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvTypeSourceTest.groovy @@ -5,7 +5,7 @@ */ package edu.ie3.datamodel.io.source.csv -import edu.ie3.datamodel.io.naming.EntityNamingStrategy +import edu.ie3.datamodel.io.FileNamingStrategy import edu.ie3.datamodel.models.input.OperatorInput import spock.lang.Specification import edu.ie3.test.common.GridTestData as gtd @@ -16,7 +16,7 @@ class CsvTypeSourceTest extends Specification implements CsvTestDataMeta { def "A CsvTypeSource should read and handle valid 2W Transformer type file as expected"() { given: - def typeSource = new CsvTypeSource(",", typeFolderPath, new EntityNamingStrategy()) + def typeSource = new CsvTypeSource(",", typeFolderPath, new FileNamingStrategy()) expect: def transformer2WTypes = typeSource.transformer2WTypes @@ -45,7 +45,7 @@ class CsvTypeSourceTest extends Specification implements CsvTestDataMeta { UUID.fromString("f15105c4-a2de-4ab8-a621-4bc98e372d92"), "Univ.-Prof. Dr. rer. hort. Klaus-Dieter Brokkoli") def secondOperator = new OperatorInput( UUID.fromString("8f9682df-0744-4b58-a122-f0dc730f6510"), "TestOperator") - def typeSource = new CsvTypeSource(",", typeFolderPath, new EntityNamingStrategy()) + def typeSource = new CsvTypeSource(",", typeFolderPath, new FileNamingStrategy()) expect: def operators = typeSource.operators @@ -57,7 +57,7 @@ class CsvTypeSourceTest extends Specification implements CsvTestDataMeta { def "A CsvTypeSource should read and handle valid line type file as expected"() { given: - def typeSource = new CsvTypeSource(",", typeFolderPath, new EntityNamingStrategy()) + def typeSource = new CsvTypeSource(",", typeFolderPath, new FileNamingStrategy()) expect: def lineTypes = typeSource.lineTypes @@ -73,7 +73,7 @@ class CsvTypeSourceTest extends Specification implements CsvTestDataMeta { def "A CsvTypeSource should read and handle valid 3W Transformer type file as expected"() { given: - def typeSource = new CsvTypeSource(",", typeFolderPath, new EntityNamingStrategy()) + def typeSource = new CsvTypeSource(",", typeFolderPath, new FileNamingStrategy()) expect: def transformer3WTypes = typeSource.transformer3WTypes @@ -102,7 +102,7 @@ class CsvTypeSourceTest extends Specification implements CsvTestDataMeta { def "A CsvTypeSource should read and handle valid bm type file as expected"() { given: - def typeSource = new CsvTypeSource(",", typeFolderPath, new EntityNamingStrategy()) + def typeSource = new CsvTypeSource(",", typeFolderPath, new FileNamingStrategy()) expect: def bmTypes = typeSource.bmTypes @@ -117,7 +117,7 @@ class CsvTypeSourceTest extends Specification implements CsvTestDataMeta { def "A CsvTypeSource should read and handle valid chp type file as expected"() { given: - def typeSource = new CsvTypeSource(",", typeFolderPath, new EntityNamingStrategy()) + def typeSource = new CsvTypeSource(",", typeFolderPath, new FileNamingStrategy()) expect: def chpTypes = typeSource.chpTypes @@ -134,7 +134,7 @@ class CsvTypeSourceTest extends Specification implements CsvTestDataMeta { def "A CsvTypeSource should read and handle valid hp type file as expected"() { given: - def typeSource = new CsvTypeSource(",", typeFolderPath, new EntityNamingStrategy()) + def typeSource = new CsvTypeSource(",", typeFolderPath, new FileNamingStrategy()) expect: def hpTypes = typeSource.hpTypes @@ -149,7 +149,7 @@ class CsvTypeSourceTest extends Specification implements CsvTestDataMeta { def "A CsvTypeSource should read and handle valid storage type file as expected"() { given: - def typeSource = new CsvTypeSource(",", typeFolderPath, new EntityNamingStrategy()) + def typeSource = new CsvTypeSource(",", typeFolderPath, new FileNamingStrategy()) expect: def storageTypes = typeSource.storageTypes @@ -170,7 +170,7 @@ class CsvTypeSourceTest extends Specification implements CsvTestDataMeta { def "A CsvTypeSource should read and handle valid wec type file as expected"() { given: - def typeSource = new CsvTypeSource(",", typeFolderPath, new EntityNamingStrategy()) + def typeSource = new CsvTypeSource(",", typeFolderPath, new FileNamingStrategy()) expect: def wecTypes = typeSource.wecTypes @@ -192,7 +192,7 @@ class CsvTypeSourceTest extends Specification implements CsvTestDataMeta { def "A CsvTypeSource should read and handle valid ev type file as expected"() { given: - def typeSource = new CsvTypeSource(",", typeFolderPath, new EntityNamingStrategy()) + def typeSource = new CsvTypeSource(",", typeFolderPath, new FileNamingStrategy()) expect: def evTypes = typeSource.evTypes diff --git a/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvWeatherSourceIconTest.groovy b/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvWeatherSourceIconTest.groovy index 3bb496ac6..7eb7678e0 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvWeatherSourceIconTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvWeatherSourceIconTest.groovy @@ -5,8 +5,8 @@ */ package edu.ie3.datamodel.io.source.csv +import edu.ie3.datamodel.io.FileNamingStrategy import edu.ie3.datamodel.io.factory.timeseries.IconTimeBasedWeatherValueFactory -import edu.ie3.datamodel.io.naming.EntityNamingStrategy import edu.ie3.datamodel.io.source.IdCoordinateSource import edu.ie3.datamodel.models.timeseries.individual.IndividualTimeSeries import edu.ie3.datamodel.models.timeseries.individual.TimeBasedValue @@ -36,7 +36,7 @@ class CsvWeatherSourceIconTest extends Specification implements CsvTestDataMeta, coordinateSource = WeatherTestData.coordinateSource def weatherFactory = new IconTimeBasedWeatherValueFactory() folderPath = new File(getClass().getResource('/weather/icon').toURI()).absolutePath - source = new CsvWeatherSource(",", folderPath, new EntityNamingStrategy(), coordinateSource, weatherFactory) + source = new CsvWeatherSource(",", folderPath, new FileNamingStrategy(), coordinateSource, weatherFactory) } def "A CsvWeatherSource can read and correctly parse a single value for a specific date and coordinate"() { @@ -106,7 +106,7 @@ class CsvWeatherSourceIconTest extends Specification implements CsvTestDataMeta, def coordinateSource = Mock(IdCoordinateSource) coordinateSource.getCoordinate(_) >> { args -> args[0] == 67775 ? Optional.of(expectedCoordinate) : Optional.empty() } def weatherFactory = new IconTimeBasedWeatherValueFactory() - def source = new CsvWeatherSource(",", folderPath, new EntityNamingStrategy(), coordinateSource, weatherFactory) + def source = new CsvWeatherSource(",", folderPath, new FileNamingStrategy(), coordinateSource, weatherFactory) def fieldToValues = new TreeMap<>(String.CASE_INSENSITIVE_ORDER) fieldToValues.putAll( [ @@ -153,7 +153,7 @@ class CsvWeatherSourceIconTest extends Specification implements CsvTestDataMeta, given: def coordinateSource = new WeatherTestData.DummyIdCoordinateSource() def weatherFactory = new IconTimeBasedWeatherValueFactory() - def source = new CsvWeatherSource(",", folderPath, new EntityNamingStrategy(), coordinateSource, weatherFactory) + def source = new CsvWeatherSource(",", folderPath, new FileNamingStrategy(), coordinateSource, weatherFactory) def fieldToValues = [ "datum" : "2019-08-01 01:00:00", "albRad" : "13.015240669", @@ -197,7 +197,7 @@ class CsvWeatherSourceIconTest extends Specification implements CsvTestDataMeta, given: def coordinateSource = new WeatherTestData.DummyIdCoordinateSource() def weatherFactory = new IconTimeBasedWeatherValueFactory() - def source = new CsvWeatherSource(",", folderPath, new EntityNamingStrategy(), coordinateSource, weatherFactory) + def source = new CsvWeatherSource(",", folderPath, new FileNamingStrategy(), coordinateSource, weatherFactory) def fieldToValues = [ "datum" : "2019-08-01 01:00:00", "albRad" : "13.015240669", @@ -240,7 +240,7 @@ class CsvWeatherSourceIconTest extends Specification implements CsvTestDataMeta, given: def coordinateSource = new WeatherTestData.DummyIdCoordinateSource() def weatherFactory = new IconTimeBasedWeatherValueFactory() - def source = new CsvWeatherSource(",", folderPath, new EntityNamingStrategy(), coordinateSource, weatherFactory) + def source = new CsvWeatherSource(",", folderPath, new FileNamingStrategy(), coordinateSource, weatherFactory) def fieldToValues = [ "datum" : "2019-08-01 01:00:00", "albrad" : "13.015240669", diff --git a/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvWeatherSourcePsdmTest.groovy b/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvWeatherSourcePsdmTest.groovy index 7f4826759..e990fbfa4 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvWeatherSourcePsdmTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvWeatherSourcePsdmTest.groovy @@ -5,7 +5,7 @@ */ package edu.ie3.datamodel.io.source.csv -import edu.ie3.datamodel.io.naming.EntityNamingStrategy +import edu.ie3.datamodel.io.FileNamingStrategy import static edu.ie3.datamodel.models.StandardUnits.SOLAR_IRRADIANCE import static edu.ie3.datamodel.models.StandardUnits.TEMPERATURE @@ -42,7 +42,7 @@ class CsvWeatherSourcePsdmTest extends Specification implements CsvTestDataMeta, def setupSpec() { coordinateSource = PsdmWeatherTestData.coordinateSource def weatherFactory = new PsdmTimeBasedWeatherValueFactory() - source = new CsvWeatherSource(";", timeSeriesFolderPath, new EntityNamingStrategy(), coordinateSource, weatherFactory) + source = new CsvWeatherSource(";", timeSeriesFolderPath, new FileNamingStrategy(), coordinateSource, weatherFactory) } def "A CsvWeatherSource can read and correctly parse a single value for a specific date and coordinate"() { @@ -109,7 +109,7 @@ class CsvWeatherSourcePsdmTest extends Specification implements CsvTestDataMeta, def coordinateSource = Mock(IdCoordinateSource) coordinateSource.getCoordinate(_) >> { args -> args[0] == 5 ? Optional.of(defaultCoordinate) : Optional.empty() } def weatherFactory = new PsdmTimeBasedWeatherValueFactory() - def source = new CsvWeatherSource(";", timeSeriesFolderPath, new EntityNamingStrategy(), coordinateSource, weatherFactory) + def source = new CsvWeatherSource(";", timeSeriesFolderPath, new FileNamingStrategy(), coordinateSource, weatherFactory) def fieldToValues = [ "uuid" : "71a79f59-eebf-40c1-8358-ba7414077d57", "time" : "2020-10-16T12:40:42Z", @@ -153,7 +153,7 @@ class CsvWeatherSourcePsdmTest extends Specification implements CsvTestDataMeta, def coordinateSource = Mock(IdCoordinateSource) coordinateSource.getCoordinate(_) >> { args -> args[0] == 5 ? Optional.of(defaultCoordinate) : Optional.empty() } def weatherFactory = new PsdmTimeBasedWeatherValueFactory() - def source = new CsvWeatherSource(";", timeSeriesFolderPath, new EntityNamingStrategy(), coordinateSource, weatherFactory) + def source = new CsvWeatherSource(";", timeSeriesFolderPath, new FileNamingStrategy(), coordinateSource, weatherFactory) def fieldToValues = [ "uuid" : "71a79f59-eebf-40c1-8358-ba7414077d57", "time" : "2020-10-16T12:40:42Z", @@ -178,7 +178,7 @@ class CsvWeatherSourcePsdmTest extends Specification implements CsvTestDataMeta, def coordinateSource = Mock(IdCoordinateSource) coordinateSource.getCoordinate(_) >> { args -> args[0] == 5 ? Optional.of(defaultCoordinate) : Optional.empty() } def weatherFactory = new PsdmTimeBasedWeatherValueFactory() - def source = new CsvWeatherSource(";", timeSeriesFolderPath, new EntityNamingStrategy(), coordinateSource, weatherFactory) + def source = new CsvWeatherSource(";", timeSeriesFolderPath, new FileNamingStrategy(), coordinateSource, weatherFactory) def fieldToValues = [ "uuid" : "71a79f59-eebf-40c1-8358-ba7414077d57", "time" : "2020-10-16T12:40:42Z", @@ -201,7 +201,7 @@ class CsvWeatherSourcePsdmTest extends Specification implements CsvTestDataMeta, def coordinateSource = Mock(IdCoordinateSource) coordinateSource.getCoordinate(_) >> Optional.empty() def weatherFactory = new PsdmTimeBasedWeatherValueFactory() - def source = new CsvWeatherSource(";", timeSeriesFolderPath, new EntityNamingStrategy(), coordinateSource, weatherFactory) + def source = new CsvWeatherSource(";", timeSeriesFolderPath, new FileNamingStrategy(), coordinateSource, weatherFactory) def fieldToValues = [ "uuid" : "71a79f59-eebf-40c1-8358-ba7414077d57", "time" : "2020-10-16T12:40:42Z", diff --git a/src/test/groovy/edu/ie3/datamodel/io/source/csv/IconCsvIdCoordinateSourceIT.groovy b/src/test/groovy/edu/ie3/datamodel/io/source/csv/IconCsvIdCoordinateSourceIT.groovy index f2641ee7c..ad68da857 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/source/csv/IconCsvIdCoordinateSourceIT.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/source/csv/IconCsvIdCoordinateSourceIT.groovy @@ -20,7 +20,7 @@ class IconCsvIdCoordinateSourceIT extends Specification implements CsvTestDataMe CsvIdCoordinateSource source def setupSpec() { - source = new CsvIdCoordinateSource(csvSep, coordinatesFolderPath + "_icon", entityPersistenceNamingStrategy, new IconIdCoordinateFactory()) + source = new CsvIdCoordinateSource(csvSep, coordinatesFolderPath + "_icon", fileNamingStrategy, new IconIdCoordinateFactory()) } def "The CsvCoordinateSource is able to create a valid stream from a coordinate file"() { From c3ecf36c0b27cea92cd0443f813135bfb6dd45c9 Mon Sep 17 00:00:00 2001 From: Niklas Steffan Date: Fri, 28 May 2021 13:54:27 +0200 Subject: [PATCH 019/157] deleted HierarchicFileNamingStrategy and io.csv.FileNamingStrategy --- .../datamodel/io/csv/FileNamingStrategy.java | 504 ----------- .../naming/HierarchicFileNamingStrategy.java | 114 --- .../io/FileNamingStrategyTest.groovy | 2 +- .../io/csv/FileNamingStrategyTest.groovy | 833 ------------------ .../HierarchicFileNamingStrategyTest.groovy | 460 ---------- 5 files changed, 1 insertion(+), 1912 deletions(-) delete mode 100644 src/main/java/edu/ie3/datamodel/io/csv/FileNamingStrategy.java delete mode 100644 src/main/java/edu/ie3/datamodel/io/naming/HierarchicFileNamingStrategy.java delete mode 100644 src/test/groovy/edu/ie3/datamodel/io/csv/FileNamingStrategyTest.groovy delete mode 100644 src/test/groovy/edu/ie3/datamodel/io/naming/HierarchicFileNamingStrategyTest.groovy diff --git a/src/main/java/edu/ie3/datamodel/io/csv/FileNamingStrategy.java b/src/main/java/edu/ie3/datamodel/io/csv/FileNamingStrategy.java deleted file mode 100644 index 2d5ec6a30..000000000 --- a/src/main/java/edu/ie3/datamodel/io/csv/FileNamingStrategy.java +++ /dev/null @@ -1,504 +0,0 @@ -/* - * © 2021. TU Dortmund University, - * Institute of Energy Systems, Energy Efficiency and Energy Economics, - * Research group Distribution grid planning and operation -*/ -package edu.ie3.datamodel.io.csv; - -import edu.ie3.datamodel.io.csv.timeseries.ColumnScheme; -import edu.ie3.datamodel.io.csv.timeseries.IndividualTimeSeriesMetaInformation; -import edu.ie3.datamodel.io.csv.timeseries.LoadProfileTimeSeriesMetaInformation; -import edu.ie3.datamodel.io.naming.EntityNamingStrategy; -import edu.ie3.datamodel.io.naming.HierarchicFileNamingStrategy; -import edu.ie3.datamodel.io.source.TimeSeriesMappingSource; -import edu.ie3.datamodel.models.UniqueEntity; -import edu.ie3.datamodel.models.input.AssetInput; -import edu.ie3.datamodel.models.input.AssetTypeInput; -import edu.ie3.datamodel.models.input.OperatorInput; -import edu.ie3.datamodel.models.input.RandomLoadParameters; -import edu.ie3.datamodel.models.input.graphics.GraphicInput; -import edu.ie3.datamodel.models.input.system.characteristic.CharacteristicInput; -import edu.ie3.datamodel.models.result.ResultEntity; -import edu.ie3.datamodel.models.timeseries.TimeSeries; -import edu.ie3.datamodel.models.timeseries.TimeSeriesEntry; -import edu.ie3.datamodel.models.timeseries.individual.IndividualTimeSeries; -import edu.ie3.datamodel.models.timeseries.repetitive.LoadProfileInput; -import edu.ie3.datamodel.models.value.*; -import edu.ie3.util.StringUtils; -import java.nio.file.Path; -import java.util.Optional; -import java.util.UUID; -import java.util.regex.Matcher; -import java.util.regex.Pattern; -import org.apache.commons.io.FilenameUtils; -import org.apache.logging.log4j.LogManager; -import org.apache.logging.log4j.Logger; - -/** - * Provides an easy to use standard way to name files based on the class that should be processed - * e.g. when writing .csv files. Represents a flat dir with all files inside. To use a hierarchic - * directory structure one might consider using {@link HierarchicFileNamingStrategy} - * - * @version 0.1 - * @since 03.02.20 - * @deprecated replaced by {@link EntityNamingStrategy} - */ -@Deprecated -public class FileNamingStrategy { - - protected static final Logger logger = LogManager.getLogger(FileNamingStrategy.class); - - private static final String UUID_STRING = - "[a-zA-Z0-9]{8}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{12}"; - /** - * Regex to match the naming convention of a file for an individual time series. The column scheme - * is accessible via the named capturing group "columnScheme". The time series' UUID is accessible - * by the named capturing group "uuid" - */ - private static final Pattern INDIVIDUAL_TIME_SERIES_PATTERN = - Pattern.compile("its_(?[a-zA-Z]{1,11})_(?" + UUID_STRING + ")"); - - /** - * Pattern to identify individual time series in this instance of the naming strategy (takes care - * of prefix and suffix) - */ - protected final Pattern individualTimeSeriesPattern; - - /** - * Regex to match the naming convention of a file for a repetitive load profile time series. The - * profile is accessible via the named capturing group "profile", the uuid by the group "uuid" - */ - private static final Pattern LOAD_PROFILE_TIME_SERIES = - Pattern.compile("lpts_(?[a-zA-Z][0-9])_(?" + UUID_STRING + ")"); - - /** - * Pattern to identify load profile time series in this instance of the naming strategy (takes - * care of prefix and suffix) - */ - protected final Pattern loadProfileTimeSeriesPattern; - - private static final String RES_ENTITY_SUFFIX = "_res"; - - private final String prefix; - private final String suffix; - - /** - * Constructor for building the file names - * - * @param prefix Prefix of the files - * @param suffix Suffixes of the files - */ - public FileNamingStrategy(String prefix, String suffix) { - this.prefix = preparePrefix(prefix); - this.suffix = prepareSuffix(suffix); - - this.individualTimeSeriesPattern = - Pattern.compile( - prefix - + (prefix.isEmpty() ? "" : "_") - + INDIVIDUAL_TIME_SERIES_PATTERN.pattern() - + (suffix.isEmpty() ? "" : "_") - + suffix); - this.loadProfileTimeSeriesPattern = - Pattern.compile( - prefix - + (prefix.isEmpty() ? "" : "_") - + LOAD_PROFILE_TIME_SERIES.pattern() - + (suffix.isEmpty() ? "" : "_") - + suffix); - } - - /** Constructor for building the file names without provided files with prefix and suffix */ - public FileNamingStrategy() { - this("", ""); - } - - /** - * Constructor for building the file names - * - * @param prefix Prefix of the files - */ - public FileNamingStrategy(String prefix) { - this(prefix, ""); - } - - /** - * Create a {@link EntityNamingStrategy} from a {@link FileNamingStrategy} - * - * @return an instance of {@link EntityNamingStrategy} - */ - public EntityNamingStrategy asEntityPersistenceNamingStrategy() { - return new EntityNamingStrategy(this.prefix, this.suffix); - } - - /** - * Prepares the prefix by appending an underscore and bringing it to lower case - * - * @param prefix Intended prefix - * @return Prefix with trailing underscore - */ - private static String preparePrefix(String prefix) { - return StringUtils.cleanString(prefix).replaceAll("([^_])$", "$1_").toLowerCase(); - } - - /** - * Prepares the suffix by prepending an underscore and bringing it to lower case - * - * @param suffix Intended suffix - * @return Suffix with trailing leading - */ - private static String prepareSuffix(String suffix) { - return StringUtils.cleanString(suffix).replaceAll("^([^_])", "_$1").toLowerCase(); - } - - public Pattern getIndividualTimeSeriesPattern() { - return individualTimeSeriesPattern; - } - - public Pattern getLoadProfileTimeSeriesPattern() { - return loadProfileTimeSeriesPattern; - } - - /** - * Get the full path to the file with regard to some (not explicitly specified) base directory. - * The path does NOT start or end with any of the known file separators or file extension. - * - * @param cls Targeted class of the given file - * @return An optional sub path to the actual file - */ - public Optional getFilePath(Class cls) { - // do not adapt orElseGet, see https://www.baeldung.com/java-optional-or-else-vs-or-else-get for - // details - return getFilePath( - getFileName(cls).orElseGet(() -> ""), getDirectoryPath(cls).orElseGet(() -> "")); - } - - /** - * Get the full path to the file with regard to some (not explicitly specified) base directory. - * The path does NOT start or end with any of the known file separators or file extension. - * - * @param Type of the time series - * @param Type of the entry in the time series - * @param Type of the value, that is carried by the time series entry - * @param timeSeries Time series to derive naming information from - * @return An optional sub path to the actual file - */ - public , E extends TimeSeriesEntry, V extends Value> - Optional getFilePath(T timeSeries) { - // do not adapt orElseGet, see https://www.baeldung.com/java-optional-or-else-vs-or-else-get for - // details - return getFilePath( - getFileName(timeSeries).orElseGet(() -> ""), - getDirectoryPath(timeSeries).orElseGet(() -> "")); - } - - private Optional getFilePath(String fileName, String subDirectories) { - if (fileName.isEmpty()) return Optional.empty(); - if (!subDirectories.isEmpty()) - return Optional.of(FilenameUtils.concat(subDirectories, fileName)); - else return Optional.of(fileName); - } - - /** - * Returns the sub directory structure with regard to some (not explicitly specified) base - * directory. The path does NOT start or end with any of the known file separators. - * - * @param cls Targeted class of the given file - * @return An optional sub directory path - */ - public Optional getDirectoryPath(Class cls) { - return Optional.empty(); - } - - /** - * Returns the sub directory structure with regard to some (not explicitly specified) base - * directory. The path does NOT start or end with any of the known file separators. - * - * @param Type of the time series - * @param Type of the entry in the time series - * @param Type of the value, that is carried by the time series entry - * @param timeSeries Time series to derive naming information from - * @return An optional sub directory path - */ - public , E extends TimeSeriesEntry, V extends Value> - Optional getDirectoryPath(T timeSeries) { - return Optional.empty(); - } - - /** - * Returns the file name (and only the file name without any directories and extension). - * - * @param cls Targeted class of the given file - * @return The file name - */ - public Optional getFileName(Class cls) { - if (AssetTypeInput.class.isAssignableFrom(cls)) - return getTypeFileName(cls.asSubclass(AssetTypeInput.class)); - if (AssetInput.class.isAssignableFrom(cls)) - return getAssetInputFileName(cls.asSubclass(AssetInput.class)); - if (ResultEntity.class.isAssignableFrom(cls)) - return getResultEntityFileName(cls.asSubclass(ResultEntity.class)); - if (CharacteristicInput.class.isAssignableFrom(cls)) - return getAssetCharacteristicsFileName(cls.asSubclass(CharacteristicInput.class)); - if (cls.equals(RandomLoadParameters.class)) { - String loadParamString = camelCaseToSnakeCase(cls.getSimpleName()); - return Optional.of(addPrefixAndSuffix(loadParamString.concat("_input"))); - } - if (GraphicInput.class.isAssignableFrom(cls)) - return getGraphicsInputFileName(cls.asSubclass(GraphicInput.class)); - if (OperatorInput.class.isAssignableFrom(cls)) - return getOperatorInputFileName(cls.asSubclass(OperatorInput.class)); - if (TimeSeriesMappingSource.MappingEntry.class.isAssignableFrom(cls)) - return getTimeSeriesMappingFileName(); - logger.error("There is no naming strategy defined for {}", cls.getSimpleName()); - return Optional.empty(); - } - - /** - * Builds a file name (and only the file name without any directories and extension) of the given - * information. - * - * @param Type of the time series - * @param Type of the entry in the time series - * @param Type of the value, that is carried by the time series entry - * @param timeSeries Time series to derive naming information from - * @return A file name for this particular time series - */ - public , E extends TimeSeriesEntry, V extends Value> - Optional getFileName(T timeSeries) { - if (timeSeries instanceof IndividualTimeSeries) { - Optional maybeFirstElement = timeSeries.getEntries().stream().findFirst(); - if (maybeFirstElement.isPresent()) { - Class valueClass = maybeFirstElement.get().getValue().getClass(); - Optional mayBeColumnScheme = ColumnScheme.parse(valueClass); - if (mayBeColumnScheme.isPresent()) { - return Optional.of( - prefix - .concat("its") - .concat("_") - .concat(mayBeColumnScheme.get().getScheme()) - .concat("_") - .concat(timeSeries.getUuid().toString()) - .concat(suffix)); - } else { - logger.error("Unsupported content of time series {}", timeSeries); - return Optional.empty(); - } - } else { - logger.error("Unable to determine content of time series {}", timeSeries); - return Optional.empty(); - } - } else if (timeSeries instanceof LoadProfileInput) { - LoadProfileInput loadProfileInput = (LoadProfileInput) timeSeries; - return Optional.of( - prefix - .concat("lpts") - .concat("_") - .concat(loadProfileInput.getType().getKey()) - .concat("_") - .concat(loadProfileInput.getUuid().toString()) - .concat(suffix)); - } else { - logger.error("There is no naming strategy defined for {}", timeSeries); - return Optional.empty(); - } - } - - /** - * Extracts meta information from a file name, of a time series. - * - * @param path Path to the file - * @return The meeting meta information - */ - public FileNameMetaInformation extractTimeSeriesMetaInformation(Path path) { - /* Extract file name from possibly fully qualified path */ - Path fileName = path.getFileName(); - if (fileName == null) - throw new IllegalArgumentException("Unable to extract file name from path '" + path + "'."); - return extractTimeSeriesMetaInformation(fileName.toString()); - } - - /** - * Extracts meta information from a file name, of a time series. Here, a file name without - * leading path has to be provided - * - * @param fileName File name - * @return The meeting meta information - */ - public FileNameMetaInformation extractTimeSeriesMetaInformation(String fileName) { - /* Remove the file ending (ending limited to 255 chars, which is the max file name allowed in NTFS and ext4) */ - String withoutEnding = fileName.replaceAll("(?:\\.[^\\\\/\\s]{1,255}){1,2}$", ""); - - if (getIndividualTimeSeriesPattern().matcher(withoutEnding).matches()) - return extractIndividualTimesSeriesMetaInformation(withoutEnding); - else if (getLoadProfileTimeSeriesPattern().matcher(withoutEnding).matches()) - return extractLoadProfileTimesSeriesMetaInformation(withoutEnding); - else - throw new IllegalArgumentException( - "Unknown format of '" + fileName + "'. Cannot extract meta information."); - } - - /** - * Extracts meta information from a valid file name for a individual time series - * - * @param fileName File name to extract information from - * @return Meta information form individual time series file name - */ - private IndividualTimeSeriesMetaInformation extractIndividualTimesSeriesMetaInformation( - String fileName) { - Matcher matcher = getIndividualTimeSeriesPattern().matcher(fileName); - if (!matcher.matches()) - throw new IllegalArgumentException( - "Cannot extract meta information on individual time series from '" + fileName + "'."); - - String columnSchemeKey = matcher.group("columnScheme"); - ColumnScheme columnScheme = - ColumnScheme.parse(columnSchemeKey) - .orElseThrow( - () -> - new IllegalArgumentException( - "Cannot parse '" + columnSchemeKey + "' to valid column scheme.")); - - return new IndividualTimeSeriesMetaInformation( - UUID.fromString(matcher.group("uuid")), columnScheme); - } - - /** - * Extracts meta information from a valid file name for a load profile time series - * - * @param fileName File name to extract information from - * @return Meta information form load profile time series file name - */ - private LoadProfileTimeSeriesMetaInformation extractLoadProfileTimesSeriesMetaInformation( - String fileName) { - Matcher matcher = getLoadProfileTimeSeriesPattern().matcher(fileName); - if (!matcher.matches()) - throw new IllegalArgumentException( - "Cannot extract meta information on load profile time series from '" + fileName + "'."); - - return new LoadProfileTimeSeriesMetaInformation( - UUID.fromString(matcher.group("uuid")), matcher.group("profile")); - } - - /** - * Get the file name for time series mapping - * - * @return The file name string - */ - public Optional getTimeSeriesMappingFileName() { - return Optional.of(addPrefixAndSuffix("time_series_mapping")); - } - - /** - * Get the the file name for all {@link GraphicInput}s - * - * @param graphicClass the graphic input class a filename string should be generated from - * @return the filename string - */ - public Optional getGraphicsInputFileName(Class graphicClass) { - String assetInputString = camelCaseToSnakeCase(graphicClass.getSimpleName()); - return Optional.of(addPrefixAndSuffix(assetInputString)); - } - - /** - * Get the the file name for all {@link CharacteristicInput}s - * - * @param assetCharClass the asset characteristics class a filename string should be generated - * from - * @return the filename string - */ - public Optional getAssetCharacteristicsFileName( - Class assetCharClass) { - String assetCharString = camelCaseToSnakeCase(assetCharClass.getSimpleName()); - return Optional.of(addPrefixAndSuffix(assetCharString)); - } - - /** - * Get the the file name for all {@link AssetTypeInput}s - * - * @param typeClass the asset type class a filename string should be generated from - * @return the filename string - */ - public Optional getTypeFileName(Class typeClass) { - String assetTypeString = camelCaseToSnakeCase(typeClass.getSimpleName()); - return Optional.of(addPrefixAndSuffix(assetTypeString)); - } - - /** - * Get the the file name for all {@link AssetInput}s - * - * @param assetInputClass the asset input class a filename string should be generated from - * @return the filename string - */ - public Optional getAssetInputFileName(Class assetInputClass) { - String assetInputString = camelCaseToSnakeCase(assetInputClass.getSimpleName()); - return Optional.of(addPrefixAndSuffix(assetInputString)); - } - - /** - * Get the the file name for all {@link OperatorInput}s - * - * @param operatorClass the asset input class a filename string should be generated from - * @return the filename string - */ - public Optional getOperatorInputFileName(Class operatorClass) { - String assetInputString = camelCaseToSnakeCase(operatorClass.getSimpleName()); - return Optional.of(addPrefixAndSuffix(assetInputString)); - } - - /** - * Get the the file name for all {@link ResultEntity}s - * - * @param resultEntityClass the result entity class a filename string should be generated from - * @return the filename string - */ - public Optional getResultEntityFileName(Class resultEntityClass) { - return Optional.of(buildResultEntityString(resultEntityClass)); - } - - /** - * Get the the file name for coordinates - * - * @return the filename string - */ - public String getIdCoordinateFileName() { - return addPrefixAndSuffix("coordinates"); - } - - private String buildResultEntityString(Class resultEntityClass) { - String resultEntityString = - camelCaseToSnakeCase(resultEntityClass.getSimpleName().replace("Result", "")); - return addPrefixAndSuffix(resultEntityString.concat(RES_ENTITY_SUFFIX)); - } - - /** - * Converts a given camel case string to its snake case representation - * - * @param camelCaseString the camel case string - * @return the resulting snake case representation - */ - private String camelCaseToSnakeCase(String camelCaseString) { - String snakeCaseReplacement = "$1_$2"; - /* Separate all lower case letters, that are followed by a capital or a digit by underscore */ - String regularCamelCaseRegex = "([a-z])([A-Z0-9]+)"; - /* Separate all digits, that are followed by a letter by underscore */ - String numberLetterCamelCaseRegex = "([0-9])([a-zA-Z]+)"; - /* Separate two or more capitals, that are not at the beginning of the string by underscore */ - String specialCamelCaseRegex = "((? getDirectoryPath(Class cls) { - Optional maybeDirectoryName = hierarchy.getSubDirectory(cls); - String directoryPath; - if (!maybeDirectoryName.isPresent()) { - logger.debug("Cannot determine directory name for class '{}'.", cls); - return Optional.empty(); - } else { - /* Make sure, the directory path does not start or end with file separator and in between the separator is harmonized */ - directoryPath = - maybeDirectoryName - .get() - .replaceFirst("^" + FILE_SEPARATOR_REGEX, "") - .replaceAll(FILE_SEPARATOR_REGEX + "$", "") - .replaceAll(FILE_SEPARATOR_REGEX, FILE_SEPARATOR_REPLACEMENT); - return Optional.of(directoryPath); - } - } - - @Deprecated - public , E extends TimeSeriesEntry, V extends Value> - Optional getDirectoryPath(T timeSeries) { - Optional maybeDirectoryName = hierarchy.getSubDirectory(timeSeries.getClass()); - String directoryPath; - if (!maybeDirectoryName.isPresent()) { - logger.debug("Cannot determine directory name for time series '{}'.", timeSeries); - return Optional.empty(); - } else { - /* Make sure, the directory path does not start or end with file separator and in between the separator is harmonized */ - directoryPath = - maybeDirectoryName - .get() - .replaceFirst("^" + FILE_SEPARATOR_REGEX, "") - .replaceAll(FILE_SEPARATOR_REGEX + "$", "") - .replaceAll(FILE_SEPARATOR_REGEX, FILE_SEPARATOR_REPLACEMENT); - return Optional.of(directoryPath); - } - } -} diff --git a/src/test/groovy/edu/ie3/datamodel/io/FileNamingStrategyTest.groovy b/src/test/groovy/edu/ie3/datamodel/io/FileNamingStrategyTest.groovy index 6a2375300..f52ae8b7d 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/FileNamingStrategyTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/FileNamingStrategyTest.groovy @@ -8,7 +8,7 @@ package edu.ie3.datamodel.io import edu.ie3.datamodel.io.csv.DefaultDirectoryHierarchy import edu.ie3.datamodel.io.csv.FlatDirectoryHierarchy import edu.ie3.datamodel.io.naming.EntityNamingStrategy -import edu.ie3.datamodel.io.naming.HierarchicFileNamingStrategy + import edu.ie3.datamodel.io.source.TimeSeriesMappingSource import edu.ie3.datamodel.models.BdewLoadProfile import edu.ie3.datamodel.models.UniqueEntity diff --git a/src/test/groovy/edu/ie3/datamodel/io/csv/FileNamingStrategyTest.groovy b/src/test/groovy/edu/ie3/datamodel/io/csv/FileNamingStrategyTest.groovy deleted file mode 100644 index 15a1dcadc..000000000 --- a/src/test/groovy/edu/ie3/datamodel/io/csv/FileNamingStrategyTest.groovy +++ /dev/null @@ -1,833 +0,0 @@ -/* - * © 2021. TU Dortmund University, - * Institute of Energy Systems, Energy Efficiency and Energy Economics, - * Research group Distribution grid planning and operation - */ -package edu.ie3.datamodel.io.csv - -import edu.ie3.datamodel.io.csv.timeseries.ColumnScheme -import edu.ie3.datamodel.io.csv.timeseries.IndividualTimeSeriesMetaInformation -import edu.ie3.datamodel.io.csv.timeseries.LoadProfileTimeSeriesMetaInformation -import edu.ie3.datamodel.io.source.TimeSeriesMappingSource -import edu.ie3.datamodel.models.BdewLoadProfile -import edu.ie3.datamodel.models.UniqueEntity -import edu.ie3.datamodel.models.input.MeasurementUnitInput -import edu.ie3.datamodel.models.input.NodeInput -import edu.ie3.datamodel.models.input.RandomLoadParameters -import edu.ie3.datamodel.models.input.connector.LineInput -import edu.ie3.datamodel.models.input.connector.SwitchInput -import edu.ie3.datamodel.models.input.connector.Transformer2WInput -import edu.ie3.datamodel.models.input.connector.Transformer3WInput -import edu.ie3.datamodel.models.input.connector.type.LineTypeInput -import edu.ie3.datamodel.models.input.connector.type.Transformer2WTypeInput -import edu.ie3.datamodel.models.input.connector.type.Transformer3WTypeInput -import edu.ie3.datamodel.models.input.graphics.LineGraphicInput -import edu.ie3.datamodel.models.input.graphics.NodeGraphicInput -import edu.ie3.datamodel.models.input.system.* -import edu.ie3.datamodel.models.input.system.characteristic.EvCharacteristicInput -import edu.ie3.datamodel.models.input.system.characteristic.WecCharacteristicInput -import edu.ie3.datamodel.models.input.system.type.* -import edu.ie3.datamodel.models.input.thermal.CylindricalStorageInput -import edu.ie3.datamodel.models.input.thermal.ThermalHouseInput -import edu.ie3.datamodel.models.result.NodeResult -import edu.ie3.datamodel.models.result.connector.LineResult -import edu.ie3.datamodel.models.result.connector.SwitchResult -import edu.ie3.datamodel.models.result.connector.Transformer2WResult -import edu.ie3.datamodel.models.result.connector.Transformer3WResult -import edu.ie3.datamodel.models.result.system.* -import edu.ie3.datamodel.models.result.thermal.CylindricalStorageResult -import edu.ie3.datamodel.models.result.thermal.ThermalHouseResult -import edu.ie3.datamodel.models.timeseries.IntValue -import edu.ie3.datamodel.models.timeseries.individual.IndividualTimeSeries -import edu.ie3.datamodel.models.timeseries.individual.TimeBasedValue -import edu.ie3.datamodel.models.timeseries.repetitive.LoadProfileInput -import edu.ie3.datamodel.models.timeseries.repetitive.RepetitiveTimeSeries -import edu.ie3.datamodel.models.value.EnergyPriceValue -import edu.ie3.util.quantities.PowerSystemUnits -import spock.lang.Specification -import tech.units.indriya.quantity.Quantities - -import java.nio.file.Paths -import java.time.ZonedDateTime -import java.util.regex.Pattern - -@Deprecated -class FileNamingStrategyTest extends Specification { - - def "The uuid pattern actually matches a valid uuid"() { - given: - def pattern = Pattern.compile(FileNamingStrategy.UUID_STRING) - def uuidString = UUID.randomUUID().toString() - - when: - def matcher = pattern.matcher(uuidString) - - then: - matcher.matches() - } - - def "The pattern for an individual time series file name actually matches a valid file name and extracts the correct groups"() { - given: - def fns = new FileNamingStrategy() - def validFileName = "its_c_4881fda2-bcee-4f4f-a5bb-6a09bf785276" - - when: - def matcher = fns.individualTimeSeriesPattern.matcher(validFileName) - - then: "the pattern matches" - matcher.matches() - - then: "it also has correct capturing groups" - matcher.groupCount() == 2 - matcher.group(1) == "c" - matcher.group("columnScheme") == "c" - matcher.group(2) == "4881fda2-bcee-4f4f-a5bb-6a09bf785276" - matcher.group("uuid") == "4881fda2-bcee-4f4f-a5bb-6a09bf785276" - } - - def "The pattern for a repetitive load profile time series file name actually matches a valid file name and extracts the correct groups"() { - given: - def fns = new FileNamingStrategy() - def validFileName = "lpts_g3_bee0a8b6-4788-4f18-bf72-be52035f7304" - - when: - def matcher = fns.loadProfileTimeSeriesPattern.matcher(validFileName) - - then: "the pattern matches" - matcher.matches() - - then: "it also has correct capturing groups" - matcher.groupCount() == 2 - matcher.group(1) == "g3" - matcher.group(2) == "bee0a8b6-4788-4f18-bf72-be52035f7304" - matcher.group("profile") == "g3" - matcher.group("uuid") == "bee0a8b6-4788-4f18-bf72-be52035f7304" - } - - def "Trying to extract time series meta information throws an Exception, if it is provided a malformed string"() { - given: - def fns = new FileNamingStrategy() - def path = Paths.get("/bla/foo") - - when: - fns.extractTimeSeriesMetaInformation(path) - - then: - def ex = thrown(IllegalArgumentException) - ex.message == "Unknown format of 'foo'. Cannot extract meta information." - } - - def "Trying to extract individual time series meta information throws an Exception, if it is provided a malformed string"() { - given: - def fns = new FileNamingStrategy() - def fileName = "foo" - - when: - fns.extractIndividualTimesSeriesMetaInformation(fileName) - - then: - def ex = thrown(IllegalArgumentException) - ex.message == "Cannot extract meta information on individual time series from 'foo'." - } - - def "Trying to extract load profile time series meta information throws an Exception, if it is provided a malformed string"() { - given: - def fns = new FileNamingStrategy() - def fileName = "foo" - - when: - fns.extractLoadProfileTimesSeriesMetaInformation(fileName) - - then: - def ex = thrown(IllegalArgumentException) - ex.message == "Cannot extract meta information on load profile time series from 'foo'." - } - - def "The FileNamingStrategy extracts correct meta information from a valid individual time series file name"() { - given: - def fns = new FileNamingStrategy() - def path = Paths.get(pathString) - - when: - def metaInformation = fns.extractTimeSeriesMetaInformation(path) - - then: - IndividualTimeSeriesMetaInformation.isAssignableFrom(metaInformation.getClass()) - (metaInformation as IndividualTimeSeriesMetaInformation).with { - assert it.uuid == UUID.fromString("4881fda2-bcee-4f4f-a5bb-6a09bf785276") - assert it.columnScheme == expectedColumnScheme - } - - where: - pathString || expectedColumnScheme - "/bla/foo/its_c_4881fda2-bcee-4f4f-a5bb-6a09bf785276.csv" || ColumnScheme.ENERGY_PRICE - "/bla/foo/its_p_4881fda2-bcee-4f4f-a5bb-6a09bf785276.csv" || ColumnScheme.ACTIVE_POWER - "/bla/foo/its_pq_4881fda2-bcee-4f4f-a5bb-6a09bf785276.csv" || ColumnScheme.APPARENT_POWER - "/bla/foo/its_h_4881fda2-bcee-4f4f-a5bb-6a09bf785276.csv" || ColumnScheme.HEAT_DEMAND - "/bla/foo/its_ph_4881fda2-bcee-4f4f-a5bb-6a09bf785276.csv" || ColumnScheme.ACTIVE_POWER_AND_HEAT_DEMAND - "/bla/foo/its_pqh_4881fda2-bcee-4f4f-a5bb-6a09bf785276.csv" || ColumnScheme.APPARENT_POWER_AND_HEAT_DEMAND - "/bla/foo/its_weather_4881fda2-bcee-4f4f-a5bb-6a09bf785276.csv" || ColumnScheme.WEATHER - } - - def "The FileNamingStrategy extracts correct meta information from a valid individual time series file name with pre- and suffix"() { - given: - def fns = new FileNamingStrategy("prefix", "suffix") - def path = Paths.get(pathString) - - when: - def metaInformation = fns.extractTimeSeriesMetaInformation(path) - - then: - IndividualTimeSeriesMetaInformation.isAssignableFrom(metaInformation.getClass()) - (metaInformation as IndividualTimeSeriesMetaInformation).with { - assert it.uuid == UUID.fromString("4881fda2-bcee-4f4f-a5bb-6a09bf785276") - assert it.columnScheme == expectedColumnScheme - } - - where: - pathString || expectedColumnScheme - "/bla/foo/prefix_its_c_4881fda2-bcee-4f4f-a5bb-6a09bf785276_suffix.csv" || ColumnScheme.ENERGY_PRICE - "/bla/foo/prefix_its_p_4881fda2-bcee-4f4f-a5bb-6a09bf785276_suffix.csv" || ColumnScheme.ACTIVE_POWER - "/bla/foo/prefix_its_pq_4881fda2-bcee-4f4f-a5bb-6a09bf785276_suffix.csv" || ColumnScheme.APPARENT_POWER - "/bla/foo/prefix_its_h_4881fda2-bcee-4f4f-a5bb-6a09bf785276_suffix.csv" || ColumnScheme.HEAT_DEMAND - "/bla/foo/prefix_its_ph_4881fda2-bcee-4f4f-a5bb-6a09bf785276_suffix.csv" || ColumnScheme.ACTIVE_POWER_AND_HEAT_DEMAND - "/bla/foo/prefix_its_pqh_4881fda2-bcee-4f4f-a5bb-6a09bf785276_suffix.csv" || ColumnScheme.APPARENT_POWER_AND_HEAT_DEMAND - "/bla/foo/prefix_its_weather_4881fda2-bcee-4f4f-a5bb-6a09bf785276_suffix.csv" || ColumnScheme.WEATHER - } - - def "The FileNamingStrategy throw an IllegalArgumentException, if the column scheme is malformed."() { - given: - def fns = new FileNamingStrategy() - def path = Paths.get("/bla/foo/its_whoops_4881fda2-bcee-4f4f-a5bb-6a09bf785276.csv") - - when: - fns.extractTimeSeriesMetaInformation(path) - - then: - def ex = thrown(IllegalArgumentException) - ex.message == "Cannot parse 'whoops' to valid column scheme." - } - - def "The FileNamingStrategy extracts correct meta information from a valid load profile time series file name"() { - given: - def fns = new FileNamingStrategy() - def path = Paths.get("/bla/foo/lpts_g3_bee0a8b6-4788-4f18-bf72-be52035f7304.csv") - - when: - def metaInformation = fns.extractTimeSeriesMetaInformation(path) - - then: - LoadProfileTimeSeriesMetaInformation.isAssignableFrom(metaInformation.getClass()) - (metaInformation as LoadProfileTimeSeriesMetaInformation).with { - assert uuid == UUID.fromString("bee0a8b6-4788-4f18-bf72-be52035f7304") - assert profile == "g3" - } - } - - def "The FileNamingStrategy extracts correct meta information from a valid load profile time series file name with pre- and suffix"() { - given: - def fns = new FileNamingStrategy("prefix", "suffix") - def path = Paths.get("/bla/foo/prefix_lpts_g3_bee0a8b6-4788-4f18-bf72-be52035f7304_suffix.csv") - - when: - def metaInformation = fns.extractTimeSeriesMetaInformation(path) - - then: - LoadProfileTimeSeriesMetaInformation.isAssignableFrom(metaInformation.getClass()) - (metaInformation as LoadProfileTimeSeriesMetaInformation).with { - assert uuid == UUID.fromString("bee0a8b6-4788-4f18-bf72-be52035f7304") - assert profile == "g3" - } - } - - def "The FileNamingStrategy is able to prepare the prefix properly"() { - when: - String actual = FileNamingStrategy.preparePrefix(prefix) - - then: - actual == expected - - where: - prefix || expected - "abc123" || "abc123_" - "aBc123" || "abc123_" - "ABC123" || "abc123_" - "abc123_" || "abc123_" - "aBc123_" || "abc123_" - "ABC123_" || "abc123_" - } - - def "The FileNamingStrategy is able to prepare the suffix properly"() { - when: - String actual = FileNamingStrategy.prepareSuffix(prefix) - - then: - actual == suffix - - where: - prefix || suffix - "abc123" || "_abc123" - "aBc123" || "_abc123" - "ABC123" || "_abc123" - "_abc123" || "_abc123" - "_aBc123" || "_abc123" - "_ABC123" || "_abc123" - } - - def "A FileNamingStrategy should recognize if empty strings are passed in the prefix/suffix constructor and don't add underlines then"() { - given: "a file naming strategy" - FileNamingStrategy strategy = new FileNamingStrategy("", "") - - expect: - strategy.prefix == "" - strategy.suffix == "" - } - - def "A FileNamingStrategy should correctly append and prepend underscores"() { - given: "a file naming strategy" - FileNamingStrategy strategy = new FileNamingStrategy("bla", "foo") - - expect: - strategy.prefix == "bla_" - strategy.suffix == "_foo" - } - - def "A FileNamingStrategy should correctly append underscore, when only prefix is set"() { - given: "a file naming strategy" - FileNamingStrategy strategy = new FileNamingStrategy("bla") - - expect: - strategy.prefix == "bla_" - strategy.suffix == "" - } - - def "A FileNamingStrategy should return an empty optional on a invalid class"() { - given: "a file naming strategy" - FileNamingStrategy strategy = new FileNamingStrategy() - - when: - Optional res = strategy.getFileName(String) - - then: - !res.present - } - - def "A FileNamingStrategy without pre- or suffixes should return valid strings for all result models"() { - given: "a file naming strategy without pre- or suffixes" - FileNamingStrategy strategy = new FileNamingStrategy() - - when: - Optional res = strategy.getFileName(modelClass) - - then: - res.present - res.get() == expectedString - - where: - modelClass || expectedString - LoadResult || "load_res" - FixedFeedInResult || "fixed_feed_in_res" - BmResult || "bm_res" - PvResult || "pv_res" - ChpResult || "chp_res" - WecResult || "wec_res" - StorageResult || "storage_res" - EvcsResult || "evcs_res" - EvResult || "ev_res" - Transformer2WResult || "transformer_2_w_res" - Transformer3WResult || "transformer_3_w_res" - LineResult || "line_res" - SwitchResult || "switch_res" - NodeResult || "node_res" - CylindricalStorageResult || "cylindrical_storage_res" - ThermalHouseResult || "thermal_house_res" - } - - def "A FileNamingStrategy with pre- and suffixes should return valid strings for all result models"() { - given: "a file naming strategy with pre- or suffixes" - FileNamingStrategy strategy = new FileNamingStrategy("prefix", "suffix") - - when: - Optional res = strategy.getFileName(modelClass) - - then: - res.present - res.get() == expectedString - - where: - modelClass || expectedString - LoadResult || "prefix_load_res_suffix" - FixedFeedInResult || "prefix_fixed_feed_in_res_suffix" - BmResult || "prefix_bm_res_suffix" - PvResult || "prefix_pv_res_suffix" - ChpResult || "prefix_chp_res_suffix" - WecResult || "prefix_wec_res_suffix" - StorageResult || "prefix_storage_res_suffix" - EvcsResult || "prefix_evcs_res_suffix" - EvResult || "prefix_ev_res_suffix" - Transformer2WResult || "prefix_transformer_2_w_res_suffix" - Transformer3WResult || "prefix_transformer_3_w_res_suffix" - LineResult || "prefix_line_res_suffix" - SwitchResult || "prefix_switch_res_suffix" - NodeResult || "prefix_node_res_suffix" - CylindricalStorageResult || "prefix_cylindrical_storage_res_suffix" - ThermalHouseResult || "prefix_thermal_house_res_suffix" - } - - def "A FileNamingStrategy without pre- or suffixes should return valid strings for all input assets models"() { - given: "a file naming strategy without pre- or suffixes" - FileNamingStrategy strategy = new FileNamingStrategy() - - when: - Optional res = strategy.getFileName(modelClass) - - then: - res.present - res.get() == expectedString - - where: - modelClass || expectedString - FixedFeedInInput || "fixed_feed_in_input" - PvInput || "pv_input" - WecInput || "wec_input" - ChpInput || "chp_input" - BmInput || "bm_input" - EvInput || "ev_input" - LoadInput || "load_input" - StorageInput || "storage_input" - HpInput || "hp_input" - LineInput || "line_input" - SwitchInput || "switch_input" - NodeInput || "node_input" - MeasurementUnitInput || "measurement_unit_input" - EvcsInput || "evcs_input" - Transformer2WInput || "transformer_2_w_input" - Transformer3WInput || "transformer_3_w_input" - CylindricalStorageInput || "cylindrical_storage_input" - ThermalHouseInput || "thermal_house_input" - } - - def "A FileNamingStrategy without pre- or suffixes should return valid strings for all asset characteristics models"() { - given: "a file naming strategy without pre- or suffixes" - FileNamingStrategy strategy = new FileNamingStrategy() - - when: - Optional res = strategy.getFileName(modelClass) - - then: - res.present - res.get() == expectedString - - where: - modelClass || expectedString - WecCharacteristicInput || "wec_characteristic_input" - EvCharacteristicInput || "ev_characteristic_input" - } - - def "A FileNamingStrategy without pre- or suffixes should return valid strings for all input types models"() { - given: "a file naming strategy without pre- or suffixes" - FileNamingStrategy strategy = new FileNamingStrategy() - - when: - Optional res = strategy.getFileName(modelClass) - - then: - res.present - res.get() == expectedString - - where: - modelClass || expectedString - BmTypeInput || "bm_type_input" - ChpTypeInput || "chp_type_input" - EvTypeInput || "ev_type_input" - HpTypeInput || "hp_type_input" - LineTypeInput || "line_type_input" - StorageTypeInput || "storage_type_input" - Transformer2WTypeInput || "transformer_2_w_type_input" - Transformer3WTypeInput || "transformer_3_w_type_input" - WecTypeInput || "wec_type_input" - WecTypeInput || "wec_type_input" - } - - def "A FileNamingStrategy without pre- or suffixes should return valid strings for a Load Parameter Model"() { - given: "a file naming strategy without pre- or suffixes" - FileNamingStrategy strategy = new FileNamingStrategy() - - when: - Optional res = strategy.getFileName(modelClass) - - then: - res.present - res.get() == expectedString - - where: - modelClass || expectedString - RandomLoadParameters || "random_load_parameters_input" - } - - def "A FileNamingStrategy without pre- or suffixes should return valid strings for a graphic input Model"() { - given: "a file naming strategy without pre- or suffixes" - FileNamingStrategy strategy = new FileNamingStrategy() - - when: - Optional res = strategy.getFileName(modelClass) - - then: - res.present - res.get() == expectedString - - where: - modelClass || expectedString - NodeGraphicInput || "node_graphic_input" - LineGraphicInput || "line_graphic_input" - } - - def "A FileNamingStrategy without pre- or suffix should return empty Optional, if the content of the time series is not covered"() { - given: - FileNamingStrategy strategy = new FileNamingStrategy() - def entries = [ - new TimeBasedValue(ZonedDateTime.now(), new IntValue(5)) - ] as SortedSet - IndividualTimeSeries timeSeries = Mock(IndividualTimeSeries) - timeSeries.uuid >> UUID.randomUUID() - timeSeries.entries >> entries - - when: - Optional actual = strategy.getFileName(timeSeries) - - then: - !actual.present - } - - def "A FileNamingStrategy without pre- or suffix should return empty Optional, if the time series is empty"() { - given: - FileNamingStrategy strategy = new FileNamingStrategy() - def entries = [] as SortedSet - IndividualTimeSeries timeSeries = Mock(IndividualTimeSeries) - timeSeries.uuid >> UUID.randomUUID() - timeSeries.entries >> entries - - when: - Optional actual = strategy.getFileName(timeSeries) - - then: - !actual.present - } - - def "A FileNamingStrategy without pre- or suffix should return valid file name for individual time series" () { - given: - FileNamingStrategy strategy = new FileNamingStrategy() - def entries = [ - new TimeBasedValue(ZonedDateTime.now(), new EnergyPriceValue(Quantities.getQuantity(500d, PowerSystemUnits.EURO_PER_MEGAWATTHOUR)))] as SortedSet - IndividualTimeSeries timeSeries = Mock(IndividualTimeSeries) - timeSeries.uuid >> uuid - timeSeries.entries >> entries - - when: - Optional actual = strategy.getFileName(timeSeries) - - then: - actual.present - actual.get() == expectedFileName - - where: - clazz | uuid || expectedFileName - IndividualTimeSeries | UUID.fromString("4881fda2-bcee-4f4f-a5bb-6a09bf785276") || "its_c_4881fda2-bcee-4f4f-a5bb-6a09bf785276" - } - - def "A FileNamingStrategy with pre- or suffix should return valid file name for individual time series" () { - given: - FileNamingStrategy strategy = new FileNamingStrategy("aa", "zz") - def entries = [] as SortedSet - entries.add(new TimeBasedValue(ZonedDateTime.now(), new EnergyPriceValue(Quantities.getQuantity(500d, PowerSystemUnits.EURO_PER_MEGAWATTHOUR)))) - IndividualTimeSeries timeSeries = Mock(IndividualTimeSeries) - timeSeries.uuid >> uuid - timeSeries.entries >> entries - - when: - Optional actual = strategy.getFileName(timeSeries) - - then: - actual.present - actual.get() == expectedFileName - - where: - clazz | uuid || expectedFileName - IndividualTimeSeries | UUID.fromString("4881fda2-bcee-4f4f-a5bb-6a09bf785276") || "aa_its_c_4881fda2-bcee-4f4f-a5bb-6a09bf785276_zz" - } - - def "A FileNamingStrategy without pre- or suffix should return valid file name for load profile input" () { - given: - FileNamingStrategy strategy = new FileNamingStrategy() - LoadProfileInput timeSeries = Mock(LoadProfileInput) - timeSeries.uuid >> uuid - timeSeries.getType() >> type - - when: - Optional actual = strategy.getFileName(timeSeries) - - then: - actual.present - actual.get() == expectedFileName - - where: - clazz | uuid | type || expectedFileName - LoadProfileInput | UUID.fromString("bee0a8b6-4788-4f18-bf72-be52035f7304") | BdewLoadProfile.G3 || "lpts_g3_bee0a8b6-4788-4f18-bf72-be52035f7304" - } - - def "A FileNamingStrategy returns empty Optional, when there is no naming defined for a given time series class"() { - given: - FileNamingStrategy fileNamingStrategy = new FileNamingStrategy() - RepetitiveTimeSeries timeSeries = Mock(RepetitiveTimeSeries) - - when: - Optional fileName = fileNamingStrategy.getFileName(timeSeries) - - then: - !fileName.present - } - - def "A FileNamingStrategy without pre- or suffixes should return valid strings for time series mapping"() { - given: "a file naming strategy without pre- or suffixes" - FileNamingStrategy strategy = new FileNamingStrategy() - - when: - Optional res = strategy.getFileName(TimeSeriesMappingSource.MappingEntry) - - then: - res.present - res.get() == "time_series_mapping" - } - - def "A FileNamingStrategy with pre- and suffix should return valid strings for time series mapping"() { - given: "a file naming strategy without pre- or suffixes" - FileNamingStrategy strategy = new FileNamingStrategy("prefix", "suffix") - - when: - Optional res = strategy.getFileName(TimeSeriesMappingSource.MappingEntry) - - then: - res.present - res.get() == "prefix_time_series_mapping_suffix" - } - - def "A simple file naming strategy does return empty sub directory path for any model input class"() { - given: "a file naming strategy without pre- or suffixes" - def strategy = new FileNamingStrategy() - - when: - def actual = strategy.getDirectoryPath(modelClass as Class) - - then: - actual == expected - - where: - modelClass || expected - FixedFeedInInput || Optional.empty() - PvInput || Optional.empty() - WecInput || Optional.empty() - ChpInput || Optional.empty() - BmInput || Optional.empty() - EvInput || Optional.empty() - LoadInput || Optional.empty() - StorageInput || Optional.empty() - HpInput || Optional.empty() - LineInput || Optional.empty() - SwitchInput || Optional.empty() - NodeInput || Optional.empty() - MeasurementUnitInput || Optional.empty() - EvcsInput || Optional.empty() - Transformer2WInput || Optional.empty() - Transformer3WInput || Optional.empty() - CylindricalStorageInput || Optional.empty() - ThermalHouseInput || Optional.empty() - BmTypeInput || Optional.empty() - ChpTypeInput || Optional.empty() - EvTypeInput || Optional.empty() - HpTypeInput || Optional.empty() - LineTypeInput || Optional.empty() - StorageTypeInput || Optional.empty() - Transformer2WTypeInput || Optional.empty() - Transformer3WTypeInput || Optional.empty() - WecTypeInput || Optional.empty() - WecTypeInput || Optional.empty() - RandomLoadParameters || Optional.empty() - NodeGraphicInput || Optional.empty() - LineGraphicInput || Optional.empty() - WecCharacteristicInput || Optional.empty() - EvCharacteristicInput || Optional.empty() - TimeSeriesMappingSource.MappingEntry || Optional.empty() - } - - def "A simple file naming strategy does return empty sub directory path for any result class"() { - given: "a file naming strategy without pre- or suffixes" - def strategy = new FileNamingStrategy() - - when: - def actual = strategy.getDirectoryPath(modelClass as Class) - - then: - actual == expected - - where: - modelClass || expected - LoadResult || Optional.empty() - FixedFeedInResult || Optional.empty() - BmResult || Optional.empty() - PvResult || Optional.empty() - ChpResult || Optional.empty() - WecResult || Optional.empty() - StorageResult || Optional.empty() - EvcsResult || Optional.empty() - EvResult || Optional.empty() - Transformer2WResult || Optional.empty() - Transformer3WResult || Optional.empty() - LineResult || Optional.empty() - SwitchResult || Optional.empty() - NodeResult || Optional.empty() - CylindricalStorageResult || Optional.empty() - ThermalHouseResult || Optional.empty() - } - - def "A simple file naming strategy does return empty sub directory path for load profile time series"() { - given: "a file naming strategy without pre- or suffixes" - def strategy = new FileNamingStrategy() - def timeSeries = Mock(LoadProfileInput) - - when: - def actual = strategy.getDirectoryPath(timeSeries) - - then: - actual == Optional.empty() - } - - def "A simple file naming strategy does return empty sub directory path for individual time series"() { - given: "a file naming strategy without pre- or suffixes" - def strategy = new FileNamingStrategy() - def timeSeries = Mock(IndividualTimeSeries) - - when: - def actual = strategy.getDirectoryPath(timeSeries) - - then: - actual == Optional.empty() - } - - def "A FileNamingStrategy without pre- or suffixes should return valid file paths for all input classes"() { - given: "a file naming strategy without pre- or suffixes" - def strategy = new FileNamingStrategy() - - when: - def res = strategy.getFilePath(modelClass as Class) - - then: - res.present - res.get() == expectedString - - where: - modelClass || expectedString - WecCharacteristicInput || "wec_characteristic_input" - FixedFeedInInput || "fixed_feed_in_input" - PvInput || "pv_input" - WecInput || "wec_input" - ChpInput || "chp_input" - BmInput || "bm_input" - EvInput || "ev_input" - LoadInput || "load_input" - StorageInput || "storage_input" - HpInput || "hp_input" - LineInput || "line_input" - SwitchInput || "switch_input" - NodeInput || "node_input" - MeasurementUnitInput || "measurement_unit_input" - EvcsInput || "evcs_input" - Transformer2WInput || "transformer_2_w_input" - Transformer3WInput || "transformer_3_w_input" - CylindricalStorageInput || "cylindrical_storage_input" - ThermalHouseInput || "thermal_house_input" - EvCharacteristicInput || "ev_characteristic_input" - BmTypeInput || "bm_type_input" - ChpTypeInput || "chp_type_input" - EvTypeInput || "ev_type_input" - HpTypeInput || "hp_type_input" - LineTypeInput || "line_type_input" - StorageTypeInput || "storage_type_input" - Transformer2WTypeInput || "transformer_2_w_type_input" - Transformer3WTypeInput || "transformer_3_w_type_input" - WecTypeInput || "wec_type_input" - WecTypeInput || "wec_type_input" - NodeGraphicInput || "node_graphic_input" - LineGraphicInput || "line_graphic_input" - } - - def "A FileNamingStrategy without pre- or suffixes should return valid file paths for all result classes"() { - given: "a file naming strategy without pre- or suffixes" - def strategy = new FileNamingStrategy() - - when: - def res = strategy.getFilePath(modelClass as Class) - - then: - res.present - res.get() == expectedString - - where: - modelClass || expectedString - LoadResult || "load_res" - FixedFeedInResult || "fixed_feed_in_res" - BmResult || "bm_res" - PvResult || "pv_res" - ChpResult || "chp_res" - WecResult || "wec_res" - StorageResult || "storage_res" - EvcsResult || "evcs_res" - EvResult || "ev_res" - Transformer2WResult || "transformer_2_w_res" - Transformer3WResult || "transformer_3_w_res" - LineResult || "line_res" - SwitchResult || "switch_res" - NodeResult || "node_res" - CylindricalStorageResult || "cylindrical_storage_res" - ThermalHouseResult || "thermal_house_res" - } - - def "A simple file naming strategy does return valid file path for load profile time series"() { - given: "a file naming strategy without pre- or suffixes" - def strategy = new FileNamingStrategy() - def timeSeries = Mock(LoadProfileInput) - timeSeries.uuid >> uuid - timeSeries.type >> type - - when: - def actual = strategy.getFilePath(timeSeries) - - then: - actual.present - actual.get() == expectedFilePath - - where: - clazz | uuid | type || expectedFilePath - LoadProfileInput | UUID.fromString("bee0a8b6-4788-4f18-bf72-be52035f7304") | BdewLoadProfile.G3 || "lpts_g3_bee0a8b6-4788-4f18-bf72-be52035f7304" - } - - def "A simple file naming strategy does return valid file path for individual time series"() { - given: "a file naming strategy without pre- or suffixes" - def strategy = new FileNamingStrategy() - def entries = [ - new TimeBasedValue(ZonedDateTime.now(), new EnergyPriceValue(Quantities.getQuantity(500d, PowerSystemUnits.EURO_PER_MEGAWATTHOUR)))] as SortedSet - def timeSeries = Mock(IndividualTimeSeries) - timeSeries.uuid >> uuid - timeSeries.entries >> entries - - when: - def actual = strategy.getFilePath(timeSeries) - - then: - actual.present - actual.get() == expectedFilePath - - where: - clazz | uuid || expectedFilePath - IndividualTimeSeries | UUID.fromString("4881fda2-bcee-4f4f-a5bb-6a09bf785276") || "its_c_4881fda2-bcee-4f4f-a5bb-6a09bf785276" - } -} diff --git a/src/test/groovy/edu/ie3/datamodel/io/naming/HierarchicFileNamingStrategyTest.groovy b/src/test/groovy/edu/ie3/datamodel/io/naming/HierarchicFileNamingStrategyTest.groovy deleted file mode 100644 index c2de9934c..000000000 --- a/src/test/groovy/edu/ie3/datamodel/io/naming/HierarchicFileNamingStrategyTest.groovy +++ /dev/null @@ -1,460 +0,0 @@ -/* - * © 2021. TU Dortmund University, - * Institute of Energy Systems, Energy Efficiency and Energy Economics, - * Research group Distribution grid planning and operation - */ -package edu.ie3.datamodel.io.naming - -import edu.ie3.datamodel.io.csv.DefaultDirectoryHierarchy -import edu.ie3.datamodel.io.source.TimeSeriesMappingSource -import edu.ie3.datamodel.models.BdewLoadProfile -import edu.ie3.datamodel.models.UniqueEntity -import edu.ie3.datamodel.models.input.MeasurementUnitInput -import edu.ie3.datamodel.models.input.NodeInput -import edu.ie3.datamodel.models.input.RandomLoadParameters -import edu.ie3.datamodel.models.input.connector.LineInput -import edu.ie3.datamodel.models.input.connector.SwitchInput -import edu.ie3.datamodel.models.input.connector.Transformer2WInput -import edu.ie3.datamodel.models.input.connector.Transformer3WInput -import edu.ie3.datamodel.models.input.connector.type.LineTypeInput -import edu.ie3.datamodel.models.input.connector.type.Transformer2WTypeInput -import edu.ie3.datamodel.models.input.connector.type.Transformer3WTypeInput -import edu.ie3.datamodel.models.input.graphics.LineGraphicInput -import edu.ie3.datamodel.models.input.graphics.NodeGraphicInput -import edu.ie3.datamodel.models.input.system.* -import edu.ie3.datamodel.models.input.system.type.* -import edu.ie3.datamodel.models.input.thermal.CylindricalStorageInput -import edu.ie3.datamodel.models.input.thermal.ThermalHouseInput -import edu.ie3.datamodel.models.result.NodeResult -import edu.ie3.datamodel.models.result.connector.LineResult -import edu.ie3.datamodel.models.result.connector.SwitchResult -import edu.ie3.datamodel.models.result.connector.Transformer2WResult -import edu.ie3.datamodel.models.result.connector.Transformer3WResult -import edu.ie3.datamodel.models.result.system.* -import edu.ie3.datamodel.models.result.thermal.CylindricalStorageResult -import edu.ie3.datamodel.models.result.thermal.ThermalHouseResult -import edu.ie3.datamodel.models.timeseries.individual.IndividualTimeSeries -import edu.ie3.datamodel.models.timeseries.individual.TimeBasedValue -import edu.ie3.datamodel.models.timeseries.repetitive.LoadProfileInput -import edu.ie3.datamodel.models.timeseries.repetitive.RepetitiveTimeSeries -import edu.ie3.datamodel.models.value.EnergyPriceValue -import edu.ie3.util.quantities.PowerSystemUnits -import spock.lang.Shared -import spock.lang.Specification -import tech.units.indriya.quantity.Quantities - -import java.nio.file.Files -import java.time.ZonedDateTime - -class HierarchicFileNamingStrategyTest extends Specification { - @Shared - DefaultDirectoryHierarchy defaultHierarchy - - def setup() { - def tmpPath = Files.createTempDirectory("psdm_hierarchic_file_naming_strategy") - defaultHierarchy = new DefaultDirectoryHierarchy(tmpPath.toString(), "test_grid") - } - - def "A HierarchicFileNamingStrategy should return an empty optional on a invalid class"() { - given: "a naming strategy" - def strategy = new HierarchicFileNamingStrategy(defaultHierarchy) - - when: - def res = strategy.getEntityName(String) - - then: - !res.present - } - - def "A HierarchicFileNamingStrategy without pre- or suffixes should return valid directory paths for all result models"() { - given: "a naming strategy without pre- or suffixes" - def strategy = new HierarchicFileNamingStrategy(defaultHierarchy) - - when: - def res = strategy.getDirectoryPath(modelClass) - - then: - res.present - res.get() == expectedString - - where: - modelClass || expectedString - LoadResult || "test_grid" + File.separator + "results" + File.separator + "participants" - FixedFeedInResult || "test_grid" + File.separator + "results" + File.separator + "participants" - BmResult || "test_grid" + File.separator + "results" + File.separator + "participants" - PvResult || "test_grid" + File.separator + "results" + File.separator + "participants" - ChpResult || "test_grid" + File.separator + "results" + File.separator + "participants" - WecResult || "test_grid" + File.separator + "results" + File.separator + "participants" - StorageResult || "test_grid" + File.separator + "results" + File.separator + "participants" - EvcsResult || "test_grid" + File.separator + "results" + File.separator + "participants" - EvResult || "test_grid" + File.separator + "results" + File.separator + "participants" - Transformer2WResult || "test_grid" + File.separator + "results" + File.separator + "grid" - Transformer3WResult || "test_grid" + File.separator + "results" + File.separator + "grid" - LineResult || "test_grid" + File.separator + "results" + File.separator + "grid" - SwitchResult || "test_grid" + File.separator + "results" + File.separator + "grid" - NodeResult || "test_grid" + File.separator + "results" + File.separator + "grid" - CylindricalStorageResult || "test_grid" + File.separator + "results" + File.separator + "thermal" - ThermalHouseResult || "test_grid" + File.separator + "results" + File.separator + "thermal" - } - - def "A HierarchicFileNamingStrategy without pre- or suffixes should return valid directory paths for all input assets models"() { - given: "a naming strategy without pre- or suffixes" - def strategy = new HierarchicFileNamingStrategy(defaultHierarchy) - - when: - def res = strategy.getDirectoryPath(modelClass) - - then: - res.present - res.get() == expectedString - - where: - modelClass || expectedString - FixedFeedInInput || "test_grid" + File.separator + "input" + File.separator + "participants" - PvInput || "test_grid" + File.separator + "input" + File.separator + "participants" - WecInput || "test_grid" + File.separator + "input" + File.separator + "participants" - ChpInput || "test_grid" + File.separator + "input" + File.separator + "participants" - BmInput || "test_grid" + File.separator + "input" + File.separator + "participants" - EvInput || "test_grid" + File.separator + "input" + File.separator + "participants" - LoadInput || "test_grid" + File.separator + "input" + File.separator + "participants" - StorageInput || "test_grid" + File.separator + "input" + File.separator + "participants" - HpInput || "test_grid" + File.separator + "input" + File.separator + "participants" - LineInput || "test_grid" + File.separator + "input" + File.separator + "grid" - SwitchInput || "test_grid" + File.separator + "input" + File.separator + "grid" - NodeInput || "test_grid" + File.separator + "input" + File.separator + "grid" - MeasurementUnitInput || "test_grid" + File.separator + "input" + File.separator + "grid" - EvcsInput || "test_grid" + File.separator + "input" + File.separator + "participants" - Transformer2WInput || "test_grid" + File.separator + "input" + File.separator + "grid" - Transformer3WInput || "test_grid" + File.separator + "input" + File.separator + "grid" - CylindricalStorageInput || "test_grid" + File.separator + "input" + File.separator + "thermal" - ThermalHouseInput || "test_grid" + File.separator + "input" + File.separator + "thermal" - } - - def "A HierarchicFileNamingStrategy without pre- or suffixes should return valid file paths for all system input assets models"() { - given: "a naming strategy without pre- or suffixes" - def strategy = new HierarchicFileNamingStrategy(defaultHierarchy) - - when: - def res = strategy.getFilePath(modelClass) - - then: - res.present - res.get() == expectedString - - where: - modelClass || expectedString - FixedFeedInInput || "test_grid" + File.separator + "input" + File.separator + "participants" + File.separator + "fixed_feed_in_input" - PvInput || "test_grid" + File.separator + "input" + File.separator + "participants" + File.separator + "pv_input" - WecInput || "test_grid" + File.separator + "input" + File.separator + "participants" + File.separator + "wec_input" - ChpInput || "test_grid" + File.separator + "input" + File.separator + "participants" + File.separator + "chp_input" - BmInput || "test_grid" + File.separator + "input" + File.separator + "participants" + File.separator + "bm_input" - EvInput || "test_grid" + File.separator + "input" + File.separator + "participants" + File.separator + "ev_input" - LoadInput || "test_grid" + File.separator + "input" + File.separator + "participants" + File.separator + "load_input" - StorageInput || "test_grid" + File.separator + "input" + File.separator + "participants" + File.separator + "storage_input" - HpInput || "test_grid" + File.separator + "input" + File.separator + "participants" + File.separator + "hp_input" - EvcsInput || "test_grid" + File.separator + "input" + File.separator + "participants" + File.separator + "evcs_input" - } - - def "A HierarchicFileNamingStrategy without pre- or suffixes should return valid file paths for all other input assets models"() { - given: "a naming strategy without pre- or suffixes" - def strategy = new HierarchicFileNamingStrategy(defaultHierarchy) - - when: - def res = strategy.getFilePath(modelClass) - - then: - res.present - res.get() == expectedString - - where: - modelClass || expectedString - LineInput || "test_grid" + File.separator + "input" + File.separator + "grid" + File.separator + "line_input" - SwitchInput || "test_grid" + File.separator + "input" + File.separator + "grid" + File.separator + "switch_input" - NodeInput || "test_grid" + File.separator + "input" + File.separator + "grid" + File.separator + "node_input" - MeasurementUnitInput || "test_grid" + File.separator + "input" + File.separator + "grid" + File.separator + "measurement_unit_input" - Transformer2WInput || "test_grid" + File.separator + "input" + File.separator + "grid" + File.separator + "transformer_2_w_input" - Transformer3WInput || "test_grid" + File.separator + "input" + File.separator + "grid" + File.separator + "transformer_3_w_input" - CylindricalStorageInput || "test_grid" + File.separator + "input" + File.separator + "thermal" + File.separator + "cylindrical_storage_input" - ThermalHouseInput || "test_grid" + File.separator + "input" + File.separator + "thermal" + File.separator + "thermal_house_input" - } - - def "A HierarchicFileNamingStrategy without pre- or suffixes should return valid directory paths for all input types models"() { - given: "a naming strategy without pre- or suffixes" - def strategy = new HierarchicFileNamingStrategy(defaultHierarchy) - - when: - def res = strategy.getDirectoryPath(modelClass) - - then: - res.present - res.get() == expectedString - - where: - modelClass || expectedString - BmTypeInput || "test_grid" + File.separator + "input" + File.separator + "global" - ChpTypeInput || "test_grid" + File.separator + "input" + File.separator + "global" - EvTypeInput || "test_grid" + File.separator + "input" + File.separator + "global" - HpTypeInput || "test_grid" + File.separator + "input" + File.separator + "global" - LineTypeInput || "test_grid" + File.separator + "input" + File.separator + "global" - StorageTypeInput || "test_grid" + File.separator + "input" + File.separator + "global" - Transformer2WTypeInput || "test_grid" + File.separator + "input" + File.separator + "global" - Transformer3WTypeInput || "test_grid" + File.separator + "input" + File.separator + "global" - WecTypeInput || "test_grid" + File.separator + "input" + File.separator + "global" - WecTypeInput || "test_grid" + File.separator + "input" + File.separator + "global" - } - - def "A HierarchicFileNamingStrategy without pre- or suffixes should return valid file paths for all input types models"() { - given: "a naming strategy without pre- or suffixes" - def strategy = new HierarchicFileNamingStrategy(defaultHierarchy) - - when: - def res = strategy.getFilePath(modelClass) - - then: - res.present - res.get() == expectedString - - where: - modelClass || expectedString - BmTypeInput || "test_grid" + File.separator + "input" + File.separator + "global" + File.separator + "bm_type_input" - ChpTypeInput || "test_grid" + File.separator + "input" + File.separator + "global" + File.separator + "chp_type_input" - EvTypeInput || "test_grid" + File.separator + "input" + File.separator + "global" + File.separator + "ev_type_input" - HpTypeInput || "test_grid" + File.separator + "input" + File.separator + "global" + File.separator + "hp_type_input" - LineTypeInput || "test_grid" + File.separator + "input" + File.separator + "global" + File.separator + "line_type_input" - StorageTypeInput || "test_grid" + File.separator + "input" + File.separator + "global" + File.separator + "storage_type_input" - Transformer2WTypeInput || "test_grid" + File.separator + "input" + File.separator + "global" + File.separator + "transformer_2_w_type_input" - Transformer3WTypeInput || "test_grid" + File.separator + "input" + File.separator + "global" + File.separator + "transformer_3_w_type_input" - WecTypeInput || "test_grid" + File.separator + "input" + File.separator + "global" + File.separator + "wec_type_input" - } - - def "A HierarchicFileNamingStrategy without pre- or suffixes should return valid directory path for a Load Parameter Model"() { - given: "a naming strategy without pre- or suffixes" - def strategy = new HierarchicFileNamingStrategy(defaultHierarchy) - - when: - def res = strategy.getDirectoryPath(modelClass) - - then: - res.present - res.get() == expectedString - - where: - modelClass || expectedString - RandomLoadParameters || "test_grid" + File.separator + "input" + File.separator + "global" - } - - def "A HierarchicFileNamingStrategy without pre- or suffixes should return valid file path for a Load Parameter Model"() { - given: "a naming strategy without pre- or suffixes" - def strategy = new HierarchicFileNamingStrategy(defaultHierarchy) - - when: - def res = strategy.getFilePath(modelClass) - - then: - res.present - res.get() == expectedString - - where: - modelClass || expectedString - RandomLoadParameters || "test_grid" + File.separator + "input" + File.separator + "global" + File.separator + "random_load_parameters_input" - } - - def "A HierarchicFileNamingStrategy without pre- or suffixes should return valid directory paths for a graphic input Model"() { - given: "a naming strategy without pre- or suffixes" - def strategy = new HierarchicFileNamingStrategy(defaultHierarchy) - - when: - def res = strategy.getDirectoryPath(modelClass) - - then: - res.present - res.get() == expectedString - - where: - modelClass || expectedString - NodeGraphicInput || "test_grid" + File.separator + "input" + File.separator + "graphics" - LineGraphicInput || "test_grid" + File.separator + "input" + File.separator + "graphics" - } - - def "A HierarchicFileNamingStrategy without pre- or suffixes should return valid file paths for a graphic input Model"() { - given: "a naming strategy without pre- or suffixes" - def strategy = new HierarchicFileNamingStrategy(defaultHierarchy) - - when: - def res = strategy.getFilePath(modelClass) - - then: - res.present - res.get() == expectedString - - where: - modelClass || expectedString - NodeGraphicInput || "test_grid" + File.separator + "input" + File.separator + "graphics" + File.separator + "node_graphic_input" - LineGraphicInput || "test_grid" + File.separator + "input" + File.separator + "graphics" + File.separator + "line_graphic_input" - } - - def "A HierarchicFileNamingStrategy should return valid directory path for individual time series"() { - given: - def strategy = new HierarchicFileNamingStrategy(defaultHierarchy) - IndividualTimeSeries timeSeries = Mock(IndividualTimeSeries) - - when: - def actual = strategy.getDirectoryPath(timeSeries) - - then: - actual.present - actual.get() == expected - - where: - clazz || expected - IndividualTimeSeries || "test_grid" + File.separator + "input" + File.separator + "participants" + File.separator + "time_series" - } - - def "A HierarchicFileNamingStrategy without pre- or suffix should return valid file path for individual time series"() { - given: - def strategy = new HierarchicFileNamingStrategy(defaultHierarchy) - def entries = [ - new TimeBasedValue(ZonedDateTime.now(), new EnergyPriceValue(Quantities.getQuantity(500d, PowerSystemUnits.EURO_PER_MEGAWATTHOUR)))] as SortedSet - IndividualTimeSeries timeSeries = Mock(IndividualTimeSeries) - timeSeries.uuid >> uuid - timeSeries.entries >> entries - - when: - def actual = strategy.getFilePath(timeSeries) - - then: - actual.present - actual.get() == expectedFilePath - - where: - clazz | uuid || expectedFilePath - IndividualTimeSeries | UUID.fromString("4881fda2-bcee-4f4f-a5bb-6a09bf785276") || "test_grid" + File.separator + "input" + File.separator + "participants" + File.separator + "time_series" + File.separator + "its_c_4881fda2-bcee-4f4f-a5bb-6a09bf785276" - } - - def "A HierarchicFileNamingStrategy with pre- or suffix should return valid file path for individual time series"() { - given: - def strategy = new HierarchicFileNamingStrategy("aa", "zz", defaultHierarchy) - def entries = [ - new TimeBasedValue(ZonedDateTime.now(), new EnergyPriceValue(Quantities.getQuantity(500d, PowerSystemUnits.EURO_PER_MEGAWATTHOUR)))] as SortedSet - IndividualTimeSeries timeSeries = Mock(IndividualTimeSeries) - timeSeries.uuid >> uuid - timeSeries.entries >> entries - - when: - def actual = strategy.getFilePath(timeSeries) - - then: - actual.present - actual.get() == expectedFileName - - where: - clazz | uuid || expectedFileName - IndividualTimeSeries | UUID.fromString("4881fda2-bcee-4f4f-a5bb-6a09bf785276") || "test_grid" + File.separator + "input" + File.separator + "participants" + File.separator + "time_series" + File.separator + "aa_its_c_4881fda2-bcee-4f4f-a5bb-6a09bf785276_zz" - } - - def "A HierarchicFileNamingStrategy without pre- or suffix should return valid directory path for load profile input"() { - given: - def strategy = new HierarchicFileNamingStrategy(defaultHierarchy) - def timeSeries = Mock(LoadProfileInput) - - when: - def actual = strategy.getDirectoryPath(timeSeries) - - then: - actual.present - actual.get() == expected - - where: - clazz || expected - LoadProfileInput || "test_grid" + File.separator + "input" + File.separator + "global" - } - - def "A HierarchicFileNamingStrategy without pre- or suffix should return valid file path for load profile input"() { - given: - def strategy = new HierarchicFileNamingStrategy(defaultHierarchy) - def timeSeries = Mock(LoadProfileInput) - timeSeries.uuid >> uuid - timeSeries.type >> type - - when: - def actual = strategy.getFilePath(timeSeries) - - then: - actual.present - actual.get() == expectedFileName - - where: - clazz | uuid | type || expectedFileName - LoadProfileInput | UUID.fromString("bee0a8b6-4788-4f18-bf72-be52035f7304") | BdewLoadProfile.G3 || "test_grid" + File.separator + "input" + File.separator + "global" + File.separator + "lpts_g3_bee0a8b6-4788-4f18-bf72-be52035f7304" - } - - def "A HierarchicFileNamingStrategy returns empty Optional, when there is no naming defined for a given time series class"() { - given: - def strategy = new HierarchicFileNamingStrategy(defaultHierarchy) - def timeSeries = Mock(RepetitiveTimeSeries) - - when: - def fileName = strategy.getEntityName(timeSeries) - - then: - !fileName.present - } - - def "A HierarchicFileNamingStrategy without pre- or suffixes should return valid directory path for time series mapping"() { - given: "a naming strategy without pre- or suffixes" - def strategy = new HierarchicFileNamingStrategy(defaultHierarchy) - - when: - def res = strategy.getDirectoryPath(TimeSeriesMappingSource.MappingEntry) - - then: - res.present - res.get() == "test_grid" + File.separator + "input" + File.separator + "participants" + File.separator + "time_series" - } - - def "A HierarchicFileNamingStrategy without pre- or suffixes should return valid file path for time series mapping"() { - given: "a naming strategy without pre- or suffixes" - def strategy = new HierarchicFileNamingStrategy(defaultHierarchy) - - when: - def res = strategy.getFilePath(TimeSeriesMappingSource.MappingEntry) - - then: - res.present - res.get() == "test_grid" + File.separator + "input" + File.separator + "participants" + File.separator + "time_series" + File.separator + "time_series_mapping" - } - - def "A HierarchicFileNamingStrategy with pre- and suffix should return valid file path for time series mapping"() { - given: "a naming strategy without pre- or suffixes" - def strategy = new HierarchicFileNamingStrategy("prefix", "suffix", defaultHierarchy) - - when: - def res = strategy.getFilePath(TimeSeriesMappingSource.MappingEntry) - - then: - res.present - res.get() == "test_grid" + File.separator + "input" + File.separator + "participants" + File.separator + "time_series" + File.separator + "prefix_time_series_mapping_suffix" - } - - def "A hierarchic file naming strategy returns correct individual time series file name pattern"() { - given: "a naming strategy without pre- or suffixes" - def strategy = new HierarchicFileNamingStrategy(defaultHierarchy) - - when: - def actual = strategy.individualTimeSeriesPattern.pattern() - - then: - actual == "test_grid" + File.separator + "input" + File.separator + "participants" + File.separator + "time_series" + File.separator + "its_(?[a-zA-Z]{1,11})_(?[a-zA-Z0-9]{8}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{12})" - } - - def "A hierarchic file naming strategy returns correct load profile time series file name pattern"() { - given: "a naming strategy without pre- or suffixes" - def strategy = new HierarchicFileNamingStrategy(defaultHierarchy) - - when: - def actual = strategy.loadProfileTimeSeriesPattern.pattern() - - then: - actual == "test_grid" + File.separator + "input" + File.separator + "global" + File.separator + "lpts_(?[a-zA-Z][0-9])_(?[a-zA-Z0-9]{8}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{12})" - } -} \ No newline at end of file From 2d7f0ba88362d6ecc4f98b23f16f2b5af5d5e9de Mon Sep 17 00:00:00 2001 From: Niklas Steffan Date: Fri, 28 May 2021 13:57:14 +0200 Subject: [PATCH 020/157] removed deprecated methods in EntityNamingStrategy --- .../io/naming/EntityNamingStrategy.java | 87 ------------------- 1 file changed, 87 deletions(-) diff --git a/src/main/java/edu/ie3/datamodel/io/naming/EntityNamingStrategy.java b/src/main/java/edu/ie3/datamodel/io/naming/EntityNamingStrategy.java index c3de97bc9..dcfc141d8 100644 --- a/src/main/java/edu/ie3/datamodel/io/naming/EntityNamingStrategy.java +++ b/src/main/java/edu/ie3/datamodel/io/naming/EntityNamingStrategy.java @@ -146,45 +146,6 @@ private static String prepareSuffix(String suffix) { return StringUtils.cleanString(suffix).replaceAll("^([^_])", "_$1").toLowerCase(); } - /** - * Get the full path to the file with regard to some (not explicitly specified) base directory. - * The path does NOT start or end with any of the known file separators or file extension. - * - * @param cls Targeted class of the given file - * @return An optional sub path to the actual file - * @deprecated This class should foremost provide namings for the entities and nothing around file - * // TODO Niklas naming or pathing in specific. This method will be moved from this class, - * when this - * issue is addressed - */ - @Deprecated // TODO: wurde in FileNamingStrategy übernommen -> hier entfernen - public Optional getFilePath(Class cls) { - // do not adapt orElseGet, see https://www.baeldung.com/java-optional-or-else-vs-or-else-get for - // details - return getFilePath( - getEntityName(cls).orElseGet(() -> ""), getDirectoryPath(cls).orElseGet(() -> "")); - } - - /** - * Compose a full file path from directory name and file name. Additionally perform some checks, - * like if the file name itself actually is available - * - * @param fileName File name - * @param subDirectories Sub directory path - * @return Concatenation of sub directory structure and file name - * @deprecated This class should foremost provide namings for the entities and nothing around file - * // TODO Niklas naming or pathing in specific. This method will be moved from this class, - * when this - * issue is addressed - */ - @Deprecated // TODO: wurde in FileNamingStrategy übernommen -> hier entfernen - private Optional getFilePath(String fileName, String subDirectories) { - if (fileName.isEmpty()) return Optional.empty(); - if (!subDirectories.isEmpty()) - return Optional.of(FilenameUtils.concat(subDirectories, fileName)); - else return Optional.of(fileName); - } - /** * Returns the name of the entity, that should be used for persistence. * @@ -347,38 +308,6 @@ public Optional getTimeSeriesMappingEntityName() { return Optional.of(addPrefixAndSuffix("time_series_mapping")); } - /** - * Returns the sub directory structure with regard to some (not explicitly specified) base - * directory. The path does NOT start or end with any of the known file separators. - * - * @param cls Targeted class of the given file - * @return An optional sub directory path - */ - @Deprecated // TODO: wurde in FileNamingStrategy übernommen -> hier entfernen - public Optional getDirectoryPath(Class cls) { - return Optional.empty(); - } - - /** - * Get the full path to the file with regard to some (not explicitly specified) base directory. - * The path does NOT start or end with any of the known file separators or file extension. - * - * @param Type of the time series - * @param Type of the entry in the time series - * @param Type of the value, that is carried by the time series entry - * @param timeSeries Time series to derive naming information from - * @return An optional sub path to the actual file - */ - @Deprecated // TODO: wurde in FileNamingStrategy übernommen -> hier entfernen - public , E extends TimeSeriesEntry, V extends Value> - Optional getFilePath(T timeSeries) { - // do not adapt orElseGet, see https://www.baeldung.com/java-optional-or-else-vs-or-else-get for - // details - return getFilePath( - getEntityName(timeSeries).orElseGet(() -> ""), - getDirectoryPath(timeSeries).orElseGet(() -> "")); - } - /** * Builds a file name (and only the file name without any directories and extension) of the given * information. @@ -429,22 +358,6 @@ Optional getEntityName(T timeSeries) { } } - /** - * Returns the sub directory structure with regard to some (not explicitly specified) base - * directory. The path does NOT start or end with any of the known file separators. - * - * @param Type of the time series - * @param Type of the entry in the time series - * @param Type of the value, that is carried by the time series entry - * @param timeSeries Time series to derive naming information from - * @return An optional sub directory path - */ - @Deprecated // TODO: Entfernen - public , E extends TimeSeriesEntry, V extends Value> - Optional getDirectoryPath(T timeSeries) { - return Optional.empty(); - } - /** * Extracts meta information from a file name, of a time series. * From 6f3a1079470eefece6f7adc47a5fcf7524c0fd86 Mon Sep 17 00:00:00 2001 From: Niklas Steffan Date: Fri, 28 May 2021 16:34:34 +0200 Subject: [PATCH 021/157] small correction after dev merge + spotlessApply --- .../ie3/datamodel/io/FileNamingStrategy.java | 21 +++++++------------ .../io/connectors/CsvFileConnector.java | 2 +- .../io/csv/FlatDirectoryHierarchy.java | 9 ++------ .../io/naming/EntityNamingStrategy.java | 1 - .../ie3/datamodel/io/sink/CsvFileSink.java | 2 -- .../io/source/csv/CsvDataSource.java | 3 +-- .../io/source/csv/CsvTimeSeriesSource.java | 1 - .../io/csv/FlatDirectoryHierarchyTest.groovy | 3 +-- .../csv/CsvSystemParticipantSourceTest.groovy | 8 +++---- 9 files changed, 17 insertions(+), 33 deletions(-) diff --git a/src/main/java/edu/ie3/datamodel/io/FileNamingStrategy.java b/src/main/java/edu/ie3/datamodel/io/FileNamingStrategy.java index 96da6efed..680f1ffd1 100644 --- a/src/main/java/edu/ie3/datamodel/io/FileNamingStrategy.java +++ b/src/main/java/edu/ie3/datamodel/io/FileNamingStrategy.java @@ -37,7 +37,6 @@ public class FileNamingStrategy { private final EntityNamingStrategy entityNamingStrategy; private final DirectoryHierarchy directoryHierarchy; - /** * Constructor for building the file naming strategy. * @@ -51,22 +50,20 @@ public FileNamingStrategy( } /** - * Constructor for building the file naming strategy. - * Since no directory hierarchy is provided, a flat directory hierarchy is used. + * Constructor for building the file naming strategy. Since no directory hierarchy is provided, a + * flat directory hierarchy is used. * * @param entityNamingStrategy entity naming strategy */ - public FileNamingStrategy( - EntityNamingStrategy entityNamingStrategy) { + public FileNamingStrategy(EntityNamingStrategy entityNamingStrategy) { this.entityNamingStrategy = entityNamingStrategy; this.directoryHierarchy = new FlatDirectoryHierarchy(); } /** - * Constructor for building the file naming strategy. - * Since no entity naming strategy is provided, the entity naming strategy is used. - * Since no directory hierarchy is provided, a flat directory hierarchy is used. - * + * Constructor for building the file naming strategy. Since no entity naming strategy is provided, + * the entity naming strategy is used. Since no directory hierarchy is provided, a flat directory + * hierarchy is used. */ public FileNamingStrategy() { this.entityNamingStrategy = new EntityNamingStrategy(); @@ -118,8 +115,7 @@ Optional getFilePath(T timeSeries) { private Optional getFilePath(String fileName, String subDirectories) { if (fileName.isEmpty()) return Optional.empty(); if (!subDirectories.isEmpty()) - return Optional.of( - FilenameUtils.concat(subDirectories, fileName)); + return Optional.of(FilenameUtils.concat(subDirectories, fileName)); else return Optional.of(fileName); } @@ -236,8 +232,7 @@ public Optional getEntityName(Class cls) { * @return A file name for this particular time series */ public , E extends TimeSeriesEntry, V extends Value> - Optional getEntityName(T timeSeries) { + Optional getEntityName(T timeSeries) { return entityNamingStrategy.getEntityName(timeSeries); } - } diff --git a/src/main/java/edu/ie3/datamodel/io/connectors/CsvFileConnector.java b/src/main/java/edu/ie3/datamodel/io/connectors/CsvFileConnector.java index 3dec47f6f..225978704 100644 --- a/src/main/java/edu/ie3/datamodel/io/connectors/CsvFileConnector.java +++ b/src/main/java/edu/ie3/datamodel/io/connectors/CsvFileConnector.java @@ -338,7 +338,7 @@ private Optional buildCsvTimeSeriesMetaI * @throws FileNotFoundException If the file is not present */ public BufferedReader initIdCoordinateReader() throws FileNotFoundException { - String filePath = entityPersistenceNamingStrategy.getIdCoordinateEntityName(); + String filePath = fileNamingStrategy.getIdCoordinateEntityName(); return initReader(filePath); } diff --git a/src/main/java/edu/ie3/datamodel/io/csv/FlatDirectoryHierarchy.java b/src/main/java/edu/ie3/datamodel/io/csv/FlatDirectoryHierarchy.java index 2ab724e9e..6fe7d0ed6 100644 --- a/src/main/java/edu/ie3/datamodel/io/csv/FlatDirectoryHierarchy.java +++ b/src/main/java/edu/ie3/datamodel/io/csv/FlatDirectoryHierarchy.java @@ -11,13 +11,8 @@ /** Default directory hierarchy for input models */ public class FlatDirectoryHierarchy implements DirectoryHierarchy { - - /** - * Empty constructor. - * - */ - public FlatDirectoryHierarchy() { - } + /** Empty constructor. */ + public FlatDirectoryHierarchy() {} /** * Gives empty sub directory. diff --git a/src/main/java/edu/ie3/datamodel/io/naming/EntityNamingStrategy.java b/src/main/java/edu/ie3/datamodel/io/naming/EntityNamingStrategy.java index dcfc141d8..2f5a08308 100644 --- a/src/main/java/edu/ie3/datamodel/io/naming/EntityNamingStrategy.java +++ b/src/main/java/edu/ie3/datamodel/io/naming/EntityNamingStrategy.java @@ -26,7 +26,6 @@ import java.util.UUID; import java.util.regex.Matcher; import java.util.regex.Pattern; -import org.apache.commons.io.FilenameUtils; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; diff --git a/src/main/java/edu/ie3/datamodel/io/sink/CsvFileSink.java b/src/main/java/edu/ie3/datamodel/io/sink/CsvFileSink.java index b1b87bbc1..d7d8d659d 100644 --- a/src/main/java/edu/ie3/datamodel/io/sink/CsvFileSink.java +++ b/src/main/java/edu/ie3/datamodel/io/sink/CsvFileSink.java @@ -12,10 +12,8 @@ import edu.ie3.datamodel.io.FileNamingStrategy; import edu.ie3.datamodel.io.connectors.CsvFileConnector; import edu.ie3.datamodel.io.csv.BufferedCsvWriter; -import edu.ie3.datamodel.io.csv.FlatDirectoryHierarchy; import edu.ie3.datamodel.io.extractor.Extractor; import edu.ie3.datamodel.io.extractor.NestedEntity; -import edu.ie3.datamodel.io.naming.EntityNamingStrategy; import edu.ie3.datamodel.io.processor.ProcessorProvider; import edu.ie3.datamodel.io.processor.timeseries.TimeSeriesProcessorKey; import edu.ie3.datamodel.models.UniqueEntity; diff --git a/src/main/java/edu/ie3/datamodel/io/source/csv/CsvDataSource.java b/src/main/java/edu/ie3/datamodel/io/source/csv/CsvDataSource.java index c15b0a6d6..27b20ba1e 100644 --- a/src/main/java/edu/ie3/datamodel/io/source/csv/CsvDataSource.java +++ b/src/main/java/edu/ie3/datamodel/io/source/csv/CsvDataSource.java @@ -64,8 +64,7 @@ public abstract class CsvDataSource { */ @Deprecated private boolean notYetLoggedWarning = true; - public CsvDataSource( - String csvSep, String folderPath, FileNamingStrategy fileNamingStrategy) { + public CsvDataSource(String csvSep, String folderPath, FileNamingStrategy fileNamingStrategy) { this.csvSep = csvSep; this.connector = new CsvFileConnector(folderPath, fileNamingStrategy); } diff --git a/src/main/java/edu/ie3/datamodel/io/source/csv/CsvTimeSeriesSource.java b/src/main/java/edu/ie3/datamodel/io/source/csv/CsvTimeSeriesSource.java index 9926330ec..14c06e381 100644 --- a/src/main/java/edu/ie3/datamodel/io/source/csv/CsvTimeSeriesSource.java +++ b/src/main/java/edu/ie3/datamodel/io/source/csv/CsvTimeSeriesSource.java @@ -9,7 +9,6 @@ import edu.ie3.datamodel.io.FileNamingStrategy; import edu.ie3.datamodel.io.connectors.CsvFileConnector; import edu.ie3.datamodel.io.factory.timeseries.*; -import edu.ie3.datamodel.io.naming.EntityNamingStrategy; import edu.ie3.datamodel.io.source.TimeSeriesSource; import edu.ie3.datamodel.models.timeseries.individual.IndividualTimeSeries; import edu.ie3.datamodel.models.timeseries.individual.TimeBasedValue; diff --git a/src/test/groovy/edu/ie3/datamodel/io/csv/FlatDirectoryHierarchyTest.groovy b/src/test/groovy/edu/ie3/datamodel/io/csv/FlatDirectoryHierarchyTest.groovy index d09633a91..3cbfc11b0 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/csv/FlatDirectoryHierarchyTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/csv/FlatDirectoryHierarchyTest.groovy @@ -42,6 +42,5 @@ class FlatDirectoryHierarchyTest extends Specification { Files.isDirectory(basePath) fdh.getSubDirectory(BmInput) == Optional.empty(); - } - + } } diff --git a/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvSystemParticipantSourceTest.groovy b/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvSystemParticipantSourceTest.groovy index 6058c9347..83c1c1de5 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvSystemParticipantSourceTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvSystemParticipantSourceTest.groovy @@ -63,10 +63,10 @@ class CsvSystemParticipantSourceTest extends Specification implements CsvTestDat def typeSource = new CsvTypeSource(csvSep, typeFolderPath, fileNamingStrategy) def thermalSource = new CsvThermalSource(csvSep, participantsFolderPath, fileNamingStrategy, typeSource) def rawGridSource = Spy(CsvRawGridSource, constructorArgs: [ - csvSep, - gridFolderPath, - fileNamingStrategy, - typeSource + csvSep, + gridFolderPath, + fileNamingStrategy, + typeSource ]) { // partly fake the return method of the csv raw grid source to always return empty node sets // -> elements to build NodeGraphicInputs are missing From 5be3283ab096cdf60659a89fe35269d478529ae5 Mon Sep 17 00:00:00 2001 From: Johannes Hiry Date: Fri, 28 May 2021 19:22:27 +0200 Subject: [PATCH 022/157] [LoadInputFactory:55] logger.error(...) -> logger.warn(...) --- .../io/factory/input/participant/LoadInputFactory.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/edu/ie3/datamodel/io/factory/input/participant/LoadInputFactory.java b/src/main/java/edu/ie3/datamodel/io/factory/input/participant/LoadInputFactory.java index 70c2b0e02..5bffdce4a 100644 --- a/src/main/java/edu/ie3/datamodel/io/factory/input/participant/LoadInputFactory.java +++ b/src/main/java/edu/ie3/datamodel/io/factory/input/participant/LoadInputFactory.java @@ -52,7 +52,7 @@ protected LoadInput buildModel( try { slp = StandardLoadProfile.parse(data.getField(SLP)); } catch (ParsingException e) { - logger.error( + logger.warn( "Cannot parse the standard load profile \"{}\" of load \"{}\". Assign no load profile instead.", data.getField(SLP), id); From 8be40a59e85fe4444cbd1af6b6f274a6b1500edb Mon Sep 17 00:00:00 2001 From: Niklas Steffan Date: Sat, 29 May 2021 16:08:50 +0200 Subject: [PATCH 023/157] improve code quality --- .../edu/ie3/datamodel/io/csv/FlatDirectoryHierarchy.java | 3 --- .../edu/ie3/datamodel/io/FileNamingStrategyTest.groovy | 4 ++-- .../datamodel/io/csv/FlatDirectoryHierarchyTest.groovy | 2 +- .../datamodel/io/naming/EntityNamingStrategyTest.groovy | 1 - .../edu/ie3/datamodel/io/sink/CsvFileSinkTest.groovy | 8 ++++---- 5 files changed, 7 insertions(+), 11 deletions(-) diff --git a/src/main/java/edu/ie3/datamodel/io/csv/FlatDirectoryHierarchy.java b/src/main/java/edu/ie3/datamodel/io/csv/FlatDirectoryHierarchy.java index 6fe7d0ed6..7f799db75 100644 --- a/src/main/java/edu/ie3/datamodel/io/csv/FlatDirectoryHierarchy.java +++ b/src/main/java/edu/ie3/datamodel/io/csv/FlatDirectoryHierarchy.java @@ -11,9 +11,6 @@ /** Default directory hierarchy for input models */ public class FlatDirectoryHierarchy implements DirectoryHierarchy { - /** Empty constructor. */ - public FlatDirectoryHierarchy() {} - /** * Gives empty sub directory. * diff --git a/src/test/groovy/edu/ie3/datamodel/io/FileNamingStrategyTest.groovy b/src/test/groovy/edu/ie3/datamodel/io/FileNamingStrategyTest.groovy index f52ae8b7d..99494febf 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/FileNamingStrategyTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/FileNamingStrategyTest.groovy @@ -772,7 +772,7 @@ class FileNamingStrategyTest extends Specification { def strategy = new FileNamingStrategy(simpleEntityNaming, defaultHierarchy) when: - def actual = strategy.getIndividualTimeSeriesPattern().pattern() + def actual = strategy.individualTimeSeriesPattern().pattern() then: actual == "test_grid" + File.separator + "input" + File.separator + "participants" + File.separator + "time_series" + File.separator + "its_(?[a-zA-Z]{1,11})_(?[a-zA-Z0-9]{8}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{12})" @@ -784,7 +784,7 @@ class FileNamingStrategyTest extends Specification { def strategy = new FileNamingStrategy(simpleEntityNaming, defaultHierarchy) when: - def actual = strategy.getLoadProfileTimeSeriesPattern().pattern() + def actual = strategy.loadProfileTimeSeriesPattern().pattern() then: actual == "test_grid" + File.separator + "input" + File.separator + "global" + File.separator + "lpts_(?[a-zA-Z][0-9])_(?[a-zA-Z0-9]{8}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{12})" diff --git a/src/test/groovy/edu/ie3/datamodel/io/csv/FlatDirectoryHierarchyTest.groovy b/src/test/groovy/edu/ie3/datamodel/io/csv/FlatDirectoryHierarchyTest.groovy index 3cbfc11b0..ed3ff77f6 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/csv/FlatDirectoryHierarchyTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/csv/FlatDirectoryHierarchyTest.groovy @@ -41,6 +41,6 @@ class FlatDirectoryHierarchyTest extends Specification { Files.exists(basePath) Files.isDirectory(basePath) - fdh.getSubDirectory(BmInput) == Optional.empty(); + fdh.getSubDirectory(BmInput) == Optional.empty() } } diff --git a/src/test/groovy/edu/ie3/datamodel/io/naming/EntityNamingStrategyTest.groovy b/src/test/groovy/edu/ie3/datamodel/io/naming/EntityNamingStrategyTest.groovy index 1972f3055..ea58a6952 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/naming/EntityNamingStrategyTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/naming/EntityNamingStrategyTest.groovy @@ -10,7 +10,6 @@ import edu.ie3.datamodel.io.csv.timeseries.IndividualTimeSeriesMetaInformation import edu.ie3.datamodel.io.csv.timeseries.LoadProfileTimeSeriesMetaInformation import edu.ie3.datamodel.io.source.TimeSeriesMappingSource import edu.ie3.datamodel.models.BdewLoadProfile -import edu.ie3.datamodel.models.UniqueEntity import edu.ie3.datamodel.models.input.MeasurementUnitInput import edu.ie3.datamodel.models.input.NodeInput import edu.ie3.datamodel.models.input.RandomLoadParameters diff --git a/src/test/groovy/edu/ie3/datamodel/io/sink/CsvFileSinkTest.groovy b/src/test/groovy/edu/ie3/datamodel/io/sink/CsvFileSinkTest.groovy index ad327256d..d1e71bc60 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/sink/CsvFileSinkTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/sink/CsvFileSinkTest.groovy @@ -5,6 +5,10 @@ */ package edu.ie3.datamodel.io.sink +import static edu.ie3.util.quantities.PowerSystemUnits.DEGREE_GEOM +import static edu.ie3.util.quantities.PowerSystemUnits.KILOVOLTAMPERE +import static tech.units.indriya.unit.Units.PERCENT + import edu.ie3.datamodel.io.FileNamingStrategy import edu.ie3.datamodel.io.processor.ProcessorProvider import edu.ie3.datamodel.io.processor.input.InputEntityProcessor @@ -51,10 +55,6 @@ import tech.units.indriya.quantity.Quantities import javax.measure.Quantity import javax.measure.quantity.Power -import static edu.ie3.util.quantities.PowerSystemUnits.DEGREE_GEOM -import static edu.ie3.util.quantities.PowerSystemUnits.KILOVOLTAMPERE -import static tech.units.indriya.unit.Units.PERCENT - class CsvFileSinkTest extends Specification implements TimeSeriesTestData { @Shared From 60bfc7ede7b3bff44acf5d27e0ee5a2f44da9398 Mon Sep 17 00:00:00 2001 From: Niklas Steffan Date: Sat, 29 May 2021 16:18:26 +0200 Subject: [PATCH 024/157] moved classes concerning hierarchy and file naming to io.naming --- .../edu/ie3/datamodel/io/connectors/CsvFileConnector.java | 2 +- .../io/{csv => naming}/DefaultDirectoryHierarchy.java | 2 +- .../datamodel/io/{csv => naming}/DirectoryHierarchy.java | 2 +- .../ie3/datamodel/io/{csv => naming}/FileHierarchy.java | 2 +- .../ie3/datamodel/io/{ => naming}/FileNamingStrategy.java | 5 +---- .../io/{csv => naming}/FlatDirectoryHierarchy.java | 2 +- src/main/java/edu/ie3/datamodel/io/sink/CsvFileSink.java | 2 +- .../edu/ie3/datamodel/io/source/csv/CsvDataSource.java | 2 +- .../edu/ie3/datamodel/io/source/csv/CsvGraphicSource.java | 2 +- .../datamodel/io/source/csv/CsvIdCoordinateSource.java | 2 +- .../edu/ie3/datamodel/io/source/csv/CsvRawGridSource.java | 2 +- .../io/source/csv/CsvSystemParticipantSource.java | 2 +- .../edu/ie3/datamodel/io/source/csv/CsvThermalSource.java | 2 +- .../io/source/csv/CsvTimeSeriesMappingSource.java | 2 +- .../ie3/datamodel/io/source/csv/CsvTimeSeriesSource.java | 2 +- .../edu/ie3/datamodel/io/source/csv/CsvTypeSource.java | 2 +- .../edu/ie3/datamodel/io/source/csv/CsvWeatherSource.java | 2 +- .../datamodel/io/connectors/CsvFileConnectorTest.groovy | 4 ++-- .../{csv => naming}/DefaultDirectoryHierarchyTest.groovy | 3 ++- .../io/{ => naming}/FileNamingStrategyTest.groovy | 8 ++++---- .../io/{csv => naming}/FlatDirectoryHierarchyTest.groovy | 3 ++- .../edu/ie3/datamodel/io/sink/CsvFileSinkTest.groovy | 2 +- .../edu/ie3/datamodel/io/sink/InfluxDbSinkIT.groovy | 2 +- .../ie3/datamodel/io/source/csv/CsvDataSourceTest.groovy | 2 +- .../ie3/datamodel/io/source/csv/CsvTestDataMeta.groovy | 2 +- .../datamodel/io/source/csv/CsvThermalSourceTest.groovy | 2 +- .../io/source/csv/CsvTimeSeriesMappingSourceIT.groovy | 2 +- .../datamodel/io/source/csv/CsvTimeSeriesSourceIT.groovy | 2 +- .../io/source/csv/CsvTimeSeriesSourceTest.groovy | 2 +- .../ie3/datamodel/io/source/csv/CsvTypeSourceTest.groovy | 2 +- .../io/source/csv/CsvWeatherSourceIconTest.groovy | 2 +- .../io/source/csv/CsvWeatherSourcePsdmTest.groovy | 2 +- 32 files changed, 38 insertions(+), 39 deletions(-) rename src/main/java/edu/ie3/datamodel/io/{csv => naming}/DefaultDirectoryHierarchy.java (99%) rename src/main/java/edu/ie3/datamodel/io/{csv => naming}/DirectoryHierarchy.java (91%) rename src/main/java/edu/ie3/datamodel/io/{csv => naming}/FileHierarchy.java (97%) rename src/main/java/edu/ie3/datamodel/io/{ => naming}/FileNamingStrategy.java (98%) rename src/main/java/edu/ie3/datamodel/io/{csv => naming}/FlatDirectoryHierarchy.java (95%) rename src/test/groovy/edu/ie3/datamodel/io/{csv => naming}/DefaultDirectoryHierarchyTest.groovy (98%) rename src/test/groovy/edu/ie3/datamodel/io/{ => naming}/FileNamingStrategyTest.groovy (99%) rename src/test/groovy/edu/ie3/datamodel/io/{csv => naming}/FlatDirectoryHierarchyTest.groovy (91%) diff --git a/src/main/java/edu/ie3/datamodel/io/connectors/CsvFileConnector.java b/src/main/java/edu/ie3/datamodel/io/connectors/CsvFileConnector.java index 225978704..b4badf969 100644 --- a/src/main/java/edu/ie3/datamodel/io/connectors/CsvFileConnector.java +++ b/src/main/java/edu/ie3/datamodel/io/connectors/CsvFileConnector.java @@ -6,10 +6,10 @@ package edu.ie3.datamodel.io.connectors; import edu.ie3.datamodel.exceptions.ConnectorException; -import edu.ie3.datamodel.io.FileNamingStrategy; import edu.ie3.datamodel.io.csv.*; import edu.ie3.datamodel.io.csv.timeseries.ColumnScheme; import edu.ie3.datamodel.io.csv.timeseries.IndividualTimeSeriesMetaInformation; +import edu.ie3.datamodel.io.naming.FileNamingStrategy; import edu.ie3.datamodel.models.UniqueEntity; import edu.ie3.datamodel.models.timeseries.TimeSeries; import edu.ie3.datamodel.models.timeseries.TimeSeriesEntry; diff --git a/src/main/java/edu/ie3/datamodel/io/csv/DefaultDirectoryHierarchy.java b/src/main/java/edu/ie3/datamodel/io/naming/DefaultDirectoryHierarchy.java similarity index 99% rename from src/main/java/edu/ie3/datamodel/io/csv/DefaultDirectoryHierarchy.java rename to src/main/java/edu/ie3/datamodel/io/naming/DefaultDirectoryHierarchy.java index 83fb39e8a..0d12fe35f 100644 --- a/src/main/java/edu/ie3/datamodel/io/csv/DefaultDirectoryHierarchy.java +++ b/src/main/java/edu/ie3/datamodel/io/naming/DefaultDirectoryHierarchy.java @@ -3,7 +3,7 @@ * Institute of Energy Systems, Energy Efficiency and Energy Economics, * Research group Distribution grid planning and operation */ -package edu.ie3.datamodel.io.csv; +package edu.ie3.datamodel.io.naming; import edu.ie3.datamodel.exceptions.FileException; import edu.ie3.datamodel.io.source.TimeSeriesMappingSource; diff --git a/src/main/java/edu/ie3/datamodel/io/csv/DirectoryHierarchy.java b/src/main/java/edu/ie3/datamodel/io/naming/DirectoryHierarchy.java similarity index 91% rename from src/main/java/edu/ie3/datamodel/io/csv/DirectoryHierarchy.java rename to src/main/java/edu/ie3/datamodel/io/naming/DirectoryHierarchy.java index 4319a0cbf..ba1714571 100644 --- a/src/main/java/edu/ie3/datamodel/io/csv/DirectoryHierarchy.java +++ b/src/main/java/edu/ie3/datamodel/io/naming/DirectoryHierarchy.java @@ -3,7 +3,7 @@ * Institute of Energy Systems, Energy Efficiency and Energy Economics, * Research group Distribution grid planning and operation */ -package edu.ie3.datamodel.io.csv; +package edu.ie3.datamodel.io.naming; import edu.ie3.datamodel.models.UniqueEntity; import java.util.Optional; diff --git a/src/main/java/edu/ie3/datamodel/io/csv/FileHierarchy.java b/src/main/java/edu/ie3/datamodel/io/naming/FileHierarchy.java similarity index 97% rename from src/main/java/edu/ie3/datamodel/io/csv/FileHierarchy.java rename to src/main/java/edu/ie3/datamodel/io/naming/FileHierarchy.java index 9f75bf4e4..38ba77d8c 100644 --- a/src/main/java/edu/ie3/datamodel/io/csv/FileHierarchy.java +++ b/src/main/java/edu/ie3/datamodel/io/naming/FileHierarchy.java @@ -3,7 +3,7 @@ * Institute of Energy Systems, Energy Efficiency and Energy Economics, * Research group Distribution grid planning and operation */ -package edu.ie3.datamodel.io.csv; +package edu.ie3.datamodel.io.naming; import edu.ie3.datamodel.models.UniqueEntity; import java.io.File; diff --git a/src/main/java/edu/ie3/datamodel/io/FileNamingStrategy.java b/src/main/java/edu/ie3/datamodel/io/naming/FileNamingStrategy.java similarity index 98% rename from src/main/java/edu/ie3/datamodel/io/FileNamingStrategy.java rename to src/main/java/edu/ie3/datamodel/io/naming/FileNamingStrategy.java index 680f1ffd1..c8912d614 100644 --- a/src/main/java/edu/ie3/datamodel/io/FileNamingStrategy.java +++ b/src/main/java/edu/ie3/datamodel/io/naming/FileNamingStrategy.java @@ -3,12 +3,9 @@ * Institute of Energy Systems, Energy Efficiency and Energy Economics, * Research group Distribution grid planning and operation */ -package edu.ie3.datamodel.io; +package edu.ie3.datamodel.io.naming; -import edu.ie3.datamodel.io.csv.DirectoryHierarchy; import edu.ie3.datamodel.io.csv.FileNameMetaInformation; -import edu.ie3.datamodel.io.csv.FlatDirectoryHierarchy; -import edu.ie3.datamodel.io.naming.EntityNamingStrategy; import edu.ie3.datamodel.models.UniqueEntity; import edu.ie3.datamodel.models.timeseries.TimeSeries; import edu.ie3.datamodel.models.timeseries.TimeSeriesEntry; diff --git a/src/main/java/edu/ie3/datamodel/io/csv/FlatDirectoryHierarchy.java b/src/main/java/edu/ie3/datamodel/io/naming/FlatDirectoryHierarchy.java similarity index 95% rename from src/main/java/edu/ie3/datamodel/io/csv/FlatDirectoryHierarchy.java rename to src/main/java/edu/ie3/datamodel/io/naming/FlatDirectoryHierarchy.java index 7f799db75..128be0ad5 100644 --- a/src/main/java/edu/ie3/datamodel/io/csv/FlatDirectoryHierarchy.java +++ b/src/main/java/edu/ie3/datamodel/io/naming/FlatDirectoryHierarchy.java @@ -3,7 +3,7 @@ * Institute of Energy Systems, Energy Efficiency and Energy Economics, * Research group Distribution grid planning and operation */ -package edu.ie3.datamodel.io.csv; +package edu.ie3.datamodel.io.naming; import edu.ie3.datamodel.models.UniqueEntity; import java.util.Optional; diff --git a/src/main/java/edu/ie3/datamodel/io/sink/CsvFileSink.java b/src/main/java/edu/ie3/datamodel/io/sink/CsvFileSink.java index d7d8d659d..02a9fa7af 100644 --- a/src/main/java/edu/ie3/datamodel/io/sink/CsvFileSink.java +++ b/src/main/java/edu/ie3/datamodel/io/sink/CsvFileSink.java @@ -9,11 +9,11 @@ import edu.ie3.datamodel.exceptions.ExtractorException; import edu.ie3.datamodel.exceptions.ProcessorProviderException; import edu.ie3.datamodel.exceptions.SinkException; -import edu.ie3.datamodel.io.FileNamingStrategy; import edu.ie3.datamodel.io.connectors.CsvFileConnector; import edu.ie3.datamodel.io.csv.BufferedCsvWriter; import edu.ie3.datamodel.io.extractor.Extractor; import edu.ie3.datamodel.io.extractor.NestedEntity; +import edu.ie3.datamodel.io.naming.FileNamingStrategy; import edu.ie3.datamodel.io.processor.ProcessorProvider; import edu.ie3.datamodel.io.processor.timeseries.TimeSeriesProcessorKey; import edu.ie3.datamodel.models.UniqueEntity; diff --git a/src/main/java/edu/ie3/datamodel/io/source/csv/CsvDataSource.java b/src/main/java/edu/ie3/datamodel/io/source/csv/CsvDataSource.java index 27b20ba1e..c53a7ce78 100644 --- a/src/main/java/edu/ie3/datamodel/io/source/csv/CsvDataSource.java +++ b/src/main/java/edu/ie3/datamodel/io/source/csv/CsvDataSource.java @@ -6,11 +6,11 @@ package edu.ie3.datamodel.io.source.csv; import edu.ie3.datamodel.exceptions.SourceException; -import edu.ie3.datamodel.io.FileNamingStrategy; import edu.ie3.datamodel.io.connectors.CsvFileConnector; import edu.ie3.datamodel.io.factory.EntityFactory; import edu.ie3.datamodel.io.factory.input.AssetInputEntityData; import edu.ie3.datamodel.io.factory.input.NodeAssetInputEntityData; +import edu.ie3.datamodel.io.naming.FileNamingStrategy; import edu.ie3.datamodel.models.UniqueEntity; import edu.ie3.datamodel.models.input.AssetInput; import edu.ie3.datamodel.models.input.AssetTypeInput; diff --git a/src/main/java/edu/ie3/datamodel/io/source/csv/CsvGraphicSource.java b/src/main/java/edu/ie3/datamodel/io/source/csv/CsvGraphicSource.java index bef8b953e..0bd529e07 100644 --- a/src/main/java/edu/ie3/datamodel/io/source/csv/CsvGraphicSource.java +++ b/src/main/java/edu/ie3/datamodel/io/source/csv/CsvGraphicSource.java @@ -5,11 +5,11 @@ */ package edu.ie3.datamodel.io.source.csv; -import edu.ie3.datamodel.io.FileNamingStrategy; import edu.ie3.datamodel.io.factory.input.graphics.LineGraphicInputEntityData; import edu.ie3.datamodel.io.factory.input.graphics.LineGraphicInputFactory; import edu.ie3.datamodel.io.factory.input.graphics.NodeGraphicInputEntityData; import edu.ie3.datamodel.io.factory.input.graphics.NodeGraphicInputFactory; +import edu.ie3.datamodel.io.naming.FileNamingStrategy; import edu.ie3.datamodel.io.source.GraphicSource; import edu.ie3.datamodel.io.source.RawGridSource; import edu.ie3.datamodel.io.source.TypeSource; diff --git a/src/main/java/edu/ie3/datamodel/io/source/csv/CsvIdCoordinateSource.java b/src/main/java/edu/ie3/datamodel/io/source/csv/CsvIdCoordinateSource.java index 251985cc9..6a9abf4cc 100644 --- a/src/main/java/edu/ie3/datamodel/io/source/csv/CsvIdCoordinateSource.java +++ b/src/main/java/edu/ie3/datamodel/io/source/csv/CsvIdCoordinateSource.java @@ -5,9 +5,9 @@ */ package edu.ie3.datamodel.io.source.csv; -import edu.ie3.datamodel.io.FileNamingStrategy; import edu.ie3.datamodel.io.factory.SimpleFactoryData; import edu.ie3.datamodel.io.factory.timeseries.IdCoordinateFactory; +import edu.ie3.datamodel.io.naming.FileNamingStrategy; import edu.ie3.datamodel.io.source.IdCoordinateSource; import java.io.BufferedReader; import java.io.IOException; diff --git a/src/main/java/edu/ie3/datamodel/io/source/csv/CsvRawGridSource.java b/src/main/java/edu/ie3/datamodel/io/source/csv/CsvRawGridSource.java index 94204e8ef..96306e25d 100644 --- a/src/main/java/edu/ie3/datamodel/io/source/csv/CsvRawGridSource.java +++ b/src/main/java/edu/ie3/datamodel/io/source/csv/CsvRawGridSource.java @@ -5,9 +5,9 @@ */ package edu.ie3.datamodel.io.source.csv; -import edu.ie3.datamodel.io.FileNamingStrategy; import edu.ie3.datamodel.io.factory.EntityFactory; import edu.ie3.datamodel.io.factory.input.*; +import edu.ie3.datamodel.io.naming.FileNamingStrategy; import edu.ie3.datamodel.io.source.RawGridSource; import edu.ie3.datamodel.io.source.TypeSource; import edu.ie3.datamodel.models.UniqueEntity; diff --git a/src/main/java/edu/ie3/datamodel/io/source/csv/CsvSystemParticipantSource.java b/src/main/java/edu/ie3/datamodel/io/source/csv/CsvSystemParticipantSource.java index d205b8434..4cd58265e 100644 --- a/src/main/java/edu/ie3/datamodel/io/source/csv/CsvSystemParticipantSource.java +++ b/src/main/java/edu/ie3/datamodel/io/source/csv/CsvSystemParticipantSource.java @@ -5,10 +5,10 @@ */ package edu.ie3.datamodel.io.source.csv; -import edu.ie3.datamodel.io.FileNamingStrategy; import edu.ie3.datamodel.io.factory.EntityFactory; import edu.ie3.datamodel.io.factory.input.NodeAssetInputEntityData; import edu.ie3.datamodel.io.factory.input.participant.*; +import edu.ie3.datamodel.io.naming.FileNamingStrategy; import edu.ie3.datamodel.io.source.RawGridSource; import edu.ie3.datamodel.io.source.SystemParticipantSource; import edu.ie3.datamodel.io.source.ThermalSource; diff --git a/src/main/java/edu/ie3/datamodel/io/source/csv/CsvThermalSource.java b/src/main/java/edu/ie3/datamodel/io/source/csv/CsvThermalSource.java index 83e6ad958..0b31b078d 100644 --- a/src/main/java/edu/ie3/datamodel/io/source/csv/CsvThermalSource.java +++ b/src/main/java/edu/ie3/datamodel/io/source/csv/CsvThermalSource.java @@ -5,8 +5,8 @@ */ package edu.ie3.datamodel.io.source.csv; -import edu.ie3.datamodel.io.FileNamingStrategy; import edu.ie3.datamodel.io.factory.input.*; +import edu.ie3.datamodel.io.naming.FileNamingStrategy; import edu.ie3.datamodel.io.source.ThermalSource; import edu.ie3.datamodel.io.source.TypeSource; import edu.ie3.datamodel.models.input.OperatorInput; diff --git a/src/main/java/edu/ie3/datamodel/io/source/csv/CsvTimeSeriesMappingSource.java b/src/main/java/edu/ie3/datamodel/io/source/csv/CsvTimeSeriesMappingSource.java index 789b91935..a813a0749 100644 --- a/src/main/java/edu/ie3/datamodel/io/source/csv/CsvTimeSeriesMappingSource.java +++ b/src/main/java/edu/ie3/datamodel/io/source/csv/CsvTimeSeriesMappingSource.java @@ -5,10 +5,10 @@ */ package edu.ie3.datamodel.io.source.csv; -import edu.ie3.datamodel.io.FileNamingStrategy; import edu.ie3.datamodel.io.csv.timeseries.IndividualTimeSeriesMetaInformation; import edu.ie3.datamodel.io.factory.SimpleEntityData; import edu.ie3.datamodel.io.factory.timeseries.TimeSeriesMappingFactory; +import edu.ie3.datamodel.io.naming.FileNamingStrategy; import edu.ie3.datamodel.io.source.TimeSeriesMappingSource; import java.util.Map; import java.util.Optional; diff --git a/src/main/java/edu/ie3/datamodel/io/source/csv/CsvTimeSeriesSource.java b/src/main/java/edu/ie3/datamodel/io/source/csv/CsvTimeSeriesSource.java index 14c06e381..887c8e9dd 100644 --- a/src/main/java/edu/ie3/datamodel/io/source/csv/CsvTimeSeriesSource.java +++ b/src/main/java/edu/ie3/datamodel/io/source/csv/CsvTimeSeriesSource.java @@ -6,9 +6,9 @@ package edu.ie3.datamodel.io.source.csv; import edu.ie3.datamodel.exceptions.SourceException; -import edu.ie3.datamodel.io.FileNamingStrategy; import edu.ie3.datamodel.io.connectors.CsvFileConnector; import edu.ie3.datamodel.io.factory.timeseries.*; +import edu.ie3.datamodel.io.naming.FileNamingStrategy; import edu.ie3.datamodel.io.source.TimeSeriesSource; import edu.ie3.datamodel.models.timeseries.individual.IndividualTimeSeries; import edu.ie3.datamodel.models.timeseries.individual.TimeBasedValue; diff --git a/src/main/java/edu/ie3/datamodel/io/source/csv/CsvTypeSource.java b/src/main/java/edu/ie3/datamodel/io/source/csv/CsvTypeSource.java index 0a21002be..13e0616d7 100644 --- a/src/main/java/edu/ie3/datamodel/io/source/csv/CsvTypeSource.java +++ b/src/main/java/edu/ie3/datamodel/io/source/csv/CsvTypeSource.java @@ -5,7 +5,6 @@ */ package edu.ie3.datamodel.io.source.csv; -import edu.ie3.datamodel.io.FileNamingStrategy; import edu.ie3.datamodel.io.factory.EntityFactory; import edu.ie3.datamodel.io.factory.SimpleEntityData; import edu.ie3.datamodel.io.factory.input.OperatorInputFactory; @@ -13,6 +12,7 @@ import edu.ie3.datamodel.io.factory.typeinput.SystemParticipantTypeInputFactory; import edu.ie3.datamodel.io.factory.typeinput.Transformer2WTypeInputFactory; import edu.ie3.datamodel.io.factory.typeinput.Transformer3WTypeInputFactory; +import edu.ie3.datamodel.io.naming.FileNamingStrategy; import edu.ie3.datamodel.io.source.TypeSource; import edu.ie3.datamodel.models.input.InputEntity; import edu.ie3.datamodel.models.input.OperatorInput; diff --git a/src/main/java/edu/ie3/datamodel/io/source/csv/CsvWeatherSource.java b/src/main/java/edu/ie3/datamodel/io/source/csv/CsvWeatherSource.java index c56844a00..69d322f6c 100644 --- a/src/main/java/edu/ie3/datamodel/io/source/csv/CsvWeatherSource.java +++ b/src/main/java/edu/ie3/datamodel/io/source/csv/CsvWeatherSource.java @@ -5,12 +5,12 @@ */ package edu.ie3.datamodel.io.source.csv; -import edu.ie3.datamodel.io.FileNamingStrategy; import edu.ie3.datamodel.io.connectors.CsvFileConnector; import edu.ie3.datamodel.io.csv.timeseries.ColumnScheme; import edu.ie3.datamodel.io.factory.timeseries.IdCoordinateFactory; import edu.ie3.datamodel.io.factory.timeseries.TimeBasedWeatherValueData; import edu.ie3.datamodel.io.factory.timeseries.TimeBasedWeatherValueFactory; +import edu.ie3.datamodel.io.naming.FileNamingStrategy; import edu.ie3.datamodel.io.source.IdCoordinateSource; import edu.ie3.datamodel.io.source.WeatherSource; import edu.ie3.datamodel.models.UniqueEntity; diff --git a/src/test/groovy/edu/ie3/datamodel/io/connectors/CsvFileConnectorTest.groovy b/src/test/groovy/edu/ie3/datamodel/io/connectors/CsvFileConnectorTest.groovy index 5a71b1dc9..5a9824f4a 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/connectors/CsvFileConnectorTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/connectors/CsvFileConnectorTest.groovy @@ -6,9 +6,9 @@ package edu.ie3.datamodel.io.connectors import edu.ie3.datamodel.exceptions.ConnectorException -import edu.ie3.datamodel.io.FileNamingStrategy +import edu.ie3.datamodel.io.naming.FileNamingStrategy import edu.ie3.datamodel.io.csv.CsvFileDefinition -import edu.ie3.datamodel.io.csv.DefaultDirectoryHierarchy +import edu.ie3.datamodel.io.naming.DefaultDirectoryHierarchy import edu.ie3.datamodel.io.csv.timeseries.ColumnScheme import edu.ie3.datamodel.io.naming.EntityNamingStrategy import edu.ie3.datamodel.models.StandardUnits diff --git a/src/test/groovy/edu/ie3/datamodel/io/csv/DefaultDirectoryHierarchyTest.groovy b/src/test/groovy/edu/ie3/datamodel/io/naming/DefaultDirectoryHierarchyTest.groovy similarity index 98% rename from src/test/groovy/edu/ie3/datamodel/io/csv/DefaultDirectoryHierarchyTest.groovy rename to src/test/groovy/edu/ie3/datamodel/io/naming/DefaultDirectoryHierarchyTest.groovy index faa37633a..ff2ecf176 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/csv/DefaultDirectoryHierarchyTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/naming/DefaultDirectoryHierarchyTest.groovy @@ -3,9 +3,10 @@ * Institute of Energy Systems, Energy Efficiency and Energy Economics, * Research group Distribution grid planning and operation */ -package edu.ie3.datamodel.io.csv +package edu.ie3.datamodel.io.naming import edu.ie3.datamodel.exceptions.FileException +import edu.ie3.datamodel.io.naming.DefaultDirectoryHierarchy import edu.ie3.util.io.FileIOUtils import org.apache.commons.io.FilenameUtils import org.testcontainers.shaded.org.bouncycastle.util.test.TestFailedException diff --git a/src/test/groovy/edu/ie3/datamodel/io/FileNamingStrategyTest.groovy b/src/test/groovy/edu/ie3/datamodel/io/naming/FileNamingStrategyTest.groovy similarity index 99% rename from src/test/groovy/edu/ie3/datamodel/io/FileNamingStrategyTest.groovy rename to src/test/groovy/edu/ie3/datamodel/io/naming/FileNamingStrategyTest.groovy index 99494febf..5bd9fa8f6 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/FileNamingStrategyTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/naming/FileNamingStrategyTest.groovy @@ -3,12 +3,12 @@ * Institute of Energy Systems, Energy Efficiency and Energy Economics, * Research group Distribution grid planning and operation */ -package edu.ie3.datamodel.io +package edu.ie3.datamodel.io.naming -import edu.ie3.datamodel.io.csv.DefaultDirectoryHierarchy -import edu.ie3.datamodel.io.csv.FlatDirectoryHierarchy +import edu.ie3.datamodel.io.naming.DefaultDirectoryHierarchy +import edu.ie3.datamodel.io.naming.FlatDirectoryHierarchy import edu.ie3.datamodel.io.naming.EntityNamingStrategy - +import edu.ie3.datamodel.io.naming.FileNamingStrategy import edu.ie3.datamodel.io.source.TimeSeriesMappingSource import edu.ie3.datamodel.models.BdewLoadProfile import edu.ie3.datamodel.models.UniqueEntity diff --git a/src/test/groovy/edu/ie3/datamodel/io/csv/FlatDirectoryHierarchyTest.groovy b/src/test/groovy/edu/ie3/datamodel/io/naming/FlatDirectoryHierarchyTest.groovy similarity index 91% rename from src/test/groovy/edu/ie3/datamodel/io/csv/FlatDirectoryHierarchyTest.groovy rename to src/test/groovy/edu/ie3/datamodel/io/naming/FlatDirectoryHierarchyTest.groovy index ed3ff77f6..fad8f2a42 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/csv/FlatDirectoryHierarchyTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/naming/FlatDirectoryHierarchyTest.groovy @@ -3,8 +3,9 @@ * Institute of Energy Systems, Energy Efficiency and Energy Economics, * Research group Distribution grid planning and operation */ -package edu.ie3.datamodel.io.csv +package edu.ie3.datamodel.io.naming +import edu.ie3.datamodel.io.naming.FlatDirectoryHierarchy import edu.ie3.datamodel.models.input.system.BmInput import edu.ie3.util.io.FileIOUtils import spock.lang.Shared diff --git a/src/test/groovy/edu/ie3/datamodel/io/sink/CsvFileSinkTest.groovy b/src/test/groovy/edu/ie3/datamodel/io/sink/CsvFileSinkTest.groovy index d1e71bc60..80a5f386d 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/sink/CsvFileSinkTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/sink/CsvFileSinkTest.groovy @@ -9,7 +9,7 @@ import static edu.ie3.util.quantities.PowerSystemUnits.DEGREE_GEOM import static edu.ie3.util.quantities.PowerSystemUnits.KILOVOLTAMPERE import static tech.units.indriya.unit.Units.PERCENT -import edu.ie3.datamodel.io.FileNamingStrategy +import edu.ie3.datamodel.io.naming.FileNamingStrategy import edu.ie3.datamodel.io.processor.ProcessorProvider import edu.ie3.datamodel.io.processor.input.InputEntityProcessor import edu.ie3.datamodel.io.processor.result.ResultEntityProcessor diff --git a/src/test/groovy/edu/ie3/datamodel/io/sink/InfluxDbSinkIT.groovy b/src/test/groovy/edu/ie3/datamodel/io/sink/InfluxDbSinkIT.groovy index 089ba139b..4574dbe89 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/sink/InfluxDbSinkIT.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/sink/InfluxDbSinkIT.groovy @@ -5,7 +5,7 @@ */ package edu.ie3.datamodel.io.sink -import edu.ie3.datamodel.io.FileNamingStrategy +import edu.ie3.datamodel.io.naming.FileNamingStrategy import edu.ie3.datamodel.io.connectors.InfluxDbConnector import edu.ie3.datamodel.io.naming.EntityNamingStrategy import edu.ie3.datamodel.models.StandardUnits diff --git a/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvDataSourceTest.groovy b/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvDataSourceTest.groovy index 704a1e7d9..d0cb4067e 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvDataSourceTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvDataSourceTest.groovy @@ -5,7 +5,7 @@ */ package edu.ie3.datamodel.io.source.csv -import edu.ie3.datamodel.io.FileNamingStrategy +import edu.ie3.datamodel.io.naming.FileNamingStrategy import edu.ie3.datamodel.io.factory.input.ThermalBusInputFactory import edu.ie3.datamodel.models.UniqueEntity import edu.ie3.datamodel.models.input.NodeInput diff --git a/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvTestDataMeta.groovy b/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvTestDataMeta.groovy index 388a751b0..19b4d21cf 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvTestDataMeta.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvTestDataMeta.groovy @@ -5,7 +5,7 @@ */ package edu.ie3.datamodel.io.source.csv -import edu.ie3.datamodel.io.FileNamingStrategy +import edu.ie3.datamodel.io.naming.FileNamingStrategy /** * Holds meta data for csv tests e.g. file and folder paths diff --git a/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvThermalSourceTest.groovy b/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvThermalSourceTest.groovy index feef1f3f4..5bae97c7a 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvThermalSourceTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvThermalSourceTest.groovy @@ -5,7 +5,7 @@ */ package edu.ie3.datamodel.io.source.csv -import edu.ie3.datamodel.io.FileNamingStrategy +import edu.ie3.datamodel.io.naming.FileNamingStrategy import edu.ie3.datamodel.io.factory.input.AssetInputEntityData import edu.ie3.datamodel.io.factory.input.ThermalUnitInputEntityData import edu.ie3.datamodel.models.input.OperatorInput diff --git a/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvTimeSeriesMappingSourceIT.groovy b/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvTimeSeriesMappingSourceIT.groovy index e5fec227c..1034201c6 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvTimeSeriesMappingSourceIT.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvTimeSeriesMappingSourceIT.groovy @@ -5,7 +5,7 @@ */ package edu.ie3.datamodel.io.source.csv -import edu.ie3.datamodel.io.FileNamingStrategy +import edu.ie3.datamodel.io.naming.FileNamingStrategy import edu.ie3.datamodel.io.connectors.CsvFileConnector import edu.ie3.datamodel.io.csv.timeseries.ColumnScheme import edu.ie3.datamodel.io.source.TimeSeriesMappingSource diff --git a/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvTimeSeriesSourceIT.groovy b/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvTimeSeriesSourceIT.groovy index 2a2b230e5..800a5955d 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvTimeSeriesSourceIT.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvTimeSeriesSourceIT.groovy @@ -6,7 +6,7 @@ package edu.ie3.datamodel.io.source.csv import edu.ie3.datamodel.exceptions.SourceException -import edu.ie3.datamodel.io.FileNamingStrategy +import edu.ie3.datamodel.io.naming.FileNamingStrategy import edu.ie3.datamodel.io.factory.timeseries.TimeBasedSimpleValueFactory import edu.ie3.datamodel.models.StandardUnits import edu.ie3.datamodel.models.value.HeatAndPValue diff --git a/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvTimeSeriesSourceTest.groovy b/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvTimeSeriesSourceTest.groovy index 98ff49792..dcbac850c 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvTimeSeriesSourceTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvTimeSeriesSourceTest.groovy @@ -5,7 +5,7 @@ */ package edu.ie3.datamodel.io.source.csv -import edu.ie3.datamodel.io.FileNamingStrategy +import edu.ie3.datamodel.io.naming.FileNamingStrategy import static edu.ie3.datamodel.models.StandardUnits.ENERGY_PRICE diff --git a/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvTypeSourceTest.groovy b/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvTypeSourceTest.groovy index e8f06009c..0d4732149 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvTypeSourceTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvTypeSourceTest.groovy @@ -5,7 +5,7 @@ */ package edu.ie3.datamodel.io.source.csv -import edu.ie3.datamodel.io.FileNamingStrategy +import edu.ie3.datamodel.io.naming.FileNamingStrategy import edu.ie3.datamodel.models.input.OperatorInput import spock.lang.Specification import edu.ie3.test.common.GridTestData as gtd diff --git a/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvWeatherSourceIconTest.groovy b/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvWeatherSourceIconTest.groovy index 7eb7678e0..9e97019ea 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvWeatherSourceIconTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvWeatherSourceIconTest.groovy @@ -5,7 +5,7 @@ */ package edu.ie3.datamodel.io.source.csv -import edu.ie3.datamodel.io.FileNamingStrategy +import edu.ie3.datamodel.io.naming.FileNamingStrategy import edu.ie3.datamodel.io.factory.timeseries.IconTimeBasedWeatherValueFactory import edu.ie3.datamodel.io.source.IdCoordinateSource import edu.ie3.datamodel.models.timeseries.individual.IndividualTimeSeries diff --git a/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvWeatherSourcePsdmTest.groovy b/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvWeatherSourcePsdmTest.groovy index e990fbfa4..5501b9b1c 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvWeatherSourcePsdmTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvWeatherSourcePsdmTest.groovy @@ -5,7 +5,7 @@ */ package edu.ie3.datamodel.io.source.csv -import edu.ie3.datamodel.io.FileNamingStrategy +import edu.ie3.datamodel.io.naming.FileNamingStrategy import static edu.ie3.datamodel.models.StandardUnits.SOLAR_IRRADIANCE import static edu.ie3.datamodel.models.StandardUnits.TEMPERATURE From 77e4b316bcdb3128de7e5a974754a63ada360a27 Mon Sep 17 00:00:00 2001 From: Niklas Steffan Date: Sat, 29 May 2021 16:29:00 +0200 Subject: [PATCH 025/157] improve code quality --- .../java/edu/ie3/datamodel/io/naming/DirectoryHierarchy.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/edu/ie3/datamodel/io/naming/DirectoryHierarchy.java b/src/main/java/edu/ie3/datamodel/io/naming/DirectoryHierarchy.java index ba1714571..700cf53ce 100644 --- a/src/main/java/edu/ie3/datamodel/io/naming/DirectoryHierarchy.java +++ b/src/main/java/edu/ie3/datamodel/io/naming/DirectoryHierarchy.java @@ -10,5 +10,6 @@ public interface DirectoryHierarchy extends FileHierarchy { + @Override Optional getSubDirectory(Class cls, String fileSeparator); } From dfe5326f3cf70012f3bafeaeb92499d9ff906abd Mon Sep 17 00:00:00 2001 From: Niklas Steffan Date: Sun, 30 May 2021 13:26:49 +0200 Subject: [PATCH 026/157] added attributes desiredTemperature, upperTemperatureLimit, lowerTemperatureLimit to thermalHouseInput --- .../input/thermal/ThermalHouseInput.java | 73 ++++++++++++++++++- 1 file changed, 69 insertions(+), 4 deletions(-) diff --git a/src/main/java/edu/ie3/datamodel/models/input/thermal/ThermalHouseInput.java b/src/main/java/edu/ie3/datamodel/models/input/thermal/ThermalHouseInput.java index 5386e8686..03a34ae3c 100644 --- a/src/main/java/edu/ie3/datamodel/models/input/thermal/ThermalHouseInput.java +++ b/src/main/java/edu/ie3/datamodel/models/input/thermal/ThermalHouseInput.java @@ -14,12 +14,20 @@ import java.util.UUID; import tech.units.indriya.ComparableQuantity; +import javax.measure.quantity.Temperature; + /** Quite simple thermal model of a house to serve as a heat sink */ public class ThermalHouseInput extends ThermalSinkInput { /** Thermal, transitional losses of the included thermal house model (typically in kW/K) */ private final ComparableQuantity ethLosses; /** Thermal capacity of the included thermal house model (typically in kWh/K) */ private final ComparableQuantity ethCapa; + /** Desired target temperature of the thermal house model (typically in °C) */ + private final ComparableQuantity desiredTemperature; + /** Upper boundary temperature of the thermal house model (typically in °C) */ + private final ComparableQuantity upperTemperatureLimit; + /** Lower boundary temperature of the thermal house model (typically in °C) */ + private final ComparableQuantity lowerTemperatureLimit; /** * @param uuid Unique identifier of a thermal house model @@ -27,16 +35,25 @@ public class ThermalHouseInput extends ThermalSinkInput { * @param bus Thermal bus, the model is connected to * @param ethLosses Thermal, transitional losses of the included thermal house model * @param ethCapa Thermal capacity of the included thermal house model + * @param desiredTemperature Desired target temperature of the thermal house model + * @param upperTemperatureLimit Upper boundary temperature of the thermal house model + * @param lowerTemperatureLimit Lower boundary temperature of the thermal house model */ public ThermalHouseInput( UUID uuid, String id, ThermalBusInput bus, ComparableQuantity ethLosses, - ComparableQuantity ethCapa) { + ComparableQuantity ethCapa, + ComparableQuantity desiredTemperature, + ComparableQuantity upperTemperatureLimit, + ComparableQuantity lowerTemperatureLimit) { super(uuid, id, bus); this.ethLosses = ethLosses.to(StandardUnits.THERMAL_TRANSMISSION); this.ethCapa = ethCapa.to(StandardUnits.HEAT_CAPACITY); + this.desiredTemperature = desiredTemperature.to(StandardUnits.TEMPERATURE); + this.upperTemperatureLimit = upperTemperatureLimit.to(StandardUnits.TEMPERATURE); + this.lowerTemperatureLimit = lowerTemperatureLimit.to(StandardUnits.TEMPERATURE); } /** @@ -47,6 +64,9 @@ public ThermalHouseInput( * @param bus Thermal bus, the model is connected to * @param ethLosses Thermal, transitional losses of the included thermal house model * @param ethCapa Thermal capacity of the included thermal house model + * @param desiredTemperature Desired target temperature of the thermal house model + * @param upperTemperatureLimit Upper boundary temperature of the thermal house model + * @param lowerTemperatureLimit Lower boundary temperature of the thermal house model */ public ThermalHouseInput( UUID uuid, @@ -55,10 +75,16 @@ public ThermalHouseInput( OperationTime operationTime, ThermalBusInput bus, ComparableQuantity ethLosses, - ComparableQuantity ethCapa) { + ComparableQuantity ethCapa, + ComparableQuantity desiredTemperature, + ComparableQuantity upperTemperatureLimit, + ComparableQuantity lowerTemperatureLimit) { super(uuid, id, operator, operationTime, bus); this.ethLosses = ethLosses.to(StandardUnits.THERMAL_TRANSMISSION); this.ethCapa = ethCapa.to(StandardUnits.HEAT_CAPACITY); + this.desiredTemperature = desiredTemperature.to(StandardUnits.TEMPERATURE); + this.upperTemperatureLimit = upperTemperatureLimit.to(StandardUnits.TEMPERATURE); + this.lowerTemperatureLimit = lowerTemperatureLimit.to(StandardUnits.TEMPERATURE); } public ComparableQuantity getEthLosses() { @@ -69,6 +95,12 @@ public ComparableQuantity getEthCapa() { return ethCapa; } + public ComparableQuantity getDesiredTemperature() { return desiredTemperature; } + + public ComparableQuantity getUpperTemperatureLimit() { return upperTemperatureLimit; } + + public ComparableQuantity getLowerTemperatureLimit() { return lowerTemperatureLimit; } + @Override public ThermalHouseInputCopyBuilder copy() { return new ThermalHouseInputCopyBuilder(this); @@ -80,7 +112,10 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) return false; if (!super.equals(o)) return false; ThermalHouseInput that = (ThermalHouseInput) o; - return ethLosses.equals(that.ethLosses) && ethCapa.equals(that.ethCapa); + return ethLosses.equals(that.ethLosses) && ethCapa.equals(that.ethCapa) + && desiredTemperature.equals(that.desiredTemperature) + && upperTemperatureLimit.equals(that.upperTemperatureLimit) + && lowerTemperatureLimit.equals(that.lowerTemperatureLimit); } @Override @@ -105,6 +140,12 @@ public String toString() { + ethLosses + ", ethCapa=" + ethCapa + + ", desiredTemperature=" + + desiredTemperature + + ", upperTemperatureLimit=" + + upperTemperatureLimit + + ", lowerTemperatureLimit=" + + lowerTemperatureLimit + '}'; } @@ -118,11 +159,17 @@ public static class ThermalHouseInputCopyBuilder private ComparableQuantity ethLosses; private ComparableQuantity ethCapa; + private ComparableQuantity desiredTemperature; + private ComparableQuantity upperTemperatureLimit; + private ComparableQuantity lowerTemperatureLimit; private ThermalHouseInputCopyBuilder(ThermalHouseInput entity) { super(entity); this.ethLosses = entity.getEthLosses(); this.ethCapa = entity.getEthCapa(); + this.desiredTemperature = entity.getDesiredTemperature(); + this.upperTemperatureLimit = entity.getUpperTemperatureLimit(); + this.lowerTemperatureLimit = entity.getLowerTemperatureLimit(); } @Override @@ -134,7 +181,10 @@ public ThermalHouseInput build() { getOperationTime(), getThermalBus(), ethLosses, - ethCapa); + ethCapa, + desiredTemperature, + upperTemperatureLimit, + lowerTemperatureLimit); } public ThermalHouseInputCopyBuilder ethLosses( @@ -148,6 +198,21 @@ public ThermalHouseInputCopyBuilder ethCapa(ComparableQuantity eth return this; } + public ThermalHouseInputCopyBuilder desiredTemperature(ComparableQuantity desiredTemperature) { + this.desiredTemperature = desiredTemperature; + return this; + } + + public ThermalHouseInputCopyBuilder upperTemperatureLimit(ComparableQuantity upperTemperatureLimit) { + this.upperTemperatureLimit = upperTemperatureLimit; + return this; + } + + public ThermalHouseInputCopyBuilder lowerTemperatureLimit(ComparableQuantity lowerTemperatureLimit) { + this.lowerTemperatureLimit = lowerTemperatureLimit; + return this; + } + @Override protected ThermalHouseInputCopyBuilder childInstance() { return this; From 7db5a9a6f090996ea2ea760b7132d4dc0d9b2f9e Mon Sep 17 00:00:00 2001 From: Niklas Steffan Date: Sun, 30 May 2021 13:31:59 +0200 Subject: [PATCH 027/157] adapted thermalhouse.rst in readthedocs --- .../models/input/participant/thermalhouse.rst | 36 +++++++++++-------- 1 file changed, 21 insertions(+), 15 deletions(-) diff --git a/docs/readthedocs/models/input/participant/thermalhouse.rst b/docs/readthedocs/models/input/participant/thermalhouse.rst index 302e6295c..4112001df 100644 --- a/docs/readthedocs/models/input/participant/thermalhouse.rst +++ b/docs/readthedocs/models/input/participant/thermalhouse.rst @@ -7,21 +7,27 @@ This reflects a simple shoe box with transmission losses Attributes, Units and Remarks ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -+---------------+---------+---------------------------------+ -| Attribute | Unit | Remarks | -+===============+=========+=================================+ -| uuid | -- | | -+---------------+---------+---------------------------------+ -| id | -- | Human readable identifier | -+---------------+---------+---------------------------------+ -| operator | -- | | -+---------------+---------+---------------------------------+ -| operationTime | -- | Timely restriction of operation | -+---------------+---------+---------------------------------+ -| ethLosses | kW / K | Thermal losses | -+---------------+---------+---------------------------------+ -| ethCapa | kWh / K | Thermal capacity | -+---------------+---------+---------------------------------+ ++-----------------------+---------+---------------------------------+ +| Attribute | Unit | Remarks | ++=======================+=========+=================================+ +| uuid | -- | | ++-----------------------+---------+---------------------------------+ +| id | -- | Human readable identifier | ++-----------------------+---------+---------------------------------+ +| operator | -- | | ++-----------------------+---------+---------------------------------+ +| operationTime | -- | Timely restriction of operation | ++-----------------------+---------+---------------------------------+ +| ethLosses | kW / K | Thermal losses | ++-----------------------+---------+---------------------------------+ +| ethCapa | kWh / K | Thermal capacity | ++-----------------------+---------+---------------------------------+ +| desiredTemperature | °C | Desired target temperature | ++-----------------------+---------+---------------------------------+ +| upperTemperatureLimit | °C | Upper temperature boundary | ++-----------------------+---------+---------------------------------+ +| lowerTemperatureLimit | °C | Lower temperature boundary | ++-----------------------+---------+---------------------------------+ Caveats ^^^^^^^ From fe512498dca23310b8d7359d92633479da9ec538 Mon Sep 17 00:00:00 2001 From: Niklas Steffan Date: Sun, 30 May 2021 13:41:41 +0200 Subject: [PATCH 028/157] adapted ThermalUnitInputTestData and ThermalHouseInputTest --- .../models/input/thermal/ThermalHouseInputTest.groovy | 9 ++++++++- .../edu/ie3/test/common/ThermalUnitInputTestData.groovy | 8 +++++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/src/test/groovy/edu/ie3/datamodel/models/input/thermal/ThermalHouseInputTest.groovy b/src/test/groovy/edu/ie3/datamodel/models/input/thermal/ThermalHouseInputTest.groovy index 2111ac8ee..691bdddcd 100644 --- a/src/test/groovy/edu/ie3/datamodel/models/input/thermal/ThermalHouseInputTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/models/input/thermal/ThermalHouseInputTest.groovy @@ -17,7 +17,11 @@ class ThermalHouseInputTest extends Specification { when: def alteredUnit = thermalHouseInput.copy().ethLosses(ThermalUnitInputTestData.thermalConductance) - .ethCapa(ThermalUnitInputTestData.ethCapa).thermalBus(ThermalUnitInputTestData.thermalBus).build() + .ethCapa(ThermalUnitInputTestData.ethCapa) + .desiredTemperature(ThermalUnitInputTestData.desiredTemperature) + .upperTemperatureLimit(ThermalUnitInputTestData.upperTemperatureLimit) + .lowerTemperatureLimit(ThermalUnitInputTestData.lowerTemperatureLimit) + .thermalBus(ThermalUnitInputTestData.thermalBus).build() then: @@ -29,6 +33,9 @@ class ThermalHouseInputTest extends Specification { assert thermalBus == thermalHouseInput.thermalBus assert ethLosses == ThermalUnitInputTestData.thermalConductance assert ethCapa == ThermalUnitInputTestData.ethCapa + assert desiredTemperature == ThermalUnitInputTestData.desiredTemperature + assert upperTemperatureLimit == ThermalUnitInputTestData.upperTemperatureLimit + assert lowerTemperatureLimit == ThermalUnitInputTestData.lowerTemperatureLimit } } } diff --git a/src/test/groovy/edu/ie3/test/common/ThermalUnitInputTestData.groovy b/src/test/groovy/edu/ie3/test/common/ThermalUnitInputTestData.groovy index f4cd4b035..608b54eb9 100644 --- a/src/test/groovy/edu/ie3/test/common/ThermalUnitInputTestData.groovy +++ b/src/test/groovy/edu/ie3/test/common/ThermalUnitInputTestData.groovy @@ -33,6 +33,9 @@ class ThermalUnitInputTestData extends SystemParticipantTestData { // thermal house input private static final ComparableQuantity thermalConductance = Quantities.getQuantity(10, StandardUnits.THERMAL_TRANSMISSION) private static final ComparableQuantity ethCapa = Quantities.getQuantity(20, StandardUnits.HEAT_CAPACITY) + private static final ComparableQuantity desiredTemperature = Quantities.getQuantity(20, StandardUnits.TEMPERATURE) + private static final ComparableQuantity upperTemperatureLimit = Quantities.getQuantity(25, StandardUnits.TEMPERATURE) + private static final ComparableQuantity lowerTemperatureLimit = Quantities.getQuantity(25, StandardUnits.TEMPERATURE) public static final thermalHouseInput = new ThermalHouseInput( thermalUnitUuid, "test_thermalHouseInput", @@ -40,7 +43,10 @@ class ThermalUnitInputTestData extends SystemParticipantTestData { operationTime, thermalBus, thermalConductance, - ethCapa) + ethCapa, + desiredTemperature, + upperTemperatureLimit, + lowerTemperatureLimit) // thermal cylindric storage input private static final ComparableQuantity storageVolumeLvl = Quantities.getQuantity(100, StandardUnits.VOLUME) From 5ab3afc53cd57366d564ee81568f71fb64d22eca Mon Sep 17 00:00:00 2001 From: Niklas Steffan Date: Sun, 30 May 2021 14:00:28 +0200 Subject: [PATCH 029/157] adapted ValidationUtils + Tests for thermal house model --- .../validation/ThermalUnitValidationUtils.java | 13 ++++++++++++- .../ThermalUnitValidationUtilsTest.groovy | 10 ++++++++-- .../ie3/test/common/ThermalUnitInputTestData.groovy | 2 +- 3 files changed, 21 insertions(+), 4 deletions(-) diff --git a/src/main/java/edu/ie3/datamodel/utils/validation/ThermalUnitValidationUtils.java b/src/main/java/edu/ie3/datamodel/utils/validation/ThermalUnitValidationUtils.java index 955b11efb..ac7dc2fd2 100644 --- a/src/main/java/edu/ie3/datamodel/utils/validation/ThermalUnitValidationUtils.java +++ b/src/main/java/edu/ie3/datamodel/utils/validation/ThermalUnitValidationUtils.java @@ -76,7 +76,9 @@ private static void checkThermalStorage(ThermalStorageInput thermalStorageInput) * Validates a thermalHouseInput if:
* - it is not null
* - its thermal losses are not negative
- * - its thermal capacity is positive + * - its thermal capacity is positive
+ * - its upper temperature limit is higher than the lower temperature limit
+ * - its desired temperature lies between the upper und lower limit temperatures * * @param thermalHouseInput ThermalHouseInput to validate */ @@ -86,6 +88,15 @@ private static void checkThermalHouse(ThermalHouseInput thermalHouseInput) { new Quantity[] {thermalHouseInput.getEthLosses()}, thermalHouseInput); detectZeroOrNegativeQuantities( new Quantity[] {thermalHouseInput.getEthCapa()}, thermalHouseInput); + if (thermalHouseInput.getLowerTemperatureLimit().isGreaterThan(thermalHouseInput.getUpperTemperatureLimit())) + throw new InvalidEntityException( + "Lower temperature limit cannot be higher than the upper temperature limit", + thermalHouseInput); + if (thermalHouseInput.getLowerTemperatureLimit().isGreaterThan(thermalHouseInput.getDesiredTemperature()) + || thermalHouseInput.getUpperTemperatureLimit().isLessThan(thermalHouseInput.getDesiredTemperature())) + throw new InvalidEntityException( + "Desired temperature must be higher than lower temperature limit and lower than upper temperature limit", + thermalHouseInput); } /** diff --git a/src/test/groovy/edu/ie3/datamodel/utils/validation/ThermalUnitValidationUtilsTest.groovy b/src/test/groovy/edu/ie3/datamodel/utils/validation/ThermalUnitValidationUtilsTest.groovy index 406c2bba1..c1a325857 100644 --- a/src/test/groovy/edu/ie3/datamodel/utils/validation/ThermalUnitValidationUtilsTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/utils/validation/ThermalUnitValidationUtilsTest.groovy @@ -38,6 +38,9 @@ class ThermalUnitValidationUtilsTest extends Specification { // Specific data for thermal house input private static final ComparableQuantity thermalConductance = Quantities.getQuantity(10, StandardUnits.THERMAL_TRANSMISSION) private static final ComparableQuantity ethCapa = Quantities.getQuantity(20, StandardUnits.HEAT_CAPACITY) + private static final ComparableQuantity desiredTemperature = Quantities.getQuantity(20, StandardUnits.TEMPERATURE) + private static final ComparableQuantity upperTemperatureLimit = Quantities.getQuantity(25, StandardUnits.TEMPERATURE) + private static final ComparableQuantity lowerTemperatureLimit = Quantities.getQuantity(15, StandardUnits.TEMPERATURE) // Specific data for thermal cylindric storage input private static final ComparableQuantity storageVolumeLvl = Quantities.getQuantity(100, StandardUnits.VOLUME) @@ -70,8 +73,11 @@ class ThermalUnitValidationUtilsTest extends Specification { where: invalidThermalHouse || expectedException - new ThermalHouseInput(thermalUnitUuid, id, operator, operationTime, SystemParticipantTestData.thermalBus, Quantities.getQuantity(-10, StandardUnits.THERMAL_TRANSMISSION), ethCapa) || new InvalidEntityException("The following quantities have to be zero or positive: -10 kW/K", invalidThermalHouse) - new ThermalHouseInput(thermalUnitUuid, id, operator, operationTime, SystemParticipantTestData.thermalBus, thermalConductance, Quantities.getQuantity(0, StandardUnits.HEAT_CAPACITY)) || new InvalidEntityException("The following quantities have to be positive: 0 kWh/K", invalidThermalHouse) + new ThermalHouseInput(thermalUnitUuid, id, operator, operationTime, SystemParticipantTestData.thermalBus, Quantities.getQuantity(-10, StandardUnits.THERMAL_TRANSMISSION), ethCapa, desiredTemperature, upperTemperatureLimit, lowerTemperatureLimit) || new InvalidEntityException("The following quantities have to be zero or positive: -10 kW/K", invalidThermalHouse) + new ThermalHouseInput(thermalUnitUuid, id, operator, operationTime, SystemParticipantTestData.thermalBus, thermalConductance, Quantities.getQuantity(0, StandardUnits.HEAT_CAPACITY), desiredTemperature, upperTemperatureLimit, lowerTemperatureLimit) || new InvalidEntityException("The following quantities have to be positive: 0 kWh/K", invalidThermalHouse) + new ThermalHouseInput(thermalUnitUuid, id, operator, operationTime, SystemParticipantTestData.thermalBus, thermalConductance, ethCapa, Quantities.getQuantity(0, StandardUnits.TEMPERATURE), upperTemperatureLimit, lowerTemperatureLimit) || new InvalidEntityException("Desired temperature must be higher than lower temperature limit and lower than upper temperature limit", invalidThermalHouse) + new ThermalHouseInput(thermalUnitUuid, id, operator, operationTime, SystemParticipantTestData.thermalBus, thermalConductance, ethCapa, desiredTemperature, Quantities.getQuantity(0, StandardUnits.TEMPERATURE), lowerTemperatureLimit) || new InvalidEntityException("Desired temperature must be higher than lower temperature limit and lower than upper temperature limit", invalidThermalHouse) + new ThermalHouseInput(thermalUnitUuid, id, operator, operationTime, SystemParticipantTestData.thermalBus, thermalConductance, ethCapa, desiredTemperature, upperTemperatureLimit, Quantities.getQuantity(30, StandardUnits.TEMPERATURE)) || new InvalidEntityException("Desired temperature must be higher than lower temperature limit and lower than upper temperature limit", invalidThermalHouse) } // Thermal Cylindrical Storage diff --git a/src/test/groovy/edu/ie3/test/common/ThermalUnitInputTestData.groovy b/src/test/groovy/edu/ie3/test/common/ThermalUnitInputTestData.groovy index 608b54eb9..26c98fd89 100644 --- a/src/test/groovy/edu/ie3/test/common/ThermalUnitInputTestData.groovy +++ b/src/test/groovy/edu/ie3/test/common/ThermalUnitInputTestData.groovy @@ -35,7 +35,7 @@ class ThermalUnitInputTestData extends SystemParticipantTestData { private static final ComparableQuantity ethCapa = Quantities.getQuantity(20, StandardUnits.HEAT_CAPACITY) private static final ComparableQuantity desiredTemperature = Quantities.getQuantity(20, StandardUnits.TEMPERATURE) private static final ComparableQuantity upperTemperatureLimit = Quantities.getQuantity(25, StandardUnits.TEMPERATURE) - private static final ComparableQuantity lowerTemperatureLimit = Quantities.getQuantity(25, StandardUnits.TEMPERATURE) + private static final ComparableQuantity lowerTemperatureLimit = Quantities.getQuantity(15, StandardUnits.TEMPERATURE) public static final thermalHouseInput = new ThermalHouseInput( thermalUnitUuid, "test_thermalHouseInput", From 2e05396e214ed7cb09aa92df0805ce511105c937 Mon Sep 17 00:00:00 2001 From: Niklas Steffan Date: Sun, 30 May 2021 14:06:25 +0200 Subject: [PATCH 030/157] adapted ThermalHouseInputFactory --- .../factory/input/ThermalHouseInputFactory.java | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/src/main/java/edu/ie3/datamodel/io/factory/input/ThermalHouseInputFactory.java b/src/main/java/edu/ie3/datamodel/io/factory/input/ThermalHouseInputFactory.java index 1cd707658..301802788 100644 --- a/src/main/java/edu/ie3/datamodel/io/factory/input/ThermalHouseInputFactory.java +++ b/src/main/java/edu/ie3/datamodel/io/factory/input/ThermalHouseInputFactory.java @@ -15,10 +15,15 @@ import java.util.UUID; import tech.units.indriya.ComparableQuantity; +import javax.measure.quantity.Temperature; + public class ThermalHouseInputFactory extends AssetInputEntityFactory { private static final String ETH_LOSSES = "ethlosses"; private static final String ETH_CAPA = "ethcapa"; + private static final String DESIRED_TEMPERATURE = "desiredTemperature"; + private static final String UPPER_TEMPERATURE_LIMIT = "upperTemperatureLimit"; + private static final String LOWER_TEMPERATURE_LIMIT = "lowerTemperatureLimit"; public ThermalHouseInputFactory() { super(ThermalHouseInput.class); @@ -26,7 +31,7 @@ public ThermalHouseInputFactory() { @Override protected String[] getAdditionalFields() { - return new String[] {ETH_LOSSES, ETH_CAPA}; + return new String[] {ETH_LOSSES, ETH_CAPA, DESIRED_TEMPERATURE, UPPER_TEMPERATURE_LIMIT, LOWER_TEMPERATURE_LIMIT}; } @Override @@ -41,6 +46,13 @@ protected ThermalHouseInput buildModel( data.getQuantity(ETH_LOSSES, StandardUnits.THERMAL_TRANSMISSION); final ComparableQuantity ethCapa = data.getQuantity(ETH_CAPA, StandardUnits.HEAT_CAPACITY); - return new ThermalHouseInput(uuid, id, operator, operationTime, busInput, ethLosses, ethCapa); + final ComparableQuantity desiredTemperature = + data.getQuantity(DESIRED_TEMPERATURE, StandardUnits.TEMPERATURE); + final ComparableQuantity upperTemperatureLimit = + data.getQuantity(UPPER_TEMPERATURE_LIMIT, StandardUnits.TEMPERATURE); + final ComparableQuantity lowerTemperatureLimit = + data.getQuantity(LOWER_TEMPERATURE_LIMIT, StandardUnits.TEMPERATURE); + return new ThermalHouseInput(uuid, id, operator, operationTime, busInput, ethLosses, ethCapa, desiredTemperature, + upperTemperatureLimit, lowerTemperatureLimit); } } From 0d687ca8f08d8ae55f8ef4420b7f52daf06a1718 Mon Sep 17 00:00:00 2001 From: Niklas Steffan Date: Sun, 30 May 2021 14:08:28 +0200 Subject: [PATCH 031/157] corrected ThermalUnitValidationUtils --- .../utils/validation/ThermalUnitValidationUtils.java | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/main/java/edu/ie3/datamodel/utils/validation/ThermalUnitValidationUtils.java b/src/main/java/edu/ie3/datamodel/utils/validation/ThermalUnitValidationUtils.java index ac7dc2fd2..62cd3e761 100644 --- a/src/main/java/edu/ie3/datamodel/utils/validation/ThermalUnitValidationUtils.java +++ b/src/main/java/edu/ie3/datamodel/utils/validation/ThermalUnitValidationUtils.java @@ -88,10 +88,6 @@ private static void checkThermalHouse(ThermalHouseInput thermalHouseInput) { new Quantity[] {thermalHouseInput.getEthLosses()}, thermalHouseInput); detectZeroOrNegativeQuantities( new Quantity[] {thermalHouseInput.getEthCapa()}, thermalHouseInput); - if (thermalHouseInput.getLowerTemperatureLimit().isGreaterThan(thermalHouseInput.getUpperTemperatureLimit())) - throw new InvalidEntityException( - "Lower temperature limit cannot be higher than the upper temperature limit", - thermalHouseInput); if (thermalHouseInput.getLowerTemperatureLimit().isGreaterThan(thermalHouseInput.getDesiredTemperature()) || thermalHouseInput.getUpperTemperatureLimit().isLessThan(thermalHouseInput.getDesiredTemperature())) throw new InvalidEntityException( From 2b864c9ce9386c02fb0508456ee0d872c51a519e Mon Sep 17 00:00:00 2001 From: Niklas Steffan Date: Sun, 30 May 2021 14:21:12 +0200 Subject: [PATCH 032/157] adapted other appearances --- .../main/input/ThermalDatamodelConcept.puml | 3 ++ .../input/ThermalHouseInputFactory.java | 20 ++++++++--- .../input/thermal/ThermalHouseInput.java | 33 ++++++++++++------- .../ThermalUnitValidationUtils.java | 12 ++++--- .../input/ThermalHouseInputFactoryTest.groovy | 3 ++ .../io/source/csv/CsvThermalSourceTest.groovy | 6 ++++ 6 files changed, 56 insertions(+), 21 deletions(-) diff --git a/docs/uml/main/input/ThermalDatamodelConcept.puml b/docs/uml/main/input/ThermalDatamodelConcept.puml index 51348820a..f18207ad9 100644 --- a/docs/uml/main/input/ThermalDatamodelConcept.puml +++ b/docs/uml/main/input/ThermalDatamodelConcept.puml @@ -101,6 +101,9 @@ package models { class ThermalHouseInput { - ethCapa: ComparableQuantity [kWh/K] - ethLosses: ComparableQuantity [kW/K] + - desiredTemperature: ComparableQuantity [°C] + - upperTemperatureLimit: ComparableQuantity [°C] + - lowerTemperatureLimit: ComparableQuantity [°C] } ThermalHouseInput --|> ThermalSinkInput diff --git a/src/main/java/edu/ie3/datamodel/io/factory/input/ThermalHouseInputFactory.java b/src/main/java/edu/ie3/datamodel/io/factory/input/ThermalHouseInputFactory.java index 301802788..3df298ef6 100644 --- a/src/main/java/edu/ie3/datamodel/io/factory/input/ThermalHouseInputFactory.java +++ b/src/main/java/edu/ie3/datamodel/io/factory/input/ThermalHouseInputFactory.java @@ -13,9 +13,8 @@ import edu.ie3.util.quantities.interfaces.HeatCapacity; import edu.ie3.util.quantities.interfaces.ThermalConductance; import java.util.UUID; -import tech.units.indriya.ComparableQuantity; - import javax.measure.quantity.Temperature; +import tech.units.indriya.ComparableQuantity; public class ThermalHouseInputFactory extends AssetInputEntityFactory { @@ -31,7 +30,9 @@ public ThermalHouseInputFactory() { @Override protected String[] getAdditionalFields() { - return new String[] {ETH_LOSSES, ETH_CAPA, DESIRED_TEMPERATURE, UPPER_TEMPERATURE_LIMIT, LOWER_TEMPERATURE_LIMIT}; + return new String[] { + ETH_LOSSES, ETH_CAPA, DESIRED_TEMPERATURE, UPPER_TEMPERATURE_LIMIT, LOWER_TEMPERATURE_LIMIT + }; } @Override @@ -52,7 +53,16 @@ protected ThermalHouseInput buildModel( data.getQuantity(UPPER_TEMPERATURE_LIMIT, StandardUnits.TEMPERATURE); final ComparableQuantity lowerTemperatureLimit = data.getQuantity(LOWER_TEMPERATURE_LIMIT, StandardUnits.TEMPERATURE); - return new ThermalHouseInput(uuid, id, operator, operationTime, busInput, ethLosses, ethCapa, desiredTemperature, - upperTemperatureLimit, lowerTemperatureLimit); + return new ThermalHouseInput( + uuid, + id, + operator, + operationTime, + busInput, + ethLosses, + ethCapa, + desiredTemperature, + upperTemperatureLimit, + lowerTemperatureLimit); } } diff --git a/src/main/java/edu/ie3/datamodel/models/input/thermal/ThermalHouseInput.java b/src/main/java/edu/ie3/datamodel/models/input/thermal/ThermalHouseInput.java index 03a34ae3c..95172ea92 100644 --- a/src/main/java/edu/ie3/datamodel/models/input/thermal/ThermalHouseInput.java +++ b/src/main/java/edu/ie3/datamodel/models/input/thermal/ThermalHouseInput.java @@ -12,9 +12,8 @@ import edu.ie3.util.quantities.interfaces.ThermalConductance; import java.util.Objects; import java.util.UUID; -import tech.units.indriya.ComparableQuantity; - import javax.measure.quantity.Temperature; +import tech.units.indriya.ComparableQuantity; /** Quite simple thermal model of a house to serve as a heat sink */ public class ThermalHouseInput extends ThermalSinkInput { @@ -95,11 +94,17 @@ public ComparableQuantity getEthCapa() { return ethCapa; } - public ComparableQuantity getDesiredTemperature() { return desiredTemperature; } + public ComparableQuantity getDesiredTemperature() { + return desiredTemperature; + } - public ComparableQuantity getUpperTemperatureLimit() { return upperTemperatureLimit; } + public ComparableQuantity getUpperTemperatureLimit() { + return upperTemperatureLimit; + } - public ComparableQuantity getLowerTemperatureLimit() { return lowerTemperatureLimit; } + public ComparableQuantity getLowerTemperatureLimit() { + return lowerTemperatureLimit; + } @Override public ThermalHouseInputCopyBuilder copy() { @@ -112,10 +117,11 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) return false; if (!super.equals(o)) return false; ThermalHouseInput that = (ThermalHouseInput) o; - return ethLosses.equals(that.ethLosses) && ethCapa.equals(that.ethCapa) - && desiredTemperature.equals(that.desiredTemperature) - && upperTemperatureLimit.equals(that.upperTemperatureLimit) - && lowerTemperatureLimit.equals(that.lowerTemperatureLimit); + return ethLosses.equals(that.ethLosses) + && ethCapa.equals(that.ethCapa) + && desiredTemperature.equals(that.desiredTemperature) + && upperTemperatureLimit.equals(that.upperTemperatureLimit) + && lowerTemperatureLimit.equals(that.lowerTemperatureLimit); } @Override @@ -198,17 +204,20 @@ public ThermalHouseInputCopyBuilder ethCapa(ComparableQuantity eth return this; } - public ThermalHouseInputCopyBuilder desiredTemperature(ComparableQuantity desiredTemperature) { + public ThermalHouseInputCopyBuilder desiredTemperature( + ComparableQuantity desiredTemperature) { this.desiredTemperature = desiredTemperature; return this; } - public ThermalHouseInputCopyBuilder upperTemperatureLimit(ComparableQuantity upperTemperatureLimit) { + public ThermalHouseInputCopyBuilder upperTemperatureLimit( + ComparableQuantity upperTemperatureLimit) { this.upperTemperatureLimit = upperTemperatureLimit; return this; } - public ThermalHouseInputCopyBuilder lowerTemperatureLimit(ComparableQuantity lowerTemperatureLimit) { + public ThermalHouseInputCopyBuilder lowerTemperatureLimit( + ComparableQuantity lowerTemperatureLimit) { this.lowerTemperatureLimit = lowerTemperatureLimit; return this; } diff --git a/src/main/java/edu/ie3/datamodel/utils/validation/ThermalUnitValidationUtils.java b/src/main/java/edu/ie3/datamodel/utils/validation/ThermalUnitValidationUtils.java index 62cd3e761..4966f0117 100644 --- a/src/main/java/edu/ie3/datamodel/utils/validation/ThermalUnitValidationUtils.java +++ b/src/main/java/edu/ie3/datamodel/utils/validation/ThermalUnitValidationUtils.java @@ -88,11 +88,15 @@ private static void checkThermalHouse(ThermalHouseInput thermalHouseInput) { new Quantity[] {thermalHouseInput.getEthLosses()}, thermalHouseInput); detectZeroOrNegativeQuantities( new Quantity[] {thermalHouseInput.getEthCapa()}, thermalHouseInput); - if (thermalHouseInput.getLowerTemperatureLimit().isGreaterThan(thermalHouseInput.getDesiredTemperature()) - || thermalHouseInput.getUpperTemperatureLimit().isLessThan(thermalHouseInput.getDesiredTemperature())) + if (thermalHouseInput + .getLowerTemperatureLimit() + .isGreaterThan(thermalHouseInput.getDesiredTemperature()) + || thermalHouseInput + .getUpperTemperatureLimit() + .isLessThan(thermalHouseInput.getDesiredTemperature())) throw new InvalidEntityException( - "Desired temperature must be higher than lower temperature limit and lower than upper temperature limit", - thermalHouseInput); + "Desired temperature must be higher than lower temperature limit and lower than upper temperature limit", + thermalHouseInput); } /** diff --git a/src/test/groovy/edu/ie3/datamodel/io/factory/input/ThermalHouseInputFactoryTest.groovy b/src/test/groovy/edu/ie3/datamodel/io/factory/input/ThermalHouseInputFactoryTest.groovy index 2237200ee..9335beff8 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/factory/input/ThermalHouseInputFactoryTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/factory/input/ThermalHouseInputFactoryTest.groovy @@ -49,6 +49,9 @@ class ThermalHouseInputFactoryTest extends Specification implements FactoryTestH assert thermalBus == thermalBusInput assert ethLosses == getQuant(parameter["ethlosses"], StandardUnits.THERMAL_TRANSMISSION) assert ethCapa == getQuant(parameter["ethcapa"], StandardUnits.HEAT_CAPACITY) + assert desiredTemperature == getQuant(parameter["desiredTemperature"], StandardUnits.TEMPERATURE) + assert upperTemperatureLimit == getQuant(parameter["upperTemperatureLimit"], StandardUnits.TEMPERATURE) + assert lowerTemperatureLimit == getQuant(parameter["lowerTemperatureLimit"], StandardUnits.TEMPERATURE) } } } diff --git a/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvThermalSourceTest.groovy b/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvThermalSourceTest.groovy index ef9b9090d..cb08a4006 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvThermalSourceTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvThermalSourceTest.groovy @@ -154,6 +154,9 @@ class CsvThermalSourceTest extends Specification implements CsvTestDataMeta { resultingThermalHouseWoOperator.first().thermalBus == ThermalUnitInputTestData.thermalHouseInput.thermalBus resultingThermalHouseWoOperator.first().ethLosses == ThermalUnitInputTestData.thermalHouseInput.ethLosses resultingThermalHouseWoOperator.first().ethCapa == ThermalUnitInputTestData.thermalHouseInput.ethCapa + resultingThermalHouseWoOperator.first().desiredTemperature == ThermalUnitInputTestData.thermalHouseInput.desiredTemperature + resultingThermalHouseWoOperator.first().upperTemperatureLimit == ThermalUnitInputTestData.thermalHouseInput.upperTemperatureLimit + resultingThermalHouseWoOperator.first().lowerTemperatureLimit == ThermalUnitInputTestData.thermalHouseInput.lowerTemperatureLimit //test method when operators and thermal buses are provided as constructor parameters when: @@ -169,6 +172,9 @@ class CsvThermalSourceTest extends Specification implements CsvTestDataMeta { resultingThermalHouseWoOperator.first().thermalBus == ThermalUnitInputTestData.thermalHouseInput.thermalBus resultingThermalHouse.first().ethLosses == ThermalUnitInputTestData.thermalHouseInput.ethLosses resultingThermalHouse.first().ethCapa == ThermalUnitInputTestData.thermalHouseInput.ethCapa + resultingThermalHouse.first().desiredTemperature == ThermalUnitInputTestData.thermalHouseInput.desiredTemperature + resultingThermalHouse.first().upperTemperatureLimit == ThermalUnitInputTestData.thermalHouseInput.upperTemperatureLimit + resultingThermalHouse.first().lowerTemperatureLimit == ThermalUnitInputTestData.thermalHouseInput.lowerTemperatureLimit } } From 095ef46a5d5eaa58774a3de1fd56a6660714d9c3 Mon Sep 17 00:00:00 2001 From: Niklas Steffan Date: Sun, 30 May 2021 14:49:01 +0200 Subject: [PATCH 033/157] corrected bug, 1 remaining --- .../factory/input/ThermalHouseInputFactoryTest.groovy | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/test/groovy/edu/ie3/datamodel/io/factory/input/ThermalHouseInputFactoryTest.groovy b/src/test/groovy/edu/ie3/datamodel/io/factory/input/ThermalHouseInputFactoryTest.groovy index 9335beff8..3a5214c7e 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/factory/input/ThermalHouseInputFactoryTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/factory/input/ThermalHouseInputFactoryTest.groovy @@ -27,10 +27,13 @@ class ThermalHouseInputFactoryTest extends Specification implements FactoryTestH given: "a system participant input type factory and model data" def inputFactory = new ThermalHouseInputFactory() Map parameter = [ - "uuid" : "91ec3bcf-1777-4d38-af67-0bf7c9fa73c7", - "id" : "TestID", - "ethlosses": "3", - "ethcapa" : "4" + "uuid" : "91ec3bcf-1777-4d38-af67-0bf7c9fa73c7", + "id" : "TestID", + "ethlosses" : "3", + "ethcapa" : "4", + "desiredTemperature" : "5", + "upperTemperatureLimit" : "6", + "lowerTemperatureLimit" : "7" ] def inputClass = ThermalHouseInput def thermalBusInput = Mock(ThermalBusInput) From c5c8682e2a97c2b3a6197466ae40745127d2261d Mon Sep 17 00:00:00 2001 From: Niklas Steffan Date: Mon, 31 May 2021 12:45:07 +0200 Subject: [PATCH 034/157] still one bug --- .../io/naming/FileNamingStrategy.java | 10 ++++--- .../io/naming/FileNamingStrategyTest.groovy | 27 +++++++------------ 2 files changed, 16 insertions(+), 21 deletions(-) diff --git a/src/main/java/edu/ie3/datamodel/io/naming/FileNamingStrategy.java b/src/main/java/edu/ie3/datamodel/io/naming/FileNamingStrategy.java index c8912d614..da321ea26 100644 --- a/src/main/java/edu/ie3/datamodel/io/naming/FileNamingStrategy.java +++ b/src/main/java/edu/ie3/datamodel/io/naming/FileNamingStrategy.java @@ -175,8 +175,9 @@ public Pattern getIndividualTimeSeriesPattern() { return subDirectory.isEmpty() ? entityNamingStrategy.getIndividualTimeSeriesPattern() : Pattern.compile( - FilenameUtils.concat( - subDirectory, entityNamingStrategy.getIndividualTimeSeriesPattern().pattern())); + subDirectory.replaceAll(FILE_SEPARATOR_REGEX, FILE_SEPARATOR_REPLACEMENT) + + FILE_SEPARATOR_REPLACEMENT + + entityNamingStrategy.getIndividualTimeSeriesPattern().pattern()); } public Pattern getLoadProfileTimeSeriesPattern() { @@ -184,8 +185,9 @@ public Pattern getLoadProfileTimeSeriesPattern() { return subDirectory.isEmpty() ? entityNamingStrategy.getLoadProfileTimeSeriesPattern() : Pattern.compile( - FilenameUtils.concat( - subDirectory, entityNamingStrategy.getLoadProfileTimeSeriesPattern().pattern())); + subDirectory.replaceAll(FILE_SEPARATOR_REGEX, FILE_SEPARATOR_REPLACEMENT) + + FILE_SEPARATOR_REPLACEMENT + + entityNamingStrategy.getLoadProfileTimeSeriesPattern().pattern()); } /** diff --git a/src/test/groovy/edu/ie3/datamodel/io/naming/FileNamingStrategyTest.groovy b/src/test/groovy/edu/ie3/datamodel/io/naming/FileNamingStrategyTest.groovy index 5bd9fa8f6..dd82db747 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/naming/FileNamingStrategyTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/naming/FileNamingStrategyTest.groovy @@ -5,10 +5,6 @@ */ package edu.ie3.datamodel.io.naming -import edu.ie3.datamodel.io.naming.DefaultDirectoryHierarchy -import edu.ie3.datamodel.io.naming.FlatDirectoryHierarchy -import edu.ie3.datamodel.io.naming.EntityNamingStrategy -import edu.ie3.datamodel.io.naming.FileNamingStrategy import edu.ie3.datamodel.io.source.TimeSeriesMappingSource import edu.ie3.datamodel.models.BdewLoadProfile import edu.ie3.datamodel.models.UniqueEntity @@ -765,26 +761,23 @@ class FileNamingStrategyTest extends Specification { IndividualTimeSeries | UUID.fromString("4881fda2-bcee-4f4f-a5bb-6a09bf785276") || "its_c_4881fda2-bcee-4f4f-a5bb-6a09bf785276" } - - //TODO: Fix me! def "A FileNamingStrategy with DefaultHierarchy returns correct individual time series file name pattern"() { - given: "a naming strategy without pre- or suffixes" + given: def strategy = new FileNamingStrategy(simpleEntityNaming, defaultHierarchy) when: - def actual = strategy.individualTimeSeriesPattern().pattern() + def actual = strategy.individualTimeSeriesPattern.pattern() then: actual == "test_grid" + File.separator + "input" + File.separator + "participants" + File.separator + "time_series" + File.separator + "its_(?[a-zA-Z]{1,11})_(?[a-zA-Z0-9]{8}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{12})" } - //TODO: Fix me! def "A FileNamingStrategy with DefaultHierarchy returns correct load profile time series file name pattern"() { - given: "a naming strategy without pre- or suffixes" + given: def strategy = new FileNamingStrategy(simpleEntityNaming, defaultHierarchy) when: - def actual = strategy.loadProfileTimeSeriesPattern().pattern() + def actual = strategy.loadProfileTimeSeriesPattern.pattern() then: actual == "test_grid" + File.separator + "input" + File.separator + "global" + File.separator + "lpts_(?[a-zA-Z][0-9])_(?[a-zA-Z0-9]{8}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{12})" @@ -792,25 +785,25 @@ class FileNamingStrategyTest extends Specification { def "A FileNamingStrategy with FlatHierarchy returns correct individual time series file name pattern"() { - given: "a naming strategy without pre- or suffixes" + given: def strategy = new FileNamingStrategy(simpleEntityNaming, flatHierarchy) when: - def actual = strategy.getIndividualTimeSeriesPattern().pattern() + def actual = strategy.individualTimeSeriesPattern.pattern() then: - actual.toString() == "its_(?[a-zA-Z]{1,11})_(?[a-zA-Z0-9]{8}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{12})" + actual == "its_(?[a-zA-Z]{1,11})_(?[a-zA-Z0-9]{8}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{12})" } def "A FileNamingStrategy with FlatHierarchy returns correct load profile time series file name pattern"() { - given: "a naming strategy without pre- or suffixes" + given: def strategy = new FileNamingStrategy(simpleEntityNaming, flatHierarchy) when: - def actual = strategy.getLoadProfileTimeSeriesPattern().pattern() + def actual = strategy.loadProfileTimeSeriesPattern.pattern() then: - actual.toString() == "lpts_(?[a-zA-Z][0-9])_(?[a-zA-Z0-9]{8}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{12})" + actual == "lpts_(?[a-zA-Z][0-9])_(?[a-zA-Z0-9]{8}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{12})" } } \ No newline at end of file From f1ddaace8af19483941c2be01c49eff2e63bdbdf Mon Sep 17 00:00:00 2001 From: Niklas Steffan Date: Mon, 31 May 2021 12:51:49 +0200 Subject: [PATCH 035/157] try again --- .../edu/ie3/datamodel/io/naming/FileNamingStrategyTest.groovy | 1 - 1 file changed, 1 deletion(-) diff --git a/src/test/groovy/edu/ie3/datamodel/io/naming/FileNamingStrategyTest.groovy b/src/test/groovy/edu/ie3/datamodel/io/naming/FileNamingStrategyTest.groovy index dd82db747..b38025ba0 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/naming/FileNamingStrategyTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/naming/FileNamingStrategyTest.groovy @@ -783,7 +783,6 @@ class FileNamingStrategyTest extends Specification { actual == "test_grid" + File.separator + "input" + File.separator + "global" + File.separator + "lpts_(?[a-zA-Z][0-9])_(?[a-zA-Z0-9]{8}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{12})" } - def "A FileNamingStrategy with FlatHierarchy returns correct individual time series file name pattern"() { given: def strategy = new FileNamingStrategy(simpleEntityNaming, flatHierarchy) From a3e8a9ea2041c73201dc83fcc200b12b6b58be34 Mon Sep 17 00:00:00 2001 From: Niklas Steffan Date: Mon, 31 May 2021 13:02:28 +0200 Subject: [PATCH 036/157] updated CHANGELOG.md --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2608fa232..ee8b052f2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased/Snapshot] +### Changed +- separated entity and file naming and introduced a new FileNamingStrategy taking an EntityNamingStrategy and a DirectoryHierarchy as arguments + ## [2.0.0] - 2021-05-21 ### Added From c0cb71ba72771d3369d75d297b2f8881ac5a4be2 Mon Sep 17 00:00:00 2001 From: Sebastian <14994800+sebastian-peter@users.noreply.github.com> Date: Tue, 1 Jun 2021 13:59:29 +0200 Subject: [PATCH 037/157] Adding evcs to CsvSystemParticipantSource.getSystemParticipants --- .../io/source/csv/CsvSystemParticipantSource.java | 7 ++++++- .../io/source/csv/CsvSystemParticipantSourceTest.groovy | 5 ++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/main/java/edu/ie3/datamodel/io/source/csv/CsvSystemParticipantSource.java b/src/main/java/edu/ie3/datamodel/io/source/csv/CsvSystemParticipantSource.java index 4d944885a..088b34d39 100644 --- a/src/main/java/edu/ie3/datamodel/io/source/csv/CsvSystemParticipantSource.java +++ b/src/main/java/edu/ie3/datamodel/io/source/csv/CsvSystemParticipantSource.java @@ -153,6 +153,11 @@ public Optional getSystemParticipants() { .filter(isPresentCollectIfNot(EvInput.class, nonBuildEntities)) .map(Optional::get) .collect(Collectors.toSet()); + Set evcs = + nodeAssetEntityStream(EvcsInput.class, evcsInputFactory, nodes, operators) + .filter(isPresentCollectIfNot(EvcsInput.class, nonBuildEntities)) + .map(Optional::get) + .collect(Collectors.toSet()); Set chpInputs = chpInputStream(nodes, operators, chpTypes, thermalBuses, thermalStorages) .filter(isPresentCollectIfNot(ChpInput.class, nonBuildEntities)) @@ -175,7 +180,7 @@ public Optional getSystemParticipants() { new SystemParticipants( bmInputs, chpInputs, - Collections.emptySet(), + evcs, evs, fixedFeedInInputs, hpInputs, diff --git a/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvSystemParticipantSourceTest.groovy b/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvSystemParticipantSourceTest.groovy index dac895b8d..254f67b23 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvSystemParticipantSourceTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvSystemParticipantSourceTest.groovy @@ -25,7 +25,6 @@ import edu.ie3.datamodel.models.input.system.WecInput import edu.ie3.datamodel.models.input.thermal.ThermalBusInput import edu.ie3.datamodel.models.input.thermal.ThermalStorageInput import edu.ie3.test.common.SystemParticipantTestData as sptd -import org.apache.commons.lang3.NotImplementedException import spock.lang.Specification class CsvSystemParticipantSourceTest extends Specification implements CsvTestDataMeta { @@ -45,7 +44,7 @@ class CsvSystemParticipantSourceTest extends Specification implements CsvTestDat then: systemParticipantsOpt.present systemParticipantsOpt.ifPresent({ systemParticipants -> - assert (systemParticipants.allEntitiesAsList().size() == 9) + assert (systemParticipants.allEntitiesAsList().size() == 10) assert (systemParticipants.getPvPlants().first().uuid == sptd.pvInput.uuid) assert (systemParticipants.getBmPlants().first().uuid == sptd.bmInput.uuid) assert (systemParticipants.getChpPlants().first().uuid == sptd.chpInput.uuid) @@ -55,7 +54,7 @@ class CsvSystemParticipantSourceTest extends Specification implements CsvTestDat assert (systemParticipants.getLoads().first().uuid == sptd.loadInput.uuid) assert (systemParticipants.getWecPlants().first().uuid == sptd.wecInput.uuid) assert (systemParticipants.getStorages().first().uuid == sptd.storageInput.uuid) - assert (systemParticipants.getEvCS() == [] as Set) + assert (systemParticipants.getEvCS().first().uuid == sptd.evcsInput.uuid) }) } From baa9be1987b4313de7752fa061b2abdb1923dcf6 Mon Sep 17 00:00:00 2001 From: Johannes Hiry Date: Tue, 1 Jun 2021 14:57:24 +0200 Subject: [PATCH 038/157] adapted CHANGELOG.md --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2608fa232..230757336 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased/Snapshot] +### Fixed +- `CsvSystemParticipantSource#getSystemParticipants()` now correctly returns electric vehicle charging station input models [PR#370](https://github.com/ie3-institute/PowerSystemDataModel/pull/370) + ## [2.0.0] - 2021-05-21 ### Added From fc5b7fc6876120e6b592c21a195d399f21f1e6d3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 7 Jun 2021 04:20:43 +0000 Subject: [PATCH 039/157] Bump java-client from 3.1.5 to 3.1.6 Bumps [java-client](https://github.com/couchbase/couchbase-jvm-clients) from 3.1.5 to 3.1.6. - [Release notes](https://github.com/couchbase/couchbase-jvm-clients/releases) - [Commits](https://github.com/couchbase/couchbase-jvm-clients/commits) --- updated-dependencies: - dependency-name: com.couchbase.client:java-client dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index c55a454a6..c6ec90013 100644 --- a/build.gradle +++ b/build.gradle @@ -82,7 +82,7 @@ dependencies { // Databases compile 'org.influxdb:influxdb-java:2.21' - compile 'com.couchbase.client:java-client:3.1.5' + compile 'com.couchbase.client:java-client:3.1.6' runtimeOnly 'org.postgresql:postgresql:42.2.20' // postgresql jdbc driver required during runtime From 82acc8775b0d0e01fc920847f38a9f50f2c30f92 Mon Sep 17 00:00:00 2001 From: t-ober <63147366+t-ober@users.noreply.github.com> Date: Mon, 7 Jun 2021 09:41:39 +0200 Subject: [PATCH 040/157] adjust javadocs documentation --- .../models/input/connector/ConnectorInput.java | 6 ++++-- .../datamodel/models/input/connector/LineInput.java | 6 ++++-- .../models/input/connector/Transformer2WInput.java | 6 ++++-- .../models/input/connector/Transformer3WInput.java | 12 ++++++++---- .../models/input/connector/TransformerInput.java | 6 ++++-- 5 files changed, 24 insertions(+), 12 deletions(-) diff --git a/src/main/java/edu/ie3/datamodel/models/input/connector/ConnectorInput.java b/src/main/java/edu/ie3/datamodel/models/input/connector/ConnectorInput.java index b7536e7d4..528a9c91c 100644 --- a/src/main/java/edu/ie3/datamodel/models/input/connector/ConnectorInput.java +++ b/src/main/java/edu/ie3/datamodel/models/input/connector/ConnectorInput.java @@ -30,7 +30,8 @@ public abstract class ConnectorInput extends AssetInput implements HasNodes { * @param operationTime Time for which the entity is operated * @param nodeA Grid node at one side of the connector * @param nodeB Grid node at the other side of the connector - * @param parallelDevices Amount of parallel devices + * @param parallelDevices overall amount of parallel devices to automatically construct (e.g. + * parallelDevices = 2 will build a total of two entities using the specified parameters) */ public ConnectorInput( UUID uuid, @@ -53,7 +54,8 @@ public ConnectorInput( * @param id of the asset * @param nodeA Grid node at one side of the connector * @param nodeB Grid node at the other side of the connector - * @param parallelDevices Amount of parallel devices + * @param parallelDevices overall amount of parallel devices to automatically construct (e.g. + * parallelDevices = 2 will build a total of two entities using the specified parameters) */ public ConnectorInput( UUID uuid, String id, NodeInput nodeA, NodeInput nodeB, int parallelDevices) { diff --git a/src/main/java/edu/ie3/datamodel/models/input/connector/LineInput.java b/src/main/java/edu/ie3/datamodel/models/input/connector/LineInput.java index 72502cc97..a4b231e9e 100644 --- a/src/main/java/edu/ie3/datamodel/models/input/connector/LineInput.java +++ b/src/main/java/edu/ie3/datamodel/models/input/connector/LineInput.java @@ -43,7 +43,8 @@ public class LineInput extends ConnectorInput implements HasType { * @param operationTime Time for which the entity is operated * @param nodeA Grid node at one side of the line * @param nodeB Grid node at the other side of the line - * @param parallelDevices Amount of parallel lines + * @param parallelDevices overall amount of parallel lines to automatically construct (e.g. + * parallelDevices = 2 will build a total of two lines using the specified parameters) * @param type of line * @param length of this line * @param geoPosition Coordinates of this line @@ -75,7 +76,8 @@ public LineInput( * @param id of the asset * @param nodeA Grid node at one side of the line * @param nodeB Grid node at the other side of the line - * @param parallelDevices Amount of parallel lines + * @param parallelDevices overall amount of parallel lines to automatically construct (e.g. + * parallelDevices = 2 will build a total of two lines using the specified parameters) * @param type of line * @param length of this line * @param geoPosition Coordinates of this line diff --git a/src/main/java/edu/ie3/datamodel/models/input/connector/Transformer2WInput.java b/src/main/java/edu/ie3/datamodel/models/input/connector/Transformer2WInput.java index 22b0b8f8e..725e70046 100644 --- a/src/main/java/edu/ie3/datamodel/models/input/connector/Transformer2WInput.java +++ b/src/main/java/edu/ie3/datamodel/models/input/connector/Transformer2WInput.java @@ -30,7 +30,8 @@ public class Transformer2WInput extends TransformerInput implements HasType { * @param operationTime Time for which the entity is operated * @param nodeA higher voltage node * @param nodeB lower voltage node - * @param parallelDevices Amount of singular transformers + * @param parallelDevices overall amount of parallel transformers to automatically construct (e.g. + * parallelDevices = 2 will build a total of two transformers using the specified parameters) * @param type of 2W transformer * @param tapPos Tap position of this transformer * @param autoTap True, if the tap position of the transformer is adapted automatically @@ -57,7 +58,8 @@ public Transformer2WInput( * @param id of the asset * @param nodeA higher voltage node * @param nodeB lower voltage node - * @param parallelDevices Amount of singular transformers + * @param parallelDevices overall amount of parallel transformers to automatically construct (e.g. + * parallelDevices = 2 will build a total of two transformers using the specified parameters) * @param type of 2W transformer * @param tapPos Tap position of this transformer * @param autoTap True, if the tap position of the transformer is adapted automatically diff --git a/src/main/java/edu/ie3/datamodel/models/input/connector/Transformer3WInput.java b/src/main/java/edu/ie3/datamodel/models/input/connector/Transformer3WInput.java index 25861b63c..760972f40 100644 --- a/src/main/java/edu/ie3/datamodel/models/input/connector/Transformer3WInput.java +++ b/src/main/java/edu/ie3/datamodel/models/input/connector/Transformer3WInput.java @@ -37,7 +37,8 @@ public class Transformer3WInput extends TransformerInput implements HasType { * @param nodeA The higher voltage node * @param nodeB The middle voltage node * @param nodeC The lower voltage node - * @param parallelDevices Amount of singular transformers + * @param parallelDevices overall amount of parallel transformers to automatically construct (e.g. + * parallelDevices = 2 will build a total of two transformers using the specified parameters) * @param type of 3W transformer * @param tapPos Tap Position of this transformer * @param autoTap true, if there is an automated regulation activated for this transformer @@ -85,7 +86,8 @@ public Transformer3WInput( * @param nodeA The higher voltage node * @param nodeB The middle voltage node * @param nodeC The lower voltage node - * @param parallelDevices Amount of singular transformers + * @param parallelDevices overall amount of parallel transformers to automatically construct (e.g. + * parallelDevices = 2 will build a total of two transformers using the specified parameters) * @param type of 3W transformer * @param tapPos Tap Position of this transformer * @param autoTap true, if there is an automated regulation activated for this transformer @@ -136,7 +138,8 @@ public Transformer3WInput( * @param nodeA The higher voltage node * @param nodeB The middle voltage node * @param nodeC The lower voltage node - * @param parallelDevices Amount of singular transformers + * @param parallelDevices overall amount of parallel transformers to automatically construct (e.g. + * parallelDevices = 2 will build a total of two transformers using the specified parameters) * @param type of 3W transformer * @param tapPos Tap Position of this transformer * @param autoTap true, if there is an automated regulation activated for this transformer @@ -177,7 +180,8 @@ public Transformer3WInput( * @param nodeA The higher voltage node * @param nodeB The middle voltage node * @param nodeC The lower voltage node - * @param parallelDevices Amount of singular transformers + * @param parallelDevices overall amount of parallel transformers to automatically construct (e.g. + * parallelDevices = 2 will build a total of two transformers using the specified parameters) * @param type of 3W transformer * @param tapPos Tap Position of this transformer * @param autoTap true, if there is an automated regulation activated for this transformer diff --git a/src/main/java/edu/ie3/datamodel/models/input/connector/TransformerInput.java b/src/main/java/edu/ie3/datamodel/models/input/connector/TransformerInput.java index bef9330ad..b5c10cb00 100644 --- a/src/main/java/edu/ie3/datamodel/models/input/connector/TransformerInput.java +++ b/src/main/java/edu/ie3/datamodel/models/input/connector/TransformerInput.java @@ -27,7 +27,8 @@ public abstract class TransformerInput extends ConnectorInput { * @param id of the asset * @param nodeA Grid node at the high voltage winding * @param nodeB Grid node at the low voltage winding - * @param parallelDevices Amount of parallel transformers + * @param parallelDevices overall amount of parallel transformers to automatically construct (e.g. + * parallelDevices = 2 will build a total of two transformers using the specified parameters) * @param tapPos Tap Position of this transformer * @param autoTap True, if the tap position of the transformer is adapted automatically */ @@ -53,7 +54,8 @@ public TransformerInput( * @param id of the asset * @param nodeA Grid node at the high voltage winding * @param nodeB Grid node at the low voltage winding - * @param parallelDevices Amount of parallel transformers + * @param parallelDevices overall amount of parallel transformers to automatically construct (e.g. + * parallelDevices = 2 will build a total of two transformers using the specified parameters) * @param tapPos Tap Position of this transformer * @param autoTap True, if the tap position of the transformer is adapted automatically */ From 6951ce71ce5d4501eea11dd102d78dd38898c6b7 Mon Sep 17 00:00:00 2001 From: t-ober <63147366+t-ober@users.noreply.github.com> Date: Mon, 7 Jun 2021 09:42:10 +0200 Subject: [PATCH 041/157] adjust readthedocs documentation --- docs/readthedocs/models/input/grid/line.rst | 4 +- .../models/input/grid/transformer2w.rst | 48 +++++++++-------- .../models/input/grid/transformer3w.rst | 52 ++++++++++--------- 3 files changed, 55 insertions(+), 49 deletions(-) diff --git a/docs/readthedocs/models/input/grid/line.rst b/docs/readthedocs/models/input/grid/line.rst index 5f489504d..800cb3092 100644 --- a/docs/readthedocs/models/input/grid/line.rst +++ b/docs/readthedocs/models/input/grid/line.rst @@ -48,7 +48,9 @@ Entity Model +-------------------+------+--------------------------------------------------------+ | nodeB | -- | | +-------------------+------+--------------------------------------------------------+ -| parallelDevices | -- | Amount of parallel devices of same attributes | +| parallelDevices | -- | | overall amount of parallel lines to automatically | +| | -- | | construct (e.g. parallelDevices = 2 will build a | +| | -- | | total of two lines using the specified parameters) | +-------------------+------+--------------------------------------------------------+ | type | -- | | +-------------------+------+--------------------------------------------------------+ diff --git a/docs/readthedocs/models/input/grid/transformer2w.rst b/docs/readthedocs/models/input/grid/transformer2w.rst index 248a22fc1..f9c89f1b7 100644 --- a/docs/readthedocs/models/input/grid/transformer2w.rst +++ b/docs/readthedocs/models/input/grid/transformer2w.rst @@ -50,29 +50,31 @@ As obvious, the parameter can be used in T- as in 𝜋-equivalent circuit repres Entity Model """""""""""" -+-----------------+------+--------------------------------------------------------+ -| Attribute | Unit | Remarks | -+=================+======+========================================================+ -| uuid | -- | | -+-----------------+------+--------------------------------------------------------+ -| id | -- | Human readable identifier | -+-----------------+------+--------------------------------------------------------+ -| operator | -- | | -+-----------------+------+--------------------------------------------------------+ -| operationTime | -- | Timely restriction of operation | -+-----------------+------+--------------------------------------------------------+ -| nodeA | -- | Higher voltage node | -+-----------------+------+--------------------------------------------------------+ -| nodeB | -- | Lower voltage node | -+-----------------+------+--------------------------------------------------------+ -| parallelDevices | -- | Amount of parallel devices of same attributes | -+-----------------+------+--------------------------------------------------------+ -| type | -- | | -+-----------------+------+--------------------------------------------------------+ -| tapPos | -- | Current position of the tap changer | -+-----------------+------+--------------------------------------------------------+ -| autoTap | -- | true, if there is a tap regulation apparent and active | -+-----------------+------+--------------------------------------------------------+ ++-----------------+------+------------------------------------------------------------+ +| Attribute | Unit | Remarks | ++=================+======+============================================================+ +| uuid | -- | | ++-----------------+------+------------------------------------------------------------+ +| id | -- | Human readable identifier | ++-----------------+------+------------------------------------------------------------+ +| operator | -- | | ++-----------------+------+------------------------------------------------------------+ +| operationTime | -- | Timely restriction of operation | ++-----------------+------+------------------------------------------------------------+ +| nodeA | -- | Higher voltage node | ++-----------------+------+------------------------------------------------------------+ +| nodeB | -- | Lower voltage node | ++-----------------+------+------------------------------------------------------------+ +| parallelDevices | -- | | overall amount of parallel transformers to automatically | +| | -- | | construct (e.g. parallelDevices = 2 will build a | +| | -- | | total of two transformers using the specified parameters)| ++-----------------+------+------------------------------------------------------------+ +| type | -- | | ++-----------------+------+------------------------------------------------------------+ +| tapPos | -- | Current position of the tap changer | ++-----------------+------+------------------------------------------------------------+ +| autoTap | -- | true, if there is a tap regulation apparent and active | ++-----------------+------+------------------------------------------------------------+ Caveats ^^^^^^^ diff --git a/docs/readthedocs/models/input/grid/transformer3w.rst b/docs/readthedocs/models/input/grid/transformer3w.rst index fd60cd942..db4e67d00 100644 --- a/docs/readthedocs/models/input/grid/transformer3w.rst +++ b/docs/readthedocs/models/input/grid/transformer3w.rst @@ -70,31 +70,33 @@ All impedances and admittances are given with respect to the higher voltage side Entity Model """""""""""" -+-----------------+------+--------------------------------------------------------+ -| Attribute | Unit | Remarks | -+=================+======+========================================================+ -| uuid | -- | | -+-----------------+------+--------------------------------------------------------+ -| id | -- | Human readable identifier | -+-----------------+------+--------------------------------------------------------+ -| operator | -- | | -+-----------------+------+--------------------------------------------------------+ -| operationTime | -- | Timely restriction of operation | -+-----------------+------+--------------------------------------------------------+ -| nodeA | -- | Higher voltage node | -+-----------------+------+--------------------------------------------------------+ -| nodeB | -- | Intermediate voltage node | -+-----------------+------+--------------------------------------------------------+ -| nodeC | -- | Lowest voltage node | -+-----------------+------+--------------------------------------------------------+ -| parallelDevices | -- | Amount of parallel devices of same attributes | -+-----------------+------+--------------------------------------------------------+ -| type | -- | | -+-----------------+------+--------------------------------------------------------+ -| tapPos | -- | Current position of the tap changer | -+-----------------+------+--------------------------------------------------------+ -| autoTap | -- | true, if there is a tap regulation apparent and active | -+-----------------+------+--------------------------------------------------------+ ++-----------------+------+------------------------------------------------------------+ +| Attribute | Unit | Remarks | ++=================+======+============================================================+ +| uuid | -- | | ++-----------------+------+------------------------------------------------------------+ +| id | -- | Human readable identifier | ++-----------------+------+------------------------------------------------------------+ +| operator | -- | | ++-----------------+------+------------------------------------------------------------+ +| operationTime | -- | Timely restriction of operation | ++-----------------+------+------------------------------------------------------------+ +| nodeA | -- | Higher voltage node | ++-----------------+------+------------------------------------------------------------+ +| nodeB | -- | Intermediate voltage node | ++-----------------+------+------------------------------------------------------------+ +| nodeC | -- | Lowest voltage node | ++-----------------+------+------------------------------------------------------------+ +| parallelDevices | -- | | overall amount of parallel transformers to automatically | +| | -- | | construct (e.g. parallelDevices = 2 will build a | +| | -- | | total of two transformers using the specified parameters)| ++-----------------+------+------------------------------------------------------------+ +| type | -- | | ++-----------------+------+------------------------------------------------------------+ +| tapPos | -- | Current position of the tap changer | ++-----------------+------+------------------------------------------------------------+ +| autoTap | -- | true, if there is a tap regulation apparent and active | ++-----------------+------+------------------------------------------------------------+ Caveats ^^^^^^^ From 644428e635fe28499f155c0aafcdb86aa6a016a4 Mon Sep 17 00:00:00 2001 From: t-ober <63147366+t-ober@users.noreply.github.com> Date: Mon, 7 Jun 2021 10:24:12 +0200 Subject: [PATCH 042/157] update stable release version --- docs/readthedocs/gettingstarted.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/readthedocs/gettingstarted.rst b/docs/readthedocs/gettingstarted.rst index 768aa8800..e1ccfcfdb 100644 --- a/docs/readthedocs/gettingstarted.rst +++ b/docs/readthedocs/gettingstarted.rst @@ -25,7 +25,7 @@ On `Maven central com.github.ie3-institute PowerSystemDataModel - 1.1.0 + 2.0.0 Snapshot releases From dd7ac52dd67d96e232871f9ee840de8a7644c8d4 Mon Sep 17 00:00:00 2001 From: "Kittl, Chris" Date: Mon, 7 Jun 2021 17:09:12 +0200 Subject: [PATCH 043/157] Correctly escaping windows file separator in time series regex pattern --- .../java/edu/ie3/datamodel/io/IoUtil.java | 29 ++++++++ .../io/connectors/CsvFileConnector.java | 13 ++-- .../io/naming/FileNamingStrategy.java | 68 ++++++++++++------- .../timeseries/TimeSeriesProcessor.java | 6 +- .../io/source/csv/CsvDataSource.java | 8 +-- .../io/source/csv/CsvIdCoordinateSource.java | 2 +- .../io/source/csv/CsvWeatherSource.java | 2 +- .../input/container/GraphicElements.java | 6 +- .../input/container/RawGridElements.java | 18 ++--- .../input/container/SystemParticipants.java | 30 +++----- .../chargingpoint/ChargingPointTypeUtils.java | 3 +- .../utils/ContainerNodeUpdateUtil.java | 4 +- .../io/naming/FileNamingStrategyTest.groovy | 6 +- 13 files changed, 108 insertions(+), 87 deletions(-) create mode 100644 src/main/java/edu/ie3/datamodel/io/IoUtil.java diff --git a/src/main/java/edu/ie3/datamodel/io/IoUtil.java b/src/main/java/edu/ie3/datamodel/io/IoUtil.java new file mode 100644 index 000000000..59a39c282 --- /dev/null +++ b/src/main/java/edu/ie3/datamodel/io/IoUtil.java @@ -0,0 +1,29 @@ +/* + * © 2021. TU Dortmund University, + * Institute of Energy Systems, Energy Efficiency and Energy Economics, + * Research group Distribution grid planning and operation +*/ +package edu.ie3.datamodel.io; + +import java.io.File; + +public class IoUtil { + private static final String FILE_SEPARATOR_REGEX = "[\\\\/]"; + private static final String FILE_SEPARATOR_REPLACEMENT = + File.separator.equals("\\") ? "\\\\" : "/"; + + private IoUtil() { + throw new IllegalStateException("Utility classes cannot be instantiated"); + } + + /** + * Ensure to have harmonized file separator across the whole String. Will replace all occurences + * if "\" and "/" by the systems file separator + * + * @param in The String to harmonize + * @return The harmonized String + */ + public static String harmonizeFileSeparator(String in) { + return in.replaceAll(FILE_SEPARATOR_REGEX, FILE_SEPARATOR_REPLACEMENT); + } +} diff --git a/src/main/java/edu/ie3/datamodel/io/connectors/CsvFileConnector.java b/src/main/java/edu/ie3/datamodel/io/connectors/CsvFileConnector.java index b4badf969..56cb52179 100644 --- a/src/main/java/edu/ie3/datamodel/io/connectors/CsvFileConnector.java +++ b/src/main/java/edu/ie3/datamodel/io/connectors/CsvFileConnector.java @@ -6,6 +6,7 @@ package edu.ie3.datamodel.io.connectors; import edu.ie3.datamodel.exceptions.ConnectorException; +import edu.ie3.datamodel.io.IoUtil; import edu.ie3.datamodel.io.csv.*; import edu.ie3.datamodel.io.csv.timeseries.ColumnScheme; import edu.ie3.datamodel.io.csv.timeseries.IndividualTimeSeriesMetaInformation; @@ -45,9 +46,6 @@ public class CsvFileConnector implements DataConnector { private final String baseDirectoryName; private static final String FILE_ENDING = ".csv"; - private static final String FILE_SEPARATOR_REGEX = "[\\\\/]"; - private static final String FILE_SEPARATOR_REPLACEMENT = - File.separator.equals("\\") ? "\\\\" : "/"; public CsvFileConnector(String baseDirectoryName, FileNamingStrategy fileNamingStrategy) { this.baseDirectoryName = baseDirectoryName; @@ -106,8 +104,7 @@ BufferedCsvWriter getOrInitWriter(T timeSeries, String[] headerElements, String private BufferedCsvWriter initWriter(String baseDirectory, CsvFileDefinition fileDefinition) throws ConnectorException, IOException { /* Join the full DIRECTORY path (excluding file name) */ - String baseDirectoryHarmonized = - baseDirectory.replaceAll(FILE_SEPARATOR_REGEX, FILE_SEPARATOR_REPLACEMENT); + String baseDirectoryHarmonized = IoUtil.harmonizeFileSeparator(baseDirectory); String fullDirectoryPath = FilenameUtils.concat(baseDirectoryHarmonized, fileDefinition.getDirectoryPath()); String fullPath = FilenameUtils.concat(baseDirectoryHarmonized, fileDefinition.getFilePath()); @@ -202,8 +199,7 @@ public Optional getIndividualTimeSeriesMeta */ private Map buildIndividualTimeSeriesMetaInformation() { - return getIndividualTimeSeriesFilePaths() - .parallelStream() + return getIndividualTimeSeriesFilePaths().parallelStream() .map( filePath -> { /* Extract meta information from file path and enhance it with the file path itself */ @@ -227,8 +223,7 @@ public Optional getIndividualTimeSeriesMeta */ public Map> getCsvIndividualTimeSeriesMetaInformation(ColumnScheme... columnSchemes) { - return getIndividualTimeSeriesFilePaths() - .parallelStream() + return getIndividualTimeSeriesFilePaths().parallelStream() .map( pathString -> { String filePathWithoutEnding = removeFileEnding(pathString); diff --git a/src/main/java/edu/ie3/datamodel/io/naming/FileNamingStrategy.java b/src/main/java/edu/ie3/datamodel/io/naming/FileNamingStrategy.java index da321ea26..371f79757 100644 --- a/src/main/java/edu/ie3/datamodel/io/naming/FileNamingStrategy.java +++ b/src/main/java/edu/ie3/datamodel/io/naming/FileNamingStrategy.java @@ -5,6 +5,7 @@ */ package edu.ie3.datamodel.io.naming; +import edu.ie3.datamodel.io.IoUtil; import edu.ie3.datamodel.io.csv.FileNameMetaInformation; import edu.ie3.datamodel.models.UniqueEntity; import edu.ie3.datamodel.models.timeseries.TimeSeries; @@ -78,8 +79,7 @@ public Optional getFilePath(Class cls) { // do not adapt orElseGet, see https://www.baeldung.com/java-optional-or-else-vs-or-else-get for // details return getFilePath( - entityNamingStrategy.getEntityName(cls).orElseGet(() -> ""), - getDirectoryPath(cls).orElseGet(() -> "")); + entityNamingStrategy.getEntityName(cls).orElse(""), getDirectoryPath(cls).orElse("")); } /** @@ -97,8 +97,8 @@ Optional getFilePath(T timeSeries) { // do not adapt orElseGet, see https://www.baeldung.com/java-optional-or-else-vs-or-else-get for // details return getFilePath( - entityNamingStrategy.getEntityName(timeSeries).orElseGet(() -> ""), - getDirectoryPath(timeSeries).orElseGet(() -> "")); + entityNamingStrategy.getEntityName(timeSeries).orElse(""), + getDirectoryPath(timeSeries).orElse("")); } /** @@ -132,11 +132,11 @@ public Optional getDirectoryPath(Class cls) { } else { /* Make sure, the directory path does not start or end with file separator and in between the separator is harmonized */ directoryPath = - maybeDirectoryName - .get() - .replaceFirst("^" + FILE_SEPARATOR_REGEX, "") - .replaceAll(FILE_SEPARATOR_REGEX + "$", "") - .replaceAll(FILE_SEPARATOR_REGEX, FILE_SEPARATOR_REPLACEMENT); + IoUtil.harmonizeFileSeparator( + maybeDirectoryName + .get() + .replaceFirst("^" + FILE_SEPARATOR_REGEX, "") + .replaceAll(FILE_SEPARATOR_REGEX + "$", "")); return Optional.of(directoryPath); } } @@ -161,33 +161,49 @@ Optional getDirectoryPath(T timeSeries) { } else { /* Make sure, the directory path does not start or end with file separator and in between the separator is harmonized */ directoryPath = - maybeDirectoryName - .get() - .replaceFirst("^" + FILE_SEPARATOR_REGEX, "") - .replaceAll(FILE_SEPARATOR_REGEX + "$", "") - .replaceAll(FILE_SEPARATOR_REGEX, FILE_SEPARATOR_REPLACEMENT); + IoUtil.harmonizeFileSeparator( + maybeDirectoryName + .get() + .replaceFirst("^" + FILE_SEPARATOR_REGEX, "") + .replaceAll(FILE_SEPARATOR_REGEX + "$", "")); return Optional.of(directoryPath); } } public Pattern getIndividualTimeSeriesPattern() { String subDirectory = directoryHierarchy.getSubDirectory(IndividualTimeSeries.class).orElse(""); - return subDirectory.isEmpty() - ? entityNamingStrategy.getIndividualTimeSeriesPattern() - : Pattern.compile( - subDirectory.replaceAll(FILE_SEPARATOR_REGEX, FILE_SEPARATOR_REPLACEMENT) - + FILE_SEPARATOR_REPLACEMENT - + entityNamingStrategy.getIndividualTimeSeriesPattern().pattern()); + + if (subDirectory.isEmpty()) { + return entityNamingStrategy.getIndividualTimeSeriesPattern(); + } else { + /* Build the pattern by joining the sub directory with the file name pattern, harmonizing file separators and + * finally escaping them */ + String joined = + FilenameUtils.concat( + subDirectory, entityNamingStrategy.getIndividualTimeSeriesPattern().pattern()); + String harmonized = IoUtil.harmonizeFileSeparator(joined); + String escaped = harmonized.replace("\\", "\\\\"); + + return Pattern.compile(escaped); + } } public Pattern getLoadProfileTimeSeriesPattern() { String subDirectory = directoryHierarchy.getSubDirectory(LoadProfileInput.class).orElse(""); - return subDirectory.isEmpty() - ? entityNamingStrategy.getLoadProfileTimeSeriesPattern() - : Pattern.compile( - subDirectory.replaceAll(FILE_SEPARATOR_REGEX, FILE_SEPARATOR_REPLACEMENT) - + FILE_SEPARATOR_REPLACEMENT - + entityNamingStrategy.getLoadProfileTimeSeriesPattern().pattern()); + + if (subDirectory.isEmpty()) { + return entityNamingStrategy.getLoadProfileTimeSeriesPattern(); + } else { + /* Build the pattern by joining the sub directory with the file name pattern, harmonizing file separators and + * finally escaping them */ + String joined = + FilenameUtils.concat( + subDirectory, entityNamingStrategy.getLoadProfileTimeSeriesPattern().pattern()); + String harmonized = IoUtil.harmonizeFileSeparator(joined); + String escaped = harmonized.replace("\\", "\\\\"); + + return Pattern.compile(escaped); + } } /** diff --git a/src/main/java/edu/ie3/datamodel/io/processor/timeseries/TimeSeriesProcessor.java b/src/main/java/edu/ie3/datamodel/io/processor/timeseries/TimeSeriesProcessor.java index af29f3dca..0a2bf66b3 100644 --- a/src/main/java/edu/ie3/datamodel/io/processor/timeseries/TimeSeriesProcessor.java +++ b/src/main/java/edu/ie3/datamodel/io/processor/timeseries/TimeSeriesProcessor.java @@ -106,7 +106,8 @@ private SortedMap buildFieldToSource( Class timeSeriesClass, Class entryClass, Class valueClass) { /* Get the mapping from field name to getter method ignoring the getter for returning all entries */ Map timeSeriesMapping = - mapFieldNameToGetter(timeSeriesClass, Arrays.asList("entries", "uuid", "type")).entrySet() + mapFieldNameToGetter(timeSeriesClass, Arrays.asList("entries", "uuid", "type")) + .entrySet() .stream() .collect( Collectors.toMap( @@ -136,7 +137,8 @@ private SortedMap buildFieldToSource( mapFieldNameToGetter( valueClass, Arrays.asList("solarIrradiance", "temperature", "wind")) - .entrySet().stream() + .entrySet() + .stream() .map( entry -> new AbstractMap.SimpleEntry<>( diff --git a/src/main/java/edu/ie3/datamodel/io/source/csv/CsvDataSource.java b/src/main/java/edu/ie3/datamodel/io/source/csv/CsvDataSource.java index c53a7ce78..928fa9fa6 100644 --- a/src/main/java/edu/ie3/datamodel/io/source/csv/CsvDataSource.java +++ b/src/main/java/edu/ie3/datamodel/io/source/csv/CsvDataSource.java @@ -391,10 +391,7 @@ protected Stream> buildStreamWithFieldsToAttributesMap( Collection> allRows = csvRowFieldValueMapping(reader, headline); return distinctRowsWithLog( - allRows, - fieldToValues -> fieldToValues.get("uuid"), - entityClass.getSimpleName(), - "UUID") + allRows, fieldToValues -> fieldToValues.get("uuid"), entityClass.getSimpleName(), "UUID") .parallelStream(); } catch (IOException e) { log.warn( @@ -453,8 +450,7 @@ protected Set> distinctRowsWithLog( /* Check for rows with the same key based on the provided key extractor function */ Set> distinctIdSet = - allRowsSet - .parallelStream() + allRowsSet.parallelStream() .filter(ValidationUtils.distinctByKey(keyExtractor)) .collect(Collectors.toSet()); if (distinctIdSet.size() != allRowsSet.size()) { diff --git a/src/main/java/edu/ie3/datamodel/io/source/csv/CsvIdCoordinateSource.java b/src/main/java/edu/ie3/datamodel/io/source/csv/CsvIdCoordinateSource.java index 6a9abf4cc..822dae3bb 100644 --- a/src/main/java/edu/ie3/datamodel/io/source/csv/CsvIdCoordinateSource.java +++ b/src/main/java/edu/ie3/datamodel/io/source/csv/CsvIdCoordinateSource.java @@ -123,7 +123,7 @@ protected Stream> buildStreamWithFieldsToAttributesMap() { .get(factory.getLatField()) .concat(fieldToValues.get(factory.getLonField())); return distinctRowsWithLog( - withDistinctCoordinateId, coordinateExtractor, "coordinate id mapping", "coordinate") + withDistinctCoordinateId, coordinateExtractor, "coordinate id mapping", "coordinate") .parallelStream(); } catch (IOException e) { log.error("Cannot read the file for coordinate id to coordinate mapping.", e); diff --git a/src/main/java/edu/ie3/datamodel/io/source/csv/CsvWeatherSource.java b/src/main/java/edu/ie3/datamodel/io/source/csv/CsvWeatherSource.java index 69d322f6c..6a3e2bdda 100644 --- a/src/main/java/edu/ie3/datamodel/io/source/csv/CsvWeatherSource.java +++ b/src/main/java/edu/ie3/datamodel/io/source/csv/CsvWeatherSource.java @@ -253,7 +253,7 @@ protected Stream> buildStreamWithFieldsToAttributesMap( .get(weatherFactory.getTimeFieldString()) .concat(fieldToValues.get(weatherFactory.getCoordinateIdFieldString())); return distinctRowsWithLog( - allRows, timeCoordinateIdExtractor, entityClass.getSimpleName(), "UUID") + allRows, timeCoordinateIdExtractor, entityClass.getSimpleName(), "UUID") .parallelStream(); } catch (IOException e) { diff --git a/src/main/java/edu/ie3/datamodel/models/input/container/GraphicElements.java b/src/main/java/edu/ie3/datamodel/models/input/container/GraphicElements.java index af0d4d9fd..60434f9a8 100644 --- a/src/main/java/edu/ie3/datamodel/models/input/container/GraphicElements.java +++ b/src/main/java/edu/ie3/datamodel/models/input/container/GraphicElements.java @@ -48,14 +48,12 @@ public GraphicElements(List graphics) { /* init sets */ this.nodeGraphics = - graphics - .parallelStream() + graphics.parallelStream() .filter(graphic -> graphic instanceof NodeGraphicInput) .map(graphic -> (NodeGraphicInput) graphic) .collect(Collectors.toSet()); this.lineGraphics = - graphics - .parallelStream() + graphics.parallelStream() .filter(graphic -> graphic instanceof LineGraphicInput) .map(graphic -> (LineGraphicInput) graphic) .collect(Collectors.toSet()); diff --git a/src/main/java/edu/ie3/datamodel/models/input/container/RawGridElements.java b/src/main/java/edu/ie3/datamodel/models/input/container/RawGridElements.java index 4f0abc3e9..b8806a63d 100644 --- a/src/main/java/edu/ie3/datamodel/models/input/container/RawGridElements.java +++ b/src/main/java/edu/ie3/datamodel/models/input/container/RawGridElements.java @@ -84,38 +84,32 @@ public RawGridElements(List rawGridElements) { /* init sets */ this.nodes = - rawGridElements - .parallelStream() + rawGridElements.parallelStream() .filter(gridElement -> gridElement instanceof NodeInput) .map(nodeInput -> (NodeInput) nodeInput) .collect(Collectors.toSet()); this.lines = - rawGridElements - .parallelStream() + rawGridElements.parallelStream() .filter(gridElement -> gridElement instanceof LineInput) .map(lineInput -> (LineInput) lineInput) .collect(Collectors.toSet()); this.transformer2Ws = - rawGridElements - .parallelStream() + rawGridElements.parallelStream() .filter(gridElement -> gridElement instanceof Transformer2WInput) .map(trafo2wInput -> (Transformer2WInput) trafo2wInput) .collect(Collectors.toSet()); this.transformer3Ws = - rawGridElements - .parallelStream() + rawGridElements.parallelStream() .filter(gridElement -> gridElement instanceof Transformer3WInput) .map(trafo3wInput -> (Transformer3WInput) trafo3wInput) .collect(Collectors.toSet()); this.switches = - rawGridElements - .parallelStream() + rawGridElements.parallelStream() .filter(gridElement -> gridElement instanceof SwitchInput) .map(switchInput -> (SwitchInput) switchInput) .collect(Collectors.toSet()); this.measurementUnits = - rawGridElements - .parallelStream() + rawGridElements.parallelStream() .filter(gridElement -> gridElement instanceof MeasurementUnitInput) .map(measurementUnitInput -> (MeasurementUnitInput) measurementUnitInput) .collect(Collectors.toSet()); diff --git a/src/main/java/edu/ie3/datamodel/models/input/container/SystemParticipants.java b/src/main/java/edu/ie3/datamodel/models/input/container/SystemParticipants.java index 8a47b4995..28550d86a 100644 --- a/src/main/java/edu/ie3/datamodel/models/input/container/SystemParticipants.java +++ b/src/main/java/edu/ie3/datamodel/models/input/container/SystemParticipants.java @@ -106,62 +106,52 @@ public SystemParticipants(List systemParticipants) { /* init sets */ this.bmPlants = - systemParticipants - .parallelStream() + systemParticipants.parallelStream() .filter(gridElement -> gridElement instanceof BmInput) .map(bmInput -> (BmInput) bmInput) .collect(Collectors.toSet()); this.chpPlants = - systemParticipants - .parallelStream() + systemParticipants.parallelStream() .filter(gridElement -> gridElement instanceof ChpInput) .map(chpInput -> (ChpInput) chpInput) .collect(Collectors.toSet()); this.evCS = - systemParticipants - .parallelStream() + systemParticipants.parallelStream() .filter(gridElement -> gridElement instanceof EvcsInput) .map(evcsInput -> (EvcsInput) evcsInput) .collect(Collectors.toSet()); this.evs = - systemParticipants - .parallelStream() + systemParticipants.parallelStream() .filter(gridElement -> gridElement instanceof EvInput) .map(evInput -> (EvInput) evInput) .collect(Collectors.toSet()); this.fixedFeedIns = - systemParticipants - .parallelStream() + systemParticipants.parallelStream() .filter(gridElement -> gridElement instanceof FixedFeedInInput) .map(fixedFeedInInpu -> (FixedFeedInInput) fixedFeedInInpu) .collect(Collectors.toSet()); this.heatPumps = - systemParticipants - .parallelStream() + systemParticipants.parallelStream() .filter(gridElement -> gridElement instanceof HpInput) .map(hpInput -> (HpInput) hpInput) .collect(Collectors.toSet()); this.loads = - systemParticipants - .parallelStream() + systemParticipants.parallelStream() .filter(gridElement -> gridElement instanceof LoadInput) .map(loadInput -> (LoadInput) loadInput) .collect(Collectors.toSet()); this.pvPlants = - systemParticipants - .parallelStream() + systemParticipants.parallelStream() .filter(gridElement -> gridElement instanceof PvInput) .map(pvInput -> (PvInput) pvInput) .collect(Collectors.toSet()); this.storages = - systemParticipants - .parallelStream() + systemParticipants.parallelStream() .filter(gridElement -> gridElement instanceof StorageInput) .map(storageInput -> (StorageInput) storageInput) .collect(Collectors.toSet()); this.wecPlants = - systemParticipants - .parallelStream() + systemParticipants.parallelStream() .filter(gridElement -> gridElement instanceof WecInput) .map(wecInput -> (WecInput) wecInput) .collect(Collectors.toSet()); diff --git a/src/main/java/edu/ie3/datamodel/models/input/system/type/chargingpoint/ChargingPointTypeUtils.java b/src/main/java/edu/ie3/datamodel/models/input/system/type/chargingpoint/ChargingPointTypeUtils.java index 6825a3c0f..e72de1aba 100644 --- a/src/main/java/edu/ie3/datamodel/models/input/system/type/chargingpoint/ChargingPointTypeUtils.java +++ b/src/main/java/edu/ie3/datamodel/models/input/system/type/chargingpoint/ChargingPointTypeUtils.java @@ -142,7 +142,8 @@ private ChargingPointTypeUtils() { Stream.concat( Stream.of(type.getId().toLowerCase()), type.getSynonymousIds().stream().map(String::toLowerCase)) - .collect(Collectors.toMap(Function.identity(), v -> type)).entrySet() + .collect(Collectors.toMap(Function.identity(), v -> type)) + .entrySet() .stream()) .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue))); diff --git a/src/main/java/edu/ie3/datamodel/utils/ContainerNodeUpdateUtil.java b/src/main/java/edu/ie3/datamodel/utils/ContainerNodeUpdateUtil.java index 5286f78af..f641adccf 100644 --- a/src/main/java/edu/ie3/datamodel/utils/ContainerNodeUpdateUtil.java +++ b/src/main/java/edu/ie3/datamodel/utils/ContainerNodeUpdateUtil.java @@ -207,9 +207,7 @@ private static SystemParticipants updateSystemParticipantsWithNodes( SystemParticipants systemParticipants, Map oldToNewNodes) { List sysParts = - systemParticipants - .allEntitiesAsList() - .parallelStream() + systemParticipants.allEntitiesAsList().parallelStream() .map( sysPart -> { if (oldToNewNodes.containsKey(sysPart.getNode())) { diff --git a/src/test/groovy/edu/ie3/datamodel/io/naming/FileNamingStrategyTest.groovy b/src/test/groovy/edu/ie3/datamodel/io/naming/FileNamingStrategyTest.groovy index b38025ba0..83c8a6967 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/naming/FileNamingStrategyTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/naming/FileNamingStrategyTest.groovy @@ -761,6 +761,8 @@ class FileNamingStrategyTest extends Specification { IndividualTimeSeries | UUID.fromString("4881fda2-bcee-4f4f-a5bb-6a09bf785276") || "its_c_4881fda2-bcee-4f4f-a5bb-6a09bf785276" } + String escapedFileSeparator = File.separator == "\\" ? "\\\\" : File.separator + def "A FileNamingStrategy with DefaultHierarchy returns correct individual time series file name pattern"() { given: def strategy = new FileNamingStrategy(simpleEntityNaming, defaultHierarchy) @@ -769,7 +771,7 @@ class FileNamingStrategyTest extends Specification { def actual = strategy.individualTimeSeriesPattern.pattern() then: - actual == "test_grid" + File.separator + "input" + File.separator + "participants" + File.separator + "time_series" + File.separator + "its_(?[a-zA-Z]{1,11})_(?[a-zA-Z0-9]{8}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{12})" + actual == "test_grid" + escapedFileSeparator + "input" + escapedFileSeparator + "participants" + escapedFileSeparator + "time_series" + escapedFileSeparator + "its_(?[a-zA-Z]{1,11})_(?[a-zA-Z0-9]{8}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{12})" } def "A FileNamingStrategy with DefaultHierarchy returns correct load profile time series file name pattern"() { @@ -780,7 +782,7 @@ class FileNamingStrategyTest extends Specification { def actual = strategy.loadProfileTimeSeriesPattern.pattern() then: - actual == "test_grid" + File.separator + "input" + File.separator + "global" + File.separator + "lpts_(?[a-zA-Z][0-9])_(?[a-zA-Z0-9]{8}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{12})" + actual == "test_grid" + escapedFileSeparator + "input" + escapedFileSeparator + "global" + escapedFileSeparator + "lpts_(?[a-zA-Z][0-9])_(?[a-zA-Z0-9]{8}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{12})" } def "A FileNamingStrategy with FlatHierarchy returns correct individual time series file name pattern"() { From a9b99118608942ab8ef79596e8327ccd75eacb34 Mon Sep 17 00:00:00 2001 From: Niklas Steffan Date: Tue, 8 Jun 2021 09:40:10 +0200 Subject: [PATCH 044/157] used IoUtil regex in FileNamingStrategy and CsvFileDefinition --- .../java/edu/ie3/datamodel/io/IoUtil.java | 4 +-- .../io/connectors/CsvFileConnector.java | 6 ++-- .../datamodel/io/csv/CsvFileDefinition.java | 11 +++---- .../io/naming/FileNamingStrategy.java | 13 +++----- .../timeseries/TimeSeriesProcessor.java | 6 ++-- .../io/source/csv/CsvDataSource.java | 8 +++-- .../io/source/csv/CsvIdCoordinateSource.java | 2 +- .../io/source/csv/CsvWeatherSource.java | 2 +- .../input/container/GraphicElements.java | 6 ++-- .../input/container/RawGridElements.java | 18 +++++++---- .../input/container/SystemParticipants.java | 30 ++++++++++++------- .../chargingpoint/ChargingPointTypeUtils.java | 3 +- .../utils/ContainerNodeUpdateUtil.java | 4 ++- 13 files changed, 64 insertions(+), 49 deletions(-) diff --git a/src/main/java/edu/ie3/datamodel/io/IoUtil.java b/src/main/java/edu/ie3/datamodel/io/IoUtil.java index 59a39c282..ddda0c8fa 100644 --- a/src/main/java/edu/ie3/datamodel/io/IoUtil.java +++ b/src/main/java/edu/ie3/datamodel/io/IoUtil.java @@ -8,8 +8,8 @@ import java.io.File; public class IoUtil { - private static final String FILE_SEPARATOR_REGEX = "[\\\\/]"; - private static final String FILE_SEPARATOR_REPLACEMENT = + public static final String FILE_SEPARATOR_REGEX = "[\\\\/]"; + public static final String FILE_SEPARATOR_REPLACEMENT = File.separator.equals("\\") ? "\\\\" : "/"; private IoUtil() { diff --git a/src/main/java/edu/ie3/datamodel/io/connectors/CsvFileConnector.java b/src/main/java/edu/ie3/datamodel/io/connectors/CsvFileConnector.java index 56cb52179..0f0c8ad73 100644 --- a/src/main/java/edu/ie3/datamodel/io/connectors/CsvFileConnector.java +++ b/src/main/java/edu/ie3/datamodel/io/connectors/CsvFileConnector.java @@ -199,7 +199,8 @@ public Optional getIndividualTimeSeriesMeta */ private Map buildIndividualTimeSeriesMetaInformation() { - return getIndividualTimeSeriesFilePaths().parallelStream() + return getIndividualTimeSeriesFilePaths() + .parallelStream() .map( filePath -> { /* Extract meta information from file path and enhance it with the file path itself */ @@ -223,7 +224,8 @@ public Optional getIndividualTimeSeriesMeta */ public Map> getCsvIndividualTimeSeriesMetaInformation(ColumnScheme... columnSchemes) { - return getIndividualTimeSeriesFilePaths().parallelStream() + return getIndividualTimeSeriesFilePaths() + .parallelStream() .map( pathString -> { String filePathWithoutEnding = removeFileEnding(pathString); diff --git a/src/main/java/edu/ie3/datamodel/io/csv/CsvFileDefinition.java b/src/main/java/edu/ie3/datamodel/io/csv/CsvFileDefinition.java index e44bfed3a..5e103d1e6 100644 --- a/src/main/java/edu/ie3/datamodel/io/csv/CsvFileDefinition.java +++ b/src/main/java/edu/ie3/datamodel/io/csv/CsvFileDefinition.java @@ -5,7 +5,7 @@ */ package edu.ie3.datamodel.io.csv; -import java.io.File; +import edu.ie3.datamodel.io.IoUtil; import java.util.Arrays; import java.util.Objects; import java.util.regex.Matcher; @@ -17,9 +17,6 @@ public class CsvFileDefinition { private static final Logger logger = LoggerFactory.getLogger(CsvFileDefinition.class); - private static final String FILE_SEPARATOR_REGEX = "[\\\\/]"; - private static final String FILE_SEPARATOR_REPLACEMENT = - File.separator.equals("\\") ? "\\\\" : "/"; private static final Pattern FILE_NAME_PATTERN = Pattern.compile( "^(?[^\\\\/\\s.]{0,255})(?:\\.(?[a-zA-Z0-9]{0,10}(?:\\.[a-zA-Z0-9]{0,10})?))?$"); @@ -37,9 +34,9 @@ public CsvFileDefinition( this.directoryPath = Objects.nonNull(directoryPath) ? directoryPath - .replaceFirst("^" + FILE_SEPARATOR_REGEX, "") - .replaceAll(FILE_SEPARATOR_REGEX + "$", "") - .replaceAll(FILE_SEPARATOR_REGEX, FILE_SEPARATOR_REPLACEMENT) + .replaceFirst("^" + IoUtil.FILE_SEPARATOR_REGEX, "") + .replaceAll(IoUtil.FILE_SEPARATOR_REGEX + "$", "") + .replaceAll(IoUtil.FILE_SEPARATOR_REGEX, IoUtil.FILE_SEPARATOR_REPLACEMENT) : ""; /* Check the given information of the file name */ diff --git a/src/main/java/edu/ie3/datamodel/io/naming/FileNamingStrategy.java b/src/main/java/edu/ie3/datamodel/io/naming/FileNamingStrategy.java index 371f79757..36da8ee1f 100644 --- a/src/main/java/edu/ie3/datamodel/io/naming/FileNamingStrategy.java +++ b/src/main/java/edu/ie3/datamodel/io/naming/FileNamingStrategy.java @@ -13,7 +13,6 @@ import edu.ie3.datamodel.models.timeseries.individual.IndividualTimeSeries; import edu.ie3.datamodel.models.timeseries.repetitive.LoadProfileInput; import edu.ie3.datamodel.models.value.Value; -import java.io.File; import java.util.Optional; import java.util.regex.Pattern; import org.apache.commons.io.FilenameUtils; @@ -28,10 +27,6 @@ public class FileNamingStrategy { protected static final Logger logger = LogManager.getLogger(FileNamingStrategy.class); - private static final String FILE_SEPARATOR_REGEX = "[\\\\/]"; - private static final String FILE_SEPARATOR_REPLACEMENT = - File.separator.equals("\\") ? "\\\\" : "/"; - private final EntityNamingStrategy entityNamingStrategy; private final DirectoryHierarchy directoryHierarchy; @@ -135,8 +130,8 @@ public Optional getDirectoryPath(Class cls) { IoUtil.harmonizeFileSeparator( maybeDirectoryName .get() - .replaceFirst("^" + FILE_SEPARATOR_REGEX, "") - .replaceAll(FILE_SEPARATOR_REGEX + "$", "")); + .replaceFirst("^" + IoUtil.FILE_SEPARATOR_REGEX, "") + .replaceAll(IoUtil.FILE_SEPARATOR_REGEX + "$", "")); return Optional.of(directoryPath); } } @@ -164,8 +159,8 @@ Optional getDirectoryPath(T timeSeries) { IoUtil.harmonizeFileSeparator( maybeDirectoryName .get() - .replaceFirst("^" + FILE_SEPARATOR_REGEX, "") - .replaceAll(FILE_SEPARATOR_REGEX + "$", "")); + .replaceFirst("^" + IoUtil.FILE_SEPARATOR_REGEX, "") + .replaceAll(IoUtil.FILE_SEPARATOR_REGEX + "$", "")); return Optional.of(directoryPath); } } diff --git a/src/main/java/edu/ie3/datamodel/io/processor/timeseries/TimeSeriesProcessor.java b/src/main/java/edu/ie3/datamodel/io/processor/timeseries/TimeSeriesProcessor.java index 0a2bf66b3..af29f3dca 100644 --- a/src/main/java/edu/ie3/datamodel/io/processor/timeseries/TimeSeriesProcessor.java +++ b/src/main/java/edu/ie3/datamodel/io/processor/timeseries/TimeSeriesProcessor.java @@ -106,8 +106,7 @@ private SortedMap buildFieldToSource( Class timeSeriesClass, Class entryClass, Class valueClass) { /* Get the mapping from field name to getter method ignoring the getter for returning all entries */ Map timeSeriesMapping = - mapFieldNameToGetter(timeSeriesClass, Arrays.asList("entries", "uuid", "type")) - .entrySet() + mapFieldNameToGetter(timeSeriesClass, Arrays.asList("entries", "uuid", "type")).entrySet() .stream() .collect( Collectors.toMap( @@ -137,8 +136,7 @@ private SortedMap buildFieldToSource( mapFieldNameToGetter( valueClass, Arrays.asList("solarIrradiance", "temperature", "wind")) - .entrySet() - .stream() + .entrySet().stream() .map( entry -> new AbstractMap.SimpleEntry<>( diff --git a/src/main/java/edu/ie3/datamodel/io/source/csv/CsvDataSource.java b/src/main/java/edu/ie3/datamodel/io/source/csv/CsvDataSource.java index 928fa9fa6..c53a7ce78 100644 --- a/src/main/java/edu/ie3/datamodel/io/source/csv/CsvDataSource.java +++ b/src/main/java/edu/ie3/datamodel/io/source/csv/CsvDataSource.java @@ -391,7 +391,10 @@ protected Stream> buildStreamWithFieldsToAttributesMap( Collection> allRows = csvRowFieldValueMapping(reader, headline); return distinctRowsWithLog( - allRows, fieldToValues -> fieldToValues.get("uuid"), entityClass.getSimpleName(), "UUID") + allRows, + fieldToValues -> fieldToValues.get("uuid"), + entityClass.getSimpleName(), + "UUID") .parallelStream(); } catch (IOException e) { log.warn( @@ -450,7 +453,8 @@ protected Set> distinctRowsWithLog( /* Check for rows with the same key based on the provided key extractor function */ Set> distinctIdSet = - allRowsSet.parallelStream() + allRowsSet + .parallelStream() .filter(ValidationUtils.distinctByKey(keyExtractor)) .collect(Collectors.toSet()); if (distinctIdSet.size() != allRowsSet.size()) { diff --git a/src/main/java/edu/ie3/datamodel/io/source/csv/CsvIdCoordinateSource.java b/src/main/java/edu/ie3/datamodel/io/source/csv/CsvIdCoordinateSource.java index 822dae3bb..6a9abf4cc 100644 --- a/src/main/java/edu/ie3/datamodel/io/source/csv/CsvIdCoordinateSource.java +++ b/src/main/java/edu/ie3/datamodel/io/source/csv/CsvIdCoordinateSource.java @@ -123,7 +123,7 @@ protected Stream> buildStreamWithFieldsToAttributesMap() { .get(factory.getLatField()) .concat(fieldToValues.get(factory.getLonField())); return distinctRowsWithLog( - withDistinctCoordinateId, coordinateExtractor, "coordinate id mapping", "coordinate") + withDistinctCoordinateId, coordinateExtractor, "coordinate id mapping", "coordinate") .parallelStream(); } catch (IOException e) { log.error("Cannot read the file for coordinate id to coordinate mapping.", e); diff --git a/src/main/java/edu/ie3/datamodel/io/source/csv/CsvWeatherSource.java b/src/main/java/edu/ie3/datamodel/io/source/csv/CsvWeatherSource.java index 6a3e2bdda..69d322f6c 100644 --- a/src/main/java/edu/ie3/datamodel/io/source/csv/CsvWeatherSource.java +++ b/src/main/java/edu/ie3/datamodel/io/source/csv/CsvWeatherSource.java @@ -253,7 +253,7 @@ protected Stream> buildStreamWithFieldsToAttributesMap( .get(weatherFactory.getTimeFieldString()) .concat(fieldToValues.get(weatherFactory.getCoordinateIdFieldString())); return distinctRowsWithLog( - allRows, timeCoordinateIdExtractor, entityClass.getSimpleName(), "UUID") + allRows, timeCoordinateIdExtractor, entityClass.getSimpleName(), "UUID") .parallelStream(); } catch (IOException e) { diff --git a/src/main/java/edu/ie3/datamodel/models/input/container/GraphicElements.java b/src/main/java/edu/ie3/datamodel/models/input/container/GraphicElements.java index 60434f9a8..af0d4d9fd 100644 --- a/src/main/java/edu/ie3/datamodel/models/input/container/GraphicElements.java +++ b/src/main/java/edu/ie3/datamodel/models/input/container/GraphicElements.java @@ -48,12 +48,14 @@ public GraphicElements(List graphics) { /* init sets */ this.nodeGraphics = - graphics.parallelStream() + graphics + .parallelStream() .filter(graphic -> graphic instanceof NodeGraphicInput) .map(graphic -> (NodeGraphicInput) graphic) .collect(Collectors.toSet()); this.lineGraphics = - graphics.parallelStream() + graphics + .parallelStream() .filter(graphic -> graphic instanceof LineGraphicInput) .map(graphic -> (LineGraphicInput) graphic) .collect(Collectors.toSet()); diff --git a/src/main/java/edu/ie3/datamodel/models/input/container/RawGridElements.java b/src/main/java/edu/ie3/datamodel/models/input/container/RawGridElements.java index b8806a63d..4f0abc3e9 100644 --- a/src/main/java/edu/ie3/datamodel/models/input/container/RawGridElements.java +++ b/src/main/java/edu/ie3/datamodel/models/input/container/RawGridElements.java @@ -84,32 +84,38 @@ public RawGridElements(List rawGridElements) { /* init sets */ this.nodes = - rawGridElements.parallelStream() + rawGridElements + .parallelStream() .filter(gridElement -> gridElement instanceof NodeInput) .map(nodeInput -> (NodeInput) nodeInput) .collect(Collectors.toSet()); this.lines = - rawGridElements.parallelStream() + rawGridElements + .parallelStream() .filter(gridElement -> gridElement instanceof LineInput) .map(lineInput -> (LineInput) lineInput) .collect(Collectors.toSet()); this.transformer2Ws = - rawGridElements.parallelStream() + rawGridElements + .parallelStream() .filter(gridElement -> gridElement instanceof Transformer2WInput) .map(trafo2wInput -> (Transformer2WInput) trafo2wInput) .collect(Collectors.toSet()); this.transformer3Ws = - rawGridElements.parallelStream() + rawGridElements + .parallelStream() .filter(gridElement -> gridElement instanceof Transformer3WInput) .map(trafo3wInput -> (Transformer3WInput) trafo3wInput) .collect(Collectors.toSet()); this.switches = - rawGridElements.parallelStream() + rawGridElements + .parallelStream() .filter(gridElement -> gridElement instanceof SwitchInput) .map(switchInput -> (SwitchInput) switchInput) .collect(Collectors.toSet()); this.measurementUnits = - rawGridElements.parallelStream() + rawGridElements + .parallelStream() .filter(gridElement -> gridElement instanceof MeasurementUnitInput) .map(measurementUnitInput -> (MeasurementUnitInput) measurementUnitInput) .collect(Collectors.toSet()); diff --git a/src/main/java/edu/ie3/datamodel/models/input/container/SystemParticipants.java b/src/main/java/edu/ie3/datamodel/models/input/container/SystemParticipants.java index 28550d86a..8a47b4995 100644 --- a/src/main/java/edu/ie3/datamodel/models/input/container/SystemParticipants.java +++ b/src/main/java/edu/ie3/datamodel/models/input/container/SystemParticipants.java @@ -106,52 +106,62 @@ public SystemParticipants(List systemParticipants) { /* init sets */ this.bmPlants = - systemParticipants.parallelStream() + systemParticipants + .parallelStream() .filter(gridElement -> gridElement instanceof BmInput) .map(bmInput -> (BmInput) bmInput) .collect(Collectors.toSet()); this.chpPlants = - systemParticipants.parallelStream() + systemParticipants + .parallelStream() .filter(gridElement -> gridElement instanceof ChpInput) .map(chpInput -> (ChpInput) chpInput) .collect(Collectors.toSet()); this.evCS = - systemParticipants.parallelStream() + systemParticipants + .parallelStream() .filter(gridElement -> gridElement instanceof EvcsInput) .map(evcsInput -> (EvcsInput) evcsInput) .collect(Collectors.toSet()); this.evs = - systemParticipants.parallelStream() + systemParticipants + .parallelStream() .filter(gridElement -> gridElement instanceof EvInput) .map(evInput -> (EvInput) evInput) .collect(Collectors.toSet()); this.fixedFeedIns = - systemParticipants.parallelStream() + systemParticipants + .parallelStream() .filter(gridElement -> gridElement instanceof FixedFeedInInput) .map(fixedFeedInInpu -> (FixedFeedInInput) fixedFeedInInpu) .collect(Collectors.toSet()); this.heatPumps = - systemParticipants.parallelStream() + systemParticipants + .parallelStream() .filter(gridElement -> gridElement instanceof HpInput) .map(hpInput -> (HpInput) hpInput) .collect(Collectors.toSet()); this.loads = - systemParticipants.parallelStream() + systemParticipants + .parallelStream() .filter(gridElement -> gridElement instanceof LoadInput) .map(loadInput -> (LoadInput) loadInput) .collect(Collectors.toSet()); this.pvPlants = - systemParticipants.parallelStream() + systemParticipants + .parallelStream() .filter(gridElement -> gridElement instanceof PvInput) .map(pvInput -> (PvInput) pvInput) .collect(Collectors.toSet()); this.storages = - systemParticipants.parallelStream() + systemParticipants + .parallelStream() .filter(gridElement -> gridElement instanceof StorageInput) .map(storageInput -> (StorageInput) storageInput) .collect(Collectors.toSet()); this.wecPlants = - systemParticipants.parallelStream() + systemParticipants + .parallelStream() .filter(gridElement -> gridElement instanceof WecInput) .map(wecInput -> (WecInput) wecInput) .collect(Collectors.toSet()); diff --git a/src/main/java/edu/ie3/datamodel/models/input/system/type/chargingpoint/ChargingPointTypeUtils.java b/src/main/java/edu/ie3/datamodel/models/input/system/type/chargingpoint/ChargingPointTypeUtils.java index e72de1aba..6825a3c0f 100644 --- a/src/main/java/edu/ie3/datamodel/models/input/system/type/chargingpoint/ChargingPointTypeUtils.java +++ b/src/main/java/edu/ie3/datamodel/models/input/system/type/chargingpoint/ChargingPointTypeUtils.java @@ -142,8 +142,7 @@ private ChargingPointTypeUtils() { Stream.concat( Stream.of(type.getId().toLowerCase()), type.getSynonymousIds().stream().map(String::toLowerCase)) - .collect(Collectors.toMap(Function.identity(), v -> type)) - .entrySet() + .collect(Collectors.toMap(Function.identity(), v -> type)).entrySet() .stream()) .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue))); diff --git a/src/main/java/edu/ie3/datamodel/utils/ContainerNodeUpdateUtil.java b/src/main/java/edu/ie3/datamodel/utils/ContainerNodeUpdateUtil.java index f641adccf..5286f78af 100644 --- a/src/main/java/edu/ie3/datamodel/utils/ContainerNodeUpdateUtil.java +++ b/src/main/java/edu/ie3/datamodel/utils/ContainerNodeUpdateUtil.java @@ -207,7 +207,9 @@ private static SystemParticipants updateSystemParticipantsWithNodes( SystemParticipants systemParticipants, Map oldToNewNodes) { List sysParts = - systemParticipants.allEntitiesAsList().parallelStream() + systemParticipants + .allEntitiesAsList() + .parallelStream() .map( sysPart -> { if (oldToNewNodes.containsKey(sysPart.getNode())) { From 17cb2c67f99f324f010b68a844759083a7a27054 Mon Sep 17 00:00:00 2001 From: Niklas Steffan Date: Tue, 8 Jun 2021 09:43:33 +0200 Subject: [PATCH 045/157] updated CHANGELOG.md --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 230757336..eff512750 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased/Snapshot] +### Changed +- added desired temperature boundaries to `ThermalHouseInput` + ### Fixed - `CsvSystemParticipantSource#getSystemParticipants()` now correctly returns electric vehicle charging station input models [PR#370](https://github.com/ie3-institute/PowerSystemDataModel/pull/370) From f44742ccaa43401760f481d1ddfdd4a4ae2314ac Mon Sep 17 00:00:00 2001 From: Niklas Steffan Date: Tue, 8 Jun 2021 10:59:38 +0200 Subject: [PATCH 046/157] corrected last bugs --- .../datamodel/models/input/thermal/ThermalHouseInput.java | 8 +++++++- .../testGridFiles/thermal/thermal_house_input.csv | 4 ++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/main/java/edu/ie3/datamodel/models/input/thermal/ThermalHouseInput.java b/src/main/java/edu/ie3/datamodel/models/input/thermal/ThermalHouseInput.java index 95172ea92..63666fcc3 100644 --- a/src/main/java/edu/ie3/datamodel/models/input/thermal/ThermalHouseInput.java +++ b/src/main/java/edu/ie3/datamodel/models/input/thermal/ThermalHouseInput.java @@ -126,7 +126,13 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(super.hashCode(), ethLosses, ethCapa); + return Objects.hash( + super.hashCode(), + ethLosses, + ethCapa, + desiredTemperature, + upperTemperatureLimit, + lowerTemperatureLimit); } @Override diff --git a/src/test/resources/testGridFiles/thermal/thermal_house_input.csv b/src/test/resources/testGridFiles/thermal/thermal_house_input.csv index f5ea59569..6243599b2 100644 --- a/src/test/resources/testGridFiles/thermal/thermal_house_input.csv +++ b/src/test/resources/testGridFiles/thermal/thermal_house_input.csv @@ -1,2 +1,2 @@ -uuid,id,operates_from,operates_until,operator,thermal_bus,eth_losses,eth_capa -717af017-cc69-406f-b452-e022d7fb516a,"test_thermalHouseInput",2020-03-24T15:11:31Z[UTC],2020-03-25T15:11:31Z[UTC],8f9682df-0744-4b58-a122-f0dc730f6510,0d95d7f2-49fb-4d49-8636-383a5220384e,10,20 \ No newline at end of file +uuid,id,operates_from,operates_until,operator,thermal_bus,eth_losses,eth_capa,desired_temperature,upper_temperature_limit,lower_temperature_limit +717af017-cc69-406f-b452-e022d7fb516a,"test_thermalHouseInput",2020-03-24T15:11:31Z[UTC],2020-03-25T15:11:31Z[UTC],8f9682df-0744-4b58-a122-f0dc730f6510,0d95d7f2-49fb-4d49-8636-383a5220384e,10,20,20,25,15 \ No newline at end of file From 4472159979f07c1f83435526f0e479f68aeb5dbe Mon Sep 17 00:00:00 2001 From: Niklas Steffan Date: Tue, 8 Jun 2021 11:10:55 +0200 Subject: [PATCH 047/157] Codacy cleaning --- .../input/thermal/ThermalHouseInputTest.groovy | 12 ++++++------ .../ThermalUnitValidationUtilsTest.groovy | 18 +++++++++--------- .../common/ThermalUnitInputTestData.groovy | 12 ++++++------ 3 files changed, 21 insertions(+), 21 deletions(-) diff --git a/src/test/groovy/edu/ie3/datamodel/models/input/thermal/ThermalHouseInputTest.groovy b/src/test/groovy/edu/ie3/datamodel/models/input/thermal/ThermalHouseInputTest.groovy index 691bdddcd..2af7789d3 100644 --- a/src/test/groovy/edu/ie3/datamodel/models/input/thermal/ThermalHouseInputTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/models/input/thermal/ThermalHouseInputTest.groovy @@ -18,9 +18,9 @@ class ThermalHouseInputTest extends Specification { when: def alteredUnit = thermalHouseInput.copy().ethLosses(ThermalUnitInputTestData.thermalConductance) .ethCapa(ThermalUnitInputTestData.ethCapa) - .desiredTemperature(ThermalUnitInputTestData.desiredTemperature) - .upperTemperatureLimit(ThermalUnitInputTestData.upperTemperatureLimit) - .lowerTemperatureLimit(ThermalUnitInputTestData.lowerTemperatureLimit) + .desiredTemperature(ThermalUnitInputTestData.DESIRED_TEMPERATURE) + .upperTemperatureLimit(ThermalUnitInputTestData.UPPER_TEMPERATURE_LIMIT) + .lowerTemperatureLimit(ThermalUnitInputTestData.LOWER_TEMPERATURE_LIMIT) .thermalBus(ThermalUnitInputTestData.thermalBus).build() @@ -33,9 +33,9 @@ class ThermalHouseInputTest extends Specification { assert thermalBus == thermalHouseInput.thermalBus assert ethLosses == ThermalUnitInputTestData.thermalConductance assert ethCapa == ThermalUnitInputTestData.ethCapa - assert desiredTemperature == ThermalUnitInputTestData.desiredTemperature - assert upperTemperatureLimit == ThermalUnitInputTestData.upperTemperatureLimit - assert lowerTemperatureLimit == ThermalUnitInputTestData.lowerTemperatureLimit + assert desiredTemperature == ThermalUnitInputTestData.DESIRED_TEMPERATURE + assert upperTemperatureLimit == ThermalUnitInputTestData.UPPER_TEMPERATURE_LIMIT + assert lowerTemperatureLimit == ThermalUnitInputTestData.LOWER_TEMPERATURE_LIMIT } } } diff --git a/src/test/groovy/edu/ie3/datamodel/utils/validation/ThermalUnitValidationUtilsTest.groovy b/src/test/groovy/edu/ie3/datamodel/utils/validation/ThermalUnitValidationUtilsTest.groovy index c1a325857..884012b55 100644 --- a/src/test/groovy/edu/ie3/datamodel/utils/validation/ThermalUnitValidationUtilsTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/utils/validation/ThermalUnitValidationUtilsTest.groovy @@ -38,9 +38,9 @@ class ThermalUnitValidationUtilsTest extends Specification { // Specific data for thermal house input private static final ComparableQuantity thermalConductance = Quantities.getQuantity(10, StandardUnits.THERMAL_TRANSMISSION) private static final ComparableQuantity ethCapa = Quantities.getQuantity(20, StandardUnits.HEAT_CAPACITY) - private static final ComparableQuantity desiredTemperature = Quantities.getQuantity(20, StandardUnits.TEMPERATURE) - private static final ComparableQuantity upperTemperatureLimit = Quantities.getQuantity(25, StandardUnits.TEMPERATURE) - private static final ComparableQuantity lowerTemperatureLimit = Quantities.getQuantity(15, StandardUnits.TEMPERATURE) + private static final ComparableQuantity DESIRED_TEMPERATURE = Quantities.getQuantity(20, StandardUnits.TEMPERATURE) + private static final ComparableQuantity UPPER_TEMPERATURE_LIMIT = Quantities.getQuantity(25, StandardUnits.TEMPERATURE) + private static final ComparableQuantity LOWER_TEMPERATURE_LIMIT = Quantities.getQuantity(15, StandardUnits.TEMPERATURE) // Specific data for thermal cylindric storage input private static final ComparableQuantity storageVolumeLvl = Quantities.getQuantity(100, StandardUnits.VOLUME) @@ -72,12 +72,12 @@ class ThermalUnitValidationUtilsTest extends Specification { ex.message == expectedException.message where: - invalidThermalHouse || expectedException - new ThermalHouseInput(thermalUnitUuid, id, operator, operationTime, SystemParticipantTestData.thermalBus, Quantities.getQuantity(-10, StandardUnits.THERMAL_TRANSMISSION), ethCapa, desiredTemperature, upperTemperatureLimit, lowerTemperatureLimit) || new InvalidEntityException("The following quantities have to be zero or positive: -10 kW/K", invalidThermalHouse) - new ThermalHouseInput(thermalUnitUuid, id, operator, operationTime, SystemParticipantTestData.thermalBus, thermalConductance, Quantities.getQuantity(0, StandardUnits.HEAT_CAPACITY), desiredTemperature, upperTemperatureLimit, lowerTemperatureLimit) || new InvalidEntityException("The following quantities have to be positive: 0 kWh/K", invalidThermalHouse) - new ThermalHouseInput(thermalUnitUuid, id, operator, operationTime, SystemParticipantTestData.thermalBus, thermalConductance, ethCapa, Quantities.getQuantity(0, StandardUnits.TEMPERATURE), upperTemperatureLimit, lowerTemperatureLimit) || new InvalidEntityException("Desired temperature must be higher than lower temperature limit and lower than upper temperature limit", invalidThermalHouse) - new ThermalHouseInput(thermalUnitUuid, id, operator, operationTime, SystemParticipantTestData.thermalBus, thermalConductance, ethCapa, desiredTemperature, Quantities.getQuantity(0, StandardUnits.TEMPERATURE), lowerTemperatureLimit) || new InvalidEntityException("Desired temperature must be higher than lower temperature limit and lower than upper temperature limit", invalidThermalHouse) - new ThermalHouseInput(thermalUnitUuid, id, operator, operationTime, SystemParticipantTestData.thermalBus, thermalConductance, ethCapa, desiredTemperature, upperTemperatureLimit, Quantities.getQuantity(30, StandardUnits.TEMPERATURE)) || new InvalidEntityException("Desired temperature must be higher than lower temperature limit and lower than upper temperature limit", invalidThermalHouse) + invalidThermalHouse || expectedException + new ThermalHouseInput(thermalUnitUuid, id, operator, operationTime, SystemParticipantTestData.thermalBus, Quantities.getQuantity(-10, StandardUnits.THERMAL_TRANSMISSION), ethCapa, DESIRED_TEMPERATURE, UPPER_TEMPERATURE_LIMIT, LOWER_TEMPERATURE_LIMIT) || new InvalidEntityException("The following quantities have to be zero or positive: -10 kW/K", invalidThermalHouse) + new ThermalHouseInput(thermalUnitUuid, id, operator, operationTime, SystemParticipantTestData.thermalBus, thermalConductance, Quantities.getQuantity(0, StandardUnits.HEAT_CAPACITY), DESIRED_TEMPERATURE, UPPER_TEMPERATURE_LIMIT, LOWER_TEMPERATURE_LIMIT) || new InvalidEntityException("The following quantities have to be positive: 0 kWh/K", invalidThermalHouse) + new ThermalHouseInput(thermalUnitUuid, id, operator, operationTime, SystemParticipantTestData.thermalBus, thermalConductance, ethCapa, Quantities.getQuantity(0, StandardUnits.TEMPERATURE), UPPER_TEMPERATURE_LIMIT, LOWER_TEMPERATURE_LIMIT) || new InvalidEntityException("Desired temperature must be higher than lower temperature limit and lower than upper temperature limit", invalidThermalHouse) + new ThermalHouseInput(thermalUnitUuid, id, operator, operationTime, SystemParticipantTestData.thermalBus, thermalConductance, ethCapa, DESIRED_TEMPERATURE, Quantities.getQuantity(0, StandardUnits.TEMPERATURE), LOWER_TEMPERATURE_LIMIT) || new InvalidEntityException("Desired temperature must be higher than lower temperature limit and lower than upper temperature limit", invalidThermalHouse) + new ThermalHouseInput(thermalUnitUuid, id, operator, operationTime, SystemParticipantTestData.thermalBus, thermalConductance, ethCapa, DESIRED_TEMPERATURE, UPPER_TEMPERATURE_LIMIT, Quantities.getQuantity(30, StandardUnits.TEMPERATURE)) || new InvalidEntityException("Desired temperature must be higher than lower temperature limit and lower than upper temperature limit", invalidThermalHouse) } // Thermal Cylindrical Storage diff --git a/src/test/groovy/edu/ie3/test/common/ThermalUnitInputTestData.groovy b/src/test/groovy/edu/ie3/test/common/ThermalUnitInputTestData.groovy index 26c98fd89..17445bf64 100644 --- a/src/test/groovy/edu/ie3/test/common/ThermalUnitInputTestData.groovy +++ b/src/test/groovy/edu/ie3/test/common/ThermalUnitInputTestData.groovy @@ -33,9 +33,9 @@ class ThermalUnitInputTestData extends SystemParticipantTestData { // thermal house input private static final ComparableQuantity thermalConductance = Quantities.getQuantity(10, StandardUnits.THERMAL_TRANSMISSION) private static final ComparableQuantity ethCapa = Quantities.getQuantity(20, StandardUnits.HEAT_CAPACITY) - private static final ComparableQuantity desiredTemperature = Quantities.getQuantity(20, StandardUnits.TEMPERATURE) - private static final ComparableQuantity upperTemperatureLimit = Quantities.getQuantity(25, StandardUnits.TEMPERATURE) - private static final ComparableQuantity lowerTemperatureLimit = Quantities.getQuantity(15, StandardUnits.TEMPERATURE) + private static final ComparableQuantity DESIRED_TEMPERATURE = Quantities.getQuantity(20, StandardUnits.TEMPERATURE) + private static final ComparableQuantity UPPER_TEMPERATURE_LIMIT = Quantities.getQuantity(25, StandardUnits.TEMPERATURE) + private static final ComparableQuantity LOWER_TEMPERATURE_LIMIT = Quantities.getQuantity(15, StandardUnits.TEMPERATURE) public static final thermalHouseInput = new ThermalHouseInput( thermalUnitUuid, "test_thermalHouseInput", @@ -44,9 +44,9 @@ class ThermalUnitInputTestData extends SystemParticipantTestData { thermalBus, thermalConductance, ethCapa, - desiredTemperature, - upperTemperatureLimit, - lowerTemperatureLimit) + DESIRED_TEMPERATURE, + UPPER_TEMPERATURE_LIMIT, + LOWER_TEMPERATURE_LIMIT) // thermal cylindric storage input private static final ComparableQuantity storageVolumeLvl = Quantities.getQuantity(100, StandardUnits.VOLUME) From e41583ec3a29b761cba009fc8b0c47502542f828 Mon Sep 17 00:00:00 2001 From: "Kittl, Chris" Date: Tue, 8 Jun 2021 15:15:59 +0200 Subject: [PATCH 048/157] Fix, what I broke --- .../datamodel/io/csv/CsvFileDefinition.java | 8 ++++---- .../io/naming/FileNamingStrategy.java | 18 +++++++----------- 2 files changed, 11 insertions(+), 15 deletions(-) diff --git a/src/main/java/edu/ie3/datamodel/io/csv/CsvFileDefinition.java b/src/main/java/edu/ie3/datamodel/io/csv/CsvFileDefinition.java index 5e103d1e6..ffd2213bd 100644 --- a/src/main/java/edu/ie3/datamodel/io/csv/CsvFileDefinition.java +++ b/src/main/java/edu/ie3/datamodel/io/csv/CsvFileDefinition.java @@ -33,10 +33,10 @@ public CsvFileDefinition( /* Remove all file separators at the beginning and end of a directory path and ensure harmonized file separator */ this.directoryPath = Objects.nonNull(directoryPath) - ? directoryPath - .replaceFirst("^" + IoUtil.FILE_SEPARATOR_REGEX, "") - .replaceAll(IoUtil.FILE_SEPARATOR_REGEX + "$", "") - .replaceAll(IoUtil.FILE_SEPARATOR_REGEX, IoUtil.FILE_SEPARATOR_REPLACEMENT) + ? IoUtil.harmonizeFileSeparator( + directoryPath + .replaceFirst("^" + IoUtil.FILE_SEPARATOR_REGEX, "") + .replaceAll(IoUtil.FILE_SEPARATOR_REGEX + "$", "")) : ""; /* Check the given information of the file name */ diff --git a/src/main/java/edu/ie3/datamodel/io/naming/FileNamingStrategy.java b/src/main/java/edu/ie3/datamodel/io/naming/FileNamingStrategy.java index 36da8ee1f..c58472302 100644 --- a/src/main/java/edu/ie3/datamodel/io/naming/FileNamingStrategy.java +++ b/src/main/java/edu/ie3/datamodel/io/naming/FileNamingStrategy.java @@ -74,7 +74,7 @@ public Optional getFilePath(Class cls) { // do not adapt orElseGet, see https://www.baeldung.com/java-optional-or-else-vs-or-else-get for // details return getFilePath( - entityNamingStrategy.getEntityName(cls).orElse(""), getDirectoryPath(cls).orElse("")); + getEntityName(cls).orElseGet(() -> ""), getDirectoryPath(cls).orElseGet(() -> "")); } /** @@ -92,8 +92,8 @@ Optional getFilePath(T timeSeries) { // do not adapt orElseGet, see https://www.baeldung.com/java-optional-or-else-vs-or-else-get for // details return getFilePath( - entityNamingStrategy.getEntityName(timeSeries).orElse(""), - getDirectoryPath(timeSeries).orElse("")); + entityNamingStrategy.getEntityName(timeSeries).orElseGet(() -> ""), + getDirectoryPath(timeSeries).orElseGet(() -> "")); } /** @@ -120,19 +120,17 @@ private Optional getFilePath(String fileName, String subDirectories) { */ public Optional getDirectoryPath(Class cls) { Optional maybeDirectoryName = directoryHierarchy.getSubDirectory(cls); - String directoryPath; if (!maybeDirectoryName.isPresent()) { logger.debug("Cannot determine directory name for class '{}'.", cls); return Optional.empty(); } else { /* Make sure, the directory path does not start or end with file separator and in between the separator is harmonized */ - directoryPath = + return Optional.of( IoUtil.harmonizeFileSeparator( maybeDirectoryName .get() .replaceFirst("^" + IoUtil.FILE_SEPARATOR_REGEX, "") - .replaceAll(IoUtil.FILE_SEPARATOR_REGEX + "$", "")); - return Optional.of(directoryPath); + .replaceAll(IoUtil.FILE_SEPARATOR_REGEX + "$", ""))); } } @@ -149,19 +147,17 @@ public Optional getDirectoryPath(Class cls) { public , E extends TimeSeriesEntry, V extends Value> Optional getDirectoryPath(T timeSeries) { Optional maybeDirectoryName = directoryHierarchy.getSubDirectory(timeSeries.getClass()); - String directoryPath; if (!maybeDirectoryName.isPresent()) { logger.debug("Cannot determine directory name for time series '{}'.", timeSeries); return Optional.empty(); } else { /* Make sure, the directory path does not start or end with file separator and in between the separator is harmonized */ - directoryPath = + return Optional.of( IoUtil.harmonizeFileSeparator( maybeDirectoryName .get() .replaceFirst("^" + IoUtil.FILE_SEPARATOR_REGEX, "") - .replaceAll(IoUtil.FILE_SEPARATOR_REGEX + "$", "")); - return Optional.of(directoryPath); + .replaceAll(IoUtil.FILE_SEPARATOR_REGEX + "$", ""))); } } From 0e9439811c950054dd431bb3353ae23733d4d9a6 Mon Sep 17 00:00:00 2001 From: Niklas Steffan Date: Tue, 8 Jun 2021 16:58:24 +0200 Subject: [PATCH 049/157] added some javadoc and moved timeseriesapptern methods from EntityNamingStrategy to FileNamingStrategy --- CHANGELOG.md | 2 +- .../io/naming/DefaultDirectoryHierarchy.java | 2 +- .../io/naming/DirectoryHierarchy.java | 15 -- .../io/naming/EntityNamingStrategy.java | 82 ---------- .../io/naming/FileNamingStrategy.java | 106 +++++++++++-- .../io/naming/FlatDirectoryHierarchy.java | 2 +- .../io/naming/EntityNamingStrategyTest.groovy | 140 ------------------ .../io/naming/FileNamingStrategyTest.groovy | 140 ++++++++++++++++++ 8 files changed, 236 insertions(+), 253 deletions(-) delete mode 100644 src/main/java/edu/ie3/datamodel/io/naming/DirectoryHierarchy.java diff --git a/CHANGELOG.md b/CHANGELOG.md index 519e6f50a..ea28b6568 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,7 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased/Snapshot] ### Changed -- separated entity and file naming and introduced a new FileNamingStrategy taking an EntityNamingStrategy and a DirectoryHierarchy as arguments +- separated entity and file naming and introduced a new FileNamingStrategy taking an EntityNamingStrategy and a FileHierarchy as arguments ### Fixed - `CsvSystemParticipantSource#getSystemParticipants()` now correctly returns electric vehicle charging station input models [PR#370](https://github.com/ie3-institute/PowerSystemDataModel/pull/370) diff --git a/src/main/java/edu/ie3/datamodel/io/naming/DefaultDirectoryHierarchy.java b/src/main/java/edu/ie3/datamodel/io/naming/DefaultDirectoryHierarchy.java index 0d12fe35f..80c95fc2e 100644 --- a/src/main/java/edu/ie3/datamodel/io/naming/DefaultDirectoryHierarchy.java +++ b/src/main/java/edu/ie3/datamodel/io/naming/DefaultDirectoryHierarchy.java @@ -44,7 +44,7 @@ import org.slf4j.LoggerFactory; /** Default directory hierarchy for input models */ -public class DefaultDirectoryHierarchy implements DirectoryHierarchy { +public class DefaultDirectoryHierarchy implements FileHierarchy { private static final Logger logger = LoggerFactory.getLogger(DefaultDirectoryHierarchy.class); /** Use the unix file separator here. */ diff --git a/src/main/java/edu/ie3/datamodel/io/naming/DirectoryHierarchy.java b/src/main/java/edu/ie3/datamodel/io/naming/DirectoryHierarchy.java deleted file mode 100644 index 700cf53ce..000000000 --- a/src/main/java/edu/ie3/datamodel/io/naming/DirectoryHierarchy.java +++ /dev/null @@ -1,15 +0,0 @@ -/* - * © 2021. TU Dortmund University, - * Institute of Energy Systems, Energy Efficiency and Energy Economics, - * Research group Distribution grid planning and operation -*/ -package edu.ie3.datamodel.io.naming; - -import edu.ie3.datamodel.models.UniqueEntity; -import java.util.Optional; - -public interface DirectoryHierarchy extends FileHierarchy { - - @Override - Optional getSubDirectory(Class cls, String fileSeparator); -} diff --git a/src/main/java/edu/ie3/datamodel/io/naming/EntityNamingStrategy.java b/src/main/java/edu/ie3/datamodel/io/naming/EntityNamingStrategy.java index 2f5a08308..8027f9f0d 100644 --- a/src/main/java/edu/ie3/datamodel/io/naming/EntityNamingStrategy.java +++ b/src/main/java/edu/ie3/datamodel/io/naming/EntityNamingStrategy.java @@ -5,10 +5,7 @@ */ package edu.ie3.datamodel.io.naming; -import edu.ie3.datamodel.io.csv.FileNameMetaInformation; import edu.ie3.datamodel.io.csv.timeseries.ColumnScheme; -import edu.ie3.datamodel.io.csv.timeseries.IndividualTimeSeriesMetaInformation; -import edu.ie3.datamodel.io.csv.timeseries.LoadProfileTimeSeriesMetaInformation; import edu.ie3.datamodel.io.source.TimeSeriesMappingSource; import edu.ie3.datamodel.models.UniqueEntity; import edu.ie3.datamodel.models.input.*; @@ -21,10 +18,7 @@ import edu.ie3.datamodel.models.timeseries.repetitive.LoadProfileInput; import edu.ie3.datamodel.models.value.*; import edu.ie3.util.StringUtils; -import java.nio.file.Path; import java.util.Optional; -import java.util.UUID; -import java.util.regex.Matcher; import java.util.regex.Pattern; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; @@ -357,82 +351,6 @@ Optional getEntityName(T timeSeries) { } } - /** - * Extracts meta information from a file name, of a time series. - * - * @param path Path to the file - * @return The meeting meta information - */ - public FileNameMetaInformation extractTimeSeriesMetaInformation(Path path) { - /* Extract file name from possibly fully qualified path */ - Path fileName = path.getFileName(); - if (fileName == null) - throw new IllegalArgumentException("Unable to extract file name from path '" + path + "'."); - return extractTimeSeriesMetaInformation(fileName.toString()); - } - - /** - * Extracts meta information from a file name, of a time series. Here, a file name without - * leading path has to be provided - * - * @param fileName File name - * @return The meeting meta information - */ - public FileNameMetaInformation extractTimeSeriesMetaInformation(String fileName) { - /* Remove the file ending (ending limited to 255 chars, which is the max file name allowed in NTFS and ext4) */ - String withoutEnding = fileName.replaceAll("(?:\\.[^\\\\/\\s]{1,255}){1,2}$", ""); - - if (individualTimeSeriesPattern.matcher(withoutEnding).matches()) - return extractIndividualTimesSeriesMetaInformation(withoutEnding); - else if (loadProfileTimeSeriesPattern.matcher(withoutEnding).matches()) - return extractLoadProfileTimesSeriesMetaInformation(withoutEnding); - else - throw new IllegalArgumentException( - "Unknown format of '" + fileName + "'. Cannot extract meta information."); - } - - /** - * Extracts meta information from a valid file name for a individual time series - * - * @param fileName File name to extract information from - * @return Meta information form individual time series file name - */ - private IndividualTimeSeriesMetaInformation extractIndividualTimesSeriesMetaInformation( - String fileName) { - Matcher matcher = individualTimeSeriesPattern.matcher(fileName); - if (!matcher.matches()) - throw new IllegalArgumentException( - "Cannot extract meta information on individual time series from '" + fileName + "'."); - - String columnSchemeKey = matcher.group("columnScheme"); - ColumnScheme columnScheme = - ColumnScheme.parse(columnSchemeKey) - .orElseThrow( - () -> - new IllegalArgumentException( - "Cannot parse '" + columnSchemeKey + "' to valid column scheme.")); - - return new IndividualTimeSeriesMetaInformation( - UUID.fromString(matcher.group("uuid")), columnScheme); - } - - /** - * Extracts meta information from a valid file name for a load profile time series - * - * @param fileName File name to extract information from - * @return Meta information form load profile time series file name - */ - private LoadProfileTimeSeriesMetaInformation extractLoadProfileTimesSeriesMetaInformation( - String fileName) { - Matcher matcher = loadProfileTimeSeriesPattern.matcher(fileName); - if (!matcher.matches()) - throw new IllegalArgumentException( - "Cannot extract meta information on load profile time series from '" + fileName + "'."); - - return new LoadProfileTimeSeriesMetaInformation( - UUID.fromString(matcher.group("uuid")), matcher.group("profile")); - } - /** * Get the entity name for coordinates * diff --git a/src/main/java/edu/ie3/datamodel/io/naming/FileNamingStrategy.java b/src/main/java/edu/ie3/datamodel/io/naming/FileNamingStrategy.java index c58472302..fa87bb4fa 100644 --- a/src/main/java/edu/ie3/datamodel/io/naming/FileNamingStrategy.java +++ b/src/main/java/edu/ie3/datamodel/io/naming/FileNamingStrategy.java @@ -7,13 +7,20 @@ import edu.ie3.datamodel.io.IoUtil; import edu.ie3.datamodel.io.csv.FileNameMetaInformation; +import edu.ie3.datamodel.io.csv.timeseries.ColumnScheme; +import edu.ie3.datamodel.io.csv.timeseries.IndividualTimeSeriesMetaInformation; +import edu.ie3.datamodel.io.csv.timeseries.LoadProfileTimeSeriesMetaInformation; import edu.ie3.datamodel.models.UniqueEntity; import edu.ie3.datamodel.models.timeseries.TimeSeries; import edu.ie3.datamodel.models.timeseries.TimeSeriesEntry; import edu.ie3.datamodel.models.timeseries.individual.IndividualTimeSeries; import edu.ie3.datamodel.models.timeseries.repetitive.LoadProfileInput; import edu.ie3.datamodel.models.value.Value; + +import java.nio.file.Path; import java.util.Optional; +import java.util.UUID; +import java.util.regex.Matcher; import java.util.regex.Pattern; import org.apache.commons.io.FilenameUtils; import org.apache.logging.log4j.LogManager; @@ -21,25 +28,25 @@ /** * A naming strategy, that combines an {@link EntityNamingStrategy} for naming entities and a {@link - * DirectoryHierarchy} for a folder structure. + * FileHierarchy} for a folder structure. */ public class FileNamingStrategy { - protected static final Logger logger = LogManager.getLogger(FileNamingStrategy.class); + private static final Logger logger = LogManager.getLogger(FileNamingStrategy.class); private final EntityNamingStrategy entityNamingStrategy; - private final DirectoryHierarchy directoryHierarchy; + private final FileHierarchy fileHierarchy; /** * Constructor for building the file naming strategy. * * @param entityNamingStrategy entity naming strategy - * @param directoryHierarchy directory hierarchy + * @param fileHierarchy directory hierarchy */ public FileNamingStrategy( - EntityNamingStrategy entityNamingStrategy, DirectoryHierarchy directoryHierarchy) { + EntityNamingStrategy entityNamingStrategy, FileHierarchy fileHierarchy) { this.entityNamingStrategy = entityNamingStrategy; - this.directoryHierarchy = directoryHierarchy; + this.fileHierarchy = fileHierarchy; } /** @@ -50,7 +57,7 @@ public FileNamingStrategy( */ public FileNamingStrategy(EntityNamingStrategy entityNamingStrategy) { this.entityNamingStrategy = entityNamingStrategy; - this.directoryHierarchy = new FlatDirectoryHierarchy(); + this.fileHierarchy = new FlatDirectoryHierarchy(); } /** @@ -60,7 +67,7 @@ public FileNamingStrategy(EntityNamingStrategy entityNamingStrategy) { */ public FileNamingStrategy() { this.entityNamingStrategy = new EntityNamingStrategy(); - this.directoryHierarchy = new FlatDirectoryHierarchy(); + this.fileHierarchy = new FlatDirectoryHierarchy(); } /** @@ -119,7 +126,7 @@ private Optional getFilePath(String fileName, String subDirectories) { * @return An optional sub directory path */ public Optional getDirectoryPath(Class cls) { - Optional maybeDirectoryName = directoryHierarchy.getSubDirectory(cls); + Optional maybeDirectoryName = fileHierarchy.getSubDirectory(cls); if (!maybeDirectoryName.isPresent()) { logger.debug("Cannot determine directory name for class '{}'.", cls); return Optional.empty(); @@ -146,7 +153,7 @@ public Optional getDirectoryPath(Class cls) { */ public , E extends TimeSeriesEntry, V extends Value> Optional getDirectoryPath(T timeSeries) { - Optional maybeDirectoryName = directoryHierarchy.getSubDirectory(timeSeries.getClass()); + Optional maybeDirectoryName = fileHierarchy.getSubDirectory(timeSeries.getClass()); if (!maybeDirectoryName.isPresent()) { logger.debug("Cannot determine directory name for time series '{}'.", timeSeries); return Optional.empty(); @@ -161,8 +168,12 @@ Optional getDirectoryPath(T timeSeries) { } } + /** + * Returns the pattern to identify individual time series in this instance of the file naming strategy considering + * the {@link EntityNamingStrategy} and {@link FileHierarchy}. + */ public Pattern getIndividualTimeSeriesPattern() { - String subDirectory = directoryHierarchy.getSubDirectory(IndividualTimeSeries.class).orElse(""); + String subDirectory = fileHierarchy.getSubDirectory(IndividualTimeSeries.class).orElse(""); if (subDirectory.isEmpty()) { return entityNamingStrategy.getIndividualTimeSeriesPattern(); @@ -179,8 +190,12 @@ public Pattern getIndividualTimeSeriesPattern() { } } + /** + * Returns the pattern to identify load profile time series in this instance of the file naming strategy considering + * the {@link EntityNamingStrategy} and {@link FileHierarchy}. + */ public Pattern getLoadProfileTimeSeriesPattern() { - String subDirectory = directoryHierarchy.getSubDirectory(LoadProfileInput.class).orElse(""); + String subDirectory = fileHierarchy.getSubDirectory(LoadProfileInput.class).orElse(""); if (subDirectory.isEmpty()) { return entityNamingStrategy.getLoadProfileTimeSeriesPattern(); @@ -197,6 +212,20 @@ public Pattern getLoadProfileTimeSeriesPattern() { } } + /** + * Extracts meta information from a file name, of a time series. + * + * @param path Path to the file + * @return The meeting meta information + */ + public FileNameMetaInformation extractTimeSeriesMetaInformation(Path path) { + /* Extract file name from possibly fully qualified path */ + Path fileName = path.getFileName(); + if (fileName == null) + throw new IllegalArgumentException("Unable to extract file name from path '" + path + "'."); + return extractTimeSeriesMetaInformation(fileName.toString()); + } + /** * Extracts meta information from a file name, of a time series. Here, a file name without * leading path has to be provided @@ -205,7 +234,58 @@ public Pattern getLoadProfileTimeSeriesPattern() { * @return The meeting meta information */ public FileNameMetaInformation extractTimeSeriesMetaInformation(String fileName) { - return entityNamingStrategy.extractTimeSeriesMetaInformation(fileName); + /* Remove the file ending (ending limited to 255 chars, which is the max file name allowed in NTFS and ext4) */ + String withoutEnding = fileName.replaceAll("(?:\\.[^\\\\/\\s]{1,255}){1,2}$", ""); + + if (getIndividualTimeSeriesPattern().matcher(withoutEnding).matches()) + return extractIndividualTimesSeriesMetaInformation(withoutEnding); + else if (getLoadProfileTimeSeriesPattern().matcher(withoutEnding).matches()) + return extractLoadProfileTimesSeriesMetaInformation(withoutEnding); + else + throw new IllegalArgumentException( + "Unknown format of '" + fileName + "'. Cannot extract meta information."); + } + + /** + * Extracts meta information from a valid file name for a individual time series + * + * @param fileName File name to extract information from + * @return Meta information form individual time series file name + */ + private IndividualTimeSeriesMetaInformation extractIndividualTimesSeriesMetaInformation( + String fileName) { + Matcher matcher = getIndividualTimeSeriesPattern().matcher(fileName); + if (!matcher.matches()) + throw new IllegalArgumentException( + "Cannot extract meta information on individual time series from '" + fileName + "'."); + + String columnSchemeKey = matcher.group("columnScheme"); + ColumnScheme columnScheme = + ColumnScheme.parse(columnSchemeKey) + .orElseThrow( + () -> + new IllegalArgumentException( + "Cannot parse '" + columnSchemeKey + "' to valid column scheme.")); + + return new IndividualTimeSeriesMetaInformation( + UUID.fromString(matcher.group("uuid")), columnScheme); + } + + /** + * Extracts meta information from a valid file name for a load profile time series + * + * @param fileName File name to extract information from + * @return Meta information form load profile time series file name + */ + private LoadProfileTimeSeriesMetaInformation extractLoadProfileTimesSeriesMetaInformation( + String fileName) { + Matcher matcher = getLoadProfileTimeSeriesPattern().matcher(fileName); + if (!matcher.matches()) + throw new IllegalArgumentException( + "Cannot extract meta information on load profile time series from '" + fileName + "'."); + + return new LoadProfileTimeSeriesMetaInformation( + UUID.fromString(matcher.group("uuid")), matcher.group("profile")); } /** diff --git a/src/main/java/edu/ie3/datamodel/io/naming/FlatDirectoryHierarchy.java b/src/main/java/edu/ie3/datamodel/io/naming/FlatDirectoryHierarchy.java index 128be0ad5..7c4787d64 100644 --- a/src/main/java/edu/ie3/datamodel/io/naming/FlatDirectoryHierarchy.java +++ b/src/main/java/edu/ie3/datamodel/io/naming/FlatDirectoryHierarchy.java @@ -9,7 +9,7 @@ import java.util.Optional; /** Default directory hierarchy for input models */ -public class FlatDirectoryHierarchy implements DirectoryHierarchy { +public class FlatDirectoryHierarchy implements FileHierarchy { /** * Gives empty sub directory. diff --git a/src/test/groovy/edu/ie3/datamodel/io/naming/EntityNamingStrategyTest.groovy b/src/test/groovy/edu/ie3/datamodel/io/naming/EntityNamingStrategyTest.groovy index ea58a6952..59b8c0451 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/naming/EntityNamingStrategyTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/naming/EntityNamingStrategyTest.groovy @@ -5,9 +5,6 @@ */ package edu.ie3.datamodel.io.naming -import edu.ie3.datamodel.io.csv.timeseries.ColumnScheme -import edu.ie3.datamodel.io.csv.timeseries.IndividualTimeSeriesMetaInformation -import edu.ie3.datamodel.io.csv.timeseries.LoadProfileTimeSeriesMetaInformation import edu.ie3.datamodel.io.source.TimeSeriesMappingSource import edu.ie3.datamodel.models.BdewLoadProfile import edu.ie3.datamodel.models.input.MeasurementUnitInput @@ -66,7 +63,6 @@ import edu.ie3.util.quantities.PowerSystemUnits import spock.lang.Specification import tech.units.indriya.quantity.Quantities -import java.nio.file.Paths import java.time.ZonedDateTime import java.util.regex.Pattern @@ -122,142 +118,6 @@ class EntityNamingStrategyTest extends Specification { matcher.group("uuid") == "bee0a8b6-4788-4f18-bf72-be52035f7304" } - def "Trying to extract time series meta information throws an Exception, if it is provided a malformed string"() { - given: - def fns = new EntityNamingStrategy() - def path = Paths.get("/bla/foo") - - when: - fns.extractTimeSeriesMetaInformation(path) - - then: - def ex = thrown(IllegalArgumentException) - ex.message == "Unknown format of 'foo'. Cannot extract meta information." - } - - def "Trying to extract individual time series meta information throws an Exception, if it is provided a malformed string"() { - given: - def fns = new EntityNamingStrategy() - def fileName = "foo" - - when: - fns.extractIndividualTimesSeriesMetaInformation(fileName) - - then: - def ex = thrown(IllegalArgumentException) - ex.message == "Cannot extract meta information on individual time series from 'foo'." - } - - def "Trying to extract load profile time series meta information throws an Exception, if it is provided a malformed string"() { - given: - def fns = new EntityNamingStrategy() - def fileName = "foo" - - when: - fns.extractLoadProfileTimesSeriesMetaInformation(fileName) - - then: - def ex = thrown(IllegalArgumentException) - ex.message == "Cannot extract meta information on load profile time series from 'foo'." - } - - def "The EntityPersistenceNamingStrategy extracts correct meta information from a valid individual time series file name"() { - given: - def fns = new EntityNamingStrategy() - def path = Paths.get(pathString) - - when: - def metaInformation = fns.extractTimeSeriesMetaInformation(path) - - then: - IndividualTimeSeriesMetaInformation.isAssignableFrom(metaInformation.getClass()) - (metaInformation as IndividualTimeSeriesMetaInformation).with { - assert it.uuid == UUID.fromString("4881fda2-bcee-4f4f-a5bb-6a09bf785276") - assert it.columnScheme == expectedColumnScheme - } - - where: - pathString || expectedColumnScheme - "/bla/foo/its_c_4881fda2-bcee-4f4f-a5bb-6a09bf785276.csv" || ColumnScheme.ENERGY_PRICE - "/bla/foo/its_p_4881fda2-bcee-4f4f-a5bb-6a09bf785276.csv" || ColumnScheme.ACTIVE_POWER - "/bla/foo/its_pq_4881fda2-bcee-4f4f-a5bb-6a09bf785276.csv" || ColumnScheme.APPARENT_POWER - "/bla/foo/its_h_4881fda2-bcee-4f4f-a5bb-6a09bf785276.csv" || ColumnScheme.HEAT_DEMAND - "/bla/foo/its_ph_4881fda2-bcee-4f4f-a5bb-6a09bf785276.csv" || ColumnScheme.ACTIVE_POWER_AND_HEAT_DEMAND - "/bla/foo/its_pqh_4881fda2-bcee-4f4f-a5bb-6a09bf785276.csv" || ColumnScheme.APPARENT_POWER_AND_HEAT_DEMAND - "/bla/foo/its_weather_4881fda2-bcee-4f4f-a5bb-6a09bf785276.csv" || ColumnScheme.WEATHER - } - - def "The EntityPersistenceNamingStrategy extracts correct meta information from a valid individual time series file name with pre- and suffix"() { - given: - def fns = new EntityNamingStrategy("prefix", "suffix") - def path = Paths.get(pathString) - - when: - def metaInformation = fns.extractTimeSeriesMetaInformation(path) - - then: - IndividualTimeSeriesMetaInformation.isAssignableFrom(metaInformation.getClass()) - (metaInformation as IndividualTimeSeriesMetaInformation).with { - assert it.uuid == UUID.fromString("4881fda2-bcee-4f4f-a5bb-6a09bf785276") - assert it.columnScheme == expectedColumnScheme - } - - where: - pathString || expectedColumnScheme - "/bla/foo/prefix_its_c_4881fda2-bcee-4f4f-a5bb-6a09bf785276_suffix.csv" || ColumnScheme.ENERGY_PRICE - "/bla/foo/prefix_its_p_4881fda2-bcee-4f4f-a5bb-6a09bf785276_suffix.csv" || ColumnScheme.ACTIVE_POWER - "/bla/foo/prefix_its_pq_4881fda2-bcee-4f4f-a5bb-6a09bf785276_suffix.csv" || ColumnScheme.APPARENT_POWER - "/bla/foo/prefix_its_h_4881fda2-bcee-4f4f-a5bb-6a09bf785276_suffix.csv" || ColumnScheme.HEAT_DEMAND - "/bla/foo/prefix_its_ph_4881fda2-bcee-4f4f-a5bb-6a09bf785276_suffix.csv" || ColumnScheme.ACTIVE_POWER_AND_HEAT_DEMAND - "/bla/foo/prefix_its_pqh_4881fda2-bcee-4f4f-a5bb-6a09bf785276_suffix.csv" || ColumnScheme.APPARENT_POWER_AND_HEAT_DEMAND - "/bla/foo/prefix_its_weather_4881fda2-bcee-4f4f-a5bb-6a09bf785276_suffix.csv" || ColumnScheme.WEATHER - } - - def "The EntityPersistenceNamingStrategy throw an IllegalArgumentException, if the column scheme is malformed."() { - given: - def fns = new EntityNamingStrategy() - def path = Paths.get("/bla/foo/its_whoops_4881fda2-bcee-4f4f-a5bb-6a09bf785276.csv") - - when: - fns.extractTimeSeriesMetaInformation(path) - - then: - def ex = thrown(IllegalArgumentException) - ex.message == "Cannot parse 'whoops' to valid column scheme." - } - - def "The EntityPersistenceNamingStrategy extracts correct meta information from a valid load profile time series file name"() { - given: - def fns = new EntityNamingStrategy() - def path = Paths.get("/bla/foo/lpts_g3_bee0a8b6-4788-4f18-bf72-be52035f7304.csv") - - when: - def metaInformation = fns.extractTimeSeriesMetaInformation(path) - - then: - LoadProfileTimeSeriesMetaInformation.isAssignableFrom(metaInformation.getClass()) - (metaInformation as LoadProfileTimeSeriesMetaInformation).with { - assert uuid == UUID.fromString("bee0a8b6-4788-4f18-bf72-be52035f7304") - assert profile == "g3" - } - } - - def "The EntityPersistenceNamingStrategy extracts correct meta information from a valid load profile time series file name with pre- and suffix"() { - given: - def fns = new EntityNamingStrategy("prefix", "suffix") - def path = Paths.get("/bla/foo/prefix_lpts_g3_bee0a8b6-4788-4f18-bf72-be52035f7304_suffix.csv") - - when: - def metaInformation = fns.extractTimeSeriesMetaInformation(path) - - then: - LoadProfileTimeSeriesMetaInformation.isAssignableFrom(metaInformation.getClass()) - (metaInformation as LoadProfileTimeSeriesMetaInformation).with { - assert uuid == UUID.fromString("bee0a8b6-4788-4f18-bf72-be52035f7304") - assert profile == "g3" - } - } - def "The EntityPersistenceNamingStrategy is able to prepare the prefix properly"() { when: String actual = EntityNamingStrategy.preparePrefix(prefix) diff --git a/src/test/groovy/edu/ie3/datamodel/io/naming/FileNamingStrategyTest.groovy b/src/test/groovy/edu/ie3/datamodel/io/naming/FileNamingStrategyTest.groovy index 83c8a6967..ee78e893f 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/naming/FileNamingStrategyTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/naming/FileNamingStrategyTest.groovy @@ -5,6 +5,9 @@ */ package edu.ie3.datamodel.io.naming +import edu.ie3.datamodel.io.csv.timeseries.ColumnScheme +import edu.ie3.datamodel.io.csv.timeseries.IndividualTimeSeriesMetaInformation +import edu.ie3.datamodel.io.csv.timeseries.LoadProfileTimeSeriesMetaInformation import edu.ie3.datamodel.io.source.TimeSeriesMappingSource import edu.ie3.datamodel.models.BdewLoadProfile import edu.ie3.datamodel.models.UniqueEntity @@ -64,6 +67,7 @@ import spock.lang.Specification import tech.units.indriya.quantity.Quantities import java.nio.file.Files +import java.nio.file.Paths import java.time.ZonedDateTime class FileNamingStrategyTest extends Specification { @@ -807,4 +811,140 @@ class FileNamingStrategyTest extends Specification { actual == "lpts_(?[a-zA-Z][0-9])_(?[a-zA-Z0-9]{8}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{12})" } + def "Trying to extract time series meta information throws an Exception, if it is provided a malformed string"() { + given: + def fns = new FileNamingStrategy(simpleEntityNaming, flatHierarchy) + def path = Paths.get("/bla/foo") + + when: + fns.extractTimeSeriesMetaInformation(path) + + then: + def ex = thrown(IllegalArgumentException) + ex.message == "Unknown format of 'foo'. Cannot extract meta information." + } + + def "Trying to extract individual time series meta information throws an Exception, if it is provided a malformed string"() { + given: + def fns = new FileNamingStrategy(simpleEntityNaming, flatHierarchy) + def fileName = "foo" + + when: + fns.extractIndividualTimesSeriesMetaInformation(fileName) + + then: + def ex = thrown(IllegalArgumentException) + ex.message == "Cannot extract meta information on individual time series from 'foo'." + } + + def "Trying to extract load profile time series meta information throws an Exception, if it is provided a malformed string"() { + given: + def fns = new FileNamingStrategy(simpleEntityNaming, flatHierarchy) + def fileName = "foo" + + when: + fns.extractLoadProfileTimesSeriesMetaInformation(fileName) + + then: + def ex = thrown(IllegalArgumentException) + ex.message == "Cannot extract meta information on load profile time series from 'foo'." + } + + def "The EntityPersistenceNamingStrategy extracts correct meta information from a valid individual time series file name"() { + given: + def fns = new FileNamingStrategy(simpleEntityNaming, flatHierarchy) + def path = Paths.get(pathString) + + when: + def metaInformation = fns.extractTimeSeriesMetaInformation(path) + + then: + IndividualTimeSeriesMetaInformation.isAssignableFrom(metaInformation.getClass()) + (metaInformation as IndividualTimeSeriesMetaInformation).with { + assert it.uuid == UUID.fromString("4881fda2-bcee-4f4f-a5bb-6a09bf785276") + assert it.columnScheme == expectedColumnScheme + } + + where: + pathString || expectedColumnScheme + "/bla/foo/its_c_4881fda2-bcee-4f4f-a5bb-6a09bf785276.csv" || ColumnScheme.ENERGY_PRICE + "/bla/foo/its_p_4881fda2-bcee-4f4f-a5bb-6a09bf785276.csv" || ColumnScheme.ACTIVE_POWER + "/bla/foo/its_pq_4881fda2-bcee-4f4f-a5bb-6a09bf785276.csv" || ColumnScheme.APPARENT_POWER + "/bla/foo/its_h_4881fda2-bcee-4f4f-a5bb-6a09bf785276.csv" || ColumnScheme.HEAT_DEMAND + "/bla/foo/its_ph_4881fda2-bcee-4f4f-a5bb-6a09bf785276.csv" || ColumnScheme.ACTIVE_POWER_AND_HEAT_DEMAND + "/bla/foo/its_pqh_4881fda2-bcee-4f4f-a5bb-6a09bf785276.csv" || ColumnScheme.APPARENT_POWER_AND_HEAT_DEMAND + "/bla/foo/its_weather_4881fda2-bcee-4f4f-a5bb-6a09bf785276.csv" || ColumnScheme.WEATHER + } + + def "The EntityPersistenceNamingStrategy extracts correct meta information from a valid individual time series file name with pre- and suffix"() { + given: + def fns = new FileNamingStrategy(new EntityNamingStrategy("prefix", "suffix"), flatHierarchy) + def path = Paths.get(pathString) + + when: + def metaInformation = fns.extractTimeSeriesMetaInformation(path) + + then: + IndividualTimeSeriesMetaInformation.isAssignableFrom(metaInformation.getClass()) + (metaInformation as IndividualTimeSeriesMetaInformation).with { + assert it.uuid == UUID.fromString("4881fda2-bcee-4f4f-a5bb-6a09bf785276") + assert it.columnScheme == expectedColumnScheme + } + + where: + pathString || expectedColumnScheme + "/bla/foo/prefix_its_c_4881fda2-bcee-4f4f-a5bb-6a09bf785276_suffix.csv" || ColumnScheme.ENERGY_PRICE + "/bla/foo/prefix_its_p_4881fda2-bcee-4f4f-a5bb-6a09bf785276_suffix.csv" || ColumnScheme.ACTIVE_POWER + "/bla/foo/prefix_its_pq_4881fda2-bcee-4f4f-a5bb-6a09bf785276_suffix.csv" || ColumnScheme.APPARENT_POWER + "/bla/foo/prefix_its_h_4881fda2-bcee-4f4f-a5bb-6a09bf785276_suffix.csv" || ColumnScheme.HEAT_DEMAND + "/bla/foo/prefix_its_ph_4881fda2-bcee-4f4f-a5bb-6a09bf785276_suffix.csv" || ColumnScheme.ACTIVE_POWER_AND_HEAT_DEMAND + "/bla/foo/prefix_its_pqh_4881fda2-bcee-4f4f-a5bb-6a09bf785276_suffix.csv" || ColumnScheme.APPARENT_POWER_AND_HEAT_DEMAND + "/bla/foo/prefix_its_weather_4881fda2-bcee-4f4f-a5bb-6a09bf785276_suffix.csv" || ColumnScheme.WEATHER + } + + def "The EntityPersistenceNamingStrategy throw an IllegalArgumentException, if the column scheme is malformed."() { + given: + def fns = new FileNamingStrategy(simpleEntityNaming, flatHierarchy) + def path = Paths.get("/bla/foo/its_whoops_4881fda2-bcee-4f4f-a5bb-6a09bf785276.csv") + + when: + fns.extractTimeSeriesMetaInformation(path) + + then: + def ex = thrown(IllegalArgumentException) + ex.message == "Cannot parse 'whoops' to valid column scheme." + } + + def "The EntityPersistenceNamingStrategy extracts correct meta information from a valid load profile time series file name"() { + given: + def fns = new FileNamingStrategy(simpleEntityNaming, flatHierarchy) + def path = Paths.get("/bla/foo/lpts_g3_bee0a8b6-4788-4f18-bf72-be52035f7304.csv") + + when: + def metaInformation = fns.extractTimeSeriesMetaInformation(path) + + then: + LoadProfileTimeSeriesMetaInformation.isAssignableFrom(metaInformation.getClass()) + (metaInformation as LoadProfileTimeSeriesMetaInformation).with { + assert uuid == UUID.fromString("bee0a8b6-4788-4f18-bf72-be52035f7304") + assert profile == "g3" + } + } + + def "The EntityPersistenceNamingStrategy extracts correct meta information from a valid load profile time series file name with pre- and suffix"() { + given: + def fns = new FileNamingStrategy(new EntityNamingStrategy("prefix", "suffix"), flatHierarchy) + def path = Paths.get("/bla/foo/prefix_lpts_g3_bee0a8b6-4788-4f18-bf72-be52035f7304_suffix.csv") + + when: + def metaInformation = fns.extractTimeSeriesMetaInformation(path) + + then: + LoadProfileTimeSeriesMetaInformation.isAssignableFrom(metaInformation.getClass()) + (metaInformation as LoadProfileTimeSeriesMetaInformation).with { + assert uuid == UUID.fromString("bee0a8b6-4788-4f18-bf72-be52035f7304") + assert profile == "g3" + } + } + } \ No newline at end of file From b19f4fb662af0f85eb13aa843f98b10da87399a8 Mon Sep 17 00:00:00 2001 From: Niklas Steffan Date: Tue, 8 Jun 2021 17:22:38 +0200 Subject: [PATCH 050/157] renamed EntityNamingStrategy to EntityPersistenceNamingStrategy --- ...a => EntityPersistenceNamingStrategy.java} | 11 +-- .../io/naming/FileNamingStrategy.java | 72 ++++++++++--------- .../ie3/datamodel/io/sink/InfluxDbSink.java | 19 ++--- .../io/connectors/CsvFileConnectorTest.groovy | 10 +-- ...ntityPersistenceNamingStrategyTest.groovy} | 48 ++++++------- .../io/naming/FileNamingStrategyTest.groovy | 12 ++-- .../datamodel/io/sink/InfluxDbSinkIT.groovy | 5 +- 7 files changed, 92 insertions(+), 85 deletions(-) rename src/main/java/edu/ie3/datamodel/io/naming/{EntityNamingStrategy.java => EntityPersistenceNamingStrategy.java} (97%) rename src/test/groovy/edu/ie3/datamodel/io/naming/{EntityNamingStrategyTest.groovy => EntityPersistenceNamingStrategyTest.groovy} (89%) diff --git a/src/main/java/edu/ie3/datamodel/io/naming/EntityNamingStrategy.java b/src/main/java/edu/ie3/datamodel/io/naming/EntityPersistenceNamingStrategy.java similarity index 97% rename from src/main/java/edu/ie3/datamodel/io/naming/EntityNamingStrategy.java rename to src/main/java/edu/ie3/datamodel/io/naming/EntityPersistenceNamingStrategy.java index 8027f9f0d..038885cdc 100644 --- a/src/main/java/edu/ie3/datamodel/io/naming/EntityNamingStrategy.java +++ b/src/main/java/edu/ie3/datamodel/io/naming/EntityPersistenceNamingStrategy.java @@ -30,9 +30,10 @@ * @version 0.1 * @since 03.02.20 */ -public class EntityNamingStrategy { +public class EntityPersistenceNamingStrategy { - protected static final Logger logger = LogManager.getLogger(EntityNamingStrategy.class); + protected static final Logger logger = + LogManager.getLogger(EntityPersistenceNamingStrategy.class); private static final String UUID_STRING = "[a-zA-Z0-9]{8}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{12}"; @@ -72,7 +73,7 @@ public class EntityNamingStrategy { * Constructor for building the names of the data sinks without provided entities with prefix and * suffix */ - public EntityNamingStrategy() { + public EntityPersistenceNamingStrategy() { this("", ""); } @@ -81,7 +82,7 @@ public EntityNamingStrategy() { * * @param prefix Prefix of the data sinks */ - public EntityNamingStrategy(String prefix) { + public EntityPersistenceNamingStrategy(String prefix) { this(prefix, ""); } @@ -91,7 +92,7 @@ public EntityNamingStrategy(String prefix) { * @param prefix Prefix of the data sinks * @param suffix Suffixes of the data sinks */ - public EntityNamingStrategy(String prefix, String suffix) { + public EntityPersistenceNamingStrategy(String prefix, String suffix) { this.prefix = preparePrefix(prefix); this.suffix = prepareSuffix(suffix); diff --git a/src/main/java/edu/ie3/datamodel/io/naming/FileNamingStrategy.java b/src/main/java/edu/ie3/datamodel/io/naming/FileNamingStrategy.java index fa87bb4fa..8d6f67d26 100644 --- a/src/main/java/edu/ie3/datamodel/io/naming/FileNamingStrategy.java +++ b/src/main/java/edu/ie3/datamodel/io/naming/FileNamingStrategy.java @@ -16,7 +16,6 @@ import edu.ie3.datamodel.models.timeseries.individual.IndividualTimeSeries; import edu.ie3.datamodel.models.timeseries.repetitive.LoadProfileInput; import edu.ie3.datamodel.models.value.Value; - import java.nio.file.Path; import java.util.Optional; import java.util.UUID; @@ -27,25 +26,26 @@ import org.apache.logging.log4j.Logger; /** - * A naming strategy, that combines an {@link EntityNamingStrategy} for naming entities and a {@link - * FileHierarchy} for a folder structure. + * A naming strategy, that combines an {@link EntityPersistenceNamingStrategy} for naming entities + * and a {@link FileHierarchy} for a folder structure. */ public class FileNamingStrategy { private static final Logger logger = LogManager.getLogger(FileNamingStrategy.class); - private final EntityNamingStrategy entityNamingStrategy; + private final EntityPersistenceNamingStrategy entityPersistenceNamingStrategy; private final FileHierarchy fileHierarchy; /** * Constructor for building the file naming strategy. * - * @param entityNamingStrategy entity naming strategy + * @param entityPersistenceNamingStrategy entity naming strategy * @param fileHierarchy directory hierarchy */ public FileNamingStrategy( - EntityNamingStrategy entityNamingStrategy, FileHierarchy fileHierarchy) { - this.entityNamingStrategy = entityNamingStrategy; + EntityPersistenceNamingStrategy entityPersistenceNamingStrategy, + FileHierarchy fileHierarchy) { + this.entityPersistenceNamingStrategy = entityPersistenceNamingStrategy; this.fileHierarchy = fileHierarchy; } @@ -53,10 +53,10 @@ public FileNamingStrategy( * Constructor for building the file naming strategy. Since no directory hierarchy is provided, a * flat directory hierarchy is used. * - * @param entityNamingStrategy entity naming strategy + * @param entityPersistenceNamingStrategy entity naming strategy */ - public FileNamingStrategy(EntityNamingStrategy entityNamingStrategy) { - this.entityNamingStrategy = entityNamingStrategy; + public FileNamingStrategy(EntityPersistenceNamingStrategy entityPersistenceNamingStrategy) { + this.entityPersistenceNamingStrategy = entityPersistenceNamingStrategy; this.fileHierarchy = new FlatDirectoryHierarchy(); } @@ -66,7 +66,7 @@ public FileNamingStrategy(EntityNamingStrategy entityNamingStrategy) { * hierarchy is used. */ public FileNamingStrategy() { - this.entityNamingStrategy = new EntityNamingStrategy(); + this.entityPersistenceNamingStrategy = new EntityPersistenceNamingStrategy(); this.fileHierarchy = new FlatDirectoryHierarchy(); } @@ -99,7 +99,7 @@ Optional getFilePath(T timeSeries) { // do not adapt orElseGet, see https://www.baeldung.com/java-optional-or-else-vs-or-else-get for // details return getFilePath( - entityNamingStrategy.getEntityName(timeSeries).orElseGet(() -> ""), + entityPersistenceNamingStrategy.getEntityName(timeSeries).orElseGet(() -> ""), getDirectoryPath(timeSeries).orElseGet(() -> "")); } @@ -169,20 +169,21 @@ Optional getDirectoryPath(T timeSeries) { } /** - * Returns the pattern to identify individual time series in this instance of the file naming strategy considering - * the {@link EntityNamingStrategy} and {@link FileHierarchy}. + * Returns the pattern to identify individual time series in this instance of the file naming + * strategy considering the {@link EntityPersistenceNamingStrategy} and {@link FileHierarchy}. */ public Pattern getIndividualTimeSeriesPattern() { String subDirectory = fileHierarchy.getSubDirectory(IndividualTimeSeries.class).orElse(""); if (subDirectory.isEmpty()) { - return entityNamingStrategy.getIndividualTimeSeriesPattern(); + return entityPersistenceNamingStrategy.getIndividualTimeSeriesPattern(); } else { /* Build the pattern by joining the sub directory with the file name pattern, harmonizing file separators and * finally escaping them */ String joined = FilenameUtils.concat( - subDirectory, entityNamingStrategy.getIndividualTimeSeriesPattern().pattern()); + subDirectory, + entityPersistenceNamingStrategy.getIndividualTimeSeriesPattern().pattern()); String harmonized = IoUtil.harmonizeFileSeparator(joined); String escaped = harmonized.replace("\\", "\\\\"); @@ -191,20 +192,21 @@ public Pattern getIndividualTimeSeriesPattern() { } /** - * Returns the pattern to identify load profile time series in this instance of the file naming strategy considering - * the {@link EntityNamingStrategy} and {@link FileHierarchy}. + * Returns the pattern to identify load profile time series in this instance of the file naming + * strategy considering the {@link EntityPersistenceNamingStrategy} and {@link FileHierarchy}. */ public Pattern getLoadProfileTimeSeriesPattern() { String subDirectory = fileHierarchy.getSubDirectory(LoadProfileInput.class).orElse(""); if (subDirectory.isEmpty()) { - return entityNamingStrategy.getLoadProfileTimeSeriesPattern(); + return entityPersistenceNamingStrategy.getLoadProfileTimeSeriesPattern(); } else { /* Build the pattern by joining the sub directory with the file name pattern, harmonizing file separators and * finally escaping them */ String joined = FilenameUtils.concat( - subDirectory, entityNamingStrategy.getLoadProfileTimeSeriesPattern().pattern()); + subDirectory, + entityPersistenceNamingStrategy.getLoadProfileTimeSeriesPattern().pattern()); String harmonized = IoUtil.harmonizeFileSeparator(joined); String escaped = harmonized.replace("\\", "\\\\"); @@ -243,7 +245,7 @@ else if (getLoadProfileTimeSeriesPattern().matcher(withoutEnding).matches()) return extractLoadProfileTimesSeriesMetaInformation(withoutEnding); else throw new IllegalArgumentException( - "Unknown format of '" + fileName + "'. Cannot extract meta information."); + "Unknown format of '" + fileName + "'. Cannot extract meta information."); } /** @@ -253,22 +255,22 @@ else if (getLoadProfileTimeSeriesPattern().matcher(withoutEnding).matches()) * @return Meta information form individual time series file name */ private IndividualTimeSeriesMetaInformation extractIndividualTimesSeriesMetaInformation( - String fileName) { + String fileName) { Matcher matcher = getIndividualTimeSeriesPattern().matcher(fileName); if (!matcher.matches()) throw new IllegalArgumentException( - "Cannot extract meta information on individual time series from '" + fileName + "'."); + "Cannot extract meta information on individual time series from '" + fileName + "'."); String columnSchemeKey = matcher.group("columnScheme"); ColumnScheme columnScheme = - ColumnScheme.parse(columnSchemeKey) - .orElseThrow( - () -> - new IllegalArgumentException( - "Cannot parse '" + columnSchemeKey + "' to valid column scheme.")); + ColumnScheme.parse(columnSchemeKey) + .orElseThrow( + () -> + new IllegalArgumentException( + "Cannot parse '" + columnSchemeKey + "' to valid column scheme.")); return new IndividualTimeSeriesMetaInformation( - UUID.fromString(matcher.group("uuid")), columnScheme); + UUID.fromString(matcher.group("uuid")), columnScheme); } /** @@ -278,14 +280,14 @@ private IndividualTimeSeriesMetaInformation extractIndividualTimesSeriesMetaInfo * @return Meta information form load profile time series file name */ private LoadProfileTimeSeriesMetaInformation extractLoadProfileTimesSeriesMetaInformation( - String fileName) { + String fileName) { Matcher matcher = getLoadProfileTimeSeriesPattern().matcher(fileName); if (!matcher.matches()) throw new IllegalArgumentException( - "Cannot extract meta information on load profile time series from '" + fileName + "'."); + "Cannot extract meta information on load profile time series from '" + fileName + "'."); return new LoadProfileTimeSeriesMetaInformation( - UUID.fromString(matcher.group("uuid")), matcher.group("profile")); + UUID.fromString(matcher.group("uuid")), matcher.group("profile")); } /** @@ -294,7 +296,7 @@ private LoadProfileTimeSeriesMetaInformation extractLoadProfileTimesSeriesMetaIn * @return the entity name string */ public String getIdCoordinateEntityName() { - return entityNamingStrategy.getIdCoordinateEntityName(); + return entityPersistenceNamingStrategy.getIdCoordinateEntityName(); } /** @@ -304,7 +306,7 @@ public String getIdCoordinateEntityName() { * @return The name of the entity */ public Optional getEntityName(Class cls) { - return entityNamingStrategy.getEntityName(cls); + return entityPersistenceNamingStrategy.getEntityName(cls); } /** @@ -319,6 +321,6 @@ public Optional getEntityName(Class cls) { */ public , E extends TimeSeriesEntry, V extends Value> Optional getEntityName(T timeSeries) { - return entityNamingStrategy.getEntityName(timeSeries); + return entityPersistenceNamingStrategy.getEntityName(timeSeries); } } diff --git a/src/main/java/edu/ie3/datamodel/io/sink/InfluxDbSink.java b/src/main/java/edu/ie3/datamodel/io/sink/InfluxDbSink.java index 9f42eb401..d3577902f 100644 --- a/src/main/java/edu/ie3/datamodel/io/sink/InfluxDbSink.java +++ b/src/main/java/edu/ie3/datamodel/io/sink/InfluxDbSink.java @@ -7,7 +7,7 @@ import edu.ie3.datamodel.exceptions.SinkException; import edu.ie3.datamodel.io.connectors.InfluxDbConnector; -import edu.ie3.datamodel.io.naming.EntityNamingStrategy; +import edu.ie3.datamodel.io.naming.EntityPersistenceNamingStrategy; import edu.ie3.datamodel.io.processor.ProcessorProvider; import edu.ie3.datamodel.io.processor.timeseries.TimeSeriesProcessorKey; import edu.ie3.datamodel.models.UniqueEntity; @@ -33,18 +33,20 @@ public class InfluxDbSink implements OutputDataSink { private static final String FIELD_NAME_INPUT = "inputModel"; private final InfluxDbConnector connector; - private final EntityNamingStrategy entityNamingStrategy; + private final EntityPersistenceNamingStrategy entityPersistenceNamingStrategy; private final ProcessorProvider processorProvider; /** * Initializes a new InfluxDbWeatherSource * * @param connector needed for database connection - * @param entityNamingStrategy needed to create measurement names for entities + * @param entityPersistenceNamingStrategy needed to create measurement names for entities */ - public InfluxDbSink(InfluxDbConnector connector, EntityNamingStrategy entityNamingStrategy) { + public InfluxDbSink( + InfluxDbConnector connector, + EntityPersistenceNamingStrategy entityPersistenceNamingStrategy) { this.connector = connector; - this.entityNamingStrategy = entityNamingStrategy; + this.entityPersistenceNamingStrategy = entityPersistenceNamingStrategy; this.processorProvider = new ProcessorProvider( ProcessorProvider.allResultEntityProcessors(), @@ -57,7 +59,7 @@ public InfluxDbSink(InfluxDbConnector connector, EntityNamingStrategy entityNami * @param connector needed for database connection */ public InfluxDbSink(InfluxDbConnector connector) { - this(connector, new EntityNamingStrategy()); + this(connector, new EntityPersistenceNamingStrategy()); } @Override @@ -106,7 +108,8 @@ public void flush() { * @param entity the entity to transform */ private Optional transformToPoint(ResultEntity entity) { - Optional measurementName = entityNamingStrategy.getResultEntityName(entity.getClass()); + Optional measurementName = + entityPersistenceNamingStrategy.getResultEntityName(entity.getClass()); if (!measurementName.isPresent()) log.warn( "I could not get a measurement name for class {}. I am using its simple name instead.", @@ -165,7 +168,7 @@ private Optional transformToPoint(ResultEntity entity, String measurement private , V extends Value> Set transformToPoints( TimeSeries timeSeries) { if (timeSeries.getEntries().isEmpty()) return Collections.emptySet(); - Optional measurementName = entityNamingStrategy.getEntityName(timeSeries); + Optional measurementName = entityPersistenceNamingStrategy.getEntityName(timeSeries); if (!measurementName.isPresent()) { String valueClassName = timeSeries.getEntries().iterator().next().getValue().getClass().getSimpleName(); diff --git a/src/test/groovy/edu/ie3/datamodel/io/connectors/CsvFileConnectorTest.groovy b/src/test/groovy/edu/ie3/datamodel/io/connectors/CsvFileConnectorTest.groovy index 5a9824f4a..2907d62d2 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/connectors/CsvFileConnectorTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/connectors/CsvFileConnectorTest.groovy @@ -10,7 +10,7 @@ import edu.ie3.datamodel.io.naming.FileNamingStrategy import edu.ie3.datamodel.io.csv.CsvFileDefinition import edu.ie3.datamodel.io.naming.DefaultDirectoryHierarchy import edu.ie3.datamodel.io.csv.timeseries.ColumnScheme -import edu.ie3.datamodel.io.naming.EntityNamingStrategy +import edu.ie3.datamodel.io.naming.EntityPersistenceNamingStrategy import edu.ie3.datamodel.models.StandardUnits import edu.ie3.datamodel.models.input.NodeInput import edu.ie3.datamodel.models.timeseries.individual.IndividualTimeSeries @@ -149,7 +149,7 @@ class CsvFileConnectorTest extends Specification { def "The csv file connector throws an Exception, if the foreseen file cannot be found"() { given: - def cfc = new CsvFileConnector(tmpDirectory.toString(), new FileNamingStrategy(new EntityNamingStrategy(), new DefaultDirectoryHierarchy(tmpDirectory.toString(), "test"))) + def cfc = new CsvFileConnector(tmpDirectory.toString(), new FileNamingStrategy(new EntityPersistenceNamingStrategy(), new DefaultDirectoryHierarchy(tmpDirectory.toString(), "test"))) when: cfc.initReader(NodeInput) @@ -170,7 +170,7 @@ class CsvFileConnectorTest extends Specification { given: "a suitable connector" def baseDirectory = FilenameUtils.concat(tmpDirectory.toString(), "directoryHierarchy") def directoryHierarchy = new DefaultDirectoryHierarchy(baseDirectory, "test") - def fileNamingStrategy = new FileNamingStrategy(new EntityNamingStrategy(), directoryHierarchy) + def fileNamingStrategy = new FileNamingStrategy(new EntityPersistenceNamingStrategy(), directoryHierarchy) def connector = new CsvFileConnector(baseDirectory, fileNamingStrategy) and: "expected results" @@ -236,7 +236,7 @@ class CsvFileConnectorTest extends Specification { def "The csv file connector is able to build correct csv file definition from class upon request, utilizing directory hierarchy"() { given: def baseDirectory = tmpDirectory.toString() - def fileNamingStrategy = new FileNamingStrategy(new EntityNamingStrategy(), new DefaultDirectoryHierarchy(tmpDirectory.toString(), "test")) + def fileNamingStrategy = new FileNamingStrategy(new EntityPersistenceNamingStrategy(), new DefaultDirectoryHierarchy(tmpDirectory.toString(), "test")) def connector = new CsvFileConnector(baseDirectory, fileNamingStrategy) def expected = new CsvFileDefinition("node_input.csv", Stream.of("test", "input", "grid").collect(Collectors.joining(File.separator)), ["a", "b", "c"] as String[], ",") @@ -289,7 +289,7 @@ class CsvFileConnectorTest extends Specification { def "The csv file connector is able to build correct csv file definition from time series upon request, utilizing directory hierarchy"() { given: "a suitable connector" def baseDirectory = tmpDirectory.toString() - def fileNamingStrategy = new FileNamingStrategy(new EntityNamingStrategy(), new DefaultDirectoryHierarchy(tmpDirectory.toString(), "test")) + def fileNamingStrategy = new FileNamingStrategy(new EntityPersistenceNamingStrategy(), new DefaultDirectoryHierarchy(tmpDirectory.toString(), "test")) def connector = new CsvFileConnector(baseDirectory, fileNamingStrategy) def expected = new CsvFileDefinition("its_c_0c03ce9f-ab0e-4715-bc13-f9d903f26dbf.csv", Stream.of("test", "input", "participants", "time_series").collect(Collectors.joining(File.separator)), ["a", "b", "c"] as String[], ",") diff --git a/src/test/groovy/edu/ie3/datamodel/io/naming/EntityNamingStrategyTest.groovy b/src/test/groovy/edu/ie3/datamodel/io/naming/EntityPersistenceNamingStrategyTest.groovy similarity index 89% rename from src/test/groovy/edu/ie3/datamodel/io/naming/EntityNamingStrategyTest.groovy rename to src/test/groovy/edu/ie3/datamodel/io/naming/EntityPersistenceNamingStrategyTest.groovy index 59b8c0451..016346640 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/naming/EntityNamingStrategyTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/naming/EntityPersistenceNamingStrategyTest.groovy @@ -66,11 +66,11 @@ import tech.units.indriya.quantity.Quantities import java.time.ZonedDateTime import java.util.regex.Pattern -class EntityNamingStrategyTest extends Specification { +class EntityPersistenceNamingStrategyTest extends Specification { def "The uuid pattern actually matches a valid uuid"() { given: - def pattern = Pattern.compile(EntityNamingStrategy.UUID_STRING) + def pattern = Pattern.compile(EntityPersistenceNamingStrategy.UUID_STRING) def uuidString = UUID.randomUUID().toString() when: @@ -82,7 +82,7 @@ class EntityNamingStrategyTest extends Specification { def "The pattern for an individual time series file name actually matches a valid file name and extracts the correct groups"() { given: - def fns = new EntityNamingStrategy() + def fns = new EntityPersistenceNamingStrategy() def validFileName = "its_c_4881fda2-bcee-4f4f-a5bb-6a09bf785276" when: @@ -101,7 +101,7 @@ class EntityNamingStrategyTest extends Specification { def "The pattern for a repetitive load profile time series file name actually matches a valid file name and extracts the correct groups"() { given: - def fns = new EntityNamingStrategy() + def fns = new EntityPersistenceNamingStrategy() def validFileName = "lpts_g3_bee0a8b6-4788-4f18-bf72-be52035f7304" when: @@ -120,7 +120,7 @@ class EntityNamingStrategyTest extends Specification { def "The EntityPersistenceNamingStrategy is able to prepare the prefix properly"() { when: - String actual = EntityNamingStrategy.preparePrefix(prefix) + String actual = EntityPersistenceNamingStrategy.preparePrefix(prefix) then: actual == expected @@ -137,7 +137,7 @@ class EntityNamingStrategyTest extends Specification { def "The EntityPersistenceNamingStrategy is able to prepare the suffix properly"() { when: - String actual = EntityNamingStrategy.prepareSuffix(prefix) + String actual = EntityPersistenceNamingStrategy.prepareSuffix(prefix) then: actual == suffix @@ -154,7 +154,7 @@ class EntityNamingStrategyTest extends Specification { def "A EntityPersistenceNamingStrategy should recognize if empty strings are passed in the prefix/suffix constructor and don't add underlines then"() { given: "a naming strategy" - EntityNamingStrategy strategy = new EntityNamingStrategy("", "") + EntityPersistenceNamingStrategy strategy = new EntityPersistenceNamingStrategy("", "") expect: strategy.prefix == "" @@ -163,7 +163,7 @@ class EntityNamingStrategyTest extends Specification { def "A EntityPersistenceNamingStrategy should correctly append and prepend underscores"() { given: "a naming strategy" - EntityNamingStrategy strategy = new EntityNamingStrategy("bla", "foo") + EntityPersistenceNamingStrategy strategy = new EntityPersistenceNamingStrategy("bla", "foo") expect: strategy.prefix == "bla_" @@ -172,7 +172,7 @@ class EntityNamingStrategyTest extends Specification { def "A EntityPersistenceNamingStrategy should correctly append underscore, when only prefix is set"() { given: "a naming strategy" - EntityNamingStrategy strategy = new EntityNamingStrategy("bla") + EntityPersistenceNamingStrategy strategy = new EntityPersistenceNamingStrategy("bla") expect: strategy.prefix == "bla_" @@ -181,7 +181,7 @@ class EntityNamingStrategyTest extends Specification { def "A EntityPersistenceNamingStrategy should return an empty optional on a invalid class"() { given: "a naming strategy" - EntityNamingStrategy strategy = new EntityNamingStrategy() + EntityPersistenceNamingStrategy strategy = new EntityPersistenceNamingStrategy() when: Optional res = strategy.getEntityName(String) @@ -192,7 +192,7 @@ class EntityNamingStrategyTest extends Specification { def "A EntityPersistenceNamingStrategy without pre- or suffixes should return valid strings for all result models"() { given: "a naming strategy without pre- or suffixes" - EntityNamingStrategy strategy = new EntityNamingStrategy() + EntityPersistenceNamingStrategy strategy = new EntityPersistenceNamingStrategy() when: Optional res = strategy.getEntityName(modelClass) @@ -223,7 +223,7 @@ class EntityNamingStrategyTest extends Specification { def "A EntityPersistenceNamingStrategy with pre- and suffixes should return valid strings for all result models"() { given: "a naming strategy with pre- or suffixes" - EntityNamingStrategy strategy = new EntityNamingStrategy("prefix", "suffix") + EntityPersistenceNamingStrategy strategy = new EntityPersistenceNamingStrategy("prefix", "suffix") when: Optional res = strategy.getEntityName(modelClass) @@ -254,7 +254,7 @@ class EntityNamingStrategyTest extends Specification { def "A EntityPersistenceNamingStrategy without pre- or suffixes should return valid strings for all input assets models"() { given: "a naming strategy without pre- or suffixes" - EntityNamingStrategy strategy = new EntityNamingStrategy() + EntityPersistenceNamingStrategy strategy = new EntityPersistenceNamingStrategy() when: Optional res = strategy.getEntityName(modelClass) @@ -287,7 +287,7 @@ class EntityNamingStrategyTest extends Specification { def "A EntityPersistenceNamingStrategy without pre- or suffixes should return valid strings for all input types models"() { given: "a naming strategy without pre- or suffixes" - EntityNamingStrategy strategy = new EntityNamingStrategy() + EntityPersistenceNamingStrategy strategy = new EntityPersistenceNamingStrategy() when: Optional res = strategy.getEntityName(modelClass) @@ -312,7 +312,7 @@ class EntityNamingStrategyTest extends Specification { def "A EntityPersistenceNamingStrategy without pre- or suffixes should return valid strings for a Load Parameter Model"() { given: "a naming strategy without pre- or suffixes" - EntityNamingStrategy strategy = new EntityNamingStrategy() + EntityPersistenceNamingStrategy strategy = new EntityPersistenceNamingStrategy() when: Optional res = strategy.getEntityName(modelClass) @@ -328,7 +328,7 @@ class EntityNamingStrategyTest extends Specification { def "A EntityPersistenceNamingStrategy without pre- or suffixes should return valid strings for a graphic input Model"() { given: "a naming strategy without pre- or suffixes" - EntityNamingStrategy strategy = new EntityNamingStrategy() + EntityPersistenceNamingStrategy strategy = new EntityPersistenceNamingStrategy() when: Optional res = strategy.getEntityName(modelClass) @@ -345,7 +345,7 @@ class EntityNamingStrategyTest extends Specification { def "A EntityPersistenceNamingStrategy without pre- or suffix should return empty Optional, if the content of the time series is not covered"() { given: - EntityNamingStrategy strategy = new EntityNamingStrategy() + EntityPersistenceNamingStrategy strategy = new EntityPersistenceNamingStrategy() def entries = [ new TimeBasedValue(ZonedDateTime.now(), new IntValue(5)) ] as SortedSet @@ -362,7 +362,7 @@ class EntityNamingStrategyTest extends Specification { def "A EntityPersistenceNamingStrategy without pre- or suffix should return empty Optional, if the time series is empty"() { given: - EntityNamingStrategy strategy = new EntityNamingStrategy() + EntityPersistenceNamingStrategy strategy = new EntityPersistenceNamingStrategy() def entries = [] as SortedSet IndividualTimeSeries timeSeries = Mock(IndividualTimeSeries) timeSeries.uuid >> UUID.randomUUID() @@ -377,7 +377,7 @@ class EntityNamingStrategyTest extends Specification { def "A EntityPersistenceNamingStrategy without pre- or suffix should return valid file name for individual time series" () { given: - EntityNamingStrategy strategy = new EntityNamingStrategy() + EntityPersistenceNamingStrategy strategy = new EntityPersistenceNamingStrategy() def entries = [ new TimeBasedValue(ZonedDateTime.now(), new EnergyPriceValue(Quantities.getQuantity(500d, PowerSystemUnits.EURO_PER_MEGAWATTHOUR)))] as SortedSet IndividualTimeSeries timeSeries = Mock(IndividualTimeSeries) @@ -398,7 +398,7 @@ class EntityNamingStrategyTest extends Specification { def "A EntityPersistenceNamingStrategy with pre- or suffix should return valid file name for individual time series" () { given: - EntityNamingStrategy strategy = new EntityNamingStrategy("aa", "zz") + EntityPersistenceNamingStrategy strategy = new EntityPersistenceNamingStrategy("aa", "zz") def entries = [] as SortedSet entries.add(new TimeBasedValue(ZonedDateTime.now(), new EnergyPriceValue(Quantities.getQuantity(500d, PowerSystemUnits.EURO_PER_MEGAWATTHOUR)))) IndividualTimeSeries timeSeries = Mock(IndividualTimeSeries) @@ -419,7 +419,7 @@ class EntityNamingStrategyTest extends Specification { def "A EntityPersistenceNamingStrategy without pre- or suffix should return valid file name for load profile input" () { given: - EntityNamingStrategy strategy = new EntityNamingStrategy() + EntityPersistenceNamingStrategy strategy = new EntityPersistenceNamingStrategy() LoadProfileInput timeSeries = Mock(LoadProfileInput) timeSeries.uuid >> uuid timeSeries.type >> type @@ -438,7 +438,7 @@ class EntityNamingStrategyTest extends Specification { def "A EntityPersistenceNamingStrategy returns empty Optional, when there is no naming defined for a given time series class"() { given: - EntityNamingStrategy entityPersistenceNamingStrategy = new EntityNamingStrategy() + EntityPersistenceNamingStrategy entityPersistenceNamingStrategy = new EntityPersistenceNamingStrategy() RepetitiveTimeSeries timeSeries = Mock(RepetitiveTimeSeries) when: @@ -450,7 +450,7 @@ class EntityNamingStrategyTest extends Specification { def "A EntityPersistenceNamingStrategy without pre- or suffixes should return valid strings for time series mapping"() { given: "a naming strategy without pre- or suffixes" - EntityNamingStrategy strategy = new EntityNamingStrategy() + EntityPersistenceNamingStrategy strategy = new EntityPersistenceNamingStrategy() when: Optional res = strategy.getEntityName(TimeSeriesMappingSource.MappingEntry) @@ -462,7 +462,7 @@ class EntityNamingStrategyTest extends Specification { def "A EntityPersistenceNamingStrategy with pre- and suffix should return valid strings for time series mapping"() { given: "a naming strategy without pre- or suffixes" - EntityNamingStrategy strategy = new EntityNamingStrategy("prefix", "suffix") + EntityPersistenceNamingStrategy strategy = new EntityPersistenceNamingStrategy("prefix", "suffix") when: Optional res = strategy.getEntityName(TimeSeriesMappingSource.MappingEntry) diff --git a/src/test/groovy/edu/ie3/datamodel/io/naming/FileNamingStrategyTest.groovy b/src/test/groovy/edu/ie3/datamodel/io/naming/FileNamingStrategyTest.groovy index ee78e893f..33df42d16 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/naming/FileNamingStrategyTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/naming/FileNamingStrategyTest.groovy @@ -76,13 +76,13 @@ class FileNamingStrategyTest extends Specification { @Shared DefaultDirectoryHierarchy defaultHierarchy FlatDirectoryHierarchy flatHierarchy - EntityNamingStrategy simpleEntityNaming + EntityPersistenceNamingStrategy simpleEntityNaming def setup() { def tmpPath = Files.createTempDirectory("psdm_file_naming_strategy") defaultHierarchy = new DefaultDirectoryHierarchy(tmpPath.toString(), "test_grid") flatHierarchy = new FlatDirectoryHierarchy() - simpleEntityNaming = new EntityNamingStrategy() + simpleEntityNaming = new EntityPersistenceNamingStrategy() } @@ -402,7 +402,7 @@ class FileNamingStrategyTest extends Specification { def "A FileNamingStrategy with DefaultHierarchy and with pre- or suffix should return valid file path for individual time series"() { given: - def strategy = new FileNamingStrategy(new EntityNamingStrategy("aa", "zz"), defaultHierarchy) + def strategy = new FileNamingStrategy(new EntityPersistenceNamingStrategy("aa", "zz"), defaultHierarchy) def entries = [ new TimeBasedValue(ZonedDateTime.now(), new EnergyPriceValue(Quantities.getQuantity(500d, PowerSystemUnits.EURO_PER_MEGAWATTHOUR)))] as SortedSet IndividualTimeSeries timeSeries = Mock(IndividualTimeSeries) @@ -466,7 +466,7 @@ class FileNamingStrategyTest extends Specification { def "A FileNamingStrategy with DefaultHierarchy and pre- and suffix should return valid file path for time series mapping"() { given: "a file naming strategy without pre- or suffixes" - def strategy = new FileNamingStrategy(new EntityNamingStrategy("prefix", "suffix"), defaultHierarchy) + def strategy = new FileNamingStrategy(new EntityPersistenceNamingStrategy("prefix", "suffix"), defaultHierarchy) when: def res = strategy.getFilePath(TimeSeriesMappingSource.MappingEntry) @@ -878,7 +878,7 @@ class FileNamingStrategyTest extends Specification { def "The EntityPersistenceNamingStrategy extracts correct meta information from a valid individual time series file name with pre- and suffix"() { given: - def fns = new FileNamingStrategy(new EntityNamingStrategy("prefix", "suffix"), flatHierarchy) + def fns = new FileNamingStrategy(new EntityPersistenceNamingStrategy("prefix", "suffix"), flatHierarchy) def path = Paths.get(pathString) when: @@ -933,7 +933,7 @@ class FileNamingStrategyTest extends Specification { def "The EntityPersistenceNamingStrategy extracts correct meta information from a valid load profile time series file name with pre- and suffix"() { given: - def fns = new FileNamingStrategy(new EntityNamingStrategy("prefix", "suffix"), flatHierarchy) + def fns = new FileNamingStrategy(new EntityPersistenceNamingStrategy("prefix", "suffix"), flatHierarchy) def path = Paths.get("/bla/foo/prefix_lpts_g3_bee0a8b6-4788-4f18-bf72-be52035f7304_suffix.csv") when: diff --git a/src/test/groovy/edu/ie3/datamodel/io/sink/InfluxDbSinkIT.groovy b/src/test/groovy/edu/ie3/datamodel/io/sink/InfluxDbSinkIT.groovy index 4574dbe89..5b5ae4446 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/sink/InfluxDbSinkIT.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/sink/InfluxDbSinkIT.groovy @@ -5,9 +5,10 @@ */ package edu.ie3.datamodel.io.sink + import edu.ie3.datamodel.io.naming.FileNamingStrategy import edu.ie3.datamodel.io.connectors.InfluxDbConnector -import edu.ie3.datamodel.io.naming.EntityNamingStrategy +import edu.ie3.datamodel.io.naming.EntityPersistenceNamingStrategy import edu.ie3.datamodel.models.StandardUnits import edu.ie3.datamodel.models.input.NodeInput import edu.ie3.datamodel.models.result.ResultEntity @@ -271,7 +272,7 @@ class InfluxDbSinkIT extends Specification { } //Always return an empty Optional for results - class EmptyFileNamingStrategy extends EntityNamingStrategy { + class EmptyFileNamingStrategy extends EntityPersistenceNamingStrategy { @Override Optional getResultEntityName(Class resultEntityClass) { return Optional.empty() From 0a2c5ef92a1ae52af0bc343f6ff5f953c519c696 Mon Sep 17 00:00:00 2001 From: Niklas Steffan Date: Tue, 8 Jun 2021 17:31:40 +0200 Subject: [PATCH 051/157] javadoc correction --- .../java/edu/ie3/datamodel/io/naming/FileNamingStrategy.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java/edu/ie3/datamodel/io/naming/FileNamingStrategy.java b/src/main/java/edu/ie3/datamodel/io/naming/FileNamingStrategy.java index 8d6f67d26..661151231 100644 --- a/src/main/java/edu/ie3/datamodel/io/naming/FileNamingStrategy.java +++ b/src/main/java/edu/ie3/datamodel/io/naming/FileNamingStrategy.java @@ -171,6 +171,8 @@ Optional getDirectoryPath(T timeSeries) { /** * Returns the pattern to identify individual time series in this instance of the file naming * strategy considering the {@link EntityPersistenceNamingStrategy} and {@link FileHierarchy}. + * + * @return An individual time series pattern */ public Pattern getIndividualTimeSeriesPattern() { String subDirectory = fileHierarchy.getSubDirectory(IndividualTimeSeries.class).orElse(""); @@ -194,6 +196,8 @@ public Pattern getIndividualTimeSeriesPattern() { /** * Returns the pattern to identify load profile time series in this instance of the file naming * strategy considering the {@link EntityPersistenceNamingStrategy} and {@link FileHierarchy}. + * + * @return A load profile time series pattern */ public Pattern getLoadProfileTimeSeriesPattern() { String subDirectory = fileHierarchy.getSubDirectory(LoadProfileInput.class).orElse(""); From 238aa3decc39b96de02deaa153060f9aa115c6ff Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 11 Jun 2021 04:08:29 +0000 Subject: [PATCH 052/157] Bump org.sonarqube from 3.2.0 to 3.3 Bumps org.sonarqube from 3.2.0 to 3.3. --- updated-dependencies: - dependency-name: org.sonarqube dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index c6ec90013..43b86232f 100644 --- a/build.gradle +++ b/build.gradle @@ -10,7 +10,7 @@ plugins { id 'de.undercouch.download' version '4.1.1' id 'kr.motd.sphinx' version '2.10.1' // documentation generation id 'jacoco' // java code coverage plugin - id "org.sonarqube" version "3.2.0" // sonarqube + id "org.sonarqube" version "3.3" // sonarqube id 'net.thauvin.erik.gradle.semver' version '1.0.4' // semantic versioning } From d356a06946d4042aee55d878b33c2b6c66e4542d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 14 Jun 2021 04:23:00 +0000 Subject: [PATCH 053/157] Bump commons-io from 2.9.0 to 2.10.0 Bumps commons-io from 2.9.0 to 2.10.0. --- updated-dependencies: - dependency-name: commons-io:commons-io dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 43b86232f..33f0c42e3 100644 --- a/build.gradle +++ b/build.gradle @@ -86,7 +86,7 @@ dependencies { runtimeOnly 'org.postgresql:postgresql:42.2.20' // postgresql jdbc driver required during runtime - compile 'commons-io:commons-io:2.9.0' // I/O functionalities + compile 'commons-io:commons-io:2.10.0' // I/O functionalities compile 'org.apache.commons:commons-compress:1.20' // I/O functionalities } From bc5dd97f1c003d12a46c9a511bbe295f05f82c94 Mon Sep 17 00:00:00 2001 From: Niklas Steffan Date: Tue, 15 Jun 2021 10:50:25 +0200 Subject: [PATCH 054/157] ongoing adaption for base directory of FlatHierarchy --- .../io/naming/DefaultDirectoryHierarchy.java | 10 ++++++ .../datamodel/io/naming/FileHierarchy.java | 8 +++++ .../io/naming/FileNamingStrategy.java | 21 ++++++++++--- .../io/naming/FlatDirectoryHierarchy.java | 31 +++++++++++++++++++ .../io/naming/FileNamingStrategyTest.groovy | 2 +- .../naming/FlatDirectoryHierarchyTest.groovy | 1 + 6 files changed, 68 insertions(+), 5 deletions(-) diff --git a/src/main/java/edu/ie3/datamodel/io/naming/DefaultDirectoryHierarchy.java b/src/main/java/edu/ie3/datamodel/io/naming/DefaultDirectoryHierarchy.java index 80c95fc2e..d32745854 100644 --- a/src/main/java/edu/ie3/datamodel/io/naming/DefaultDirectoryHierarchy.java +++ b/src/main/java/edu/ie3/datamodel/io/naming/DefaultDirectoryHierarchy.java @@ -191,6 +191,16 @@ public void createDirs(boolean withOptionals) throws IOException { } } + /** + * Gives the {@link #baseDirectory}). + * + * @return An Option to the base directory as a string + */ + @Override + public Optional getBaseDirectory() { + return Optional.of(this.baseDirectory.toString()); + } + /** * Gives the correct sub directory (w.r.t. {@link #baseDirectory}) for the provided class. * diff --git a/src/main/java/edu/ie3/datamodel/io/naming/FileHierarchy.java b/src/main/java/edu/ie3/datamodel/io/naming/FileHierarchy.java index 38ba77d8c..f6f10f20a 100644 --- a/src/main/java/edu/ie3/datamodel/io/naming/FileHierarchy.java +++ b/src/main/java/edu/ie3/datamodel/io/naming/FileHierarchy.java @@ -34,4 +34,12 @@ public interface FileHierarchy { default Optional getSubDirectory(Class cls) { return getSubDirectory(cls, File.separator); } + + /** + * Determines the base directory. + * + * @return An option to the base directory + */ + Optional getBaseDirectory(); + } diff --git a/src/main/java/edu/ie3/datamodel/io/naming/FileNamingStrategy.java b/src/main/java/edu/ie3/datamodel/io/naming/FileNamingStrategy.java index 661151231..e08f95367 100644 --- a/src/main/java/edu/ie3/datamodel/io/naming/FileNamingStrategy.java +++ b/src/main/java/edu/ie3/datamodel/io/naming/FileNamingStrategy.java @@ -55,9 +55,9 @@ public FileNamingStrategy( * * @param entityPersistenceNamingStrategy entity naming strategy */ - public FileNamingStrategy(EntityPersistenceNamingStrategy entityPersistenceNamingStrategy) { + public FileNamingStrategy(EntityPersistenceNamingStrategy entityPersistenceNamingStrategy, String basePath) { this.entityPersistenceNamingStrategy = entityPersistenceNamingStrategy; - this.fileHierarchy = new FlatDirectoryHierarchy(); + this.fileHierarchy = new FlatDirectoryHierarchy(basePath); } /** @@ -65,9 +65,9 @@ public FileNamingStrategy(EntityPersistenceNamingStrategy entityPersistenceNamin * the entity naming strategy is used. Since no directory hierarchy is provided, a flat directory * hierarchy is used. */ - public FileNamingStrategy() { + public FileNamingStrategy(String basePath) { this.entityPersistenceNamingStrategy = new EntityPersistenceNamingStrategy(); - this.fileHierarchy = new FlatDirectoryHierarchy(); + this.fileHierarchy = new FlatDirectoryHierarchy(basePath); } /** @@ -303,6 +303,19 @@ public String getIdCoordinateEntityName() { return entityPersistenceNamingStrategy.getIdCoordinateEntityName(); } + /** + * Get the full path to the id coordinate file with regard to some (not explicitly specified) base directory. + * The path does NOT start or end with any of the known file separators or file extension. + * + * @return An optional sub path to the id coordinate file + */ + public Optional getIdCoordinateFilePath() { + // do not adapt orElseGet, see https://www.baeldung.com/java-optional-or-else-vs-or-else-get for + // details + return getFilePath( + getIdCoordinateEntityName(), fileHierarchy.getBaseDirectory().orElseGet(() -> "")); + } + /** * Returns the name of the entity, that should be used for persistence. * diff --git a/src/main/java/edu/ie3/datamodel/io/naming/FlatDirectoryHierarchy.java b/src/main/java/edu/ie3/datamodel/io/naming/FlatDirectoryHierarchy.java index 7c4787d64..40185f9a8 100644 --- a/src/main/java/edu/ie3/datamodel/io/naming/FlatDirectoryHierarchy.java +++ b/src/main/java/edu/ie3/datamodel/io/naming/FlatDirectoryHierarchy.java @@ -6,11 +6,31 @@ package edu.ie3.datamodel.io.naming; import edu.ie3.datamodel.models.UniqueEntity; +import org.apache.commons.io.FilenameUtils; + +import java.io.File; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.util.Arrays; import java.util.Optional; +import java.util.stream.Collectors; /** Default directory hierarchy for input models */ public class FlatDirectoryHierarchy implements FileHierarchy { + /** Use the unix file separator here. */ + protected static final String FILE_SEPARATOR = File.separator; + + /** Base directory for this specific grid model. The base path should be a directory. */ + private final Path baseDirectory; + + public FlatDirectoryHierarchy(String baseDirectory) { + /* Prepare the base path */ + String baseDirectoryNormalized = + FilenameUtils.normalizeNoEndSeparator(baseDirectory, true) + FILE_SEPARATOR; + this.baseDirectory = Paths.get(baseDirectoryNormalized).toAbsolutePath(); + } + /** * Gives empty sub directory. * @@ -22,4 +42,15 @@ public class FlatDirectoryHierarchy implements FileHierarchy { public Optional getSubDirectory(Class cls, String fileSeparator) { return Optional.empty(); } + + + /** + * Gives the {@link #baseDirectory}). + * + * @return An Option to the base directory as a string + */ + @Override + public Optional getBaseDirectory() { + return Optional.of(this.baseDirectory.toString()); + } } diff --git a/src/test/groovy/edu/ie3/datamodel/io/naming/FileNamingStrategyTest.groovy b/src/test/groovy/edu/ie3/datamodel/io/naming/FileNamingStrategyTest.groovy index 33df42d16..6957923ae 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/naming/FileNamingStrategyTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/naming/FileNamingStrategyTest.groovy @@ -81,7 +81,7 @@ class FileNamingStrategyTest extends Specification { def setup() { def tmpPath = Files.createTempDirectory("psdm_file_naming_strategy") defaultHierarchy = new DefaultDirectoryHierarchy(tmpPath.toString(), "test_grid") - flatHierarchy = new FlatDirectoryHierarchy() + flatHierarchy = new FlatDirectoryHierarchy(tmpPath.toString()) simpleEntityNaming = new EntityPersistenceNamingStrategy() } diff --git a/src/test/groovy/edu/ie3/datamodel/io/naming/FlatDirectoryHierarchyTest.groovy b/src/test/groovy/edu/ie3/datamodel/io/naming/FlatDirectoryHierarchyTest.groovy index fad8f2a42..832bc2840 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/naming/FlatDirectoryHierarchyTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/naming/FlatDirectoryHierarchyTest.groovy @@ -39,6 +39,7 @@ class FlatDirectoryHierarchyTest extends Specification { def fdh = new FlatDirectoryHierarchy() then: + println(basePath) Files.exists(basePath) Files.isDirectory(basePath) From e7beb45d10b79c836e99ce9da62ee625c785f99c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 15 Jun 2021 09:20:24 +0000 Subject: [PATCH 055/157] Bump postgresql from 42.2.20 to 42.2.21 Bumps [postgresql](https://github.com/pgjdbc/pgjdbc) from 42.2.20 to 42.2.21. - [Release notes](https://github.com/pgjdbc/pgjdbc/releases) - [Changelog](https://github.com/pgjdbc/pgjdbc/blob/REL42.2.21/CHANGELOG.md) - [Commits](https://github.com/pgjdbc/pgjdbc/compare/REL42.2.20...REL42.2.21) --- updated-dependencies: - dependency-name: org.postgresql:postgresql dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 33f0c42e3..2455592dc 100644 --- a/build.gradle +++ b/build.gradle @@ -83,7 +83,7 @@ dependencies { // Databases compile 'org.influxdb:influxdb-java:2.21' compile 'com.couchbase.client:java-client:3.1.6' - runtimeOnly 'org.postgresql:postgresql:42.2.20' // postgresql jdbc driver required during runtime + runtimeOnly 'org.postgresql:postgresql:42.2.21' // postgresql jdbc driver required during runtime compile 'commons-io:commons-io:2.10.0' // I/O functionalities From b6170bf0cc740c2887477ef3caadd39b8cd86928 Mon Sep 17 00:00:00 2001 From: Niklas Steffan Date: Tue, 15 Jun 2021 11:36:32 +0200 Subject: [PATCH 056/157] empty base directory of FlatHierarchy > correct? --- .../io/naming/FileNamingStrategy.java | 8 +++--- .../io/naming/FlatDirectoryHierarchy.java | 17 ++----------- .../io/naming/FileNamingStrategyTest.groovy | 25 ++++++++++++++++++- 3 files changed, 30 insertions(+), 20 deletions(-) diff --git a/src/main/java/edu/ie3/datamodel/io/naming/FileNamingStrategy.java b/src/main/java/edu/ie3/datamodel/io/naming/FileNamingStrategy.java index e08f95367..516952713 100644 --- a/src/main/java/edu/ie3/datamodel/io/naming/FileNamingStrategy.java +++ b/src/main/java/edu/ie3/datamodel/io/naming/FileNamingStrategy.java @@ -55,9 +55,9 @@ public FileNamingStrategy( * * @param entityPersistenceNamingStrategy entity naming strategy */ - public FileNamingStrategy(EntityPersistenceNamingStrategy entityPersistenceNamingStrategy, String basePath) { + public FileNamingStrategy(EntityPersistenceNamingStrategy entityPersistenceNamingStrategy) { this.entityPersistenceNamingStrategy = entityPersistenceNamingStrategy; - this.fileHierarchy = new FlatDirectoryHierarchy(basePath); + this.fileHierarchy = new FlatDirectoryHierarchy(); } /** @@ -65,9 +65,9 @@ public FileNamingStrategy(EntityPersistenceNamingStrategy entityPersistenceNamin * the entity naming strategy is used. Since no directory hierarchy is provided, a flat directory * hierarchy is used. */ - public FileNamingStrategy(String basePath) { + public FileNamingStrategy() { this.entityPersistenceNamingStrategy = new EntityPersistenceNamingStrategy(); - this.fileHierarchy = new FlatDirectoryHierarchy(basePath); + this.fileHierarchy = new FlatDirectoryHierarchy(); } /** diff --git a/src/main/java/edu/ie3/datamodel/io/naming/FlatDirectoryHierarchy.java b/src/main/java/edu/ie3/datamodel/io/naming/FlatDirectoryHierarchy.java index 40185f9a8..1c9203cd3 100644 --- a/src/main/java/edu/ie3/datamodel/io/naming/FlatDirectoryHierarchy.java +++ b/src/main/java/edu/ie3/datamodel/io/naming/FlatDirectoryHierarchy.java @@ -18,19 +18,6 @@ /** Default directory hierarchy for input models */ public class FlatDirectoryHierarchy implements FileHierarchy { - /** Use the unix file separator here. */ - protected static final String FILE_SEPARATOR = File.separator; - - /** Base directory for this specific grid model. The base path should be a directory. */ - private final Path baseDirectory; - - public FlatDirectoryHierarchy(String baseDirectory) { - /* Prepare the base path */ - String baseDirectoryNormalized = - FilenameUtils.normalizeNoEndSeparator(baseDirectory, true) + FILE_SEPARATOR; - this.baseDirectory = Paths.get(baseDirectoryNormalized).toAbsolutePath(); - } - /** * Gives empty sub directory. * @@ -45,12 +32,12 @@ public Optional getSubDirectory(Class cls, Strin /** - * Gives the {@link #baseDirectory}). + * Gives the baseDirectory, which is Empty. * * @return An Option to the base directory as a string */ @Override public Optional getBaseDirectory() { - return Optional.of(this.baseDirectory.toString()); + return Optional.empty(); } } diff --git a/src/test/groovy/edu/ie3/datamodel/io/naming/FileNamingStrategyTest.groovy b/src/test/groovy/edu/ie3/datamodel/io/naming/FileNamingStrategyTest.groovy index 6957923ae..a6946451c 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/naming/FileNamingStrategyTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/naming/FileNamingStrategyTest.groovy @@ -81,7 +81,7 @@ class FileNamingStrategyTest extends Specification { def setup() { def tmpPath = Files.createTempDirectory("psdm_file_naming_strategy") defaultHierarchy = new DefaultDirectoryHierarchy(tmpPath.toString(), "test_grid") - flatHierarchy = new FlatDirectoryHierarchy(tmpPath.toString()) + flatHierarchy = new FlatDirectoryHierarchy() simpleEntityNaming = new EntityPersistenceNamingStrategy() } @@ -947,4 +947,27 @@ class FileNamingStrategyTest extends Specification { } } + + def "The FileNamingStrategy with FlatHierarchy returns the Id Coordinate file path correctly"() { + def fns = new FileNamingStrategy(new EntityPersistenceNamingStrategy("prefix", "suffix"), flatHierarchy) + + when: + def idFilePath = fns.getIdCoordinateFilePath() + + then: + idFilePath.present + idFilePath.get() == "prefix_coordinates_suffix" + } + + def "The FileNamingStrategy with DefaultHierarchy returns the Id Coordinate file path correctly"() { + def fns = new FileNamingStrategy(new EntityPersistenceNamingStrategy("prefix", "suffix"), defaultHierarchy) + + when: + def idFilePath = fns.getIdCoordinateFilePath() + + then: + idFilePath.present + idFilePath.get() == defaultHierarchy.baseDirectory.get() + File.separator + "prefix_coordinates_suffix" + } + } \ No newline at end of file From e1495f609512a4d54e929b58e3ce10501eae5b31 Mon Sep 17 00:00:00 2001 From: t-ober <63147366+t-ober@users.noreply.github.com> Date: Tue, 15 Jun 2021 11:38:54 +0200 Subject: [PATCH 057/157] test for nulls and empty strings --- .../input/AssetInputEntityFactoryTest.groovy | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/src/test/groovy/edu/ie3/datamodel/io/factory/input/AssetInputEntityFactoryTest.groovy b/src/test/groovy/edu/ie3/datamodel/io/factory/input/AssetInputEntityFactoryTest.groovy index 191560ce0..94b29b916 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/factory/input/AssetInputEntityFactoryTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/factory/input/AssetInputEntityFactoryTest.groovy @@ -53,6 +53,39 @@ class AssetInputEntityFactoryTest extends Specification implements FactoryTestHe } } + def "An AssetInputFactory should parse a valid operated AssetInput correctly (nulls and empty strings)"() { + given: "a system participant input type factory and model data" + def inputFactory = new TestAssetInputFactory() + Map parameter = [ + "uuid": "91ec3bcf-1777-4d38-af67-0bf7c9fa73c7", + "operatesfrom" : operatesfrom, + "operatesuntil": operatesuntil, + "id" : "TestID" + ] + def inputClass = TestAssetInput + def operatorInput = Mock(OperatorInput) + + when: + Optional input = inputFactory.get(new AssetInputEntityData(parameter, inputClass, operatorInput)) + + then: + input.present + input.get().getClass() == inputClass + ((TestAssetInput) input.get()).with { + assert uuid == UUID.fromString(parameter["uuid"]) + assert operationTime == OperationTime.notLimited() + assert operator == operatorInput + assert id == parameter["id"] + } + + where: + operatesfrom | operatesuntil + null | null + "" | null + null | "" + "" | "" + } + def "An AssetInputFactory should parse a valid operated AssetInput correctly (operation start time provided)"() { given: "a system participant input type factory and model data" def inputFactory = new TestAssetInputFactory() From ff8e1e186c369ffa1b32eaae3a38ab29deb3642a Mon Sep 17 00:00:00 2001 From: NGL04 <66064199+NGL04@users.noreply.github.com> Date: Tue, 15 Jun 2021 11:40:29 +0200 Subject: [PATCH 058/157] Apply suggestions from code review renaming of desiredTemperature to targetTemperature Co-authored-by: Chris Kittl <44838605+ckittl@users.noreply.github.com> --- CHANGELOG.md | 4 ++-- docs/readthedocs/models/input/participant/thermalhouse.rst | 2 +- .../io/factory/input/ThermalHouseInputFactory.java | 2 +- .../datamodel/models/input/thermal/ThermalHouseInput.java | 6 +++--- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index eff512750..0d18c9b1a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,8 +6,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased/Snapshot] -### Changed -- added desired temperature boundaries to `ThermalHouseInput` +### Added +- added target temperature including tolerance boundaries to `ThermalHouseInput` ### Fixed - `CsvSystemParticipantSource#getSystemParticipants()` now correctly returns electric vehicle charging station input models [PR#370](https://github.com/ie3-institute/PowerSystemDataModel/pull/370) diff --git a/docs/readthedocs/models/input/participant/thermalhouse.rst b/docs/readthedocs/models/input/participant/thermalhouse.rst index 4112001df..d2a6a3a81 100644 --- a/docs/readthedocs/models/input/participant/thermalhouse.rst +++ b/docs/readthedocs/models/input/participant/thermalhouse.rst @@ -22,7 +22,7 @@ Attributes, Units and Remarks +-----------------------+---------+---------------------------------+ | ethCapa | kWh / K | Thermal capacity | +-----------------------+---------+---------------------------------+ -| desiredTemperature | °C | Desired target temperature | +| targetTemperature | °C | Desired target temperature | +-----------------------+---------+---------------------------------+ | upperTemperatureLimit | °C | Upper temperature boundary | +-----------------------+---------+---------------------------------+ diff --git a/src/main/java/edu/ie3/datamodel/io/factory/input/ThermalHouseInputFactory.java b/src/main/java/edu/ie3/datamodel/io/factory/input/ThermalHouseInputFactory.java index 3df298ef6..ca218a283 100644 --- a/src/main/java/edu/ie3/datamodel/io/factory/input/ThermalHouseInputFactory.java +++ b/src/main/java/edu/ie3/datamodel/io/factory/input/ThermalHouseInputFactory.java @@ -20,7 +20,7 @@ public class ThermalHouseInputFactory extends AssetInputEntityFactory { private static final String ETH_LOSSES = "ethlosses"; private static final String ETH_CAPA = "ethcapa"; - private static final String DESIRED_TEMPERATURE = "desiredTemperature"; + private static final String TARGET_TEMPERATURE = "targetTemperature"; private static final String UPPER_TEMPERATURE_LIMIT = "upperTemperatureLimit"; private static final String LOWER_TEMPERATURE_LIMIT = "lowerTemperatureLimit"; diff --git a/src/main/java/edu/ie3/datamodel/models/input/thermal/ThermalHouseInput.java b/src/main/java/edu/ie3/datamodel/models/input/thermal/ThermalHouseInput.java index 63666fcc3..0a7036430 100644 --- a/src/main/java/edu/ie3/datamodel/models/input/thermal/ThermalHouseInput.java +++ b/src/main/java/edu/ie3/datamodel/models/input/thermal/ThermalHouseInput.java @@ -22,7 +22,7 @@ public class ThermalHouseInput extends ThermalSinkInput { /** Thermal capacity of the included thermal house model (typically in kWh/K) */ private final ComparableQuantity ethCapa; /** Desired target temperature of the thermal house model (typically in °C) */ - private final ComparableQuantity desiredTemperature; + private final ComparableQuantity targetTemperature; /** Upper boundary temperature of the thermal house model (typically in °C) */ private final ComparableQuantity upperTemperatureLimit; /** Lower boundary temperature of the thermal house model (typically in °C) */ @@ -75,7 +75,7 @@ public ThermalHouseInput( ThermalBusInput bus, ComparableQuantity ethLosses, ComparableQuantity ethCapa, - ComparableQuantity desiredTemperature, + ComparableQuantity targetTemperature, ComparableQuantity upperTemperatureLimit, ComparableQuantity lowerTemperatureLimit) { super(uuid, id, operator, operationTime, bus); @@ -152,7 +152,7 @@ public String toString() { + ethLosses + ", ethCapa=" + ethCapa - + ", desiredTemperature=" + + ", targetTemperature=" + desiredTemperature + ", upperTemperatureLimit=" + upperTemperatureLimit From 8fb40608ac107bd5144b765245c4f8bd8e33bc21 Mon Sep 17 00:00:00 2001 From: Niklas Steffan Date: Tue, 15 Jun 2021 11:55:36 +0200 Subject: [PATCH 059/157] completed renaming of desiredTemperature to targetTemperature --- .../main/input/ThermalDatamodelConcept.puml | 2 +- .../input/ThermalHouseInputFactory.java | 8 +- .../input/thermal/ThermalHouseInput.java | 32 +- .../ThermalUnitValidationUtils.java | 47 +-- .../input/ThermalHouseInputFactoryTest.groovy | 78 ++--- .../io/source/csv/CsvThermalSourceTest.groovy | 316 +++++++++--------- .../CylindricalStorageInputTest.groovy | 44 +-- .../thermal/ThermalHouseInputTest.groovy | 48 +-- .../ThermalUnitValidationUtilsTest.groovy | 164 ++++----- .../common/ThermalUnitInputTestData.groovy | 82 ++--- .../thermal/thermal_house_input.csv | 2 +- 11 files changed, 413 insertions(+), 410 deletions(-) diff --git a/docs/uml/main/input/ThermalDatamodelConcept.puml b/docs/uml/main/input/ThermalDatamodelConcept.puml index f18207ad9..5d4d41dfa 100644 --- a/docs/uml/main/input/ThermalDatamodelConcept.puml +++ b/docs/uml/main/input/ThermalDatamodelConcept.puml @@ -101,7 +101,7 @@ package models { class ThermalHouseInput { - ethCapa: ComparableQuantity [kWh/K] - ethLosses: ComparableQuantity [kW/K] - - desiredTemperature: ComparableQuantity [°C] + - targetTemperature: ComparableQuantity [°C] - upperTemperatureLimit: ComparableQuantity [°C] - lowerTemperatureLimit: ComparableQuantity [°C] } diff --git a/src/main/java/edu/ie3/datamodel/io/factory/input/ThermalHouseInputFactory.java b/src/main/java/edu/ie3/datamodel/io/factory/input/ThermalHouseInputFactory.java index ca218a283..f60961cb6 100644 --- a/src/main/java/edu/ie3/datamodel/io/factory/input/ThermalHouseInputFactory.java +++ b/src/main/java/edu/ie3/datamodel/io/factory/input/ThermalHouseInputFactory.java @@ -31,7 +31,7 @@ public ThermalHouseInputFactory() { @Override protected String[] getAdditionalFields() { return new String[] { - ETH_LOSSES, ETH_CAPA, DESIRED_TEMPERATURE, UPPER_TEMPERATURE_LIMIT, LOWER_TEMPERATURE_LIMIT + ETH_LOSSES, ETH_CAPA, TARGET_TEMPERATURE, UPPER_TEMPERATURE_LIMIT, LOWER_TEMPERATURE_LIMIT }; } @@ -47,8 +47,8 @@ protected ThermalHouseInput buildModel( data.getQuantity(ETH_LOSSES, StandardUnits.THERMAL_TRANSMISSION); final ComparableQuantity ethCapa = data.getQuantity(ETH_CAPA, StandardUnits.HEAT_CAPACITY); - final ComparableQuantity desiredTemperature = - data.getQuantity(DESIRED_TEMPERATURE, StandardUnits.TEMPERATURE); + final ComparableQuantity targetTemperature = + data.getQuantity(TARGET_TEMPERATURE, StandardUnits.TEMPERATURE); final ComparableQuantity upperTemperatureLimit = data.getQuantity(UPPER_TEMPERATURE_LIMIT, StandardUnits.TEMPERATURE); final ComparableQuantity lowerTemperatureLimit = @@ -61,7 +61,7 @@ protected ThermalHouseInput buildModel( busInput, ethLosses, ethCapa, - desiredTemperature, + targetTemperature, upperTemperatureLimit, lowerTemperatureLimit); } diff --git a/src/main/java/edu/ie3/datamodel/models/input/thermal/ThermalHouseInput.java b/src/main/java/edu/ie3/datamodel/models/input/thermal/ThermalHouseInput.java index 0a7036430..96f4e5ee6 100644 --- a/src/main/java/edu/ie3/datamodel/models/input/thermal/ThermalHouseInput.java +++ b/src/main/java/edu/ie3/datamodel/models/input/thermal/ThermalHouseInput.java @@ -34,7 +34,7 @@ public class ThermalHouseInput extends ThermalSinkInput { * @param bus Thermal bus, the model is connected to * @param ethLosses Thermal, transitional losses of the included thermal house model * @param ethCapa Thermal capacity of the included thermal house model - * @param desiredTemperature Desired target temperature of the thermal house model + * @param targetTemperature Desired target temperature of the thermal house model * @param upperTemperatureLimit Upper boundary temperature of the thermal house model * @param lowerTemperatureLimit Lower boundary temperature of the thermal house model */ @@ -44,13 +44,13 @@ public ThermalHouseInput( ThermalBusInput bus, ComparableQuantity ethLosses, ComparableQuantity ethCapa, - ComparableQuantity desiredTemperature, + ComparableQuantity targetTemperature, ComparableQuantity upperTemperatureLimit, ComparableQuantity lowerTemperatureLimit) { super(uuid, id, bus); this.ethLosses = ethLosses.to(StandardUnits.THERMAL_TRANSMISSION); this.ethCapa = ethCapa.to(StandardUnits.HEAT_CAPACITY); - this.desiredTemperature = desiredTemperature.to(StandardUnits.TEMPERATURE); + this.targetTemperature = targetTemperature.to(StandardUnits.TEMPERATURE); this.upperTemperatureLimit = upperTemperatureLimit.to(StandardUnits.TEMPERATURE); this.lowerTemperatureLimit = lowerTemperatureLimit.to(StandardUnits.TEMPERATURE); } @@ -63,7 +63,7 @@ public ThermalHouseInput( * @param bus Thermal bus, the model is connected to * @param ethLosses Thermal, transitional losses of the included thermal house model * @param ethCapa Thermal capacity of the included thermal house model - * @param desiredTemperature Desired target temperature of the thermal house model + * @param targetTemperature Desired target temperature of the thermal house model * @param upperTemperatureLimit Upper boundary temperature of the thermal house model * @param lowerTemperatureLimit Lower boundary temperature of the thermal house model */ @@ -81,7 +81,7 @@ public ThermalHouseInput( super(uuid, id, operator, operationTime, bus); this.ethLosses = ethLosses.to(StandardUnits.THERMAL_TRANSMISSION); this.ethCapa = ethCapa.to(StandardUnits.HEAT_CAPACITY); - this.desiredTemperature = desiredTemperature.to(StandardUnits.TEMPERATURE); + this.targetTemperature = targetTemperature.to(StandardUnits.TEMPERATURE); this.upperTemperatureLimit = upperTemperatureLimit.to(StandardUnits.TEMPERATURE); this.lowerTemperatureLimit = lowerTemperatureLimit.to(StandardUnits.TEMPERATURE); } @@ -94,8 +94,8 @@ public ComparableQuantity getEthCapa() { return ethCapa; } - public ComparableQuantity getDesiredTemperature() { - return desiredTemperature; + public ComparableQuantity getTargetTemperature() { + return targetTemperature; } public ComparableQuantity getUpperTemperatureLimit() { @@ -119,7 +119,7 @@ public boolean equals(Object o) { ThermalHouseInput that = (ThermalHouseInput) o; return ethLosses.equals(that.ethLosses) && ethCapa.equals(that.ethCapa) - && desiredTemperature.equals(that.desiredTemperature) + && targetTemperature.equals(that.targetTemperature) && upperTemperatureLimit.equals(that.upperTemperatureLimit) && lowerTemperatureLimit.equals(that.lowerTemperatureLimit); } @@ -130,7 +130,7 @@ public int hashCode() { super.hashCode(), ethLosses, ethCapa, - desiredTemperature, + targetTemperature, upperTemperatureLimit, lowerTemperatureLimit); } @@ -153,7 +153,7 @@ public String toString() { + ", ethCapa=" + ethCapa + ", targetTemperature=" - + desiredTemperature + + targetTemperature + ", upperTemperatureLimit=" + upperTemperatureLimit + ", lowerTemperatureLimit=" @@ -171,7 +171,7 @@ public static class ThermalHouseInputCopyBuilder private ComparableQuantity ethLosses; private ComparableQuantity ethCapa; - private ComparableQuantity desiredTemperature; + private ComparableQuantity targetTemperature; private ComparableQuantity upperTemperatureLimit; private ComparableQuantity lowerTemperatureLimit; @@ -179,7 +179,7 @@ private ThermalHouseInputCopyBuilder(ThermalHouseInput entity) { super(entity); this.ethLosses = entity.getEthLosses(); this.ethCapa = entity.getEthCapa(); - this.desiredTemperature = entity.getDesiredTemperature(); + this.targetTemperature = entity.getTargetTemperature(); this.upperTemperatureLimit = entity.getUpperTemperatureLimit(); this.lowerTemperatureLimit = entity.getLowerTemperatureLimit(); } @@ -194,7 +194,7 @@ public ThermalHouseInput build() { getThermalBus(), ethLosses, ethCapa, - desiredTemperature, + targetTemperature, upperTemperatureLimit, lowerTemperatureLimit); } @@ -210,9 +210,9 @@ public ThermalHouseInputCopyBuilder ethCapa(ComparableQuantity eth return this; } - public ThermalHouseInputCopyBuilder desiredTemperature( - ComparableQuantity desiredTemperature) { - this.desiredTemperature = desiredTemperature; + public ThermalHouseInputCopyBuilder targetTemperature( + ComparableQuantity targetTemperature) { + this.targetTemperature = targetTemperature; return this; } diff --git a/src/main/java/edu/ie3/datamodel/utils/validation/ThermalUnitValidationUtils.java b/src/main/java/edu/ie3/datamodel/utils/validation/ThermalUnitValidationUtils.java index 4966f0117..b21dc7f2f 100644 --- a/src/main/java/edu/ie3/datamodel/utils/validation/ThermalUnitValidationUtils.java +++ b/src/main/java/edu/ie3/datamodel/utils/validation/ThermalUnitValidationUtils.java @@ -2,16 +2,19 @@ * © 2021. TU Dortmund University, * Institute of Energy Systems, Energy Efficiency and Energy Economics, * Research group Distribution grid planning and operation -*/ + */ package edu.ie3.datamodel.utils.validation; import edu.ie3.datamodel.exceptions.InvalidEntityException; import edu.ie3.datamodel.models.input.thermal.*; + import javax.measure.Quantity; public class ThermalUnitValidationUtils extends ValidationUtils { - /** Private Constructor as this class is not meant to be instantiated */ + /** + * Private Constructor as this class is not meant to be instantiated + */ private ThermalUnitValidationUtils() { throw new IllegalStateException("Don't try and instantiate a Utility class."); } @@ -78,25 +81,25 @@ private static void checkThermalStorage(ThermalStorageInput thermalStorageInput) * - its thermal losses are not negative
* - its thermal capacity is positive
* - its upper temperature limit is higher than the lower temperature limit
- * - its desired temperature lies between the upper und lower limit temperatures + * - its target temperature lies between the upper und lower limit temperatures * * @param thermalHouseInput ThermalHouseInput to validate */ private static void checkThermalHouse(ThermalHouseInput thermalHouseInput) { checkNonNull(thermalHouseInput, "a thermal house"); detectNegativeQuantities( - new Quantity[] {thermalHouseInput.getEthLosses()}, thermalHouseInput); + new Quantity[]{thermalHouseInput.getEthLosses()}, thermalHouseInput); detectZeroOrNegativeQuantities( - new Quantity[] {thermalHouseInput.getEthCapa()}, thermalHouseInput); + new Quantity[]{thermalHouseInput.getEthCapa()}, thermalHouseInput); if (thermalHouseInput .getLowerTemperatureLimit() - .isGreaterThan(thermalHouseInput.getDesiredTemperature()) - || thermalHouseInput + .isGreaterThan(thermalHouseInput.getTargetTemperature()) + || thermalHouseInput .getUpperTemperatureLimit() - .isLessThan(thermalHouseInput.getDesiredTemperature())) + .isLessThan(thermalHouseInput.getTargetTemperature())) throw new InvalidEntityException( - "Desired temperature must be higher than lower temperature limit and lower than upper temperature limit", - thermalHouseInput); + "Target temperature must be higher than lower temperature limit and lower than upper temperature limit", + thermalHouseInput); } /** @@ -115,21 +118,21 @@ private static void checkCylindricalStorage(CylindricalStorageInput cylindricalS // Check if inlet temperature is higher/equal to outlet temperature if (cylindricalStorageInput.getInletTemp().isLessThan(cylindricalStorageInput.getReturnTemp())) throw new InvalidEntityException( - "Inlet temperature of the cylindrical storage cannot be lower than outlet temperature", - cylindricalStorageInput); + "Inlet temperature of the cylindrical storage cannot be lower than outlet temperature", + cylindricalStorageInput); // Check if minimum permissible storage volume is lower than overall available storage volume if (cylindricalStorageInput - .getStorageVolumeLvlMin() - .isGreaterThan(cylindricalStorageInput.getStorageVolumeLvl())) + .getStorageVolumeLvlMin() + .isGreaterThan(cylindricalStorageInput.getStorageVolumeLvl())) throw new InvalidEntityException( - "Minimum permissible storage volume of the cylindrical storage cannot be higher than overall available storage volume", - cylindricalStorageInput); + "Minimum permissible storage volume of the cylindrical storage cannot be higher than overall available storage volume", + cylindricalStorageInput); detectZeroOrNegativeQuantities( - new Quantity[] { - cylindricalStorageInput.getStorageVolumeLvl(), - cylindricalStorageInput.getStorageVolumeLvlMin(), - cylindricalStorageInput.getC() - }, - cylindricalStorageInput); + new Quantity[]{ + cylindricalStorageInput.getStorageVolumeLvl(), + cylindricalStorageInput.getStorageVolumeLvlMin(), + cylindricalStorageInput.getC() + }, + cylindricalStorageInput); } } diff --git a/src/test/groovy/edu/ie3/datamodel/io/factory/input/ThermalHouseInputFactoryTest.groovy b/src/test/groovy/edu/ie3/datamodel/io/factory/input/ThermalHouseInputFactoryTest.groovy index 3a5214c7e..23c450219 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/factory/input/ThermalHouseInputFactoryTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/factory/input/ThermalHouseInputFactoryTest.groovy @@ -14,47 +14,47 @@ import edu.ie3.test.helper.FactoryTestHelper import spock.lang.Specification class ThermalHouseInputFactoryTest extends Specification implements FactoryTestHelper { - def "A ThermalHouseInputFactory should contain exactly the expected class for parsing"() { - given: - def inputFactory = new ThermalHouseInputFactory() - def expectedClasses = [ThermalHouseInput] + def "A ThermalHouseInputFactory should contain exactly the expected class for parsing"() { + given: + def inputFactory = new ThermalHouseInputFactory() + def expectedClasses = [ThermalHouseInput] - expect: - inputFactory.supportedClasses == Arrays.asList(expectedClasses.toArray()) - } + expect: + inputFactory.supportedClasses == Arrays.asList(expectedClasses.toArray()) + } - def "A ThermalHouseInputFactory should parse a valid ThermalHouseInput correctly"() { - given: "a system participant input type factory and model data" - def inputFactory = new ThermalHouseInputFactory() - Map parameter = [ - "uuid" : "91ec3bcf-1777-4d38-af67-0bf7c9fa73c7", - "id" : "TestID", - "ethlosses" : "3", - "ethcapa" : "4", - "desiredTemperature" : "5", - "upperTemperatureLimit" : "6", - "lowerTemperatureLimit" : "7" - ] - def inputClass = ThermalHouseInput - def thermalBusInput = Mock(ThermalBusInput) + def "A ThermalHouseInputFactory should parse a valid ThermalHouseInput correctly"() { + given: "a system participant input type factory and model data" + def inputFactory = new ThermalHouseInputFactory() + Map parameter = [ + "uuid" : "91ec3bcf-1777-4d38-af67-0bf7c9fa73c7", + "id" : "TestID", + "ethlosses" : "3", + "ethcapa" : "4", + "targetTemperature" : "5", + "upperTemperatureLimit": "6", + "lowerTemperatureLimit": "7" + ] + def inputClass = ThermalHouseInput + def thermalBusInput = Mock(ThermalBusInput) - when: - Optional input = inputFactory.get(new ThermalUnitInputEntityData(parameter, inputClass, thermalBusInput)) + when: + Optional input = inputFactory.get(new ThermalUnitInputEntityData(parameter, inputClass, thermalBusInput)) - then: - input.present - input.get().getClass() == inputClass - ((ThermalHouseInput) input.get()).with { - assert uuid == UUID.fromString(parameter["uuid"]) - assert operationTime == OperationTime.notLimited() - assert operator == OperatorInput.NO_OPERATOR_ASSIGNED - assert id == parameter["id"] - assert thermalBus == thermalBusInput - assert ethLosses == getQuant(parameter["ethlosses"], StandardUnits.THERMAL_TRANSMISSION) - assert ethCapa == getQuant(parameter["ethcapa"], StandardUnits.HEAT_CAPACITY) - assert desiredTemperature == getQuant(parameter["desiredTemperature"], StandardUnits.TEMPERATURE) - assert upperTemperatureLimit == getQuant(parameter["upperTemperatureLimit"], StandardUnits.TEMPERATURE) - assert lowerTemperatureLimit == getQuant(parameter["lowerTemperatureLimit"], StandardUnits.TEMPERATURE) - } - } + then: + input.present + input.get().getClass() == inputClass + ((ThermalHouseInput) input.get()).with { + assert uuid == UUID.fromString(parameter["uuid"]) + assert operationTime == OperationTime.notLimited() + assert operator == OperatorInput.NO_OPERATOR_ASSIGNED + assert id == parameter["id"] + assert thermalBus == thermalBusInput + assert ethLosses == getQuant(parameter["ethlosses"], StandardUnits.THERMAL_TRANSMISSION) + assert ethCapa == getQuant(parameter["ethcapa"], StandardUnits.HEAT_CAPACITY) + assert targetTemperature == getQuant(parameter["targetTemperature"], StandardUnits.TEMPERATURE) + assert upperTemperatureLimit == getQuant(parameter["upperTemperatureLimit"], StandardUnits.TEMPERATURE) + assert lowerTemperatureLimit == getQuant(parameter["lowerTemperatureLimit"], StandardUnits.TEMPERATURE) + } + } } diff --git a/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvThermalSourceTest.groovy b/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvThermalSourceTest.groovy index cb08a4006..3366a9f46 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvThermalSourceTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvThermalSourceTest.groovy @@ -19,162 +19,162 @@ import java.util.stream.Collectors class CsvThermalSourceTest extends Specification implements CsvTestDataMeta { - def "A CsvThermalSource should return ThermalBuses from valid and invalid input data as expected"() { - given: - def csvTypeSource = new CsvTypeSource(",", typeFolderPath, new EntityPersistenceNamingStrategy()) - def csvThermalSource = new CsvThermalSource(csvSep, thermalFolderPath, entityPersistenceNamingStrategy, csvTypeSource) - def operators = csvTypeSource.operators - - //test method when no operators are provided as constructor parameters - when: - def resultingThermalBusesWoOperator = csvThermalSource.getThermalBuses() - - then: - resultingThermalBusesWoOperator.size() == 1 - resultingThermalBusesWoOperator.first().uuid == sptd.thermalBus.uuid - resultingThermalBusesWoOperator.first().id == sptd.thermalBus.id - resultingThermalBusesWoOperator.first().operator == sptd.thermalBus.operator - resultingThermalBusesWoOperator.first().operationTime == sptd.thermalBus.operationTime - - //test method when operators are provided as constructor parameters - when: - def resultingThermalBuses = csvThermalSource.getThermalBuses(operators) - - then: - resultingThermalBuses.size() == 1 - resultingThermalBuses.first().uuid == sptd.thermalBus.uuid - resultingThermalBuses.first().id == sptd.thermalBus.id - resultingThermalBuses.first().operator == sptd.thermalBus.operator - resultingThermalBuses.first().operationTime == sptd.thermalBus.operationTime - } - - def "A CsvThermalSource should return a CylindricalStorageInput from valid and invalid input data as expected"() { - given: - def csvTypeSource = new CsvTypeSource(",", typeFolderPath, new EntityPersistenceNamingStrategy()) - def csvThermalSource = new CsvThermalSource(csvSep, thermalFolderPath, entityPersistenceNamingStrategy, csvTypeSource) - def operators = csvTypeSource.operators - def thermalBuses = csvThermalSource.thermalBuses - - //test method when operators and thermal buses are not provided as constructor parameters - when: - def resultingCylindricalStorageWoOperator = csvThermalSource.getCylindricStorages() - - then: - resultingCylindricalStorageWoOperator.size() == 1 - resultingCylindricalStorageWoOperator.first().uuid == sptd.thermalStorage.uuid - resultingCylindricalStorageWoOperator.first().id == sptd.thermalStorage.id - resultingCylindricalStorageWoOperator.first().operator == sptd.thermalStorage.operator - resultingCylindricalStorageWoOperator.first().operationTime == sptd.thermalStorage.operationTime - resultingCylindricalStorageWoOperator.first().thermalBus == sptd.thermalStorage.thermalBus - resultingCylindricalStorageWoOperator.first().storageVolumeLvl == sptd.storageVolumeLvl - resultingCylindricalStorageWoOperator.first().storageVolumeLvlMin == sptd.storageVolumeLvlMin - resultingCylindricalStorageWoOperator.first().inletTemp == sptd.inletTemp - resultingCylindricalStorageWoOperator.first().returnTemp == sptd.returnTemp - resultingCylindricalStorageWoOperator.first().c == sptd.c - - //test method when operators and thermal buses are provided as constructor parameters - when: - def resultingCylindricalStorage = csvThermalSource.getCylindricStorages(operators, thermalBuses) - - then: - resultingCylindricalStorage.size() == 1 - resultingCylindricalStorage.first().uuid == sptd.thermalStorage.uuid - resultingCylindricalStorage.first().id == sptd.thermalStorage.id - resultingCylindricalStorage.first().operator == sptd.thermalStorage.operator - resultingCylindricalStorage.first().operationTime == sptd.thermalStorage.operationTime - resultingCylindricalStorage.first().thermalBus == sptd.thermalStorage.thermalBus - resultingCylindricalStorage.first().storageVolumeLvl == sptd.storageVolumeLvl - resultingCylindricalStorage.first().storageVolumeLvlMin == sptd.storageVolumeLvlMin - resultingCylindricalStorage.first().inletTemp == sptd.inletTemp - resultingCylindricalStorage.first().returnTemp == sptd.returnTemp - resultingCylindricalStorage.first().c == sptd.c - - } - - def "A CsvThermalSource should build thermal unit input entity from valid and invalid input data as expected"() { - given: - def csvTypeSource = new CsvTypeSource(",", typeFolderPath, new EntityPersistenceNamingStrategy()) - def csvThermalSource = new CsvThermalSource(csvSep, thermalFolderPath, entityPersistenceNamingStrategy, csvTypeSource) - def operator = new OperatorInput(UUID.fromString("8f9682df-0744-4b58-a122-f0dc730f6510"), "testOperator") - def validFieldsToAttributes = [ - "uuid" : "717af017-cc69-406f-b452-e022d7fb516a", - "id" : "test_thermal_unit", - "operator" : "8f9682df-0744-4b58-a122-f0dc730f6510", - "operatesFrom" : "2020-03-24 15:11:31", - "operatesUntil" : "2020-03-25 15:11:31", - "thermalBus" : "0d95d7f2-49fb-4d49-8636-383a5220384e" - ] - def assetInputEntityData = new AssetInputEntityData(validFieldsToAttributes, ThermalUnitInput, operator) - - when: - def resultingDataOpt = csvThermalSource.buildThermalUnitInputEntityData(assetInputEntityData, thermalBuses).collect(Collectors.toList()) - - then: - resultingDataOpt.size() == 1 - resultingDataOpt.first().present == resultIsPresent - resultingDataOpt.first().ifPresent({ resultingData -> - assert (resultingData == expectedThermalUnitInputEntityData) - }) - - where: - thermalBuses || resultIsPresent || expectedThermalUnitInputEntityData - []|| false || null // thermal buses are not present -> method should return an empty optional -> do not check for thermal unit entity data - [ - new ThermalBusInput(UUID.fromString("0d95d7f2-49fb-4d49-8636-383a5220384e"), "test_thermal_bus") - ]|| true || - new ThermalUnitInputEntityData(["uuid": "717af017-cc69-406f-b452-e022d7fb516a", - "id": "test_thermal_unit", - "operator": "8f9682df-0744-4b58-a122-f0dc730f6510", - "operatesFrom": "2020-03-24 15:11:31", - "operatesUntil": "2020-03-25 15:11:31"], - ThermalUnitInput, - new OperatorInput(UUID.fromString("8f9682df-0744-4b58-a122-f0dc730f6510"), "testOperator"), - new ThermalBusInput(UUID.fromString("0d95d7f2-49fb-4d49-8636-383a5220384e"), "test_thermal_bus")) - - } - - def "A CsvThermalSource should return a ThermalHouseInput from valid and invalid input data as expected"() { - given: - def csvTypeSource = new CsvTypeSource(",", typeFolderPath, new EntityPersistenceNamingStrategy()) - def csvThermalSource = new CsvThermalSource(csvSep, thermalFolderPath, entityPersistenceNamingStrategy, csvTypeSource) - def operators = csvTypeSource.operators - def thermalBuses = csvThermalSource.thermalBuses - - //test method when operators and thermal buses are not provided as constructor parameters - when: - def resultingThermalHouseWoOperator = csvThermalSource.getThermalHouses() - - then: - resultingThermalHouseWoOperator.size() == 1 - resultingThermalHouseWoOperator.first().uuid == ThermalUnitInputTestData.thermalHouseInput.uuid - resultingThermalHouseWoOperator.first().id == ThermalUnitInputTestData.thermalHouseInput.id - resultingThermalHouseWoOperator.first().operator == ThermalUnitInputTestData.thermalHouseInput.operator - resultingThermalHouseWoOperator.first().operationTime.isLimited() - resultingThermalHouseWoOperator.first().operationTime == ThermalUnitInputTestData.thermalHouseInput.operationTime - resultingThermalHouseWoOperator.first().thermalBus == ThermalUnitInputTestData.thermalHouseInput.thermalBus - resultingThermalHouseWoOperator.first().ethLosses == ThermalUnitInputTestData.thermalHouseInput.ethLosses - resultingThermalHouseWoOperator.first().ethCapa == ThermalUnitInputTestData.thermalHouseInput.ethCapa - resultingThermalHouseWoOperator.first().desiredTemperature == ThermalUnitInputTestData.thermalHouseInput.desiredTemperature - resultingThermalHouseWoOperator.first().upperTemperatureLimit == ThermalUnitInputTestData.thermalHouseInput.upperTemperatureLimit - resultingThermalHouseWoOperator.first().lowerTemperatureLimit == ThermalUnitInputTestData.thermalHouseInput.lowerTemperatureLimit - - //test method when operators and thermal buses are provided as constructor parameters - when: - def resultingThermalHouse = csvThermalSource.getThermalHouses(operators, thermalBuses) - - then: - resultingThermalHouse.size() == 1 - resultingThermalHouse.first().uuid == ThermalUnitInputTestData.thermalHouseInput.uuid - resultingThermalHouse.first().id == ThermalUnitInputTestData.thermalHouseInput.id - resultingThermalHouse.first().operator == ThermalUnitInputTestData.thermalHouseInput.operator - resultingThermalHouse.first().operationTime.isLimited() - resultingThermalHouse.first().operationTime == ThermalUnitInputTestData.thermalHouseInput.operationTime - resultingThermalHouseWoOperator.first().thermalBus == ThermalUnitInputTestData.thermalHouseInput.thermalBus - resultingThermalHouse.first().ethLosses == ThermalUnitInputTestData.thermalHouseInput.ethLosses - resultingThermalHouse.first().ethCapa == ThermalUnitInputTestData.thermalHouseInput.ethCapa - resultingThermalHouse.first().desiredTemperature == ThermalUnitInputTestData.thermalHouseInput.desiredTemperature - resultingThermalHouse.first().upperTemperatureLimit == ThermalUnitInputTestData.thermalHouseInput.upperTemperatureLimit - resultingThermalHouse.first().lowerTemperatureLimit == ThermalUnitInputTestData.thermalHouseInput.lowerTemperatureLimit - - } + def "A CsvThermalSource should return ThermalBuses from valid and invalid input data as expected"() { + given: + def csvTypeSource = new CsvTypeSource(",", typeFolderPath, new EntityPersistenceNamingStrategy()) + def csvThermalSource = new CsvThermalSource(csvSep, thermalFolderPath, entityPersistenceNamingStrategy, csvTypeSource) + def operators = csvTypeSource.operators + + //test method when no operators are provided as constructor parameters + when: + def resultingThermalBusesWoOperator = csvThermalSource.getThermalBuses() + + then: + resultingThermalBusesWoOperator.size() == 1 + resultingThermalBusesWoOperator.first().uuid == sptd.thermalBus.uuid + resultingThermalBusesWoOperator.first().id == sptd.thermalBus.id + resultingThermalBusesWoOperator.first().operator == sptd.thermalBus.operator + resultingThermalBusesWoOperator.first().operationTime == sptd.thermalBus.operationTime + + //test method when operators are provided as constructor parameters + when: + def resultingThermalBuses = csvThermalSource.getThermalBuses(operators) + + then: + resultingThermalBuses.size() == 1 + resultingThermalBuses.first().uuid == sptd.thermalBus.uuid + resultingThermalBuses.first().id == sptd.thermalBus.id + resultingThermalBuses.first().operator == sptd.thermalBus.operator + resultingThermalBuses.first().operationTime == sptd.thermalBus.operationTime + } + + def "A CsvThermalSource should return a CylindricalStorageInput from valid and invalid input data as expected"() { + given: + def csvTypeSource = new CsvTypeSource(",", typeFolderPath, new EntityPersistenceNamingStrategy()) + def csvThermalSource = new CsvThermalSource(csvSep, thermalFolderPath, entityPersistenceNamingStrategy, csvTypeSource) + def operators = csvTypeSource.operators + def thermalBuses = csvThermalSource.thermalBuses + + //test method when operators and thermal buses are not provided as constructor parameters + when: + def resultingCylindricalStorageWoOperator = csvThermalSource.getCylindricStorages() + + then: + resultingCylindricalStorageWoOperator.size() == 1 + resultingCylindricalStorageWoOperator.first().uuid == sptd.thermalStorage.uuid + resultingCylindricalStorageWoOperator.first().id == sptd.thermalStorage.id + resultingCylindricalStorageWoOperator.first().operator == sptd.thermalStorage.operator + resultingCylindricalStorageWoOperator.first().operationTime == sptd.thermalStorage.operationTime + resultingCylindricalStorageWoOperator.first().thermalBus == sptd.thermalStorage.thermalBus + resultingCylindricalStorageWoOperator.first().storageVolumeLvl == sptd.storageVolumeLvl + resultingCylindricalStorageWoOperator.first().storageVolumeLvlMin == sptd.storageVolumeLvlMin + resultingCylindricalStorageWoOperator.first().inletTemp == sptd.inletTemp + resultingCylindricalStorageWoOperator.first().returnTemp == sptd.returnTemp + resultingCylindricalStorageWoOperator.first().c == sptd.c + + //test method when operators and thermal buses are provided as constructor parameters + when: + def resultingCylindricalStorage = csvThermalSource.getCylindricStorages(operators, thermalBuses) + + then: + resultingCylindricalStorage.size() == 1 + resultingCylindricalStorage.first().uuid == sptd.thermalStorage.uuid + resultingCylindricalStorage.first().id == sptd.thermalStorage.id + resultingCylindricalStorage.first().operator == sptd.thermalStorage.operator + resultingCylindricalStorage.first().operationTime == sptd.thermalStorage.operationTime + resultingCylindricalStorage.first().thermalBus == sptd.thermalStorage.thermalBus + resultingCylindricalStorage.first().storageVolumeLvl == sptd.storageVolumeLvl + resultingCylindricalStorage.first().storageVolumeLvlMin == sptd.storageVolumeLvlMin + resultingCylindricalStorage.first().inletTemp == sptd.inletTemp + resultingCylindricalStorage.first().returnTemp == sptd.returnTemp + resultingCylindricalStorage.first().c == sptd.c + + } + + def "A CsvThermalSource should build thermal unit input entity from valid and invalid input data as expected"() { + given: + def csvTypeSource = new CsvTypeSource(",", typeFolderPath, new EntityPersistenceNamingStrategy()) + def csvThermalSource = new CsvThermalSource(csvSep, thermalFolderPath, entityPersistenceNamingStrategy, csvTypeSource) + def operator = new OperatorInput(UUID.fromString("8f9682df-0744-4b58-a122-f0dc730f6510"), "testOperator") + def validFieldsToAttributes = [ + "uuid" : "717af017-cc69-406f-b452-e022d7fb516a", + "id" : "test_thermal_unit", + "operator" : "8f9682df-0744-4b58-a122-f0dc730f6510", + "operatesFrom" : "2020-03-24 15:11:31", + "operatesUntil": "2020-03-25 15:11:31", + "thermalBus" : "0d95d7f2-49fb-4d49-8636-383a5220384e" + ] + def assetInputEntityData = new AssetInputEntityData(validFieldsToAttributes, ThermalUnitInput, operator) + + when: + def resultingDataOpt = csvThermalSource.buildThermalUnitInputEntityData(assetInputEntityData, thermalBuses).collect(Collectors.toList()) + + then: + resultingDataOpt.size() == 1 + resultingDataOpt.first().present == resultIsPresent + resultingDataOpt.first().ifPresent({ resultingData -> + assert (resultingData == expectedThermalUnitInputEntityData) + }) + + where: + thermalBuses || resultIsPresent || expectedThermalUnitInputEntityData + [] || false || null // thermal buses are not present -> method should return an empty optional -> do not check for thermal unit entity data + [ + new ThermalBusInput(UUID.fromString("0d95d7f2-49fb-4d49-8636-383a5220384e"), "test_thermal_bus") + ] || true || + new ThermalUnitInputEntityData(["uuid" : "717af017-cc69-406f-b452-e022d7fb516a", + "id" : "test_thermal_unit", + "operator" : "8f9682df-0744-4b58-a122-f0dc730f6510", + "operatesFrom" : "2020-03-24 15:11:31", + "operatesUntil": "2020-03-25 15:11:31"], + ThermalUnitInput, + new OperatorInput(UUID.fromString("8f9682df-0744-4b58-a122-f0dc730f6510"), "testOperator"), + new ThermalBusInput(UUID.fromString("0d95d7f2-49fb-4d49-8636-383a5220384e"), "test_thermal_bus")) + + } + + def "A CsvThermalSource should return a ThermalHouseInput from valid and invalid input data as expected"() { + given: + def csvTypeSource = new CsvTypeSource(",", typeFolderPath, new EntityPersistenceNamingStrategy()) + def csvThermalSource = new CsvThermalSource(csvSep, thermalFolderPath, entityPersistenceNamingStrategy, csvTypeSource) + def operators = csvTypeSource.operators + def thermalBuses = csvThermalSource.thermalBuses + + //test method when operators and thermal buses are not provided as constructor parameters + when: + def resultingThermalHouseWoOperator = csvThermalSource.getThermalHouses() + + then: + resultingThermalHouseWoOperator.size() == 1 + resultingThermalHouseWoOperator.first().uuid == ThermalUnitInputTestData.thermalHouseInput.uuid + resultingThermalHouseWoOperator.first().id == ThermalUnitInputTestData.thermalHouseInput.id + resultingThermalHouseWoOperator.first().operator == ThermalUnitInputTestData.thermalHouseInput.operator + resultingThermalHouseWoOperator.first().operationTime.isLimited() + resultingThermalHouseWoOperator.first().operationTime == ThermalUnitInputTestData.thermalHouseInput.operationTime + resultingThermalHouseWoOperator.first().thermalBus == ThermalUnitInputTestData.thermalHouseInput.thermalBus + resultingThermalHouseWoOperator.first().ethLosses == ThermalUnitInputTestData.thermalHouseInput.ethLosses + resultingThermalHouseWoOperator.first().ethCapa == ThermalUnitInputTestData.thermalHouseInput.ethCapa + resultingThermalHouseWoOperator.first().targetTemperature == ThermalUnitInputTestData.thermalHouseInput.targetTemperature + resultingThermalHouseWoOperator.first().upperTemperatureLimit == ThermalUnitInputTestData.thermalHouseInput.upperTemperatureLimit + resultingThermalHouseWoOperator.first().lowerTemperatureLimit == ThermalUnitInputTestData.thermalHouseInput.lowerTemperatureLimit + + //test method when operators and thermal buses are provided as constructor parameters + when: + def resultingThermalHouse = csvThermalSource.getThermalHouses(operators, thermalBuses) + + then: + resultingThermalHouse.size() == 1 + resultingThermalHouse.first().uuid == ThermalUnitInputTestData.thermalHouseInput.uuid + resultingThermalHouse.first().id == ThermalUnitInputTestData.thermalHouseInput.id + resultingThermalHouse.first().operator == ThermalUnitInputTestData.thermalHouseInput.operator + resultingThermalHouse.first().operationTime.isLimited() + resultingThermalHouse.first().operationTime == ThermalUnitInputTestData.thermalHouseInput.operationTime + resultingThermalHouseWoOperator.first().thermalBus == ThermalUnitInputTestData.thermalHouseInput.thermalBus + resultingThermalHouse.first().ethLosses == ThermalUnitInputTestData.thermalHouseInput.ethLosses + resultingThermalHouse.first().ethCapa == ThermalUnitInputTestData.thermalHouseInput.ethCapa + resultingThermalHouse.first().targetTemperature == ThermalUnitInputTestData.thermalHouseInput.targetTemperature + resultingThermalHouse.first().upperTemperatureLimit == ThermalUnitInputTestData.thermalHouseInput.upperTemperatureLimit + resultingThermalHouse.first().lowerTemperatureLimit == ThermalUnitInputTestData.thermalHouseInput.lowerTemperatureLimit + + } } diff --git a/src/test/groovy/edu/ie3/datamodel/models/input/thermal/CylindricalStorageInputTest.groovy b/src/test/groovy/edu/ie3/datamodel/models/input/thermal/CylindricalStorageInputTest.groovy index 2cfad9e0e..f2b3bcb6a 100644 --- a/src/test/groovy/edu/ie3/datamodel/models/input/thermal/CylindricalStorageInputTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/models/input/thermal/CylindricalStorageInputTest.groovy @@ -11,29 +11,29 @@ import spock.lang.Specification class CylindricalStorageInputTest extends Specification { - def "A CylindricalStorageInput copy method should work as expected"() { - given: - def cylindricalStorageInput = ThermalUnitInputTestData.cylindricStorageInput + def "A CylindricalStorageInput copy method should work as expected"() { + given: + def cylindricalStorageInput = ThermalUnitInputTestData.cylindricStorageInput - when: - def alteredUnit = cylindricalStorageInput.copy().storageVolumeLvl(ThermalUnitInputTestData.storageVolumeLvl) - .storageVolumeLvlMin(ThermalUnitInputTestData.storageVolumeLvlMin).inletTemp(ThermalUnitInputTestData.inletTemp) - .returnTemp(ThermalUnitInputTestData.returnTemp).c(ThermalUnitInputTestData.c) - .thermalBus(ThermalUnitInputTestData.thermalBus).build() + when: + def alteredUnit = cylindricalStorageInput.copy().storageVolumeLvl(ThermalUnitInputTestData.storageVolumeLvl) + .storageVolumeLvlMin(ThermalUnitInputTestData.storageVolumeLvlMin).inletTemp(ThermalUnitInputTestData.inletTemp) + .returnTemp(ThermalUnitInputTestData.returnTemp).c(ThermalUnitInputTestData.c) + .thermalBus(ThermalUnitInputTestData.thermalBus).build() - then: - alteredUnit.with { - assert uuid == cylindricalStorageInput.uuid - assert id == cylindricalStorageInput.id - assert operator == cylindricalStorageInput.operator - assert operationTime == cylindricalStorageInput.operationTime - assert thermalBus == cylindricalStorageInput.thermalBus - assert storageVolumeLvl == ThermalUnitInputTestData.storageVolumeLvl - assert storageVolumeLvlMin == ThermalUnitInputTestData.storageVolumeLvlMin - assert inletTemp == ThermalUnitInputTestData.inletTemp - assert returnTemp == ThermalUnitInputTestData.returnTemp - assert c == ThermalUnitInputTestData.c - } - } + then: + alteredUnit.with { + assert uuid == cylindricalStorageInput.uuid + assert id == cylindricalStorageInput.id + assert operator == cylindricalStorageInput.operator + assert operationTime == cylindricalStorageInput.operationTime + assert thermalBus == cylindricalStorageInput.thermalBus + assert storageVolumeLvl == ThermalUnitInputTestData.storageVolumeLvl + assert storageVolumeLvlMin == ThermalUnitInputTestData.storageVolumeLvlMin + assert inletTemp == ThermalUnitInputTestData.inletTemp + assert returnTemp == ThermalUnitInputTestData.returnTemp + assert c == ThermalUnitInputTestData.c + } + } } diff --git a/src/test/groovy/edu/ie3/datamodel/models/input/thermal/ThermalHouseInputTest.groovy b/src/test/groovy/edu/ie3/datamodel/models/input/thermal/ThermalHouseInputTest.groovy index 2af7789d3..66c7afc95 100644 --- a/src/test/groovy/edu/ie3/datamodel/models/input/thermal/ThermalHouseInputTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/models/input/thermal/ThermalHouseInputTest.groovy @@ -11,31 +11,31 @@ import spock.lang.Specification class ThermalHouseInputTest extends Specification { - def "A ThermalHouseInput copy method should work as expected"() { - given: - def thermalHouseInput = ThermalUnitInputTestData.thermalHouseInput + def "A ThermalHouseInput copy method should work as expected"() { + given: + def thermalHouseInput = ThermalUnitInputTestData.thermalHouseInput - when: - def alteredUnit = thermalHouseInput.copy().ethLosses(ThermalUnitInputTestData.thermalConductance) - .ethCapa(ThermalUnitInputTestData.ethCapa) - .desiredTemperature(ThermalUnitInputTestData.DESIRED_TEMPERATURE) - .upperTemperatureLimit(ThermalUnitInputTestData.UPPER_TEMPERATURE_LIMIT) - .lowerTemperatureLimit(ThermalUnitInputTestData.LOWER_TEMPERATURE_LIMIT) - .thermalBus(ThermalUnitInputTestData.thermalBus).build() + when: + def alteredUnit = thermalHouseInput.copy().ethLosses(ThermalUnitInputTestData.thermalConductance) + .ethCapa(ThermalUnitInputTestData.ethCapa) + .targetTemperature(ThermalUnitInputTestData.TARGET_TEMPERATURE) + .upperTemperatureLimit(ThermalUnitInputTestData.UPPER_TEMPERATURE_LIMIT) + .lowerTemperatureLimit(ThermalUnitInputTestData.LOWER_TEMPERATURE_LIMIT) + .thermalBus(ThermalUnitInputTestData.thermalBus).build() - then: - alteredUnit.with { - assert uuid == thermalHouseInput.uuid - assert id == thermalHouseInput.id - assert operator == thermalHouseInput.operator - assert operationTime == thermalHouseInput.operationTime - assert thermalBus == thermalHouseInput.thermalBus - assert ethLosses == ThermalUnitInputTestData.thermalConductance - assert ethCapa == ThermalUnitInputTestData.ethCapa - assert desiredTemperature == ThermalUnitInputTestData.DESIRED_TEMPERATURE - assert upperTemperatureLimit == ThermalUnitInputTestData.UPPER_TEMPERATURE_LIMIT - assert lowerTemperatureLimit == ThermalUnitInputTestData.LOWER_TEMPERATURE_LIMIT - } - } + then: + alteredUnit.with { + assert uuid == thermalHouseInput.uuid + assert id == thermalHouseInput.id + assert operator == thermalHouseInput.operator + assert operationTime == thermalHouseInput.operationTime + assert thermalBus == thermalHouseInput.thermalBus + assert ethLosses == ThermalUnitInputTestData.thermalConductance + assert ethCapa == ThermalUnitInputTestData.ethCapa + assert targetTemperature == ThermalUnitInputTestData.TARGET_TEMPERATURE + assert upperTemperatureLimit == ThermalUnitInputTestData.UPPER_TEMPERATURE_LIMIT + assert lowerTemperatureLimit == ThermalUnitInputTestData.LOWER_TEMPERATURE_LIMIT + } + } } diff --git a/src/test/groovy/edu/ie3/datamodel/utils/validation/ThermalUnitValidationUtilsTest.groovy b/src/test/groovy/edu/ie3/datamodel/utils/validation/ThermalUnitValidationUtilsTest.groovy index 884012b55..4a2375ecb 100644 --- a/src/test/groovy/edu/ie3/datamodel/utils/validation/ThermalUnitValidationUtilsTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/utils/validation/ThermalUnitValidationUtilsTest.groovy @@ -26,87 +26,87 @@ import javax.measure.quantity.Volume class ThermalUnitValidationUtilsTest extends Specification { - // General data - private static final UUID thermalUnitUuid = UUID.fromString("717af017-cc69-406f-b452-e022d7fb516a") - private static final String id = "thermal_unit_test" - private static final OperationTime operationTime = OperationTime.builder() - .withStart(TimeUtil.withDefaults.toZonedDateTime("2020-03-24 15:11:31")) - .withEnd(TimeUtil.withDefaults.toZonedDateTime("2020-03-25 15:11:31")).build() - private static final OperatorInput operator = new OperatorInput( - UUID.fromString("8f9682df-0744-4b58-a122-f0dc730f6510"), "TestOperator") - - // Specific data for thermal house input - private static final ComparableQuantity thermalConductance = Quantities.getQuantity(10, StandardUnits.THERMAL_TRANSMISSION) - private static final ComparableQuantity ethCapa = Quantities.getQuantity(20, StandardUnits.HEAT_CAPACITY) - private static final ComparableQuantity DESIRED_TEMPERATURE = Quantities.getQuantity(20, StandardUnits.TEMPERATURE) - private static final ComparableQuantity UPPER_TEMPERATURE_LIMIT = Quantities.getQuantity(25, StandardUnits.TEMPERATURE) - private static final ComparableQuantity LOWER_TEMPERATURE_LIMIT = Quantities.getQuantity(15, StandardUnits.TEMPERATURE) - - // Specific data for thermal cylindric storage input - private static final ComparableQuantity storageVolumeLvl = Quantities.getQuantity(100, StandardUnits.VOLUME) - private static final ComparableQuantity storageVolumeLvlMin = Quantities.getQuantity(10, StandardUnits.VOLUME) - private static final ComparableQuantity inletTemp = Quantities.getQuantity(100, StandardUnits.TEMPERATURE) - private static final ComparableQuantity returnTemp = Quantities.getQuantity(80, StandardUnits.TEMPERATURE) - private static final ComparableQuantity c = Quantities.getQuantity(1.05, StandardUnits.SPECIFIC_HEAT_CAPACITY) - - // Thermal House - - def "Smoke Test: Correct thermal house throws no exception"() { - given: - def thermalHouseInput = ThermalUnitInputTestData.thermalHouseInput - - when: - ValidationUtils.check(thermalHouseInput) - - then: - noExceptionThrown() - } - - def "ThermalUnitValidationUtils.checkThermalHouse() recognizes all potential errors for a thermal house"() { - when: - ThermalUnitValidationUtils.check(invalidThermalHouse) - - then: - Exception ex = thrown() - ex.class == expectedException.class - ex.message == expectedException.message - - where: - invalidThermalHouse || expectedException - new ThermalHouseInput(thermalUnitUuid, id, operator, operationTime, SystemParticipantTestData.thermalBus, Quantities.getQuantity(-10, StandardUnits.THERMAL_TRANSMISSION), ethCapa, DESIRED_TEMPERATURE, UPPER_TEMPERATURE_LIMIT, LOWER_TEMPERATURE_LIMIT) || new InvalidEntityException("The following quantities have to be zero or positive: -10 kW/K", invalidThermalHouse) - new ThermalHouseInput(thermalUnitUuid, id, operator, operationTime, SystemParticipantTestData.thermalBus, thermalConductance, Quantities.getQuantity(0, StandardUnits.HEAT_CAPACITY), DESIRED_TEMPERATURE, UPPER_TEMPERATURE_LIMIT, LOWER_TEMPERATURE_LIMIT) || new InvalidEntityException("The following quantities have to be positive: 0 kWh/K", invalidThermalHouse) - new ThermalHouseInput(thermalUnitUuid, id, operator, operationTime, SystemParticipantTestData.thermalBus, thermalConductance, ethCapa, Quantities.getQuantity(0, StandardUnits.TEMPERATURE), UPPER_TEMPERATURE_LIMIT, LOWER_TEMPERATURE_LIMIT) || new InvalidEntityException("Desired temperature must be higher than lower temperature limit and lower than upper temperature limit", invalidThermalHouse) - new ThermalHouseInput(thermalUnitUuid, id, operator, operationTime, SystemParticipantTestData.thermalBus, thermalConductance, ethCapa, DESIRED_TEMPERATURE, Quantities.getQuantity(0, StandardUnits.TEMPERATURE), LOWER_TEMPERATURE_LIMIT) || new InvalidEntityException("Desired temperature must be higher than lower temperature limit and lower than upper temperature limit", invalidThermalHouse) - new ThermalHouseInput(thermalUnitUuid, id, operator, operationTime, SystemParticipantTestData.thermalBus, thermalConductance, ethCapa, DESIRED_TEMPERATURE, UPPER_TEMPERATURE_LIMIT, Quantities.getQuantity(30, StandardUnits.TEMPERATURE)) || new InvalidEntityException("Desired temperature must be higher than lower temperature limit and lower than upper temperature limit", invalidThermalHouse) - } - - // Thermal Cylindrical Storage - - def "Smoke Test: Correct thermal cylindrical storage throws no exception"() { - given: - def cylindricalStorageInput = ThermalUnitInputTestData.cylindricStorageInput - - when: - ValidationUtils.check(cylindricalStorageInput) - - then: - noExceptionThrown() - } - - def "ThermalUnitValidationUtils.checkCylindricalStorage() recognizes all potential errors for a thermal cylindrical storage"() { - when: - ThermalUnitValidationUtils.check(invalidCylindricalStorage) - - then: - Exception ex = thrown() - ex.class == expectedException.class - ex.message == expectedException.message - - where: - invalidCylindricalStorage || expectedException - new CylindricalStorageInput(thermalUnitUuid, id, operator, operationTime, SystemParticipantTestData.thermalBus, storageVolumeLvl, storageVolumeLvlMin, Quantities.getQuantity(100, StandardUnits.TEMPERATURE), Quantities.getQuantity(200, StandardUnits.TEMPERATURE), c) || new InvalidEntityException("Inlet temperature of the cylindrical storage cannot be lower than outlet temperature", invalidCylindricalStorage) - new CylindricalStorageInput(thermalUnitUuid, id, operator, operationTime, SystemParticipantTestData.thermalBus, Quantities.getQuantity(100, StandardUnits.VOLUME), Quantities.getQuantity(200, StandardUnits.VOLUME), inletTemp, returnTemp, c) || new InvalidEntityException("Minimum permissible storage volume of the cylindrical storage cannot be higher than overall available storage volume", invalidCylindricalStorage) - new CylindricalStorageInput(thermalUnitUuid, id, operator, operationTime, SystemParticipantTestData.thermalBus, Quantities.getQuantity(-100, StandardUnits.VOLUME), Quantities.getQuantity(-200, StandardUnits.VOLUME), inletTemp, returnTemp, Quantities.getQuantity(-1.05, StandardUnits.SPECIFIC_HEAT_CAPACITY)) || new InvalidEntityException("The following quantities have to be positive: -100 ㎥, -200 ㎥, -1.05 kWh/K*m³", invalidCylindricalStorage) - } + // General data + private static final UUID thermalUnitUuid = UUID.fromString("717af017-cc69-406f-b452-e022d7fb516a") + private static final String id = "thermal_unit_test" + private static final OperationTime operationTime = OperationTime.builder() + .withStart(TimeUtil.withDefaults.toZonedDateTime("2020-03-24 15:11:31")) + .withEnd(TimeUtil.withDefaults.toZonedDateTime("2020-03-25 15:11:31")).build() + private static final OperatorInput operator = new OperatorInput( + UUID.fromString("8f9682df-0744-4b58-a122-f0dc730f6510"), "TestOperator") + + // Specific data for thermal house input + private static final ComparableQuantity thermalConductance = Quantities.getQuantity(10, StandardUnits.THERMAL_TRANSMISSION) + private static final ComparableQuantity ethCapa = Quantities.getQuantity(20, StandardUnits.HEAT_CAPACITY) + private static final ComparableQuantity TARGET_TEMPERATURE = Quantities.getQuantity(20, StandardUnits.TEMPERATURE) + private static final ComparableQuantity UPPER_TEMPERATURE_LIMIT = Quantities.getQuantity(25, StandardUnits.TEMPERATURE) + private static final ComparableQuantity LOWER_TEMPERATURE_LIMIT = Quantities.getQuantity(15, StandardUnits.TEMPERATURE) + + // Specific data for thermal cylindric storage input + private static final ComparableQuantity storageVolumeLvl = Quantities.getQuantity(100, StandardUnits.VOLUME) + private static final ComparableQuantity storageVolumeLvlMin = Quantities.getQuantity(10, StandardUnits.VOLUME) + private static final ComparableQuantity inletTemp = Quantities.getQuantity(100, StandardUnits.TEMPERATURE) + private static final ComparableQuantity returnTemp = Quantities.getQuantity(80, StandardUnits.TEMPERATURE) + private static final ComparableQuantity c = Quantities.getQuantity(1.05, StandardUnits.SPECIFIC_HEAT_CAPACITY) + + // Thermal House + + def "Smoke Test: Correct thermal house throws no exception"() { + given: + def thermalHouseInput = ThermalUnitInputTestData.thermalHouseInput + + when: + ValidationUtils.check(thermalHouseInput) + + then: + noExceptionThrown() + } + + def "ThermalUnitValidationUtils.checkThermalHouse() recognizes all potential errors for a thermal house"() { + when: + ThermalUnitValidationUtils.check(invalidThermalHouse) + + then: + Exception ex = thrown() + ex.class == expectedException.class + ex.message == expectedException.message + + where: + invalidThermalHouse || expectedException + new ThermalHouseInput(thermalUnitUuid, id, operator, operationTime, SystemParticipantTestData.thermalBus, Quantities.getQuantity(-10, StandardUnits.THERMAL_TRANSMISSION), ethCapa, TARGET_TEMPERATURE, UPPER_TEMPERATURE_LIMIT, LOWER_TEMPERATURE_LIMIT) || new InvalidEntityException("The following quantities have to be zero or positive: -10 kW/K", invalidThermalHouse) + new ThermalHouseInput(thermalUnitUuid, id, operator, operationTime, SystemParticipantTestData.thermalBus, thermalConductance, Quantities.getQuantity(0, StandardUnits.HEAT_CAPACITY), TARGET_TEMPERATURE, UPPER_TEMPERATURE_LIMIT, LOWER_TEMPERATURE_LIMIT) || new InvalidEntityException("The following quantities have to be positive: 0 kWh/K", invalidThermalHouse) + new ThermalHouseInput(thermalUnitUuid, id, operator, operationTime, SystemParticipantTestData.thermalBus, thermalConductance, ethCapa, Quantities.getQuantity(0, StandardUnits.TEMPERATURE), UPPER_TEMPERATURE_LIMIT, LOWER_TEMPERATURE_LIMIT) || new InvalidEntityException("Target temperature must be higher than lower temperature limit and lower than upper temperature limit", invalidThermalHouse) + new ThermalHouseInput(thermalUnitUuid, id, operator, operationTime, SystemParticipantTestData.thermalBus, thermalConductance, ethCapa, TARGET_TEMPERATURE, Quantities.getQuantity(0, StandardUnits.TEMPERATURE), LOWER_TEMPERATURE_LIMIT) || new InvalidEntityException("Target temperature must be higher than lower temperature limit and lower than upper temperature limit", invalidThermalHouse) + new ThermalHouseInput(thermalUnitUuid, id, operator, operationTime, SystemParticipantTestData.thermalBus, thermalConductance, ethCapa, TARGET_TEMPERATURE, UPPER_TEMPERATURE_LIMIT, Quantities.getQuantity(30, StandardUnits.TEMPERATURE)) || new InvalidEntityException("Target temperature must be higher than lower temperature limit and lower than upper temperature limit", invalidThermalHouse) + } + + // Thermal Cylindrical Storage + + def "Smoke Test: Correct thermal cylindrical storage throws no exception"() { + given: + def cylindricalStorageInput = ThermalUnitInputTestData.cylindricStorageInput + + when: + ValidationUtils.check(cylindricalStorageInput) + + then: + noExceptionThrown() + } + + def "ThermalUnitValidationUtils.checkCylindricalStorage() recognizes all potential errors for a thermal cylindrical storage"() { + when: + ThermalUnitValidationUtils.check(invalidCylindricalStorage) + + then: + Exception ex = thrown() + ex.class == expectedException.class + ex.message == expectedException.message + + where: + invalidCylindricalStorage || expectedException + new CylindricalStorageInput(thermalUnitUuid, id, operator, operationTime, SystemParticipantTestData.thermalBus, storageVolumeLvl, storageVolumeLvlMin, Quantities.getQuantity(100, StandardUnits.TEMPERATURE), Quantities.getQuantity(200, StandardUnits.TEMPERATURE), c) || new InvalidEntityException("Inlet temperature of the cylindrical storage cannot be lower than outlet temperature", invalidCylindricalStorage) + new CylindricalStorageInput(thermalUnitUuid, id, operator, operationTime, SystemParticipantTestData.thermalBus, Quantities.getQuantity(100, StandardUnits.VOLUME), Quantities.getQuantity(200, StandardUnits.VOLUME), inletTemp, returnTemp, c) || new InvalidEntityException("Minimum permissible storage volume of the cylindrical storage cannot be higher than overall available storage volume", invalidCylindricalStorage) + new CylindricalStorageInput(thermalUnitUuid, id, operator, operationTime, SystemParticipantTestData.thermalBus, Quantities.getQuantity(-100, StandardUnits.VOLUME), Quantities.getQuantity(-200, StandardUnits.VOLUME), inletTemp, returnTemp, Quantities.getQuantity(-1.05, StandardUnits.SPECIFIC_HEAT_CAPACITY)) || new InvalidEntityException("The following quantities have to be positive: -100 ㎥, -200 ㎥, -1.05 kWh/K*m³", invalidCylindricalStorage) + } } diff --git a/src/test/groovy/edu/ie3/test/common/ThermalUnitInputTestData.groovy b/src/test/groovy/edu/ie3/test/common/ThermalUnitInputTestData.groovy index 17445bf64..4c94565e1 100644 --- a/src/test/groovy/edu/ie3/test/common/ThermalUnitInputTestData.groovy +++ b/src/test/groovy/edu/ie3/test/common/ThermalUnitInputTestData.groovy @@ -22,49 +22,49 @@ import javax.measure.quantity.Volume class ThermalUnitInputTestData extends SystemParticipantTestData { - // general participant data - private static final UUID thermalUnitUuid = UUID.fromString("717af017-cc69-406f-b452-e022d7fb516a") - public static final OperationTime operationTime = OperationTime.builder() - .withStart(TimeUtil.withDefaults.toZonedDateTime("2020-03-24 15:11:31")) - .withEnd(TimeUtil.withDefaults.toZonedDateTime("2020-03-25 15:11:31")).build() - private static final OperatorInput operator = new OperatorInput( - UUID.fromString("8f9682df-0744-4b58-a122-f0dc730f6510"), "TestOperator") + // general participant data + private static final UUID thermalUnitUuid = UUID.fromString("717af017-cc69-406f-b452-e022d7fb516a") + public static final OperationTime operationTime = OperationTime.builder() + .withStart(TimeUtil.withDefaults.toZonedDateTime("2020-03-24 15:11:31")) + .withEnd(TimeUtil.withDefaults.toZonedDateTime("2020-03-25 15:11:31")).build() + private static final OperatorInput operator = new OperatorInput( + UUID.fromString("8f9682df-0744-4b58-a122-f0dc730f6510"), "TestOperator") - // thermal house input - private static final ComparableQuantity thermalConductance = Quantities.getQuantity(10, StandardUnits.THERMAL_TRANSMISSION) - private static final ComparableQuantity ethCapa = Quantities.getQuantity(20, StandardUnits.HEAT_CAPACITY) - private static final ComparableQuantity DESIRED_TEMPERATURE = Quantities.getQuantity(20, StandardUnits.TEMPERATURE) - private static final ComparableQuantity UPPER_TEMPERATURE_LIMIT = Quantities.getQuantity(25, StandardUnits.TEMPERATURE) - private static final ComparableQuantity LOWER_TEMPERATURE_LIMIT = Quantities.getQuantity(15, StandardUnits.TEMPERATURE) - public static final thermalHouseInput = new ThermalHouseInput( - thermalUnitUuid, - "test_thermalHouseInput", - operator, - operationTime, - thermalBus, - thermalConductance, - ethCapa, - DESIRED_TEMPERATURE, - UPPER_TEMPERATURE_LIMIT, - LOWER_TEMPERATURE_LIMIT) + // thermal house input + private static final ComparableQuantity thermalConductance = Quantities.getQuantity(10, StandardUnits.THERMAL_TRANSMISSION) + private static final ComparableQuantity ethCapa = Quantities.getQuantity(20, StandardUnits.HEAT_CAPACITY) + private static final ComparableQuantity TARGET_TEMPERATURE = Quantities.getQuantity(20, StandardUnits.TEMPERATURE) + private static final ComparableQuantity UPPER_TEMPERATURE_LIMIT = Quantities.getQuantity(25, StandardUnits.TEMPERATURE) + private static final ComparableQuantity LOWER_TEMPERATURE_LIMIT = Quantities.getQuantity(15, StandardUnits.TEMPERATURE) + public static final thermalHouseInput = new ThermalHouseInput( + thermalUnitUuid, + "test_thermalHouseInput", + operator, + operationTime, + thermalBus, + thermalConductance, + ethCapa, + TARGET_TEMPERATURE, + UPPER_TEMPERATURE_LIMIT, + LOWER_TEMPERATURE_LIMIT) - // thermal cylindric storage input - private static final ComparableQuantity storageVolumeLvl = Quantities.getQuantity(100, StandardUnits.VOLUME) - private static final ComparableQuantity storageVolumeLvlMin = Quantities.getQuantity(10, StandardUnits.VOLUME) - private static final ComparableQuantity inletTemp = Quantities.getQuantity(100, StandardUnits.TEMPERATURE) - private static final ComparableQuantity returnTemp = Quantities.getQuantity(80, StandardUnits.TEMPERATURE) - private static final ComparableQuantity c = Quantities.getQuantity(1.05, StandardUnits.SPECIFIC_HEAT_CAPACITY) + // thermal cylindric storage input + private static final ComparableQuantity storageVolumeLvl = Quantities.getQuantity(100, StandardUnits.VOLUME) + private static final ComparableQuantity storageVolumeLvlMin = Quantities.getQuantity(10, StandardUnits.VOLUME) + private static final ComparableQuantity inletTemp = Quantities.getQuantity(100, StandardUnits.TEMPERATURE) + private static final ComparableQuantity returnTemp = Quantities.getQuantity(80, StandardUnits.TEMPERATURE) + private static final ComparableQuantity c = Quantities.getQuantity(1.05, StandardUnits.SPECIFIC_HEAT_CAPACITY) - public static final cylindricStorageInput = new CylindricalStorageInput( - thermalUnitUuid, - "test_cylindricStorageInput", - operator, - operationTime, - thermalBus, - storageVolumeLvl, - storageVolumeLvlMin, - inletTemp, - returnTemp, - c) + public static final cylindricStorageInput = new CylindricalStorageInput( + thermalUnitUuid, + "test_cylindricStorageInput", + operator, + operationTime, + thermalBus, + storageVolumeLvl, + storageVolumeLvlMin, + inletTemp, + returnTemp, + c) } diff --git a/src/test/resources/testGridFiles/thermal/thermal_house_input.csv b/src/test/resources/testGridFiles/thermal/thermal_house_input.csv index 6243599b2..7bfa359d2 100644 --- a/src/test/resources/testGridFiles/thermal/thermal_house_input.csv +++ b/src/test/resources/testGridFiles/thermal/thermal_house_input.csv @@ -1,2 +1,2 @@ -uuid,id,operates_from,operates_until,operator,thermal_bus,eth_losses,eth_capa,desired_temperature,upper_temperature_limit,lower_temperature_limit +uuid,id,operates_from,operates_until,operator,thermal_bus,eth_losses,eth_capa,target_temperature,upper_temperature_limit,lower_temperature_limit 717af017-cc69-406f-b452-e022d7fb516a,"test_thermalHouseInput",2020-03-24T15:11:31Z[UTC],2020-03-25T15:11:31Z[UTC],8f9682df-0744-4b58-a122-f0dc730f6510,0d95d7f2-49fb-4d49-8636-383a5220384e,10,20,20,25,15 \ No newline at end of file From 4c857f494952c19946bad388f48960edac31a25b Mon Sep 17 00:00:00 2001 From: t-ober <63147366+t-ober@users.noreply.github.com> Date: Tue, 15 Jun 2021 12:00:40 +0200 Subject: [PATCH 060/157] adjust test text --- .../io/factory/input/AssetInputEntityFactoryTest.groovy | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/test/groovy/edu/ie3/datamodel/io/factory/input/AssetInputEntityFactoryTest.groovy b/src/test/groovy/edu/ie3/datamodel/io/factory/input/AssetInputEntityFactoryTest.groovy index 94b29b916..d072393f5 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/factory/input/AssetInputEntityFactoryTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/factory/input/AssetInputEntityFactoryTest.groovy @@ -53,14 +53,14 @@ class AssetInputEntityFactoryTest extends Specification implements FactoryTestHe } } - def "An AssetInputFactory should parse a valid operated AssetInput correctly (nulls and empty strings)"() { + def "An AssetInputFactory should parse a valid operated AssetInput correctly (with nulls and empty strings)"() { given: "a system participant input type factory and model data" def inputFactory = new TestAssetInputFactory() Map parameter = [ "uuid": "91ec3bcf-1777-4d38-af67-0bf7c9fa73c7", "operatesfrom" : operatesfrom, "operatesuntil": operatesuntil, - "id" : "TestID" + "id" : "TestID"git ] def inputClass = TestAssetInput def operatorInput = Mock(OperatorInput) From edbd4e96783f2141fb4fd866acf303793ec70b0a Mon Sep 17 00:00:00 2001 From: Niklas Steffan Date: Tue, 15 Jun 2021 12:03:23 +0200 Subject: [PATCH 061/157] Add test for equals method of ThermalHouseInput to improve test coverage --- .../input/thermal/ThermalHouseInputTest.groovy | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/test/groovy/edu/ie3/datamodel/models/input/thermal/ThermalHouseInputTest.groovy b/src/test/groovy/edu/ie3/datamodel/models/input/thermal/ThermalHouseInputTest.groovy index 66c7afc95..a8703c347 100644 --- a/src/test/groovy/edu/ie3/datamodel/models/input/thermal/ThermalHouseInputTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/models/input/thermal/ThermalHouseInputTest.groovy @@ -5,8 +5,10 @@ */ package edu.ie3.datamodel.models.input.thermal +import edu.ie3.datamodel.models.StandardUnits import edu.ie3.test.common.ThermalUnitInputTestData import spock.lang.Specification +import tech.units.indriya.quantity.Quantities class ThermalHouseInputTest extends Specification { @@ -38,4 +40,17 @@ class ThermalHouseInputTest extends Specification { assert lowerTemperatureLimit == ThermalUnitInputTestData.LOWER_TEMPERATURE_LIMIT } } + + def "The equals methods for a ThermalHouseInput works as expected"() { + given: + def thermalHouseInput1 = ThermalUnitInputTestData.thermalHouseInput + def thermalHouseInput2 = ThermalUnitInputTestData.thermalHouseInput + def thermalHouseInput3 = ThermalUnitInputTestData.thermalHouseInput.copy(). + ethLosses(Quantities.getQuantity(100, StandardUnits.THERMAL_TRANSMISSION)) + + expect: + thermalHouseInput1.equals(thermalHouseInput2) + !thermalHouseInput1.equals(thermalHouseInput3) + + } } From 7bb3784f612373d6b0efae0583c6cd68bc9aba97 Mon Sep 17 00:00:00 2001 From: Niklas Steffan Date: Tue, 15 Jun 2021 13:47:48 +0200 Subject: [PATCH 062/157] spotlessApply --- .../io/connectors/CsvFileConnector.java | 6 +- .../timeseries/TimeSeriesProcessor.java | 6 +- .../io/source/csv/CsvDataSource.java | 8 +- .../io/source/csv/CsvIdCoordinateSource.java | 2 +- .../io/source/csv/CsvWeatherSource.java | 2 +- .../input/container/GraphicElements.java | 6 +- .../input/container/RawGridElements.java | 18 +- .../input/container/SystemParticipants.java | 30 +- .../chargingpoint/ChargingPointTypeUtils.java | 3 +- .../utils/ContainerNodeUpdateUtil.java | 4 +- .../ThermalUnitValidationUtils.java | 41 ++- .../input/ThermalHouseInputFactoryTest.groovy | 78 ++--- .../io/source/csv/CsvThermalSourceTest.groovy | 316 +++++++++--------- .../CylindricalStorageInputTest.groovy | 44 +-- .../thermal/ThermalHouseInputTest.groovy | 79 +++-- .../ThermalUnitValidationUtilsTest.groovy | 164 ++++----- .../common/ThermalUnitInputTestData.groovy | 82 ++--- 17 files changed, 431 insertions(+), 458 deletions(-) diff --git a/src/main/java/edu/ie3/datamodel/io/connectors/CsvFileConnector.java b/src/main/java/edu/ie3/datamodel/io/connectors/CsvFileConnector.java index e4bd141ae..e35c376bd 100644 --- a/src/main/java/edu/ie3/datamodel/io/connectors/CsvFileConnector.java +++ b/src/main/java/edu/ie3/datamodel/io/connectors/CsvFileConnector.java @@ -204,8 +204,7 @@ public Optional getIndividualTimeSeriesMeta */ private Map buildIndividualTimeSeriesMetaInformation() { - return getIndividualTimeSeriesFilePaths() - .parallelStream() + return getIndividualTimeSeriesFilePaths().parallelStream() .map( filePath -> { /* Extract meta information from file path and enhance it with the file path itself */ @@ -230,8 +229,7 @@ public Optional getIndividualTimeSeriesMeta */ public Map> getCsvIndividualTimeSeriesMetaInformation(ColumnScheme... columnSchemes) { - return getIndividualTimeSeriesFilePaths() - .parallelStream() + return getIndividualTimeSeriesFilePaths().parallelStream() .map( pathString -> { String filePathWithoutEnding = removeFileEnding(pathString); diff --git a/src/main/java/edu/ie3/datamodel/io/processor/timeseries/TimeSeriesProcessor.java b/src/main/java/edu/ie3/datamodel/io/processor/timeseries/TimeSeriesProcessor.java index af29f3dca..0a2bf66b3 100644 --- a/src/main/java/edu/ie3/datamodel/io/processor/timeseries/TimeSeriesProcessor.java +++ b/src/main/java/edu/ie3/datamodel/io/processor/timeseries/TimeSeriesProcessor.java @@ -106,7 +106,8 @@ private SortedMap buildFieldToSource( Class timeSeriesClass, Class entryClass, Class valueClass) { /* Get the mapping from field name to getter method ignoring the getter for returning all entries */ Map timeSeriesMapping = - mapFieldNameToGetter(timeSeriesClass, Arrays.asList("entries", "uuid", "type")).entrySet() + mapFieldNameToGetter(timeSeriesClass, Arrays.asList("entries", "uuid", "type")) + .entrySet() .stream() .collect( Collectors.toMap( @@ -136,7 +137,8 @@ private SortedMap buildFieldToSource( mapFieldNameToGetter( valueClass, Arrays.asList("solarIrradiance", "temperature", "wind")) - .entrySet().stream() + .entrySet() + .stream() .map( entry -> new AbstractMap.SimpleEntry<>( diff --git a/src/main/java/edu/ie3/datamodel/io/source/csv/CsvDataSource.java b/src/main/java/edu/ie3/datamodel/io/source/csv/CsvDataSource.java index 928c2a7d9..371ba2f15 100644 --- a/src/main/java/edu/ie3/datamodel/io/source/csv/CsvDataSource.java +++ b/src/main/java/edu/ie3/datamodel/io/source/csv/CsvDataSource.java @@ -394,10 +394,7 @@ protected Stream> buildStreamWithFieldsToAttributesMap( Collection> allRows = csvRowFieldValueMapping(reader, headline); return distinctRowsWithLog( - allRows, - fieldToValues -> fieldToValues.get("uuid"), - entityClass.getSimpleName(), - "UUID") + allRows, fieldToValues -> fieldToValues.get("uuid"), entityClass.getSimpleName(), "UUID") .parallelStream(); } catch (IOException e) { log.warn( @@ -456,8 +453,7 @@ protected Set> distinctRowsWithLog( /* Check for rows with the same key based on the provided key extractor function */ Set> distinctIdSet = - allRowsSet - .parallelStream() + allRowsSet.parallelStream() .filter(ValidationUtils.distinctByKey(keyExtractor)) .collect(Collectors.toSet()); if (distinctIdSet.size() != allRowsSet.size()) { diff --git a/src/main/java/edu/ie3/datamodel/io/source/csv/CsvIdCoordinateSource.java b/src/main/java/edu/ie3/datamodel/io/source/csv/CsvIdCoordinateSource.java index a6b6dff9b..793ce7b43 100644 --- a/src/main/java/edu/ie3/datamodel/io/source/csv/CsvIdCoordinateSource.java +++ b/src/main/java/edu/ie3/datamodel/io/source/csv/CsvIdCoordinateSource.java @@ -123,7 +123,7 @@ protected Stream> buildStreamWithFieldsToAttributesMap() { .get(factory.getLatField()) .concat(fieldToValues.get(factory.getLonField())); return distinctRowsWithLog( - withDistinctCoordinateId, coordinateExtractor, "coordinate id mapping", "coordinate") + withDistinctCoordinateId, coordinateExtractor, "coordinate id mapping", "coordinate") .parallelStream(); } catch (IOException e) { log.error("Cannot read the file for coordinate id to coordinate mapping.", e); diff --git a/src/main/java/edu/ie3/datamodel/io/source/csv/CsvWeatherSource.java b/src/main/java/edu/ie3/datamodel/io/source/csv/CsvWeatherSource.java index 30b152fa4..95f543c16 100644 --- a/src/main/java/edu/ie3/datamodel/io/source/csv/CsvWeatherSource.java +++ b/src/main/java/edu/ie3/datamodel/io/source/csv/CsvWeatherSource.java @@ -256,7 +256,7 @@ protected Stream> buildStreamWithFieldsToAttributesMap( .get(weatherFactory.getTimeFieldString()) .concat(fieldToValues.get(weatherFactory.getCoordinateIdFieldString())); return distinctRowsWithLog( - allRows, timeCoordinateIdExtractor, entityClass.getSimpleName(), "UUID") + allRows, timeCoordinateIdExtractor, entityClass.getSimpleName(), "UUID") .parallelStream(); } catch (IOException e) { diff --git a/src/main/java/edu/ie3/datamodel/models/input/container/GraphicElements.java b/src/main/java/edu/ie3/datamodel/models/input/container/GraphicElements.java index af0d4d9fd..60434f9a8 100644 --- a/src/main/java/edu/ie3/datamodel/models/input/container/GraphicElements.java +++ b/src/main/java/edu/ie3/datamodel/models/input/container/GraphicElements.java @@ -48,14 +48,12 @@ public GraphicElements(List graphics) { /* init sets */ this.nodeGraphics = - graphics - .parallelStream() + graphics.parallelStream() .filter(graphic -> graphic instanceof NodeGraphicInput) .map(graphic -> (NodeGraphicInput) graphic) .collect(Collectors.toSet()); this.lineGraphics = - graphics - .parallelStream() + graphics.parallelStream() .filter(graphic -> graphic instanceof LineGraphicInput) .map(graphic -> (LineGraphicInput) graphic) .collect(Collectors.toSet()); diff --git a/src/main/java/edu/ie3/datamodel/models/input/container/RawGridElements.java b/src/main/java/edu/ie3/datamodel/models/input/container/RawGridElements.java index 4f0abc3e9..b8806a63d 100644 --- a/src/main/java/edu/ie3/datamodel/models/input/container/RawGridElements.java +++ b/src/main/java/edu/ie3/datamodel/models/input/container/RawGridElements.java @@ -84,38 +84,32 @@ public RawGridElements(List rawGridElements) { /* init sets */ this.nodes = - rawGridElements - .parallelStream() + rawGridElements.parallelStream() .filter(gridElement -> gridElement instanceof NodeInput) .map(nodeInput -> (NodeInput) nodeInput) .collect(Collectors.toSet()); this.lines = - rawGridElements - .parallelStream() + rawGridElements.parallelStream() .filter(gridElement -> gridElement instanceof LineInput) .map(lineInput -> (LineInput) lineInput) .collect(Collectors.toSet()); this.transformer2Ws = - rawGridElements - .parallelStream() + rawGridElements.parallelStream() .filter(gridElement -> gridElement instanceof Transformer2WInput) .map(trafo2wInput -> (Transformer2WInput) trafo2wInput) .collect(Collectors.toSet()); this.transformer3Ws = - rawGridElements - .parallelStream() + rawGridElements.parallelStream() .filter(gridElement -> gridElement instanceof Transformer3WInput) .map(trafo3wInput -> (Transformer3WInput) trafo3wInput) .collect(Collectors.toSet()); this.switches = - rawGridElements - .parallelStream() + rawGridElements.parallelStream() .filter(gridElement -> gridElement instanceof SwitchInput) .map(switchInput -> (SwitchInput) switchInput) .collect(Collectors.toSet()); this.measurementUnits = - rawGridElements - .parallelStream() + rawGridElements.parallelStream() .filter(gridElement -> gridElement instanceof MeasurementUnitInput) .map(measurementUnitInput -> (MeasurementUnitInput) measurementUnitInput) .collect(Collectors.toSet()); diff --git a/src/main/java/edu/ie3/datamodel/models/input/container/SystemParticipants.java b/src/main/java/edu/ie3/datamodel/models/input/container/SystemParticipants.java index 8a47b4995..28550d86a 100644 --- a/src/main/java/edu/ie3/datamodel/models/input/container/SystemParticipants.java +++ b/src/main/java/edu/ie3/datamodel/models/input/container/SystemParticipants.java @@ -106,62 +106,52 @@ public SystemParticipants(List systemParticipants) { /* init sets */ this.bmPlants = - systemParticipants - .parallelStream() + systemParticipants.parallelStream() .filter(gridElement -> gridElement instanceof BmInput) .map(bmInput -> (BmInput) bmInput) .collect(Collectors.toSet()); this.chpPlants = - systemParticipants - .parallelStream() + systemParticipants.parallelStream() .filter(gridElement -> gridElement instanceof ChpInput) .map(chpInput -> (ChpInput) chpInput) .collect(Collectors.toSet()); this.evCS = - systemParticipants - .parallelStream() + systemParticipants.parallelStream() .filter(gridElement -> gridElement instanceof EvcsInput) .map(evcsInput -> (EvcsInput) evcsInput) .collect(Collectors.toSet()); this.evs = - systemParticipants - .parallelStream() + systemParticipants.parallelStream() .filter(gridElement -> gridElement instanceof EvInput) .map(evInput -> (EvInput) evInput) .collect(Collectors.toSet()); this.fixedFeedIns = - systemParticipants - .parallelStream() + systemParticipants.parallelStream() .filter(gridElement -> gridElement instanceof FixedFeedInInput) .map(fixedFeedInInpu -> (FixedFeedInInput) fixedFeedInInpu) .collect(Collectors.toSet()); this.heatPumps = - systemParticipants - .parallelStream() + systemParticipants.parallelStream() .filter(gridElement -> gridElement instanceof HpInput) .map(hpInput -> (HpInput) hpInput) .collect(Collectors.toSet()); this.loads = - systemParticipants - .parallelStream() + systemParticipants.parallelStream() .filter(gridElement -> gridElement instanceof LoadInput) .map(loadInput -> (LoadInput) loadInput) .collect(Collectors.toSet()); this.pvPlants = - systemParticipants - .parallelStream() + systemParticipants.parallelStream() .filter(gridElement -> gridElement instanceof PvInput) .map(pvInput -> (PvInput) pvInput) .collect(Collectors.toSet()); this.storages = - systemParticipants - .parallelStream() + systemParticipants.parallelStream() .filter(gridElement -> gridElement instanceof StorageInput) .map(storageInput -> (StorageInput) storageInput) .collect(Collectors.toSet()); this.wecPlants = - systemParticipants - .parallelStream() + systemParticipants.parallelStream() .filter(gridElement -> gridElement instanceof WecInput) .map(wecInput -> (WecInput) wecInput) .collect(Collectors.toSet()); diff --git a/src/main/java/edu/ie3/datamodel/models/input/system/type/chargingpoint/ChargingPointTypeUtils.java b/src/main/java/edu/ie3/datamodel/models/input/system/type/chargingpoint/ChargingPointTypeUtils.java index 6825a3c0f..e72de1aba 100644 --- a/src/main/java/edu/ie3/datamodel/models/input/system/type/chargingpoint/ChargingPointTypeUtils.java +++ b/src/main/java/edu/ie3/datamodel/models/input/system/type/chargingpoint/ChargingPointTypeUtils.java @@ -142,7 +142,8 @@ private ChargingPointTypeUtils() { Stream.concat( Stream.of(type.getId().toLowerCase()), type.getSynonymousIds().stream().map(String::toLowerCase)) - .collect(Collectors.toMap(Function.identity(), v -> type)).entrySet() + .collect(Collectors.toMap(Function.identity(), v -> type)) + .entrySet() .stream()) .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue))); diff --git a/src/main/java/edu/ie3/datamodel/utils/ContainerNodeUpdateUtil.java b/src/main/java/edu/ie3/datamodel/utils/ContainerNodeUpdateUtil.java index 5286f78af..f641adccf 100644 --- a/src/main/java/edu/ie3/datamodel/utils/ContainerNodeUpdateUtil.java +++ b/src/main/java/edu/ie3/datamodel/utils/ContainerNodeUpdateUtil.java @@ -207,9 +207,7 @@ private static SystemParticipants updateSystemParticipantsWithNodes( SystemParticipants systemParticipants, Map oldToNewNodes) { List sysParts = - systemParticipants - .allEntitiesAsList() - .parallelStream() + systemParticipants.allEntitiesAsList().parallelStream() .map( sysPart -> { if (oldToNewNodes.containsKey(sysPart.getNode())) { diff --git a/src/main/java/edu/ie3/datamodel/utils/validation/ThermalUnitValidationUtils.java b/src/main/java/edu/ie3/datamodel/utils/validation/ThermalUnitValidationUtils.java index b21dc7f2f..e968d210e 100644 --- a/src/main/java/edu/ie3/datamodel/utils/validation/ThermalUnitValidationUtils.java +++ b/src/main/java/edu/ie3/datamodel/utils/validation/ThermalUnitValidationUtils.java @@ -2,19 +2,16 @@ * © 2021. TU Dortmund University, * Institute of Energy Systems, Energy Efficiency and Energy Economics, * Research group Distribution grid planning and operation - */ +*/ package edu.ie3.datamodel.utils.validation; import edu.ie3.datamodel.exceptions.InvalidEntityException; import edu.ie3.datamodel.models.input.thermal.*; - import javax.measure.Quantity; public class ThermalUnitValidationUtils extends ValidationUtils { - /** - * Private Constructor as this class is not meant to be instantiated - */ + /** Private Constructor as this class is not meant to be instantiated */ private ThermalUnitValidationUtils() { throw new IllegalStateException("Don't try and instantiate a Utility class."); } @@ -88,18 +85,18 @@ private static void checkThermalStorage(ThermalStorageInput thermalStorageInput) private static void checkThermalHouse(ThermalHouseInput thermalHouseInput) { checkNonNull(thermalHouseInput, "a thermal house"); detectNegativeQuantities( - new Quantity[]{thermalHouseInput.getEthLosses()}, thermalHouseInput); + new Quantity[] {thermalHouseInput.getEthLosses()}, thermalHouseInput); detectZeroOrNegativeQuantities( - new Quantity[]{thermalHouseInput.getEthCapa()}, thermalHouseInput); + new Quantity[] {thermalHouseInput.getEthCapa()}, thermalHouseInput); if (thermalHouseInput .getLowerTemperatureLimit() .isGreaterThan(thermalHouseInput.getTargetTemperature()) - || thermalHouseInput + || thermalHouseInput .getUpperTemperatureLimit() .isLessThan(thermalHouseInput.getTargetTemperature())) throw new InvalidEntityException( - "Target temperature must be higher than lower temperature limit and lower than upper temperature limit", - thermalHouseInput); + "Target temperature must be higher than lower temperature limit and lower than upper temperature limit", + thermalHouseInput); } /** @@ -118,21 +115,21 @@ private static void checkCylindricalStorage(CylindricalStorageInput cylindricalS // Check if inlet temperature is higher/equal to outlet temperature if (cylindricalStorageInput.getInletTemp().isLessThan(cylindricalStorageInput.getReturnTemp())) throw new InvalidEntityException( - "Inlet temperature of the cylindrical storage cannot be lower than outlet temperature", - cylindricalStorageInput); + "Inlet temperature of the cylindrical storage cannot be lower than outlet temperature", + cylindricalStorageInput); // Check if minimum permissible storage volume is lower than overall available storage volume if (cylindricalStorageInput - .getStorageVolumeLvlMin() - .isGreaterThan(cylindricalStorageInput.getStorageVolumeLvl())) + .getStorageVolumeLvlMin() + .isGreaterThan(cylindricalStorageInput.getStorageVolumeLvl())) throw new InvalidEntityException( - "Minimum permissible storage volume of the cylindrical storage cannot be higher than overall available storage volume", - cylindricalStorageInput); + "Minimum permissible storage volume of the cylindrical storage cannot be higher than overall available storage volume", + cylindricalStorageInput); detectZeroOrNegativeQuantities( - new Quantity[]{ - cylindricalStorageInput.getStorageVolumeLvl(), - cylindricalStorageInput.getStorageVolumeLvlMin(), - cylindricalStorageInput.getC() - }, - cylindricalStorageInput); + new Quantity[] { + cylindricalStorageInput.getStorageVolumeLvl(), + cylindricalStorageInput.getStorageVolumeLvlMin(), + cylindricalStorageInput.getC() + }, + cylindricalStorageInput); } } diff --git a/src/test/groovy/edu/ie3/datamodel/io/factory/input/ThermalHouseInputFactoryTest.groovy b/src/test/groovy/edu/ie3/datamodel/io/factory/input/ThermalHouseInputFactoryTest.groovy index 23c450219..6e0bbaaab 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/factory/input/ThermalHouseInputFactoryTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/factory/input/ThermalHouseInputFactoryTest.groovy @@ -14,47 +14,47 @@ import edu.ie3.test.helper.FactoryTestHelper import spock.lang.Specification class ThermalHouseInputFactoryTest extends Specification implements FactoryTestHelper { - def "A ThermalHouseInputFactory should contain exactly the expected class for parsing"() { - given: - def inputFactory = new ThermalHouseInputFactory() - def expectedClasses = [ThermalHouseInput] + def "A ThermalHouseInputFactory should contain exactly the expected class for parsing"() { + given: + def inputFactory = new ThermalHouseInputFactory() + def expectedClasses = [ThermalHouseInput] - expect: - inputFactory.supportedClasses == Arrays.asList(expectedClasses.toArray()) - } + expect: + inputFactory.supportedClasses == Arrays.asList(expectedClasses.toArray()) + } - def "A ThermalHouseInputFactory should parse a valid ThermalHouseInput correctly"() { - given: "a system participant input type factory and model data" - def inputFactory = new ThermalHouseInputFactory() - Map parameter = [ - "uuid" : "91ec3bcf-1777-4d38-af67-0bf7c9fa73c7", - "id" : "TestID", - "ethlosses" : "3", - "ethcapa" : "4", - "targetTemperature" : "5", - "upperTemperatureLimit": "6", - "lowerTemperatureLimit": "7" - ] - def inputClass = ThermalHouseInput - def thermalBusInput = Mock(ThermalBusInput) + def "A ThermalHouseInputFactory should parse a valid ThermalHouseInput correctly"() { + given: "a system participant input type factory and model data" + def inputFactory = new ThermalHouseInputFactory() + Map parameter = [ + "uuid" : "91ec3bcf-1777-4d38-af67-0bf7c9fa73c7", + "id" : "TestID", + "ethlosses" : "3", + "ethcapa" : "4", + "targetTemperature" : "5", + "upperTemperatureLimit": "6", + "lowerTemperatureLimit": "7" + ] + def inputClass = ThermalHouseInput + def thermalBusInput = Mock(ThermalBusInput) - when: - Optional input = inputFactory.get(new ThermalUnitInputEntityData(parameter, inputClass, thermalBusInput)) + when: + Optional input = inputFactory.get(new ThermalUnitInputEntityData(parameter, inputClass, thermalBusInput)) - then: - input.present - input.get().getClass() == inputClass - ((ThermalHouseInput) input.get()).with { - assert uuid == UUID.fromString(parameter["uuid"]) - assert operationTime == OperationTime.notLimited() - assert operator == OperatorInput.NO_OPERATOR_ASSIGNED - assert id == parameter["id"] - assert thermalBus == thermalBusInput - assert ethLosses == getQuant(parameter["ethlosses"], StandardUnits.THERMAL_TRANSMISSION) - assert ethCapa == getQuant(parameter["ethcapa"], StandardUnits.HEAT_CAPACITY) - assert targetTemperature == getQuant(parameter["targetTemperature"], StandardUnits.TEMPERATURE) - assert upperTemperatureLimit == getQuant(parameter["upperTemperatureLimit"], StandardUnits.TEMPERATURE) - assert lowerTemperatureLimit == getQuant(parameter["lowerTemperatureLimit"], StandardUnits.TEMPERATURE) - } - } + then: + input.present + input.get().getClass() == inputClass + ((ThermalHouseInput) input.get()).with { + assert uuid == UUID.fromString(parameter["uuid"]) + assert operationTime == OperationTime.notLimited() + assert operator == OperatorInput.NO_OPERATOR_ASSIGNED + assert id == parameter["id"] + assert thermalBus == thermalBusInput + assert ethLosses == getQuant(parameter["ethlosses"], StandardUnits.THERMAL_TRANSMISSION) + assert ethCapa == getQuant(parameter["ethcapa"], StandardUnits.HEAT_CAPACITY) + assert targetTemperature == getQuant(parameter["targetTemperature"], StandardUnits.TEMPERATURE) + assert upperTemperatureLimit == getQuant(parameter["upperTemperatureLimit"], StandardUnits.TEMPERATURE) + assert lowerTemperatureLimit == getQuant(parameter["lowerTemperatureLimit"], StandardUnits.TEMPERATURE) + } + } } diff --git a/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvThermalSourceTest.groovy b/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvThermalSourceTest.groovy index 3366a9f46..4e3ec192a 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvThermalSourceTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvThermalSourceTest.groovy @@ -19,162 +19,162 @@ import java.util.stream.Collectors class CsvThermalSourceTest extends Specification implements CsvTestDataMeta { - def "A CsvThermalSource should return ThermalBuses from valid and invalid input data as expected"() { - given: - def csvTypeSource = new CsvTypeSource(",", typeFolderPath, new EntityPersistenceNamingStrategy()) - def csvThermalSource = new CsvThermalSource(csvSep, thermalFolderPath, entityPersistenceNamingStrategy, csvTypeSource) - def operators = csvTypeSource.operators - - //test method when no operators are provided as constructor parameters - when: - def resultingThermalBusesWoOperator = csvThermalSource.getThermalBuses() - - then: - resultingThermalBusesWoOperator.size() == 1 - resultingThermalBusesWoOperator.first().uuid == sptd.thermalBus.uuid - resultingThermalBusesWoOperator.first().id == sptd.thermalBus.id - resultingThermalBusesWoOperator.first().operator == sptd.thermalBus.operator - resultingThermalBusesWoOperator.first().operationTime == sptd.thermalBus.operationTime - - //test method when operators are provided as constructor parameters - when: - def resultingThermalBuses = csvThermalSource.getThermalBuses(operators) - - then: - resultingThermalBuses.size() == 1 - resultingThermalBuses.first().uuid == sptd.thermalBus.uuid - resultingThermalBuses.first().id == sptd.thermalBus.id - resultingThermalBuses.first().operator == sptd.thermalBus.operator - resultingThermalBuses.first().operationTime == sptd.thermalBus.operationTime - } - - def "A CsvThermalSource should return a CylindricalStorageInput from valid and invalid input data as expected"() { - given: - def csvTypeSource = new CsvTypeSource(",", typeFolderPath, new EntityPersistenceNamingStrategy()) - def csvThermalSource = new CsvThermalSource(csvSep, thermalFolderPath, entityPersistenceNamingStrategy, csvTypeSource) - def operators = csvTypeSource.operators - def thermalBuses = csvThermalSource.thermalBuses - - //test method when operators and thermal buses are not provided as constructor parameters - when: - def resultingCylindricalStorageWoOperator = csvThermalSource.getCylindricStorages() - - then: - resultingCylindricalStorageWoOperator.size() == 1 - resultingCylindricalStorageWoOperator.first().uuid == sptd.thermalStorage.uuid - resultingCylindricalStorageWoOperator.first().id == sptd.thermalStorage.id - resultingCylindricalStorageWoOperator.first().operator == sptd.thermalStorage.operator - resultingCylindricalStorageWoOperator.first().operationTime == sptd.thermalStorage.operationTime - resultingCylindricalStorageWoOperator.first().thermalBus == sptd.thermalStorage.thermalBus - resultingCylindricalStorageWoOperator.first().storageVolumeLvl == sptd.storageVolumeLvl - resultingCylindricalStorageWoOperator.first().storageVolumeLvlMin == sptd.storageVolumeLvlMin - resultingCylindricalStorageWoOperator.first().inletTemp == sptd.inletTemp - resultingCylindricalStorageWoOperator.first().returnTemp == sptd.returnTemp - resultingCylindricalStorageWoOperator.first().c == sptd.c - - //test method when operators and thermal buses are provided as constructor parameters - when: - def resultingCylindricalStorage = csvThermalSource.getCylindricStorages(operators, thermalBuses) - - then: - resultingCylindricalStorage.size() == 1 - resultingCylindricalStorage.first().uuid == sptd.thermalStorage.uuid - resultingCylindricalStorage.first().id == sptd.thermalStorage.id - resultingCylindricalStorage.first().operator == sptd.thermalStorage.operator - resultingCylindricalStorage.first().operationTime == sptd.thermalStorage.operationTime - resultingCylindricalStorage.first().thermalBus == sptd.thermalStorage.thermalBus - resultingCylindricalStorage.first().storageVolumeLvl == sptd.storageVolumeLvl - resultingCylindricalStorage.first().storageVolumeLvlMin == sptd.storageVolumeLvlMin - resultingCylindricalStorage.first().inletTemp == sptd.inletTemp - resultingCylindricalStorage.first().returnTemp == sptd.returnTemp - resultingCylindricalStorage.first().c == sptd.c - - } - - def "A CsvThermalSource should build thermal unit input entity from valid and invalid input data as expected"() { - given: - def csvTypeSource = new CsvTypeSource(",", typeFolderPath, new EntityPersistenceNamingStrategy()) - def csvThermalSource = new CsvThermalSource(csvSep, thermalFolderPath, entityPersistenceNamingStrategy, csvTypeSource) - def operator = new OperatorInput(UUID.fromString("8f9682df-0744-4b58-a122-f0dc730f6510"), "testOperator") - def validFieldsToAttributes = [ - "uuid" : "717af017-cc69-406f-b452-e022d7fb516a", - "id" : "test_thermal_unit", - "operator" : "8f9682df-0744-4b58-a122-f0dc730f6510", - "operatesFrom" : "2020-03-24 15:11:31", - "operatesUntil": "2020-03-25 15:11:31", - "thermalBus" : "0d95d7f2-49fb-4d49-8636-383a5220384e" - ] - def assetInputEntityData = new AssetInputEntityData(validFieldsToAttributes, ThermalUnitInput, operator) - - when: - def resultingDataOpt = csvThermalSource.buildThermalUnitInputEntityData(assetInputEntityData, thermalBuses).collect(Collectors.toList()) - - then: - resultingDataOpt.size() == 1 - resultingDataOpt.first().present == resultIsPresent - resultingDataOpt.first().ifPresent({ resultingData -> - assert (resultingData == expectedThermalUnitInputEntityData) - }) - - where: - thermalBuses || resultIsPresent || expectedThermalUnitInputEntityData - [] || false || null // thermal buses are not present -> method should return an empty optional -> do not check for thermal unit entity data - [ - new ThermalBusInput(UUID.fromString("0d95d7f2-49fb-4d49-8636-383a5220384e"), "test_thermal_bus") - ] || true || - new ThermalUnitInputEntityData(["uuid" : "717af017-cc69-406f-b452-e022d7fb516a", - "id" : "test_thermal_unit", - "operator" : "8f9682df-0744-4b58-a122-f0dc730f6510", - "operatesFrom" : "2020-03-24 15:11:31", - "operatesUntil": "2020-03-25 15:11:31"], - ThermalUnitInput, - new OperatorInput(UUID.fromString("8f9682df-0744-4b58-a122-f0dc730f6510"), "testOperator"), - new ThermalBusInput(UUID.fromString("0d95d7f2-49fb-4d49-8636-383a5220384e"), "test_thermal_bus")) - - } - - def "A CsvThermalSource should return a ThermalHouseInput from valid and invalid input data as expected"() { - given: - def csvTypeSource = new CsvTypeSource(",", typeFolderPath, new EntityPersistenceNamingStrategy()) - def csvThermalSource = new CsvThermalSource(csvSep, thermalFolderPath, entityPersistenceNamingStrategy, csvTypeSource) - def operators = csvTypeSource.operators - def thermalBuses = csvThermalSource.thermalBuses - - //test method when operators and thermal buses are not provided as constructor parameters - when: - def resultingThermalHouseWoOperator = csvThermalSource.getThermalHouses() - - then: - resultingThermalHouseWoOperator.size() == 1 - resultingThermalHouseWoOperator.first().uuid == ThermalUnitInputTestData.thermalHouseInput.uuid - resultingThermalHouseWoOperator.first().id == ThermalUnitInputTestData.thermalHouseInput.id - resultingThermalHouseWoOperator.first().operator == ThermalUnitInputTestData.thermalHouseInput.operator - resultingThermalHouseWoOperator.first().operationTime.isLimited() - resultingThermalHouseWoOperator.first().operationTime == ThermalUnitInputTestData.thermalHouseInput.operationTime - resultingThermalHouseWoOperator.first().thermalBus == ThermalUnitInputTestData.thermalHouseInput.thermalBus - resultingThermalHouseWoOperator.first().ethLosses == ThermalUnitInputTestData.thermalHouseInput.ethLosses - resultingThermalHouseWoOperator.first().ethCapa == ThermalUnitInputTestData.thermalHouseInput.ethCapa - resultingThermalHouseWoOperator.first().targetTemperature == ThermalUnitInputTestData.thermalHouseInput.targetTemperature - resultingThermalHouseWoOperator.first().upperTemperatureLimit == ThermalUnitInputTestData.thermalHouseInput.upperTemperatureLimit - resultingThermalHouseWoOperator.first().lowerTemperatureLimit == ThermalUnitInputTestData.thermalHouseInput.lowerTemperatureLimit - - //test method when operators and thermal buses are provided as constructor parameters - when: - def resultingThermalHouse = csvThermalSource.getThermalHouses(operators, thermalBuses) - - then: - resultingThermalHouse.size() == 1 - resultingThermalHouse.first().uuid == ThermalUnitInputTestData.thermalHouseInput.uuid - resultingThermalHouse.first().id == ThermalUnitInputTestData.thermalHouseInput.id - resultingThermalHouse.first().operator == ThermalUnitInputTestData.thermalHouseInput.operator - resultingThermalHouse.first().operationTime.isLimited() - resultingThermalHouse.first().operationTime == ThermalUnitInputTestData.thermalHouseInput.operationTime - resultingThermalHouseWoOperator.first().thermalBus == ThermalUnitInputTestData.thermalHouseInput.thermalBus - resultingThermalHouse.first().ethLosses == ThermalUnitInputTestData.thermalHouseInput.ethLosses - resultingThermalHouse.first().ethCapa == ThermalUnitInputTestData.thermalHouseInput.ethCapa - resultingThermalHouse.first().targetTemperature == ThermalUnitInputTestData.thermalHouseInput.targetTemperature - resultingThermalHouse.first().upperTemperatureLimit == ThermalUnitInputTestData.thermalHouseInput.upperTemperatureLimit - resultingThermalHouse.first().lowerTemperatureLimit == ThermalUnitInputTestData.thermalHouseInput.lowerTemperatureLimit - - } + def "A CsvThermalSource should return ThermalBuses from valid and invalid input data as expected"() { + given: + def csvTypeSource = new CsvTypeSource(",", typeFolderPath, new EntityPersistenceNamingStrategy()) + def csvThermalSource = new CsvThermalSource(csvSep, thermalFolderPath, entityPersistenceNamingStrategy, csvTypeSource) + def operators = csvTypeSource.operators + + //test method when no operators are provided as constructor parameters + when: + def resultingThermalBusesWoOperator = csvThermalSource.getThermalBuses() + + then: + resultingThermalBusesWoOperator.size() == 1 + resultingThermalBusesWoOperator.first().uuid == sptd.thermalBus.uuid + resultingThermalBusesWoOperator.first().id == sptd.thermalBus.id + resultingThermalBusesWoOperator.first().operator == sptd.thermalBus.operator + resultingThermalBusesWoOperator.first().operationTime == sptd.thermalBus.operationTime + + //test method when operators are provided as constructor parameters + when: + def resultingThermalBuses = csvThermalSource.getThermalBuses(operators) + + then: + resultingThermalBuses.size() == 1 + resultingThermalBuses.first().uuid == sptd.thermalBus.uuid + resultingThermalBuses.first().id == sptd.thermalBus.id + resultingThermalBuses.first().operator == sptd.thermalBus.operator + resultingThermalBuses.first().operationTime == sptd.thermalBus.operationTime + } + + def "A CsvThermalSource should return a CylindricalStorageInput from valid and invalid input data as expected"() { + given: + def csvTypeSource = new CsvTypeSource(",", typeFolderPath, new EntityPersistenceNamingStrategy()) + def csvThermalSource = new CsvThermalSource(csvSep, thermalFolderPath, entityPersistenceNamingStrategy, csvTypeSource) + def operators = csvTypeSource.operators + def thermalBuses = csvThermalSource.thermalBuses + + //test method when operators and thermal buses are not provided as constructor parameters + when: + def resultingCylindricalStorageWoOperator = csvThermalSource.getCylindricStorages() + + then: + resultingCylindricalStorageWoOperator.size() == 1 + resultingCylindricalStorageWoOperator.first().uuid == sptd.thermalStorage.uuid + resultingCylindricalStorageWoOperator.first().id == sptd.thermalStorage.id + resultingCylindricalStorageWoOperator.first().operator == sptd.thermalStorage.operator + resultingCylindricalStorageWoOperator.first().operationTime == sptd.thermalStorage.operationTime + resultingCylindricalStorageWoOperator.first().thermalBus == sptd.thermalStorage.thermalBus + resultingCylindricalStorageWoOperator.first().storageVolumeLvl == sptd.storageVolumeLvl + resultingCylindricalStorageWoOperator.first().storageVolumeLvlMin == sptd.storageVolumeLvlMin + resultingCylindricalStorageWoOperator.first().inletTemp == sptd.inletTemp + resultingCylindricalStorageWoOperator.first().returnTemp == sptd.returnTemp + resultingCylindricalStorageWoOperator.first().c == sptd.c + + //test method when operators and thermal buses are provided as constructor parameters + when: + def resultingCylindricalStorage = csvThermalSource.getCylindricStorages(operators, thermalBuses) + + then: + resultingCylindricalStorage.size() == 1 + resultingCylindricalStorage.first().uuid == sptd.thermalStorage.uuid + resultingCylindricalStorage.first().id == sptd.thermalStorage.id + resultingCylindricalStorage.first().operator == sptd.thermalStorage.operator + resultingCylindricalStorage.first().operationTime == sptd.thermalStorage.operationTime + resultingCylindricalStorage.first().thermalBus == sptd.thermalStorage.thermalBus + resultingCylindricalStorage.first().storageVolumeLvl == sptd.storageVolumeLvl + resultingCylindricalStorage.first().storageVolumeLvlMin == sptd.storageVolumeLvlMin + resultingCylindricalStorage.first().inletTemp == sptd.inletTemp + resultingCylindricalStorage.first().returnTemp == sptd.returnTemp + resultingCylindricalStorage.first().c == sptd.c + + } + + def "A CsvThermalSource should build thermal unit input entity from valid and invalid input data as expected"() { + given: + def csvTypeSource = new CsvTypeSource(",", typeFolderPath, new EntityPersistenceNamingStrategy()) + def csvThermalSource = new CsvThermalSource(csvSep, thermalFolderPath, entityPersistenceNamingStrategy, csvTypeSource) + def operator = new OperatorInput(UUID.fromString("8f9682df-0744-4b58-a122-f0dc730f6510"), "testOperator") + def validFieldsToAttributes = [ + "uuid" : "717af017-cc69-406f-b452-e022d7fb516a", + "id" : "test_thermal_unit", + "operator" : "8f9682df-0744-4b58-a122-f0dc730f6510", + "operatesFrom" : "2020-03-24 15:11:31", + "operatesUntil" : "2020-03-25 15:11:31", + "thermalBus" : "0d95d7f2-49fb-4d49-8636-383a5220384e" + ] + def assetInputEntityData = new AssetInputEntityData(validFieldsToAttributes, ThermalUnitInput, operator) + + when: + def resultingDataOpt = csvThermalSource.buildThermalUnitInputEntityData(assetInputEntityData, thermalBuses).collect(Collectors.toList()) + + then: + resultingDataOpt.size() == 1 + resultingDataOpt.first().present == resultIsPresent + resultingDataOpt.first().ifPresent({ resultingData -> + assert (resultingData == expectedThermalUnitInputEntityData) + }) + + where: + thermalBuses || resultIsPresent || expectedThermalUnitInputEntityData + []|| false || null // thermal buses are not present -> method should return an empty optional -> do not check for thermal unit entity data + [ + new ThermalBusInput(UUID.fromString("0d95d7f2-49fb-4d49-8636-383a5220384e"), "test_thermal_bus") + ]|| true || + new ThermalUnitInputEntityData(["uuid": "717af017-cc69-406f-b452-e022d7fb516a", + "id": "test_thermal_unit", + "operator": "8f9682df-0744-4b58-a122-f0dc730f6510", + "operatesFrom": "2020-03-24 15:11:31", + "operatesUntil": "2020-03-25 15:11:31"], + ThermalUnitInput, + new OperatorInput(UUID.fromString("8f9682df-0744-4b58-a122-f0dc730f6510"), "testOperator"), + new ThermalBusInput(UUID.fromString("0d95d7f2-49fb-4d49-8636-383a5220384e"), "test_thermal_bus")) + + } + + def "A CsvThermalSource should return a ThermalHouseInput from valid and invalid input data as expected"() { + given: + def csvTypeSource = new CsvTypeSource(",", typeFolderPath, new EntityPersistenceNamingStrategy()) + def csvThermalSource = new CsvThermalSource(csvSep, thermalFolderPath, entityPersistenceNamingStrategy, csvTypeSource) + def operators = csvTypeSource.operators + def thermalBuses = csvThermalSource.thermalBuses + + //test method when operators and thermal buses are not provided as constructor parameters + when: + def resultingThermalHouseWoOperator = csvThermalSource.getThermalHouses() + + then: + resultingThermalHouseWoOperator.size() == 1 + resultingThermalHouseWoOperator.first().uuid == ThermalUnitInputTestData.thermalHouseInput.uuid + resultingThermalHouseWoOperator.first().id == ThermalUnitInputTestData.thermalHouseInput.id + resultingThermalHouseWoOperator.first().operator == ThermalUnitInputTestData.thermalHouseInput.operator + resultingThermalHouseWoOperator.first().operationTime.isLimited() + resultingThermalHouseWoOperator.first().operationTime == ThermalUnitInputTestData.thermalHouseInput.operationTime + resultingThermalHouseWoOperator.first().thermalBus == ThermalUnitInputTestData.thermalHouseInput.thermalBus + resultingThermalHouseWoOperator.first().ethLosses == ThermalUnitInputTestData.thermalHouseInput.ethLosses + resultingThermalHouseWoOperator.first().ethCapa == ThermalUnitInputTestData.thermalHouseInput.ethCapa + resultingThermalHouseWoOperator.first().targetTemperature == ThermalUnitInputTestData.thermalHouseInput.targetTemperature + resultingThermalHouseWoOperator.first().upperTemperatureLimit == ThermalUnitInputTestData.thermalHouseInput.upperTemperatureLimit + resultingThermalHouseWoOperator.first().lowerTemperatureLimit == ThermalUnitInputTestData.thermalHouseInput.lowerTemperatureLimit + + //test method when operators and thermal buses are provided as constructor parameters + when: + def resultingThermalHouse = csvThermalSource.getThermalHouses(operators, thermalBuses) + + then: + resultingThermalHouse.size() == 1 + resultingThermalHouse.first().uuid == ThermalUnitInputTestData.thermalHouseInput.uuid + resultingThermalHouse.first().id == ThermalUnitInputTestData.thermalHouseInput.id + resultingThermalHouse.first().operator == ThermalUnitInputTestData.thermalHouseInput.operator + resultingThermalHouse.first().operationTime.isLimited() + resultingThermalHouse.first().operationTime == ThermalUnitInputTestData.thermalHouseInput.operationTime + resultingThermalHouseWoOperator.first().thermalBus == ThermalUnitInputTestData.thermalHouseInput.thermalBus + resultingThermalHouse.first().ethLosses == ThermalUnitInputTestData.thermalHouseInput.ethLosses + resultingThermalHouse.first().ethCapa == ThermalUnitInputTestData.thermalHouseInput.ethCapa + resultingThermalHouse.first().targetTemperature == ThermalUnitInputTestData.thermalHouseInput.targetTemperature + resultingThermalHouse.first().upperTemperatureLimit == ThermalUnitInputTestData.thermalHouseInput.upperTemperatureLimit + resultingThermalHouse.first().lowerTemperatureLimit == ThermalUnitInputTestData.thermalHouseInput.lowerTemperatureLimit + + } } diff --git a/src/test/groovy/edu/ie3/datamodel/models/input/thermal/CylindricalStorageInputTest.groovy b/src/test/groovy/edu/ie3/datamodel/models/input/thermal/CylindricalStorageInputTest.groovy index f2b3bcb6a..2cfad9e0e 100644 --- a/src/test/groovy/edu/ie3/datamodel/models/input/thermal/CylindricalStorageInputTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/models/input/thermal/CylindricalStorageInputTest.groovy @@ -11,29 +11,29 @@ import spock.lang.Specification class CylindricalStorageInputTest extends Specification { - def "A CylindricalStorageInput copy method should work as expected"() { - given: - def cylindricalStorageInput = ThermalUnitInputTestData.cylindricStorageInput + def "A CylindricalStorageInput copy method should work as expected"() { + given: + def cylindricalStorageInput = ThermalUnitInputTestData.cylindricStorageInput - when: - def alteredUnit = cylindricalStorageInput.copy().storageVolumeLvl(ThermalUnitInputTestData.storageVolumeLvl) - .storageVolumeLvlMin(ThermalUnitInputTestData.storageVolumeLvlMin).inletTemp(ThermalUnitInputTestData.inletTemp) - .returnTemp(ThermalUnitInputTestData.returnTemp).c(ThermalUnitInputTestData.c) - .thermalBus(ThermalUnitInputTestData.thermalBus).build() + when: + def alteredUnit = cylindricalStorageInput.copy().storageVolumeLvl(ThermalUnitInputTestData.storageVolumeLvl) + .storageVolumeLvlMin(ThermalUnitInputTestData.storageVolumeLvlMin).inletTemp(ThermalUnitInputTestData.inletTemp) + .returnTemp(ThermalUnitInputTestData.returnTemp).c(ThermalUnitInputTestData.c) + .thermalBus(ThermalUnitInputTestData.thermalBus).build() - then: - alteredUnit.with { - assert uuid == cylindricalStorageInput.uuid - assert id == cylindricalStorageInput.id - assert operator == cylindricalStorageInput.operator - assert operationTime == cylindricalStorageInput.operationTime - assert thermalBus == cylindricalStorageInput.thermalBus - assert storageVolumeLvl == ThermalUnitInputTestData.storageVolumeLvl - assert storageVolumeLvlMin == ThermalUnitInputTestData.storageVolumeLvlMin - assert inletTemp == ThermalUnitInputTestData.inletTemp - assert returnTemp == ThermalUnitInputTestData.returnTemp - assert c == ThermalUnitInputTestData.c - } - } + then: + alteredUnit.with { + assert uuid == cylindricalStorageInput.uuid + assert id == cylindricalStorageInput.id + assert operator == cylindricalStorageInput.operator + assert operationTime == cylindricalStorageInput.operationTime + assert thermalBus == cylindricalStorageInput.thermalBus + assert storageVolumeLvl == ThermalUnitInputTestData.storageVolumeLvl + assert storageVolumeLvlMin == ThermalUnitInputTestData.storageVolumeLvlMin + assert inletTemp == ThermalUnitInputTestData.inletTemp + assert returnTemp == ThermalUnitInputTestData.returnTemp + assert c == ThermalUnitInputTestData.c + } + } } diff --git a/src/test/groovy/edu/ie3/datamodel/models/input/thermal/ThermalHouseInputTest.groovy b/src/test/groovy/edu/ie3/datamodel/models/input/thermal/ThermalHouseInputTest.groovy index a8703c347..496c46576 100644 --- a/src/test/groovy/edu/ie3/datamodel/models/input/thermal/ThermalHouseInputTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/models/input/thermal/ThermalHouseInputTest.groovy @@ -13,44 +13,43 @@ import tech.units.indriya.quantity.Quantities class ThermalHouseInputTest extends Specification { - def "A ThermalHouseInput copy method should work as expected"() { - given: - def thermalHouseInput = ThermalUnitInputTestData.thermalHouseInput - - when: - def alteredUnit = thermalHouseInput.copy().ethLosses(ThermalUnitInputTestData.thermalConductance) - .ethCapa(ThermalUnitInputTestData.ethCapa) - .targetTemperature(ThermalUnitInputTestData.TARGET_TEMPERATURE) - .upperTemperatureLimit(ThermalUnitInputTestData.UPPER_TEMPERATURE_LIMIT) - .lowerTemperatureLimit(ThermalUnitInputTestData.LOWER_TEMPERATURE_LIMIT) - .thermalBus(ThermalUnitInputTestData.thermalBus).build() - - - then: - alteredUnit.with { - assert uuid == thermalHouseInput.uuid - assert id == thermalHouseInput.id - assert operator == thermalHouseInput.operator - assert operationTime == thermalHouseInput.operationTime - assert thermalBus == thermalHouseInput.thermalBus - assert ethLosses == ThermalUnitInputTestData.thermalConductance - assert ethCapa == ThermalUnitInputTestData.ethCapa - assert targetTemperature == ThermalUnitInputTestData.TARGET_TEMPERATURE - assert upperTemperatureLimit == ThermalUnitInputTestData.UPPER_TEMPERATURE_LIMIT - assert lowerTemperatureLimit == ThermalUnitInputTestData.LOWER_TEMPERATURE_LIMIT - } - } - - def "The equals methods for a ThermalHouseInput works as expected"() { - given: - def thermalHouseInput1 = ThermalUnitInputTestData.thermalHouseInput - def thermalHouseInput2 = ThermalUnitInputTestData.thermalHouseInput - def thermalHouseInput3 = ThermalUnitInputTestData.thermalHouseInput.copy(). - ethLosses(Quantities.getQuantity(100, StandardUnits.THERMAL_TRANSMISSION)) - - expect: - thermalHouseInput1.equals(thermalHouseInput2) - !thermalHouseInput1.equals(thermalHouseInput3) - - } + def "A ThermalHouseInput copy method should work as expected"() { + given: + def thermalHouseInput = ThermalUnitInputTestData.thermalHouseInput + + when: + def alteredUnit = thermalHouseInput.copy().ethLosses(ThermalUnitInputTestData.thermalConductance) + .ethCapa(ThermalUnitInputTestData.ethCapa) + .targetTemperature(ThermalUnitInputTestData.TARGET_TEMPERATURE) + .upperTemperatureLimit(ThermalUnitInputTestData.UPPER_TEMPERATURE_LIMIT) + .lowerTemperatureLimit(ThermalUnitInputTestData.LOWER_TEMPERATURE_LIMIT) + .thermalBus(ThermalUnitInputTestData.thermalBus).build() + + + then: + alteredUnit.with { + assert uuid == thermalHouseInput.uuid + assert id == thermalHouseInput.id + assert operator == thermalHouseInput.operator + assert operationTime == thermalHouseInput.operationTime + assert thermalBus == thermalHouseInput.thermalBus + assert ethLosses == ThermalUnitInputTestData.thermalConductance + assert ethCapa == ThermalUnitInputTestData.ethCapa + assert targetTemperature == ThermalUnitInputTestData.TARGET_TEMPERATURE + assert upperTemperatureLimit == ThermalUnitInputTestData.UPPER_TEMPERATURE_LIMIT + assert lowerTemperatureLimit == ThermalUnitInputTestData.LOWER_TEMPERATURE_LIMIT + } + } + + def "The equals methods for a ThermalHouseInput works as expected"() { + given: + def thermalHouseInput1 = ThermalUnitInputTestData.thermalHouseInput + def thermalHouseInput2 = ThermalUnitInputTestData.thermalHouseInput + def thermalHouseInput3 = ThermalUnitInputTestData.thermalHouseInput.copy(). + ethLosses(Quantities.getQuantity(100, StandardUnits.THERMAL_TRANSMISSION)) + + expect: + thermalHouseInput1.equals(thermalHouseInput2) + !thermalHouseInput1.equals(thermalHouseInput3) + } } diff --git a/src/test/groovy/edu/ie3/datamodel/utils/validation/ThermalUnitValidationUtilsTest.groovy b/src/test/groovy/edu/ie3/datamodel/utils/validation/ThermalUnitValidationUtilsTest.groovy index 4a2375ecb..da62c41d4 100644 --- a/src/test/groovy/edu/ie3/datamodel/utils/validation/ThermalUnitValidationUtilsTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/utils/validation/ThermalUnitValidationUtilsTest.groovy @@ -26,87 +26,87 @@ import javax.measure.quantity.Volume class ThermalUnitValidationUtilsTest extends Specification { - // General data - private static final UUID thermalUnitUuid = UUID.fromString("717af017-cc69-406f-b452-e022d7fb516a") - private static final String id = "thermal_unit_test" - private static final OperationTime operationTime = OperationTime.builder() - .withStart(TimeUtil.withDefaults.toZonedDateTime("2020-03-24 15:11:31")) - .withEnd(TimeUtil.withDefaults.toZonedDateTime("2020-03-25 15:11:31")).build() - private static final OperatorInput operator = new OperatorInput( - UUID.fromString("8f9682df-0744-4b58-a122-f0dc730f6510"), "TestOperator") - - // Specific data for thermal house input - private static final ComparableQuantity thermalConductance = Quantities.getQuantity(10, StandardUnits.THERMAL_TRANSMISSION) - private static final ComparableQuantity ethCapa = Quantities.getQuantity(20, StandardUnits.HEAT_CAPACITY) - private static final ComparableQuantity TARGET_TEMPERATURE = Quantities.getQuantity(20, StandardUnits.TEMPERATURE) - private static final ComparableQuantity UPPER_TEMPERATURE_LIMIT = Quantities.getQuantity(25, StandardUnits.TEMPERATURE) - private static final ComparableQuantity LOWER_TEMPERATURE_LIMIT = Quantities.getQuantity(15, StandardUnits.TEMPERATURE) - - // Specific data for thermal cylindric storage input - private static final ComparableQuantity storageVolumeLvl = Quantities.getQuantity(100, StandardUnits.VOLUME) - private static final ComparableQuantity storageVolumeLvlMin = Quantities.getQuantity(10, StandardUnits.VOLUME) - private static final ComparableQuantity inletTemp = Quantities.getQuantity(100, StandardUnits.TEMPERATURE) - private static final ComparableQuantity returnTemp = Quantities.getQuantity(80, StandardUnits.TEMPERATURE) - private static final ComparableQuantity c = Quantities.getQuantity(1.05, StandardUnits.SPECIFIC_HEAT_CAPACITY) - - // Thermal House - - def "Smoke Test: Correct thermal house throws no exception"() { - given: - def thermalHouseInput = ThermalUnitInputTestData.thermalHouseInput - - when: - ValidationUtils.check(thermalHouseInput) - - then: - noExceptionThrown() - } - - def "ThermalUnitValidationUtils.checkThermalHouse() recognizes all potential errors for a thermal house"() { - when: - ThermalUnitValidationUtils.check(invalidThermalHouse) - - then: - Exception ex = thrown() - ex.class == expectedException.class - ex.message == expectedException.message - - where: - invalidThermalHouse || expectedException - new ThermalHouseInput(thermalUnitUuid, id, operator, operationTime, SystemParticipantTestData.thermalBus, Quantities.getQuantity(-10, StandardUnits.THERMAL_TRANSMISSION), ethCapa, TARGET_TEMPERATURE, UPPER_TEMPERATURE_LIMIT, LOWER_TEMPERATURE_LIMIT) || new InvalidEntityException("The following quantities have to be zero or positive: -10 kW/K", invalidThermalHouse) - new ThermalHouseInput(thermalUnitUuid, id, operator, operationTime, SystemParticipantTestData.thermalBus, thermalConductance, Quantities.getQuantity(0, StandardUnits.HEAT_CAPACITY), TARGET_TEMPERATURE, UPPER_TEMPERATURE_LIMIT, LOWER_TEMPERATURE_LIMIT) || new InvalidEntityException("The following quantities have to be positive: 0 kWh/K", invalidThermalHouse) - new ThermalHouseInput(thermalUnitUuid, id, operator, operationTime, SystemParticipantTestData.thermalBus, thermalConductance, ethCapa, Quantities.getQuantity(0, StandardUnits.TEMPERATURE), UPPER_TEMPERATURE_LIMIT, LOWER_TEMPERATURE_LIMIT) || new InvalidEntityException("Target temperature must be higher than lower temperature limit and lower than upper temperature limit", invalidThermalHouse) - new ThermalHouseInput(thermalUnitUuid, id, operator, operationTime, SystemParticipantTestData.thermalBus, thermalConductance, ethCapa, TARGET_TEMPERATURE, Quantities.getQuantity(0, StandardUnits.TEMPERATURE), LOWER_TEMPERATURE_LIMIT) || new InvalidEntityException("Target temperature must be higher than lower temperature limit and lower than upper temperature limit", invalidThermalHouse) - new ThermalHouseInput(thermalUnitUuid, id, operator, operationTime, SystemParticipantTestData.thermalBus, thermalConductance, ethCapa, TARGET_TEMPERATURE, UPPER_TEMPERATURE_LIMIT, Quantities.getQuantity(30, StandardUnits.TEMPERATURE)) || new InvalidEntityException("Target temperature must be higher than lower temperature limit and lower than upper temperature limit", invalidThermalHouse) - } - - // Thermal Cylindrical Storage - - def "Smoke Test: Correct thermal cylindrical storage throws no exception"() { - given: - def cylindricalStorageInput = ThermalUnitInputTestData.cylindricStorageInput - - when: - ValidationUtils.check(cylindricalStorageInput) - - then: - noExceptionThrown() - } - - def "ThermalUnitValidationUtils.checkCylindricalStorage() recognizes all potential errors for a thermal cylindrical storage"() { - when: - ThermalUnitValidationUtils.check(invalidCylindricalStorage) - - then: - Exception ex = thrown() - ex.class == expectedException.class - ex.message == expectedException.message - - where: - invalidCylindricalStorage || expectedException - new CylindricalStorageInput(thermalUnitUuid, id, operator, operationTime, SystemParticipantTestData.thermalBus, storageVolumeLvl, storageVolumeLvlMin, Quantities.getQuantity(100, StandardUnits.TEMPERATURE), Quantities.getQuantity(200, StandardUnits.TEMPERATURE), c) || new InvalidEntityException("Inlet temperature of the cylindrical storage cannot be lower than outlet temperature", invalidCylindricalStorage) - new CylindricalStorageInput(thermalUnitUuid, id, operator, operationTime, SystemParticipantTestData.thermalBus, Quantities.getQuantity(100, StandardUnits.VOLUME), Quantities.getQuantity(200, StandardUnits.VOLUME), inletTemp, returnTemp, c) || new InvalidEntityException("Minimum permissible storage volume of the cylindrical storage cannot be higher than overall available storage volume", invalidCylindricalStorage) - new CylindricalStorageInput(thermalUnitUuid, id, operator, operationTime, SystemParticipantTestData.thermalBus, Quantities.getQuantity(-100, StandardUnits.VOLUME), Quantities.getQuantity(-200, StandardUnits.VOLUME), inletTemp, returnTemp, Quantities.getQuantity(-1.05, StandardUnits.SPECIFIC_HEAT_CAPACITY)) || new InvalidEntityException("The following quantities have to be positive: -100 ㎥, -200 ㎥, -1.05 kWh/K*m³", invalidCylindricalStorage) - } + // General data + private static final UUID thermalUnitUuid = UUID.fromString("717af017-cc69-406f-b452-e022d7fb516a") + private static final String id = "thermal_unit_test" + private static final OperationTime operationTime = OperationTime.builder() + .withStart(TimeUtil.withDefaults.toZonedDateTime("2020-03-24 15:11:31")) + .withEnd(TimeUtil.withDefaults.toZonedDateTime("2020-03-25 15:11:31")).build() + private static final OperatorInput operator = new OperatorInput( + UUID.fromString("8f9682df-0744-4b58-a122-f0dc730f6510"), "TestOperator") + + // Specific data for thermal house input + private static final ComparableQuantity thermalConductance = Quantities.getQuantity(10, StandardUnits.THERMAL_TRANSMISSION) + private static final ComparableQuantity ethCapa = Quantities.getQuantity(20, StandardUnits.HEAT_CAPACITY) + private static final ComparableQuantity TARGET_TEMPERATURE = Quantities.getQuantity(20, StandardUnits.TEMPERATURE) + private static final ComparableQuantity UPPER_TEMPERATURE_LIMIT = Quantities.getQuantity(25, StandardUnits.TEMPERATURE) + private static final ComparableQuantity LOWER_TEMPERATURE_LIMIT = Quantities.getQuantity(15, StandardUnits.TEMPERATURE) + + // Specific data for thermal cylindric storage input + private static final ComparableQuantity storageVolumeLvl = Quantities.getQuantity(100, StandardUnits.VOLUME) + private static final ComparableQuantity storageVolumeLvlMin = Quantities.getQuantity(10, StandardUnits.VOLUME) + private static final ComparableQuantity inletTemp = Quantities.getQuantity(100, StandardUnits.TEMPERATURE) + private static final ComparableQuantity returnTemp = Quantities.getQuantity(80, StandardUnits.TEMPERATURE) + private static final ComparableQuantity c = Quantities.getQuantity(1.05, StandardUnits.SPECIFIC_HEAT_CAPACITY) + + // Thermal House + + def "Smoke Test: Correct thermal house throws no exception"() { + given: + def thermalHouseInput = ThermalUnitInputTestData.thermalHouseInput + + when: + ValidationUtils.check(thermalHouseInput) + + then: + noExceptionThrown() + } + + def "ThermalUnitValidationUtils.checkThermalHouse() recognizes all potential errors for a thermal house"() { + when: + ThermalUnitValidationUtils.check(invalidThermalHouse) + + then: + Exception ex = thrown() + ex.class == expectedException.class + ex.message == expectedException.message + + where: + invalidThermalHouse || expectedException + new ThermalHouseInput(thermalUnitUuid, id, operator, operationTime, SystemParticipantTestData.thermalBus, Quantities.getQuantity(-10, StandardUnits.THERMAL_TRANSMISSION), ethCapa, TARGET_TEMPERATURE, UPPER_TEMPERATURE_LIMIT, LOWER_TEMPERATURE_LIMIT) || new InvalidEntityException("The following quantities have to be zero or positive: -10 kW/K", invalidThermalHouse) + new ThermalHouseInput(thermalUnitUuid, id, operator, operationTime, SystemParticipantTestData.thermalBus, thermalConductance, Quantities.getQuantity(0, StandardUnits.HEAT_CAPACITY), TARGET_TEMPERATURE, UPPER_TEMPERATURE_LIMIT, LOWER_TEMPERATURE_LIMIT) || new InvalidEntityException("The following quantities have to be positive: 0 kWh/K", invalidThermalHouse) + new ThermalHouseInput(thermalUnitUuid, id, operator, operationTime, SystemParticipantTestData.thermalBus, thermalConductance, ethCapa, Quantities.getQuantity(0, StandardUnits.TEMPERATURE), UPPER_TEMPERATURE_LIMIT, LOWER_TEMPERATURE_LIMIT) || new InvalidEntityException("Target temperature must be higher than lower temperature limit and lower than upper temperature limit", invalidThermalHouse) + new ThermalHouseInput(thermalUnitUuid, id, operator, operationTime, SystemParticipantTestData.thermalBus, thermalConductance, ethCapa, TARGET_TEMPERATURE, Quantities.getQuantity(0, StandardUnits.TEMPERATURE), LOWER_TEMPERATURE_LIMIT) || new InvalidEntityException("Target temperature must be higher than lower temperature limit and lower than upper temperature limit", invalidThermalHouse) + new ThermalHouseInput(thermalUnitUuid, id, operator, operationTime, SystemParticipantTestData.thermalBus, thermalConductance, ethCapa, TARGET_TEMPERATURE, UPPER_TEMPERATURE_LIMIT, Quantities.getQuantity(30, StandardUnits.TEMPERATURE)) || new InvalidEntityException("Target temperature must be higher than lower temperature limit and lower than upper temperature limit", invalidThermalHouse) + } + + // Thermal Cylindrical Storage + + def "Smoke Test: Correct thermal cylindrical storage throws no exception"() { + given: + def cylindricalStorageInput = ThermalUnitInputTestData.cylindricStorageInput + + when: + ValidationUtils.check(cylindricalStorageInput) + + then: + noExceptionThrown() + } + + def "ThermalUnitValidationUtils.checkCylindricalStorage() recognizes all potential errors for a thermal cylindrical storage"() { + when: + ThermalUnitValidationUtils.check(invalidCylindricalStorage) + + then: + Exception ex = thrown() + ex.class == expectedException.class + ex.message == expectedException.message + + where: + invalidCylindricalStorage || expectedException + new CylindricalStorageInput(thermalUnitUuid, id, operator, operationTime, SystemParticipantTestData.thermalBus, storageVolumeLvl, storageVolumeLvlMin, Quantities.getQuantity(100, StandardUnits.TEMPERATURE), Quantities.getQuantity(200, StandardUnits.TEMPERATURE), c) || new InvalidEntityException("Inlet temperature of the cylindrical storage cannot be lower than outlet temperature", invalidCylindricalStorage) + new CylindricalStorageInput(thermalUnitUuid, id, operator, operationTime, SystemParticipantTestData.thermalBus, Quantities.getQuantity(100, StandardUnits.VOLUME), Quantities.getQuantity(200, StandardUnits.VOLUME), inletTemp, returnTemp, c) || new InvalidEntityException("Minimum permissible storage volume of the cylindrical storage cannot be higher than overall available storage volume", invalidCylindricalStorage) + new CylindricalStorageInput(thermalUnitUuid, id, operator, operationTime, SystemParticipantTestData.thermalBus, Quantities.getQuantity(-100, StandardUnits.VOLUME), Quantities.getQuantity(-200, StandardUnits.VOLUME), inletTemp, returnTemp, Quantities.getQuantity(-1.05, StandardUnits.SPECIFIC_HEAT_CAPACITY)) || new InvalidEntityException("The following quantities have to be positive: -100 ㎥, -200 ㎥, -1.05 kWh/K*m³", invalidCylindricalStorage) + } } diff --git a/src/test/groovy/edu/ie3/test/common/ThermalUnitInputTestData.groovy b/src/test/groovy/edu/ie3/test/common/ThermalUnitInputTestData.groovy index 4c94565e1..4d4ed4d4b 100644 --- a/src/test/groovy/edu/ie3/test/common/ThermalUnitInputTestData.groovy +++ b/src/test/groovy/edu/ie3/test/common/ThermalUnitInputTestData.groovy @@ -22,49 +22,49 @@ import javax.measure.quantity.Volume class ThermalUnitInputTestData extends SystemParticipantTestData { - // general participant data - private static final UUID thermalUnitUuid = UUID.fromString("717af017-cc69-406f-b452-e022d7fb516a") - public static final OperationTime operationTime = OperationTime.builder() - .withStart(TimeUtil.withDefaults.toZonedDateTime("2020-03-24 15:11:31")) - .withEnd(TimeUtil.withDefaults.toZonedDateTime("2020-03-25 15:11:31")).build() - private static final OperatorInput operator = new OperatorInput( - UUID.fromString("8f9682df-0744-4b58-a122-f0dc730f6510"), "TestOperator") + // general participant data + private static final UUID thermalUnitUuid = UUID.fromString("717af017-cc69-406f-b452-e022d7fb516a") + public static final OperationTime operationTime = OperationTime.builder() + .withStart(TimeUtil.withDefaults.toZonedDateTime("2020-03-24 15:11:31")) + .withEnd(TimeUtil.withDefaults.toZonedDateTime("2020-03-25 15:11:31")).build() + private static final OperatorInput operator = new OperatorInput( + UUID.fromString("8f9682df-0744-4b58-a122-f0dc730f6510"), "TestOperator") - // thermal house input - private static final ComparableQuantity thermalConductance = Quantities.getQuantity(10, StandardUnits.THERMAL_TRANSMISSION) - private static final ComparableQuantity ethCapa = Quantities.getQuantity(20, StandardUnits.HEAT_CAPACITY) - private static final ComparableQuantity TARGET_TEMPERATURE = Quantities.getQuantity(20, StandardUnits.TEMPERATURE) - private static final ComparableQuantity UPPER_TEMPERATURE_LIMIT = Quantities.getQuantity(25, StandardUnits.TEMPERATURE) - private static final ComparableQuantity LOWER_TEMPERATURE_LIMIT = Quantities.getQuantity(15, StandardUnits.TEMPERATURE) - public static final thermalHouseInput = new ThermalHouseInput( - thermalUnitUuid, - "test_thermalHouseInput", - operator, - operationTime, - thermalBus, - thermalConductance, - ethCapa, - TARGET_TEMPERATURE, - UPPER_TEMPERATURE_LIMIT, - LOWER_TEMPERATURE_LIMIT) + // thermal house input + private static final ComparableQuantity thermalConductance = Quantities.getQuantity(10, StandardUnits.THERMAL_TRANSMISSION) + private static final ComparableQuantity ethCapa = Quantities.getQuantity(20, StandardUnits.HEAT_CAPACITY) + private static final ComparableQuantity TARGET_TEMPERATURE = Quantities.getQuantity(20, StandardUnits.TEMPERATURE) + private static final ComparableQuantity UPPER_TEMPERATURE_LIMIT = Quantities.getQuantity(25, StandardUnits.TEMPERATURE) + private static final ComparableQuantity LOWER_TEMPERATURE_LIMIT = Quantities.getQuantity(15, StandardUnits.TEMPERATURE) + public static final thermalHouseInput = new ThermalHouseInput( + thermalUnitUuid, + "test_thermalHouseInput", + operator, + operationTime, + thermalBus, + thermalConductance, + ethCapa, + TARGET_TEMPERATURE, + UPPER_TEMPERATURE_LIMIT, + LOWER_TEMPERATURE_LIMIT) - // thermal cylindric storage input - private static final ComparableQuantity storageVolumeLvl = Quantities.getQuantity(100, StandardUnits.VOLUME) - private static final ComparableQuantity storageVolumeLvlMin = Quantities.getQuantity(10, StandardUnits.VOLUME) - private static final ComparableQuantity inletTemp = Quantities.getQuantity(100, StandardUnits.TEMPERATURE) - private static final ComparableQuantity returnTemp = Quantities.getQuantity(80, StandardUnits.TEMPERATURE) - private static final ComparableQuantity c = Quantities.getQuantity(1.05, StandardUnits.SPECIFIC_HEAT_CAPACITY) + // thermal cylindric storage input + private static final ComparableQuantity storageVolumeLvl = Quantities.getQuantity(100, StandardUnits.VOLUME) + private static final ComparableQuantity storageVolumeLvlMin = Quantities.getQuantity(10, StandardUnits.VOLUME) + private static final ComparableQuantity inletTemp = Quantities.getQuantity(100, StandardUnits.TEMPERATURE) + private static final ComparableQuantity returnTemp = Quantities.getQuantity(80, StandardUnits.TEMPERATURE) + private static final ComparableQuantity c = Quantities.getQuantity(1.05, StandardUnits.SPECIFIC_HEAT_CAPACITY) - public static final cylindricStorageInput = new CylindricalStorageInput( - thermalUnitUuid, - "test_cylindricStorageInput", - operator, - operationTime, - thermalBus, - storageVolumeLvl, - storageVolumeLvlMin, - inletTemp, - returnTemp, - c) + public static final cylindricStorageInput = new CylindricalStorageInput( + thermalUnitUuid, + "test_cylindricStorageInput", + operator, + operationTime, + thermalBus, + storageVolumeLvl, + storageVolumeLvlMin, + inletTemp, + returnTemp, + c) } From 15fb3796105768f976564c9903ca052bb087453a Mon Sep 17 00:00:00 2001 From: Niklas Steffan Date: Tue, 15 Jun 2021 13:54:53 +0200 Subject: [PATCH 063/157] spotlessApply --- .../io/connectors/CsvFileConnector.java | 260 +++++++++--------- 1 file changed, 132 insertions(+), 128 deletions(-) diff --git a/src/main/java/edu/ie3/datamodel/io/connectors/CsvFileConnector.java b/src/main/java/edu/ie3/datamodel/io/connectors/CsvFileConnector.java index e35c376bd..db0c99b0b 100644 --- a/src/main/java/edu/ie3/datamodel/io/connectors/CsvFileConnector.java +++ b/src/main/java/edu/ie3/datamodel/io/connectors/CsvFileConnector.java @@ -2,7 +2,7 @@ * © 2021. TU Dortmund University, * Institute of Energy Systems, Energy Efficiency and Energy Economics, * Research group Distribution grid planning and operation -*/ + */ package edu.ie3.datamodel.io.connectors; import edu.ie3.datamodel.exceptions.ConnectorException; @@ -14,6 +14,7 @@ import edu.ie3.datamodel.models.timeseries.TimeSeries; import edu.ie3.datamodel.models.timeseries.TimeSeriesEntry; import edu.ie3.datamodel.models.value.Value; + import java.io.*; import java.nio.charset.StandardCharsets; import java.nio.file.Files; @@ -22,6 +23,7 @@ import java.util.*; import java.util.stream.Collectors; import java.util.stream.Stream; + import org.apache.commons.io.FilenameUtils; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; @@ -37,7 +39,7 @@ public class CsvFileConnector implements DataConnector { private static final Logger log = LogManager.getLogger(CsvFileConnector.class); private final Map, BufferedCsvWriter> entityWriters = - new HashMap<>(); + new HashMap<>(); private final Map timeSeriesWriters = new HashMap<>(); // ATTENTION: Do not finalize. It's meant for lazy evaluation. private Map individualTimeSeriesMetaInformation; @@ -47,17 +49,17 @@ public class CsvFileConnector implements DataConnector { private static final String FILE_ENDING = ".csv"; private static final String FILE_SEPARATOR_REGEX = "[\\\\/]"; private static final String FILE_SEPARATOR_REPLACEMENT = - File.separator.equals("\\") ? "\\\\" : "/"; + File.separator.equals("\\") ? "\\\\" : "/"; public CsvFileConnector( - String baseDirectoryName, EntityPersistenceNamingStrategy entityPersistenceNamingStrategy) { + String baseDirectoryName, EntityPersistenceNamingStrategy entityPersistenceNamingStrategy) { this.baseDirectoryName = baseDirectoryName; this.entityPersistenceNamingStrategy = entityPersistenceNamingStrategy; } public synchronized BufferedCsvWriter getOrInitWriter( - Class clz, String[] headerElements, String csvSep) - throws ConnectorException { + Class clz, String[] headerElements, String csvSep) + throws ConnectorException { /* Try to the the right writer */ BufferedCsvWriter predefinedWriter = entityWriters.get(clz); if (predefinedWriter != null) return predefinedWriter; @@ -71,12 +73,12 @@ public synchronized BufferedCsvWriter getOrInitWriter( return newWriter; } catch (ConnectorException | IOException e) { throw new ConnectorException( - "Can neither find suitable writer nor build the correct one in CsvFileConnector.", e); + "Can neither find suitable writer nor build the correct one in CsvFileConnector.", e); } } public synchronized , E extends TimeSeriesEntry, V extends Value> - BufferedCsvWriter getOrInitWriter(T timeSeries, String[] headerElements, String csvSep) + BufferedCsvWriter getOrInitWriter(T timeSeries, String[] headerElements, String csvSep) throws ConnectorException { /* Try to the the right writer */ BufferedCsvWriter predefinedWriter = timeSeriesWriters.get(timeSeries.getUuid()); @@ -91,26 +93,26 @@ BufferedCsvWriter getOrInitWriter(T timeSeries, String[] headerElements, String return newWriter; } catch (ConnectorException | IOException e) { throw new ConnectorException( - "Can neither find suitable writer nor build the correct one in CsvFileConnector.", e); + "Can neither find suitable writer nor build the correct one in CsvFileConnector.", e); } } /** * Initializes a writer with the given base folder and file definition * - * @param baseDirectory Base directory, where the file hierarchy should start + * @param baseDirectory Base directory, where the file hierarchy should start * @param fileDefinition Definition of the files shape * @return an initialized buffered writer * @throws ConnectorException If the base folder is a file - * @throws IOException If the writer cannot be initialized correctly + * @throws IOException If the writer cannot be initialized correctly */ private BufferedCsvWriter initWriter(String baseDirectory, CsvFileDefinition fileDefinition) - throws ConnectorException, IOException { + throws ConnectorException, IOException { /* Join the full DIRECTORY path (excluding file name) */ String baseDirectoryHarmonized = - baseDirectory.replaceAll(FILE_SEPARATOR_REGEX, FILE_SEPARATOR_REPLACEMENT); + baseDirectory.replaceAll(FILE_SEPARATOR_REGEX, FILE_SEPARATOR_REPLACEMENT); String fullDirectoryPath = - FilenameUtils.concat(baseDirectoryHarmonized, fileDefinition.getDirectoryPath()); + FilenameUtils.concat(baseDirectoryHarmonized, fileDefinition.getDirectoryPath()); String fullPath = FilenameUtils.concat(baseDirectoryHarmonized, fileDefinition.getFilePath()); /* Create missing directories */ @@ -123,15 +125,15 @@ private BufferedCsvWriter initWriter(String baseDirectory, CsvFileDefinition fil File pathFile = new File(fullPath); boolean append = pathFile.exists(); BufferedCsvWriter writer = - new BufferedCsvWriter( - fullPath, fileDefinition.getHeadLineElements(), fileDefinition.getCsvSep(), append); + new BufferedCsvWriter( + fullPath, fileDefinition.getHeadLineElements(), fileDefinition.getCsvSep(), append); if (!append) { writer.writeFileHeader(); } else { log.warn( - "File '{}' already exist. Will append new content WITHOUT new header! Full path: {}", - fileDefinition.getFileName(), - pathFile.getAbsolutePath()); + "File '{}' already exist. Will append new content WITHOUT new header! Full path: {}", + fileDefinition.getFileName(), + pathFile.getAbsolutePath()); } return writer; } @@ -149,19 +151,19 @@ public BufferedReader initReader(Class clz) throws FileN String filePath = null; try { filePath = - entityPersistenceNamingStrategy - .getFilePath(clz) - .orElseThrow( - () -> - new ConnectorException( - "Cannot find a naming strategy for class '" - + clz.getSimpleName() - + "'.")); + entityPersistenceNamingStrategy + .getFilePath(clz) + .orElseThrow( + () -> + new ConnectorException( + "Cannot find a naming strategy for class '" + + clz.getSimpleName() + + "'.")); } catch (ConnectorException e) { log.error( - "Cannot get reader for entity '{}' as no file naming strategy for this file exists. Exception: {}", - clz::getSimpleName, - () -> e); + "Cannot get reader for entity '{}' as no file naming strategy for this file exists. Exception: {}", + clz::getSimpleName, + () -> e); } return initReader(filePath); } @@ -177,7 +179,7 @@ public BufferedReader initReader(Class clz) throws FileN public BufferedReader initReader(String filePath) throws FileNotFoundException { File fullPath = new File(baseDirectoryName + File.separator + filePath + FILE_ENDING); return new BufferedReader( - new InputStreamReader(new FileInputStream(fullPath), StandardCharsets.UTF_8), 16384); + new InputStreamReader(new FileInputStream(fullPath), StandardCharsets.UTF_8), 16384); } /** @@ -190,7 +192,7 @@ public BufferedReader initReader(String filePath) throws FileNotFoundException { * @return An option on the queried information */ public Optional getIndividualTimeSeriesMetaInformation( - UUID timeSeriesUuid) { + UUID timeSeriesUuid) { if (Objects.isNull(individualTimeSeriesMetaInformation)) individualTimeSeriesMetaInformation = buildIndividualTimeSeriesMetaInformation(); @@ -203,20 +205,20 @@ public Optional getIndividualTimeSeriesMeta * @return Mapping from time series uuid to it's meta information. */ private Map - buildIndividualTimeSeriesMetaInformation() { + buildIndividualTimeSeriesMetaInformation() { return getIndividualTimeSeriesFilePaths().parallelStream() - .map( - filePath -> { - /* Extract meta information from file path and enhance it with the file path itself */ - String filePathWithoutEnding = removeFileEnding(filePath); - IndividualTimeSeriesMetaInformation metaInformation = - (IndividualTimeSeriesMetaInformation) - entityPersistenceNamingStrategy.extractTimeSeriesMetaInformation( - filePathWithoutEnding); - return new CsvIndividualTimeSeriesMetaInformation( - metaInformation, filePathWithoutEnding); - }) - .collect(Collectors.toMap(FileNameMetaInformation::getUuid, v -> v)); + .map( + filePath -> { + /* Extract meta information from file path and enhance it with the file path itself */ + String filePathWithoutEnding = removeFileEnding(filePath); + IndividualTimeSeriesMetaInformation metaInformation = + (IndividualTimeSeriesMetaInformation) + entityPersistenceNamingStrategy.extractTimeSeriesMetaInformation( + filePathWithoutEnding); + return new CsvIndividualTimeSeriesMetaInformation( + metaInformation, filePathWithoutEnding); + }) + .collect(Collectors.toMap(FileNameMetaInformation::getUuid, v -> v)); } /** @@ -224,22 +226,22 @@ public Optional getIndividualTimeSeriesMeta * scheme in order to allow for accounting the different content types. * * @param columnSchemes the column schemes to initialize readers for. If no scheme is given, all - * possible readers will be initialized. + * possible readers will be initialized. * @return A mapping from column scheme to the individual time series meta information */ public Map> - getCsvIndividualTimeSeriesMetaInformation(ColumnScheme... columnSchemes) { + getCsvIndividualTimeSeriesMetaInformation(ColumnScheme... columnSchemes) { return getIndividualTimeSeriesFilePaths().parallelStream() - .map( - pathString -> { - String filePathWithoutEnding = removeFileEnding(pathString); - return buildCsvTimeSeriesMetaInformation(filePathWithoutEnding, columnSchemes); - }) - .filter(Optional::isPresent) - .map(Optional::get) - .collect( - Collectors.groupingBy( - CsvIndividualTimeSeriesMetaInformation::getColumnScheme, Collectors.toSet())); + .map( + pathString -> { + String filePathWithoutEnding = removeFileEnding(pathString); + return buildCsvTimeSeriesMetaInformation(filePathWithoutEnding, columnSchemes); + }) + .filter(Optional::isPresent) + .map(Optional::get) + .collect( + Collectors.groupingBy( + CsvIndividualTimeSeriesMetaInformation::getColumnScheme, Collectors.toSet())); } /** @@ -260,22 +262,22 @@ private String removeFileEnding(String input) { */ private Set getIndividualTimeSeriesFilePaths() { Path baseDirectoryPath = - Paths.get( - FilenameUtils.getFullPath(baseDirectoryName) - + FilenameUtils.getName(baseDirectoryName)); + Paths.get( + FilenameUtils.getFullPath(baseDirectoryName) + + FilenameUtils.getName(baseDirectoryName)); try (Stream pathStream = Files.walk(baseDirectoryPath)) { return pathStream - .map(baseDirectoryPath::relativize) - .filter( - path -> { - String withoutEnding = removeFileEnding(path.toString()); - return entityPersistenceNamingStrategy - .getIndividualTimeSeriesPattern() - .matcher(withoutEnding) - .matches(); - }) - .map(Path::toString) - .collect(Collectors.toSet()); + .map(baseDirectoryPath::relativize) + .filter( + path -> { + String withoutEnding = removeFileEnding(path.toString()); + return entityPersistenceNamingStrategy + .getIndividualTimeSeriesPattern() + .matcher(withoutEnding) + .matches(); + }) + .map(Path::toString) + .collect(Collectors.toSet()); } catch (IOException e) { log.error("Unable to determine time series files readers for time series.", e); return Collections.emptySet(); @@ -288,45 +290,45 @@ private Set getIndividualTimeSeriesFilePaths() { * or the initialisation of the reader does not work, an empty {@link Optional} is given back * * @param filePathString String describing the path to the time series file - * @param columnSchemes the allowed column schemes. If no scheme is specified, all schemes are - * allowed. + * @param columnSchemes the allowed column schemes. If no scheme is specified, all schemes are + * allowed. * @return An {@link Optional} to {@link IndividualTimeSeriesMetaInformation} */ private Optional buildCsvTimeSeriesMetaInformation( - String filePathString, ColumnScheme... columnSchemes) { + String filePathString, ColumnScheme... columnSchemes) { try { FileNameMetaInformation metaInformation = - entityPersistenceNamingStrategy.extractTimeSeriesMetaInformation(filePathString); + entityPersistenceNamingStrategy.extractTimeSeriesMetaInformation(filePathString); if (!IndividualTimeSeriesMetaInformation.class.isAssignableFrom(metaInformation.getClass())) { log.error( - "The time series file '{}' does not represent an individual time series.", - filePathString); + "The time series file '{}' does not represent an individual time series.", + filePathString); return Optional.empty(); } IndividualTimeSeriesMetaInformation individualMetaInformation = - (IndividualTimeSeriesMetaInformation) metaInformation; + (IndividualTimeSeriesMetaInformation) metaInformation; // If no column schemes are specified, we will include all. If there a specified schemes, we // check if the file's column scheme matches any of them if (columnSchemes != null - && columnSchemes.length > 0 - && Stream.of(columnSchemes) + && columnSchemes.length > 0 + && Stream.of(columnSchemes) .noneMatch(scheme -> scheme.equals(individualMetaInformation.getColumnScheme()))) { log.warn( - "The column scheme of the time series file {} does not match any of the specified column schemes ({}), so it will not be processed.", - filePathString, - columnSchemes); + "The column scheme of the time series file {} does not match any of the specified column schemes ({}), so it will not be processed.", + filePathString, + columnSchemes); return Optional.empty(); } return Optional.of( - new CsvIndividualTimeSeriesMetaInformation( - individualMetaInformation.getUuid(), - individualMetaInformation.getColumnScheme(), - filePathString)); + new CsvIndividualTimeSeriesMetaInformation( + individualMetaInformation.getUuid(), + individualMetaInformation.getColumnScheme(), + filePathString)); } catch (IllegalArgumentException e) { log.error( - "Error during extraction of meta information from file name '{}'.", filePathString, e); + "Error during extraction of meta information from file name '{}'.", filePathString, e); return Optional.empty(); } } @@ -346,76 +348,78 @@ public BufferedReader initIdCoordinateReader() throws FileNotFoundException { /** * Builds a new file definition consisting of file name and head line elements * - * @param timeSeries Time series to derive naming information from + * @param timeSeries Time series to derive naming information from * @param headLineElements Array of head line elements - * @param csvSep Separator for csv columns + * @param csvSep Separator for csv columns * @return A suitable file definition * @throws ConnectorException If the definition cannot be determined */ private , E extends TimeSeriesEntry, V extends Value> - CsvFileDefinition buildFileDefinition(T timeSeries, String[] headLineElements, String csvSep) + CsvFileDefinition buildFileDefinition(T timeSeries, String[] headLineElements, String csvSep) throws ConnectorException { String directoryPath = entityPersistenceNamingStrategy.getDirectoryPath(timeSeries).orElse(""); String fileName = - entityPersistenceNamingStrategy - .getEntityName(timeSeries) - .orElseThrow( - () -> - new ConnectorException( - "Cannot determine the file name for time series '" + timeSeries + "'.")); + entityPersistenceNamingStrategy + .getEntityName(timeSeries) + .orElseThrow( + () -> + new ConnectorException( + "Cannot determine the file name for time series '" + timeSeries + "'.")); return new CsvFileDefinition(fileName, directoryPath, headLineElements, csvSep); } /** * Builds a new file definition consisting of file name and head line elements * - * @param clz Class that is meant to be de-serialized into this file + * @param clz Class that is meant to be de-serialized into this file * @param headLineElements Array of head line elements - * @param csvSep Separator for csv columns + * @param csvSep Separator for csv columns * @return A suitable file definition * @throws ConnectorException If the definition cannot be determined */ private CsvFileDefinition buildFileDefinition( - Class clz, String[] headLineElements, String csvSep) - throws ConnectorException { + Class clz, String[] headLineElements, String csvSep) + throws ConnectorException { String directoryPath = entityPersistenceNamingStrategy.getDirectoryPath(clz).orElse(""); String fileName = - entityPersistenceNamingStrategy - .getEntityName(clz) - .orElseThrow( - () -> - new ConnectorException( - "Cannot determine the file name for class '" + clz.getSimpleName() + "'.")); + entityPersistenceNamingStrategy + .getEntityName(clz) + .orElseThrow( + () -> + new ConnectorException( + "Cannot determine the file name for class '" + clz.getSimpleName() + "'.")); return new CsvFileDefinition(fileName, directoryPath, headLineElements, csvSep); } @Override public void shutdown() { Stream.of(entityWriters.values(), timeSeriesWriters.values()) - .flatMap(Collection::stream) - .forEach( - bufferedWriter -> { - try { - bufferedWriter.close(); - } catch (IOException e) { - log.error("Error during CsvFileConnector shutdown process.", e); - } - }); + .flatMap(Collection::stream) + .forEach( + bufferedWriter -> { + try { + bufferedWriter.close(); + } catch (IOException e) { + log.error("Error during CsvFileConnector shutdown process.", e); + } + }); } - /** Enhancing the {@link IndividualTimeSeriesMetaInformation} with the full path to csv file */ + /** + * Enhancing the {@link IndividualTimeSeriesMetaInformation} with the full path to csv file + */ public static class CsvIndividualTimeSeriesMetaInformation - extends IndividualTimeSeriesMetaInformation { + extends IndividualTimeSeriesMetaInformation { private final String fullFilePath; public CsvIndividualTimeSeriesMetaInformation( - UUID uuid, ColumnScheme columnScheme, String fullFilePath) { + UUID uuid, ColumnScheme columnScheme, String fullFilePath) { super(uuid, columnScheme); this.fullFilePath = fullFilePath; } public CsvIndividualTimeSeriesMetaInformation( - IndividualTimeSeriesMetaInformation metaInformation, String fullFilePath) { + IndividualTimeSeriesMetaInformation metaInformation, String fullFilePath) { this(metaInformation.getUuid(), metaInformation.getColumnScheme(), fullFilePath); } @@ -440,14 +444,14 @@ public int hashCode() { @Override public String toString() { return "CsvIndividualTimeSeriesMetaInformation{" - + "uuid=" - + getUuid() - + ", columnScheme=" - + getColumnScheme() - + ", fullFilePath='" - + fullFilePath - + '\'' - + '}'; + + "uuid=" + + getUuid() + + ", columnScheme=" + + getColumnScheme() + + ", fullFilePath='" + + fullFilePath + + '\'' + + '}'; } } } From 8b35636c32858d94c86c95b1363054961fc89d8f Mon Sep 17 00:00:00 2001 From: Niklas Steffan Date: Tue, 15 Jun 2021 13:57:07 +0200 Subject: [PATCH 064/157] spotlessApply --- .../io/connectors/CsvFileConnector.java | 260 +++++++++--------- 1 file changed, 128 insertions(+), 132 deletions(-) diff --git a/src/main/java/edu/ie3/datamodel/io/connectors/CsvFileConnector.java b/src/main/java/edu/ie3/datamodel/io/connectors/CsvFileConnector.java index db0c99b0b..e35c376bd 100644 --- a/src/main/java/edu/ie3/datamodel/io/connectors/CsvFileConnector.java +++ b/src/main/java/edu/ie3/datamodel/io/connectors/CsvFileConnector.java @@ -2,7 +2,7 @@ * © 2021. TU Dortmund University, * Institute of Energy Systems, Energy Efficiency and Energy Economics, * Research group Distribution grid planning and operation - */ +*/ package edu.ie3.datamodel.io.connectors; import edu.ie3.datamodel.exceptions.ConnectorException; @@ -14,7 +14,6 @@ import edu.ie3.datamodel.models.timeseries.TimeSeries; import edu.ie3.datamodel.models.timeseries.TimeSeriesEntry; import edu.ie3.datamodel.models.value.Value; - import java.io.*; import java.nio.charset.StandardCharsets; import java.nio.file.Files; @@ -23,7 +22,6 @@ import java.util.*; import java.util.stream.Collectors; import java.util.stream.Stream; - import org.apache.commons.io.FilenameUtils; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; @@ -39,7 +37,7 @@ public class CsvFileConnector implements DataConnector { private static final Logger log = LogManager.getLogger(CsvFileConnector.class); private final Map, BufferedCsvWriter> entityWriters = - new HashMap<>(); + new HashMap<>(); private final Map timeSeriesWriters = new HashMap<>(); // ATTENTION: Do not finalize. It's meant for lazy evaluation. private Map individualTimeSeriesMetaInformation; @@ -49,17 +47,17 @@ public class CsvFileConnector implements DataConnector { private static final String FILE_ENDING = ".csv"; private static final String FILE_SEPARATOR_REGEX = "[\\\\/]"; private static final String FILE_SEPARATOR_REPLACEMENT = - File.separator.equals("\\") ? "\\\\" : "/"; + File.separator.equals("\\") ? "\\\\" : "/"; public CsvFileConnector( - String baseDirectoryName, EntityPersistenceNamingStrategy entityPersistenceNamingStrategy) { + String baseDirectoryName, EntityPersistenceNamingStrategy entityPersistenceNamingStrategy) { this.baseDirectoryName = baseDirectoryName; this.entityPersistenceNamingStrategy = entityPersistenceNamingStrategy; } public synchronized BufferedCsvWriter getOrInitWriter( - Class clz, String[] headerElements, String csvSep) - throws ConnectorException { + Class clz, String[] headerElements, String csvSep) + throws ConnectorException { /* Try to the the right writer */ BufferedCsvWriter predefinedWriter = entityWriters.get(clz); if (predefinedWriter != null) return predefinedWriter; @@ -73,12 +71,12 @@ public synchronized BufferedCsvWriter getOrInitWriter( return newWriter; } catch (ConnectorException | IOException e) { throw new ConnectorException( - "Can neither find suitable writer nor build the correct one in CsvFileConnector.", e); + "Can neither find suitable writer nor build the correct one in CsvFileConnector.", e); } } public synchronized , E extends TimeSeriesEntry, V extends Value> - BufferedCsvWriter getOrInitWriter(T timeSeries, String[] headerElements, String csvSep) + BufferedCsvWriter getOrInitWriter(T timeSeries, String[] headerElements, String csvSep) throws ConnectorException { /* Try to the the right writer */ BufferedCsvWriter predefinedWriter = timeSeriesWriters.get(timeSeries.getUuid()); @@ -93,26 +91,26 @@ BufferedCsvWriter getOrInitWriter(T timeSeries, String[] headerElements, String return newWriter; } catch (ConnectorException | IOException e) { throw new ConnectorException( - "Can neither find suitable writer nor build the correct one in CsvFileConnector.", e); + "Can neither find suitable writer nor build the correct one in CsvFileConnector.", e); } } /** * Initializes a writer with the given base folder and file definition * - * @param baseDirectory Base directory, where the file hierarchy should start + * @param baseDirectory Base directory, where the file hierarchy should start * @param fileDefinition Definition of the files shape * @return an initialized buffered writer * @throws ConnectorException If the base folder is a file - * @throws IOException If the writer cannot be initialized correctly + * @throws IOException If the writer cannot be initialized correctly */ private BufferedCsvWriter initWriter(String baseDirectory, CsvFileDefinition fileDefinition) - throws ConnectorException, IOException { + throws ConnectorException, IOException { /* Join the full DIRECTORY path (excluding file name) */ String baseDirectoryHarmonized = - baseDirectory.replaceAll(FILE_SEPARATOR_REGEX, FILE_SEPARATOR_REPLACEMENT); + baseDirectory.replaceAll(FILE_SEPARATOR_REGEX, FILE_SEPARATOR_REPLACEMENT); String fullDirectoryPath = - FilenameUtils.concat(baseDirectoryHarmonized, fileDefinition.getDirectoryPath()); + FilenameUtils.concat(baseDirectoryHarmonized, fileDefinition.getDirectoryPath()); String fullPath = FilenameUtils.concat(baseDirectoryHarmonized, fileDefinition.getFilePath()); /* Create missing directories */ @@ -125,15 +123,15 @@ private BufferedCsvWriter initWriter(String baseDirectory, CsvFileDefinition fil File pathFile = new File(fullPath); boolean append = pathFile.exists(); BufferedCsvWriter writer = - new BufferedCsvWriter( - fullPath, fileDefinition.getHeadLineElements(), fileDefinition.getCsvSep(), append); + new BufferedCsvWriter( + fullPath, fileDefinition.getHeadLineElements(), fileDefinition.getCsvSep(), append); if (!append) { writer.writeFileHeader(); } else { log.warn( - "File '{}' already exist. Will append new content WITHOUT new header! Full path: {}", - fileDefinition.getFileName(), - pathFile.getAbsolutePath()); + "File '{}' already exist. Will append new content WITHOUT new header! Full path: {}", + fileDefinition.getFileName(), + pathFile.getAbsolutePath()); } return writer; } @@ -151,19 +149,19 @@ public BufferedReader initReader(Class clz) throws FileN String filePath = null; try { filePath = - entityPersistenceNamingStrategy - .getFilePath(clz) - .orElseThrow( - () -> - new ConnectorException( - "Cannot find a naming strategy for class '" - + clz.getSimpleName() - + "'.")); + entityPersistenceNamingStrategy + .getFilePath(clz) + .orElseThrow( + () -> + new ConnectorException( + "Cannot find a naming strategy for class '" + + clz.getSimpleName() + + "'.")); } catch (ConnectorException e) { log.error( - "Cannot get reader for entity '{}' as no file naming strategy for this file exists. Exception: {}", - clz::getSimpleName, - () -> e); + "Cannot get reader for entity '{}' as no file naming strategy for this file exists. Exception: {}", + clz::getSimpleName, + () -> e); } return initReader(filePath); } @@ -179,7 +177,7 @@ public BufferedReader initReader(Class clz) throws FileN public BufferedReader initReader(String filePath) throws FileNotFoundException { File fullPath = new File(baseDirectoryName + File.separator + filePath + FILE_ENDING); return new BufferedReader( - new InputStreamReader(new FileInputStream(fullPath), StandardCharsets.UTF_8), 16384); + new InputStreamReader(new FileInputStream(fullPath), StandardCharsets.UTF_8), 16384); } /** @@ -192,7 +190,7 @@ public BufferedReader initReader(String filePath) throws FileNotFoundException { * @return An option on the queried information */ public Optional getIndividualTimeSeriesMetaInformation( - UUID timeSeriesUuid) { + UUID timeSeriesUuid) { if (Objects.isNull(individualTimeSeriesMetaInformation)) individualTimeSeriesMetaInformation = buildIndividualTimeSeriesMetaInformation(); @@ -205,20 +203,20 @@ public Optional getIndividualTimeSeriesMeta * @return Mapping from time series uuid to it's meta information. */ private Map - buildIndividualTimeSeriesMetaInformation() { + buildIndividualTimeSeriesMetaInformation() { return getIndividualTimeSeriesFilePaths().parallelStream() - .map( - filePath -> { - /* Extract meta information from file path and enhance it with the file path itself */ - String filePathWithoutEnding = removeFileEnding(filePath); - IndividualTimeSeriesMetaInformation metaInformation = - (IndividualTimeSeriesMetaInformation) - entityPersistenceNamingStrategy.extractTimeSeriesMetaInformation( - filePathWithoutEnding); - return new CsvIndividualTimeSeriesMetaInformation( - metaInformation, filePathWithoutEnding); - }) - .collect(Collectors.toMap(FileNameMetaInformation::getUuid, v -> v)); + .map( + filePath -> { + /* Extract meta information from file path and enhance it with the file path itself */ + String filePathWithoutEnding = removeFileEnding(filePath); + IndividualTimeSeriesMetaInformation metaInformation = + (IndividualTimeSeriesMetaInformation) + entityPersistenceNamingStrategy.extractTimeSeriesMetaInformation( + filePathWithoutEnding); + return new CsvIndividualTimeSeriesMetaInformation( + metaInformation, filePathWithoutEnding); + }) + .collect(Collectors.toMap(FileNameMetaInformation::getUuid, v -> v)); } /** @@ -226,22 +224,22 @@ public Optional getIndividualTimeSeriesMeta * scheme in order to allow for accounting the different content types. * * @param columnSchemes the column schemes to initialize readers for. If no scheme is given, all - * possible readers will be initialized. + * possible readers will be initialized. * @return A mapping from column scheme to the individual time series meta information */ public Map> - getCsvIndividualTimeSeriesMetaInformation(ColumnScheme... columnSchemes) { + getCsvIndividualTimeSeriesMetaInformation(ColumnScheme... columnSchemes) { return getIndividualTimeSeriesFilePaths().parallelStream() - .map( - pathString -> { - String filePathWithoutEnding = removeFileEnding(pathString); - return buildCsvTimeSeriesMetaInformation(filePathWithoutEnding, columnSchemes); - }) - .filter(Optional::isPresent) - .map(Optional::get) - .collect( - Collectors.groupingBy( - CsvIndividualTimeSeriesMetaInformation::getColumnScheme, Collectors.toSet())); + .map( + pathString -> { + String filePathWithoutEnding = removeFileEnding(pathString); + return buildCsvTimeSeriesMetaInformation(filePathWithoutEnding, columnSchemes); + }) + .filter(Optional::isPresent) + .map(Optional::get) + .collect( + Collectors.groupingBy( + CsvIndividualTimeSeriesMetaInformation::getColumnScheme, Collectors.toSet())); } /** @@ -262,22 +260,22 @@ private String removeFileEnding(String input) { */ private Set getIndividualTimeSeriesFilePaths() { Path baseDirectoryPath = - Paths.get( - FilenameUtils.getFullPath(baseDirectoryName) - + FilenameUtils.getName(baseDirectoryName)); + Paths.get( + FilenameUtils.getFullPath(baseDirectoryName) + + FilenameUtils.getName(baseDirectoryName)); try (Stream pathStream = Files.walk(baseDirectoryPath)) { return pathStream - .map(baseDirectoryPath::relativize) - .filter( - path -> { - String withoutEnding = removeFileEnding(path.toString()); - return entityPersistenceNamingStrategy - .getIndividualTimeSeriesPattern() - .matcher(withoutEnding) - .matches(); - }) - .map(Path::toString) - .collect(Collectors.toSet()); + .map(baseDirectoryPath::relativize) + .filter( + path -> { + String withoutEnding = removeFileEnding(path.toString()); + return entityPersistenceNamingStrategy + .getIndividualTimeSeriesPattern() + .matcher(withoutEnding) + .matches(); + }) + .map(Path::toString) + .collect(Collectors.toSet()); } catch (IOException e) { log.error("Unable to determine time series files readers for time series.", e); return Collections.emptySet(); @@ -290,45 +288,45 @@ private Set getIndividualTimeSeriesFilePaths() { * or the initialisation of the reader does not work, an empty {@link Optional} is given back * * @param filePathString String describing the path to the time series file - * @param columnSchemes the allowed column schemes. If no scheme is specified, all schemes are - * allowed. + * @param columnSchemes the allowed column schemes. If no scheme is specified, all schemes are + * allowed. * @return An {@link Optional} to {@link IndividualTimeSeriesMetaInformation} */ private Optional buildCsvTimeSeriesMetaInformation( - String filePathString, ColumnScheme... columnSchemes) { + String filePathString, ColumnScheme... columnSchemes) { try { FileNameMetaInformation metaInformation = - entityPersistenceNamingStrategy.extractTimeSeriesMetaInformation(filePathString); + entityPersistenceNamingStrategy.extractTimeSeriesMetaInformation(filePathString); if (!IndividualTimeSeriesMetaInformation.class.isAssignableFrom(metaInformation.getClass())) { log.error( - "The time series file '{}' does not represent an individual time series.", - filePathString); + "The time series file '{}' does not represent an individual time series.", + filePathString); return Optional.empty(); } IndividualTimeSeriesMetaInformation individualMetaInformation = - (IndividualTimeSeriesMetaInformation) metaInformation; + (IndividualTimeSeriesMetaInformation) metaInformation; // If no column schemes are specified, we will include all. If there a specified schemes, we // check if the file's column scheme matches any of them if (columnSchemes != null - && columnSchemes.length > 0 - && Stream.of(columnSchemes) + && columnSchemes.length > 0 + && Stream.of(columnSchemes) .noneMatch(scheme -> scheme.equals(individualMetaInformation.getColumnScheme()))) { log.warn( - "The column scheme of the time series file {} does not match any of the specified column schemes ({}), so it will not be processed.", - filePathString, - columnSchemes); + "The column scheme of the time series file {} does not match any of the specified column schemes ({}), so it will not be processed.", + filePathString, + columnSchemes); return Optional.empty(); } return Optional.of( - new CsvIndividualTimeSeriesMetaInformation( - individualMetaInformation.getUuid(), - individualMetaInformation.getColumnScheme(), - filePathString)); + new CsvIndividualTimeSeriesMetaInformation( + individualMetaInformation.getUuid(), + individualMetaInformation.getColumnScheme(), + filePathString)); } catch (IllegalArgumentException e) { log.error( - "Error during extraction of meta information from file name '{}'.", filePathString, e); + "Error during extraction of meta information from file name '{}'.", filePathString, e); return Optional.empty(); } } @@ -348,78 +346,76 @@ public BufferedReader initIdCoordinateReader() throws FileNotFoundException { /** * Builds a new file definition consisting of file name and head line elements * - * @param timeSeries Time series to derive naming information from + * @param timeSeries Time series to derive naming information from * @param headLineElements Array of head line elements - * @param csvSep Separator for csv columns + * @param csvSep Separator for csv columns * @return A suitable file definition * @throws ConnectorException If the definition cannot be determined */ private , E extends TimeSeriesEntry, V extends Value> - CsvFileDefinition buildFileDefinition(T timeSeries, String[] headLineElements, String csvSep) + CsvFileDefinition buildFileDefinition(T timeSeries, String[] headLineElements, String csvSep) throws ConnectorException { String directoryPath = entityPersistenceNamingStrategy.getDirectoryPath(timeSeries).orElse(""); String fileName = - entityPersistenceNamingStrategy - .getEntityName(timeSeries) - .orElseThrow( - () -> - new ConnectorException( - "Cannot determine the file name for time series '" + timeSeries + "'.")); + entityPersistenceNamingStrategy + .getEntityName(timeSeries) + .orElseThrow( + () -> + new ConnectorException( + "Cannot determine the file name for time series '" + timeSeries + "'.")); return new CsvFileDefinition(fileName, directoryPath, headLineElements, csvSep); } /** * Builds a new file definition consisting of file name and head line elements * - * @param clz Class that is meant to be de-serialized into this file + * @param clz Class that is meant to be de-serialized into this file * @param headLineElements Array of head line elements - * @param csvSep Separator for csv columns + * @param csvSep Separator for csv columns * @return A suitable file definition * @throws ConnectorException If the definition cannot be determined */ private CsvFileDefinition buildFileDefinition( - Class clz, String[] headLineElements, String csvSep) - throws ConnectorException { + Class clz, String[] headLineElements, String csvSep) + throws ConnectorException { String directoryPath = entityPersistenceNamingStrategy.getDirectoryPath(clz).orElse(""); String fileName = - entityPersistenceNamingStrategy - .getEntityName(clz) - .orElseThrow( - () -> - new ConnectorException( - "Cannot determine the file name for class '" + clz.getSimpleName() + "'.")); + entityPersistenceNamingStrategy + .getEntityName(clz) + .orElseThrow( + () -> + new ConnectorException( + "Cannot determine the file name for class '" + clz.getSimpleName() + "'.")); return new CsvFileDefinition(fileName, directoryPath, headLineElements, csvSep); } @Override public void shutdown() { Stream.of(entityWriters.values(), timeSeriesWriters.values()) - .flatMap(Collection::stream) - .forEach( - bufferedWriter -> { - try { - bufferedWriter.close(); - } catch (IOException e) { - log.error("Error during CsvFileConnector shutdown process.", e); - } - }); + .flatMap(Collection::stream) + .forEach( + bufferedWriter -> { + try { + bufferedWriter.close(); + } catch (IOException e) { + log.error("Error during CsvFileConnector shutdown process.", e); + } + }); } - /** - * Enhancing the {@link IndividualTimeSeriesMetaInformation} with the full path to csv file - */ + /** Enhancing the {@link IndividualTimeSeriesMetaInformation} with the full path to csv file */ public static class CsvIndividualTimeSeriesMetaInformation - extends IndividualTimeSeriesMetaInformation { + extends IndividualTimeSeriesMetaInformation { private final String fullFilePath; public CsvIndividualTimeSeriesMetaInformation( - UUID uuid, ColumnScheme columnScheme, String fullFilePath) { + UUID uuid, ColumnScheme columnScheme, String fullFilePath) { super(uuid, columnScheme); this.fullFilePath = fullFilePath; } public CsvIndividualTimeSeriesMetaInformation( - IndividualTimeSeriesMetaInformation metaInformation, String fullFilePath) { + IndividualTimeSeriesMetaInformation metaInformation, String fullFilePath) { this(metaInformation.getUuid(), metaInformation.getColumnScheme(), fullFilePath); } @@ -444,14 +440,14 @@ public int hashCode() { @Override public String toString() { return "CsvIndividualTimeSeriesMetaInformation{" - + "uuid=" - + getUuid() - + ", columnScheme=" - + getColumnScheme() - + ", fullFilePath='" - + fullFilePath - + '\'' - + '}'; + + "uuid=" + + getUuid() + + ", columnScheme=" + + getColumnScheme() + + ", fullFilePath='" + + fullFilePath + + '\'' + + '}'; } } } From 75dc0ca64918ed36812d223a89a6825b4592d894 Mon Sep 17 00:00:00 2001 From: Niklas Steffan Date: Tue, 15 Jun 2021 14:16:50 +0200 Subject: [PATCH 065/157] manually spotless --- .../models/input/participant/thermalhouse.rst | 2 +- .../io/connectors/CsvFileConnector.java | 6 ++-- .../timeseries/TimeSeriesProcessor.java | 6 ++-- .../io/source/csv/CsvDataSource.java | 8 +++-- .../io/source/csv/CsvIdCoordinateSource.java | 2 +- .../io/source/csv/CsvWeatherSource.java | 2 +- .../input/container/GraphicElements.java | 6 ++-- .../input/container/RawGridElements.java | 18 +++++++---- .../input/container/SystemParticipants.java | 30 ++++++++++++------- .../chargingpoint/ChargingPointTypeUtils.java | 3 +- .../utils/ContainerNodeUpdateUtil.java | 4 ++- 11 files changed, 55 insertions(+), 32 deletions(-) diff --git a/docs/readthedocs/models/input/participant/thermalhouse.rst b/docs/readthedocs/models/input/participant/thermalhouse.rst index d2a6a3a81..c5ff9b947 100644 --- a/docs/readthedocs/models/input/participant/thermalhouse.rst +++ b/docs/readthedocs/models/input/participant/thermalhouse.rst @@ -22,7 +22,7 @@ Attributes, Units and Remarks +-----------------------+---------+---------------------------------+ | ethCapa | kWh / K | Thermal capacity | +-----------------------+---------+---------------------------------+ -| targetTemperature | °C | Desired target temperature | +| targetTemperature | °C | Desired target temperature | +-----------------------+---------+---------------------------------+ | upperTemperatureLimit | °C | Upper temperature boundary | +-----------------------+---------+---------------------------------+ diff --git a/src/main/java/edu/ie3/datamodel/io/connectors/CsvFileConnector.java b/src/main/java/edu/ie3/datamodel/io/connectors/CsvFileConnector.java index e35c376bd..e4bd141ae 100644 --- a/src/main/java/edu/ie3/datamodel/io/connectors/CsvFileConnector.java +++ b/src/main/java/edu/ie3/datamodel/io/connectors/CsvFileConnector.java @@ -204,7 +204,8 @@ public Optional getIndividualTimeSeriesMeta */ private Map buildIndividualTimeSeriesMetaInformation() { - return getIndividualTimeSeriesFilePaths().parallelStream() + return getIndividualTimeSeriesFilePaths() + .parallelStream() .map( filePath -> { /* Extract meta information from file path and enhance it with the file path itself */ @@ -229,7 +230,8 @@ public Optional getIndividualTimeSeriesMeta */ public Map> getCsvIndividualTimeSeriesMetaInformation(ColumnScheme... columnSchemes) { - return getIndividualTimeSeriesFilePaths().parallelStream() + return getIndividualTimeSeriesFilePaths() + .parallelStream() .map( pathString -> { String filePathWithoutEnding = removeFileEnding(pathString); diff --git a/src/main/java/edu/ie3/datamodel/io/processor/timeseries/TimeSeriesProcessor.java b/src/main/java/edu/ie3/datamodel/io/processor/timeseries/TimeSeriesProcessor.java index 0a2bf66b3..af29f3dca 100644 --- a/src/main/java/edu/ie3/datamodel/io/processor/timeseries/TimeSeriesProcessor.java +++ b/src/main/java/edu/ie3/datamodel/io/processor/timeseries/TimeSeriesProcessor.java @@ -106,8 +106,7 @@ private SortedMap buildFieldToSource( Class timeSeriesClass, Class entryClass, Class valueClass) { /* Get the mapping from field name to getter method ignoring the getter for returning all entries */ Map timeSeriesMapping = - mapFieldNameToGetter(timeSeriesClass, Arrays.asList("entries", "uuid", "type")) - .entrySet() + mapFieldNameToGetter(timeSeriesClass, Arrays.asList("entries", "uuid", "type")).entrySet() .stream() .collect( Collectors.toMap( @@ -137,8 +136,7 @@ private SortedMap buildFieldToSource( mapFieldNameToGetter( valueClass, Arrays.asList("solarIrradiance", "temperature", "wind")) - .entrySet() - .stream() + .entrySet().stream() .map( entry -> new AbstractMap.SimpleEntry<>( diff --git a/src/main/java/edu/ie3/datamodel/io/source/csv/CsvDataSource.java b/src/main/java/edu/ie3/datamodel/io/source/csv/CsvDataSource.java index 371ba2f15..928c2a7d9 100644 --- a/src/main/java/edu/ie3/datamodel/io/source/csv/CsvDataSource.java +++ b/src/main/java/edu/ie3/datamodel/io/source/csv/CsvDataSource.java @@ -394,7 +394,10 @@ protected Stream> buildStreamWithFieldsToAttributesMap( Collection> allRows = csvRowFieldValueMapping(reader, headline); return distinctRowsWithLog( - allRows, fieldToValues -> fieldToValues.get("uuid"), entityClass.getSimpleName(), "UUID") + allRows, + fieldToValues -> fieldToValues.get("uuid"), + entityClass.getSimpleName(), + "UUID") .parallelStream(); } catch (IOException e) { log.warn( @@ -453,7 +456,8 @@ protected Set> distinctRowsWithLog( /* Check for rows with the same key based on the provided key extractor function */ Set> distinctIdSet = - allRowsSet.parallelStream() + allRowsSet + .parallelStream() .filter(ValidationUtils.distinctByKey(keyExtractor)) .collect(Collectors.toSet()); if (distinctIdSet.size() != allRowsSet.size()) { diff --git a/src/main/java/edu/ie3/datamodel/io/source/csv/CsvIdCoordinateSource.java b/src/main/java/edu/ie3/datamodel/io/source/csv/CsvIdCoordinateSource.java index 793ce7b43..a6b6dff9b 100644 --- a/src/main/java/edu/ie3/datamodel/io/source/csv/CsvIdCoordinateSource.java +++ b/src/main/java/edu/ie3/datamodel/io/source/csv/CsvIdCoordinateSource.java @@ -123,7 +123,7 @@ protected Stream> buildStreamWithFieldsToAttributesMap() { .get(factory.getLatField()) .concat(fieldToValues.get(factory.getLonField())); return distinctRowsWithLog( - withDistinctCoordinateId, coordinateExtractor, "coordinate id mapping", "coordinate") + withDistinctCoordinateId, coordinateExtractor, "coordinate id mapping", "coordinate") .parallelStream(); } catch (IOException e) { log.error("Cannot read the file for coordinate id to coordinate mapping.", e); diff --git a/src/main/java/edu/ie3/datamodel/io/source/csv/CsvWeatherSource.java b/src/main/java/edu/ie3/datamodel/io/source/csv/CsvWeatherSource.java index 95f543c16..30b152fa4 100644 --- a/src/main/java/edu/ie3/datamodel/io/source/csv/CsvWeatherSource.java +++ b/src/main/java/edu/ie3/datamodel/io/source/csv/CsvWeatherSource.java @@ -256,7 +256,7 @@ protected Stream> buildStreamWithFieldsToAttributesMap( .get(weatherFactory.getTimeFieldString()) .concat(fieldToValues.get(weatherFactory.getCoordinateIdFieldString())); return distinctRowsWithLog( - allRows, timeCoordinateIdExtractor, entityClass.getSimpleName(), "UUID") + allRows, timeCoordinateIdExtractor, entityClass.getSimpleName(), "UUID") .parallelStream(); } catch (IOException e) { diff --git a/src/main/java/edu/ie3/datamodel/models/input/container/GraphicElements.java b/src/main/java/edu/ie3/datamodel/models/input/container/GraphicElements.java index 60434f9a8..af0d4d9fd 100644 --- a/src/main/java/edu/ie3/datamodel/models/input/container/GraphicElements.java +++ b/src/main/java/edu/ie3/datamodel/models/input/container/GraphicElements.java @@ -48,12 +48,14 @@ public GraphicElements(List graphics) { /* init sets */ this.nodeGraphics = - graphics.parallelStream() + graphics + .parallelStream() .filter(graphic -> graphic instanceof NodeGraphicInput) .map(graphic -> (NodeGraphicInput) graphic) .collect(Collectors.toSet()); this.lineGraphics = - graphics.parallelStream() + graphics + .parallelStream() .filter(graphic -> graphic instanceof LineGraphicInput) .map(graphic -> (LineGraphicInput) graphic) .collect(Collectors.toSet()); diff --git a/src/main/java/edu/ie3/datamodel/models/input/container/RawGridElements.java b/src/main/java/edu/ie3/datamodel/models/input/container/RawGridElements.java index b8806a63d..4f0abc3e9 100644 --- a/src/main/java/edu/ie3/datamodel/models/input/container/RawGridElements.java +++ b/src/main/java/edu/ie3/datamodel/models/input/container/RawGridElements.java @@ -84,32 +84,38 @@ public RawGridElements(List rawGridElements) { /* init sets */ this.nodes = - rawGridElements.parallelStream() + rawGridElements + .parallelStream() .filter(gridElement -> gridElement instanceof NodeInput) .map(nodeInput -> (NodeInput) nodeInput) .collect(Collectors.toSet()); this.lines = - rawGridElements.parallelStream() + rawGridElements + .parallelStream() .filter(gridElement -> gridElement instanceof LineInput) .map(lineInput -> (LineInput) lineInput) .collect(Collectors.toSet()); this.transformer2Ws = - rawGridElements.parallelStream() + rawGridElements + .parallelStream() .filter(gridElement -> gridElement instanceof Transformer2WInput) .map(trafo2wInput -> (Transformer2WInput) trafo2wInput) .collect(Collectors.toSet()); this.transformer3Ws = - rawGridElements.parallelStream() + rawGridElements + .parallelStream() .filter(gridElement -> gridElement instanceof Transformer3WInput) .map(trafo3wInput -> (Transformer3WInput) trafo3wInput) .collect(Collectors.toSet()); this.switches = - rawGridElements.parallelStream() + rawGridElements + .parallelStream() .filter(gridElement -> gridElement instanceof SwitchInput) .map(switchInput -> (SwitchInput) switchInput) .collect(Collectors.toSet()); this.measurementUnits = - rawGridElements.parallelStream() + rawGridElements + .parallelStream() .filter(gridElement -> gridElement instanceof MeasurementUnitInput) .map(measurementUnitInput -> (MeasurementUnitInput) measurementUnitInput) .collect(Collectors.toSet()); diff --git a/src/main/java/edu/ie3/datamodel/models/input/container/SystemParticipants.java b/src/main/java/edu/ie3/datamodel/models/input/container/SystemParticipants.java index 28550d86a..8a47b4995 100644 --- a/src/main/java/edu/ie3/datamodel/models/input/container/SystemParticipants.java +++ b/src/main/java/edu/ie3/datamodel/models/input/container/SystemParticipants.java @@ -106,52 +106,62 @@ public SystemParticipants(List systemParticipants) { /* init sets */ this.bmPlants = - systemParticipants.parallelStream() + systemParticipants + .parallelStream() .filter(gridElement -> gridElement instanceof BmInput) .map(bmInput -> (BmInput) bmInput) .collect(Collectors.toSet()); this.chpPlants = - systemParticipants.parallelStream() + systemParticipants + .parallelStream() .filter(gridElement -> gridElement instanceof ChpInput) .map(chpInput -> (ChpInput) chpInput) .collect(Collectors.toSet()); this.evCS = - systemParticipants.parallelStream() + systemParticipants + .parallelStream() .filter(gridElement -> gridElement instanceof EvcsInput) .map(evcsInput -> (EvcsInput) evcsInput) .collect(Collectors.toSet()); this.evs = - systemParticipants.parallelStream() + systemParticipants + .parallelStream() .filter(gridElement -> gridElement instanceof EvInput) .map(evInput -> (EvInput) evInput) .collect(Collectors.toSet()); this.fixedFeedIns = - systemParticipants.parallelStream() + systemParticipants + .parallelStream() .filter(gridElement -> gridElement instanceof FixedFeedInInput) .map(fixedFeedInInpu -> (FixedFeedInInput) fixedFeedInInpu) .collect(Collectors.toSet()); this.heatPumps = - systemParticipants.parallelStream() + systemParticipants + .parallelStream() .filter(gridElement -> gridElement instanceof HpInput) .map(hpInput -> (HpInput) hpInput) .collect(Collectors.toSet()); this.loads = - systemParticipants.parallelStream() + systemParticipants + .parallelStream() .filter(gridElement -> gridElement instanceof LoadInput) .map(loadInput -> (LoadInput) loadInput) .collect(Collectors.toSet()); this.pvPlants = - systemParticipants.parallelStream() + systemParticipants + .parallelStream() .filter(gridElement -> gridElement instanceof PvInput) .map(pvInput -> (PvInput) pvInput) .collect(Collectors.toSet()); this.storages = - systemParticipants.parallelStream() + systemParticipants + .parallelStream() .filter(gridElement -> gridElement instanceof StorageInput) .map(storageInput -> (StorageInput) storageInput) .collect(Collectors.toSet()); this.wecPlants = - systemParticipants.parallelStream() + systemParticipants + .parallelStream() .filter(gridElement -> gridElement instanceof WecInput) .map(wecInput -> (WecInput) wecInput) .collect(Collectors.toSet()); diff --git a/src/main/java/edu/ie3/datamodel/models/input/system/type/chargingpoint/ChargingPointTypeUtils.java b/src/main/java/edu/ie3/datamodel/models/input/system/type/chargingpoint/ChargingPointTypeUtils.java index e72de1aba..6825a3c0f 100644 --- a/src/main/java/edu/ie3/datamodel/models/input/system/type/chargingpoint/ChargingPointTypeUtils.java +++ b/src/main/java/edu/ie3/datamodel/models/input/system/type/chargingpoint/ChargingPointTypeUtils.java @@ -142,8 +142,7 @@ private ChargingPointTypeUtils() { Stream.concat( Stream.of(type.getId().toLowerCase()), type.getSynonymousIds().stream().map(String::toLowerCase)) - .collect(Collectors.toMap(Function.identity(), v -> type)) - .entrySet() + .collect(Collectors.toMap(Function.identity(), v -> type)).entrySet() .stream()) .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue))); diff --git a/src/main/java/edu/ie3/datamodel/utils/ContainerNodeUpdateUtil.java b/src/main/java/edu/ie3/datamodel/utils/ContainerNodeUpdateUtil.java index f641adccf..5286f78af 100644 --- a/src/main/java/edu/ie3/datamodel/utils/ContainerNodeUpdateUtil.java +++ b/src/main/java/edu/ie3/datamodel/utils/ContainerNodeUpdateUtil.java @@ -207,7 +207,9 @@ private static SystemParticipants updateSystemParticipantsWithNodes( SystemParticipants systemParticipants, Map oldToNewNodes) { List sysParts = - systemParticipants.allEntitiesAsList().parallelStream() + systemParticipants + .allEntitiesAsList() + .parallelStream() .map( sysPart -> { if (oldToNewNodes.containsKey(sysPart.getNode())) { From 3772013b302de24c67f6cc6c5038dff10cf19625 Mon Sep 17 00:00:00 2001 From: t-ober <63147366+t-ober@users.noreply.github.com> Date: Tue, 15 Jun 2021 14:22:56 +0200 Subject: [PATCH 066/157] adjust docs --- docs/readthedocs/models/models.rst | 6 ++++++ .../io/factory/input/AssetInputEntityFactoryTest.groovy | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/docs/readthedocs/models/models.rst b/docs/readthedocs/models/models.rst index f7fb1c80a..62d55420b 100644 --- a/docs/readthedocs/models/models.rst +++ b/docs/readthedocs/models/models.rst @@ -80,6 +80,12 @@ Equality Checks If you think you would benefit from such a method, please consider handing in an issue `here `_. +Conditional Parameters + Some of the models have conditional parameters. When reading model data from a data source, their respective factories for building these + models can handle nulls and empty Strings (as well as any combination of those) safely. E.g.: When given parameters for a line's + :code:`operationTime` where :code:`operationStartTime` and :code:`operationEndTime` are both :code:`null` or :code:`""`, the + factory will build an always-on line model. + ***** Input ***** diff --git a/src/test/groovy/edu/ie3/datamodel/io/factory/input/AssetInputEntityFactoryTest.groovy b/src/test/groovy/edu/ie3/datamodel/io/factory/input/AssetInputEntityFactoryTest.groovy index d072393f5..eae4638a3 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/factory/input/AssetInputEntityFactoryTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/factory/input/AssetInputEntityFactoryTest.groovy @@ -60,7 +60,7 @@ class AssetInputEntityFactoryTest extends Specification implements FactoryTestHe "uuid": "91ec3bcf-1777-4d38-af67-0bf7c9fa73c7", "operatesfrom" : operatesfrom, "operatesuntil": operatesuntil, - "id" : "TestID"git + "id" : "TestID" ] def inputClass = TestAssetInput def operatorInput = Mock(OperatorInput) From e918a1d5e054fdbb5d0dd6e02cfcc7597a38ff0e Mon Sep 17 00:00:00 2001 From: Niklas Steffan Date: Tue, 15 Jun 2021 14:31:12 +0200 Subject: [PATCH 067/157] added test for coverage --- .../thermal/ThermalHouseInputTest.groovy | 26 ++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/src/test/groovy/edu/ie3/datamodel/models/input/thermal/ThermalHouseInputTest.groovy b/src/test/groovy/edu/ie3/datamodel/models/input/thermal/ThermalHouseInputTest.groovy index 496c46576..7cf9f084d 100644 --- a/src/test/groovy/edu/ie3/datamodel/models/input/thermal/ThermalHouseInputTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/models/input/thermal/ThermalHouseInputTest.groovy @@ -7,9 +7,14 @@ package edu.ie3.datamodel.models.input.thermal import edu.ie3.datamodel.models.StandardUnits import edu.ie3.test.common.ThermalUnitInputTestData +import edu.ie3.util.quantities.interfaces.HeatCapacity +import edu.ie3.util.quantities.interfaces.ThermalConductance import spock.lang.Specification +import tech.units.indriya.ComparableQuantity import tech.units.indriya.quantity.Quantities +import javax.measure.quantity.Temperature + class ThermalHouseInputTest extends Specification { @@ -45,11 +50,26 @@ class ThermalHouseInputTest extends Specification { given: def thermalHouseInput1 = ThermalUnitInputTestData.thermalHouseInput def thermalHouseInput2 = ThermalUnitInputTestData.thermalHouseInput - def thermalHouseInput3 = ThermalUnitInputTestData.thermalHouseInput.copy(). - ethLosses(Quantities.getQuantity(100, StandardUnits.THERMAL_TRANSMISSION)) expect: thermalHouseInput1.equals(thermalHouseInput2) - !thermalHouseInput1.equals(thermalHouseInput3) + } + + def "A ThermalHouseInput without operator and operation time is created as expected"() { + given: + def thermalHouseInput = new ThermalHouseInput( + UUID.fromString("717af017-cc69-406f-b452-e022d7fb516a"), + "test_thermalHouseInput", + ThermalUnitInputTestData.thermalBus, + Quantities.getQuantity(10, StandardUnits.THERMAL_TRANSMISSION), + Quantities.getQuantity(20, StandardUnits.HEAT_CAPACITY), + Quantities.getQuantity(20, StandardUnits.TEMPERATURE), + Quantities.getQuantity(25, StandardUnits.TEMPERATURE), + Quantities.getQuantity(15, StandardUnits.TEMPERATURE)) + + expect: + thermalHouseInput.targetTemperature == Quantities.getQuantity(20, StandardUnits.TEMPERATURE) + thermalHouseInput.upperTemperatureLimit == Quantities.getQuantity(25, StandardUnits.TEMPERATURE) + thermalHouseInput.lowerTemperatureLimit == Quantities.getQuantity(15, StandardUnits.TEMPERATURE) } } From 9f4eb69201debe4548c04b92d51cd393fe7eaa50 Mon Sep 17 00:00:00 2001 From: Niklas Steffan Date: Tue, 15 Jun 2021 14:31:55 +0200 Subject: [PATCH 068/157] spotless --- .../models/input/thermal/ThermalHouseInputTest.groovy | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/test/groovy/edu/ie3/datamodel/models/input/thermal/ThermalHouseInputTest.groovy b/src/test/groovy/edu/ie3/datamodel/models/input/thermal/ThermalHouseInputTest.groovy index 7cf9f084d..aad42f195 100644 --- a/src/test/groovy/edu/ie3/datamodel/models/input/thermal/ThermalHouseInputTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/models/input/thermal/ThermalHouseInputTest.groovy @@ -7,14 +7,9 @@ package edu.ie3.datamodel.models.input.thermal import edu.ie3.datamodel.models.StandardUnits import edu.ie3.test.common.ThermalUnitInputTestData -import edu.ie3.util.quantities.interfaces.HeatCapacity -import edu.ie3.util.quantities.interfaces.ThermalConductance import spock.lang.Specification -import tech.units.indriya.ComparableQuantity import tech.units.indriya.quantity.Quantities -import javax.measure.quantity.Temperature - class ThermalHouseInputTest extends Specification { From 5338c9785c5293e21b7a5caf761dca400d8e9d18 Mon Sep 17 00:00:00 2001 From: Niklas Steffan Date: Tue, 15 Jun 2021 15:05:35 +0200 Subject: [PATCH 069/157] more test --- .../datamodel/models/input/thermal/ThermalHouseInputTest.groovy | 1 + 1 file changed, 1 insertion(+) diff --git a/src/test/groovy/edu/ie3/datamodel/models/input/thermal/ThermalHouseInputTest.groovy b/src/test/groovy/edu/ie3/datamodel/models/input/thermal/ThermalHouseInputTest.groovy index aad42f195..6debe32eb 100644 --- a/src/test/groovy/edu/ie3/datamodel/models/input/thermal/ThermalHouseInputTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/models/input/thermal/ThermalHouseInputTest.groovy @@ -48,6 +48,7 @@ class ThermalHouseInputTest extends Specification { expect: thermalHouseInput1.equals(thermalHouseInput2) + !thermalHouseInput1.equals(null) } def "A ThermalHouseInput without operator and operation time is created as expected"() { From fedab3939342c35397e51c6a784c177009322478 Mon Sep 17 00:00:00 2001 From: Niklas Steffan Date: Wed, 16 Jun 2021 10:11:59 +0200 Subject: [PATCH 070/157] more tests for coverage --- .../models/input/thermal/ThermalHouseInputTest.groovy | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/test/groovy/edu/ie3/datamodel/models/input/thermal/ThermalHouseInputTest.groovy b/src/test/groovy/edu/ie3/datamodel/models/input/thermal/ThermalHouseInputTest.groovy index 6debe32eb..159680719 100644 --- a/src/test/groovy/edu/ie3/datamodel/models/input/thermal/ThermalHouseInputTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/models/input/thermal/ThermalHouseInputTest.groovy @@ -45,10 +45,15 @@ class ThermalHouseInputTest extends Specification { given: def thermalHouseInput1 = ThermalUnitInputTestData.thermalHouseInput def thermalHouseInput2 = ThermalUnitInputTestData.thermalHouseInput + def changedEthLosses = Quantities.getQuantity(100, StandardUnits.THERMAL_TRANSMISSION) + def thermalHouseInput3 = ThermalUnitInputTestData.thermalHouseInput.copy().ethLosses(changedEthLosses) + def otherObject = "otherObject" expect: thermalHouseInput1.equals(thermalHouseInput2) !thermalHouseInput1.equals(null) + !thermalHouseInput1.equals(thermalHouseInput3) + !thermalHouseInput1.equals(otherObject) } def "A ThermalHouseInput without operator and operation time is created as expected"() { From b3f06116291a16ce75e8d75e32ccfb9a0cda2f7a Mon Sep 17 00:00:00 2001 From: Niklas Steffan Date: Wed, 16 Jun 2021 10:21:25 +0200 Subject: [PATCH 071/157] more tests for coverage --- .../models/input/thermal/ThermalHouseInputTest.groovy | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/test/groovy/edu/ie3/datamodel/models/input/thermal/ThermalHouseInputTest.groovy b/src/test/groovy/edu/ie3/datamodel/models/input/thermal/ThermalHouseInputTest.groovy index 159680719..91b6fdde8 100644 --- a/src/test/groovy/edu/ie3/datamodel/models/input/thermal/ThermalHouseInputTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/models/input/thermal/ThermalHouseInputTest.groovy @@ -45,8 +45,9 @@ class ThermalHouseInputTest extends Specification { given: def thermalHouseInput1 = ThermalUnitInputTestData.thermalHouseInput def thermalHouseInput2 = ThermalUnitInputTestData.thermalHouseInput - def changedEthLosses = Quantities.getQuantity(100, StandardUnits.THERMAL_TRANSMISSION) - def thermalHouseInput3 = ThermalUnitInputTestData.thermalHouseInput.copy().ethLosses(changedEthLosses) + def changedLowerTemperature = Quantities.getQuantity(-100, StandardUnits.TEMPERATURE) + def thermalHouseInput3 = ThermalUnitInputTestData.thermalHouseInput.copy() + .lowerTemperatureLimit(changedLowerTemperature).build() def otherObject = "otherObject" expect: From c58ef3329684080928799f365c0ddab74c1b36e1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 17 Jun 2021 04:08:32 +0000 Subject: [PATCH 072/157] Bump postgresql from 42.2.21 to 42.2.22 Bumps [postgresql](https://github.com/pgjdbc/pgjdbc) from 42.2.21 to 42.2.22. - [Release notes](https://github.com/pgjdbc/pgjdbc/releases) - [Changelog](https://github.com/pgjdbc/pgjdbc/blob/master/CHANGELOG.md) - [Commits](https://github.com/pgjdbc/pgjdbc/commits) --- updated-dependencies: - dependency-name: org.postgresql:postgresql dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 2455592dc..9a22a5114 100644 --- a/build.gradle +++ b/build.gradle @@ -83,7 +83,7 @@ dependencies { // Databases compile 'org.influxdb:influxdb-java:2.21' compile 'com.couchbase.client:java-client:3.1.6' - runtimeOnly 'org.postgresql:postgresql:42.2.21' // postgresql jdbc driver required during runtime + runtimeOnly 'org.postgresql:postgresql:42.2.22' // postgresql jdbc driver required during runtime compile 'commons-io:commons-io:2.10.0' // I/O functionalities From f3e0f50c1bcdc4908fb4bb603557b2a4e29d00e4 Mon Sep 17 00:00:00 2001 From: Johannes Hiry Date: Tue, 22 Jun 2021 09:47:28 +0200 Subject: [PATCH 073/157] first draft of ResultEntitySource + CsvResultEntitySource --- .../io/source/ResultEntitySource.java | 55 ++++++ .../io/source/csv/CsvDataSource.java | 15 ++ .../io/source/csv/CsvResultEntitySource.java | 156 ++++++++++++++++++ 3 files changed, 226 insertions(+) create mode 100644 src/main/java/edu/ie3/datamodel/io/source/ResultEntitySource.java create mode 100644 src/main/java/edu/ie3/datamodel/io/source/csv/CsvResultEntitySource.java diff --git a/src/main/java/edu/ie3/datamodel/io/source/ResultEntitySource.java b/src/main/java/edu/ie3/datamodel/io/source/ResultEntitySource.java new file mode 100644 index 000000000..d4ac7fa5c --- /dev/null +++ b/src/main/java/edu/ie3/datamodel/io/source/ResultEntitySource.java @@ -0,0 +1,55 @@ +/* + * © 2021. TU Dortmund University, + * Institute of Energy Systems, Energy Efficiency and Energy Economics, + * Research group Distribution grid planning and operation +*/ +package edu.ie3.datamodel.io.source; + +import edu.ie3.datamodel.models.result.NodeResult; +import edu.ie3.datamodel.models.result.connector.LineResult; +import edu.ie3.datamodel.models.result.connector.SwitchResult; +import edu.ie3.datamodel.models.result.connector.Transformer2WResult; +import edu.ie3.datamodel.models.result.connector.Transformer3WResult; +import edu.ie3.datamodel.models.result.system.*; +import edu.ie3.datamodel.models.result.thermal.CylindricalStorageResult; +import edu.ie3.datamodel.models.result.thermal.ThermalHouseResult; +import java.util.Set; + +public interface ResultEntitySource { + + // Grid + Set getNodeResults(); + + Set getSwitchResults(); + + Set getLineResults(); + + Set getTransformer2WResultResults(); + + Set getTransformer3WResultResults(); + + // System Participants + Set getLoadResults(); + + Set getPvResults(); + + Set getFixedFeedInResults(); + + Set getBmResults(); + + Set getChpResults(); + + Set getWecResults(); + + Set getStorageResults(); + + Set getEvcsResults(); + + Set getEvResults(); + + Set getHpResults(); + + Set getCylindricalStorageResult(); + + Set getThermalHouseResults(); +} diff --git a/src/main/java/edu/ie3/datamodel/io/source/csv/CsvDataSource.java b/src/main/java/edu/ie3/datamodel/io/source/csv/CsvDataSource.java index 928c2a7d9..a55451c2d 100644 --- a/src/main/java/edu/ie3/datamodel/io/source/csv/CsvDataSource.java +++ b/src/main/java/edu/ie3/datamodel/io/source/csv/CsvDataSource.java @@ -8,6 +8,7 @@ import edu.ie3.datamodel.exceptions.SourceException; import edu.ie3.datamodel.io.connectors.CsvFileConnector; import edu.ie3.datamodel.io.factory.EntityFactory; +import edu.ie3.datamodel.io.factory.SimpleEntityData; import edu.ie3.datamodel.io.factory.input.AssetInputEntityData; import edu.ie3.datamodel.io.factory.input.NodeAssetInputEntityData; import edu.ie3.datamodel.io.naming.EntityPersistenceNamingStrategy; @@ -16,6 +17,7 @@ import edu.ie3.datamodel.models.input.AssetTypeInput; import edu.ie3.datamodel.models.input.NodeInput; import edu.ie3.datamodel.models.input.OperatorInput; +import edu.ie3.datamodel.models.result.ResultEntity; import edu.ie3.datamodel.utils.validation.ValidationUtils; import edu.ie3.util.StringUtils; import java.io.BufferedReader; @@ -620,4 +622,17 @@ protected Stream> nodeAssetEntityStream( return nodeAssetInputEntityDataStream(assetInputEntityDataStream(entityClass, operators), nodes) .map(dataOpt -> dataOpt.flatMap(factory::get)); } + + /** + * TODO JH + * + * @param entityClass + * @param + * @return + */ + protected Stream simpleEntityDataStream( + Class entityClass) { + return buildStreamWithFieldsToAttributesMap(entityClass, connector) + .map(fieldsToAttributes -> new SimpleEntityData(fieldsToAttributes, entityClass)); + } } diff --git a/src/main/java/edu/ie3/datamodel/io/source/csv/CsvResultEntitySource.java b/src/main/java/edu/ie3/datamodel/io/source/csv/CsvResultEntitySource.java new file mode 100644 index 000000000..40a604e52 --- /dev/null +++ b/src/main/java/edu/ie3/datamodel/io/source/csv/CsvResultEntitySource.java @@ -0,0 +1,156 @@ +/* + * © 2021. TU Dortmund University, + * Institute of Energy Systems, Energy Efficiency and Energy Economics, + * Research group Distribution grid planning and operation +*/ +package edu.ie3.datamodel.io.source.csv; + +import edu.ie3.datamodel.io.factory.SimpleEntityFactory; +import edu.ie3.datamodel.io.factory.result.*; +import edu.ie3.datamodel.io.naming.EntityPersistenceNamingStrategy; +import edu.ie3.datamodel.io.source.ResultEntitySource; +import edu.ie3.datamodel.models.result.NodeResult; +import edu.ie3.datamodel.models.result.ResultEntity; +import edu.ie3.datamodel.models.result.connector.LineResult; +import edu.ie3.datamodel.models.result.connector.SwitchResult; +import edu.ie3.datamodel.models.result.connector.Transformer2WResult; +import edu.ie3.datamodel.models.result.connector.Transformer3WResult; +import edu.ie3.datamodel.models.result.system.*; +import edu.ie3.datamodel.models.result.thermal.CylindricalStorageResult; +import edu.ie3.datamodel.models.result.thermal.ThermalHouseResult; +import java.util.Optional; +import java.util.Set; +import java.util.stream.Collectors; + +public class CsvResultEntitySource extends CsvDataSource implements ResultEntitySource { + + private final SystemParticipantResultFactory systemParticipantResultFactory; + private final ThermalResultFactory thermalResultFactory; + private final SwitchResultFactory switchResultFactory; + private final NodeResultFactory nodeResultFactory; + private final ConnectorResultFactory connectorResultFactory; + + public CsvResultEntitySource( + String csvSep, + String folderPath, + EntityPersistenceNamingStrategy entityPersistenceNamingStrategy) { + super(csvSep, folderPath, entityPersistenceNamingStrategy); + + // init factories + this.systemParticipantResultFactory = new SystemParticipantResultFactory(); + this.thermalResultFactory = new ThermalResultFactory(); + this.switchResultFactory = new SwitchResultFactory(); + this.nodeResultFactory = new NodeResultFactory(); + this.connectorResultFactory = new ConnectorResultFactory(); + } + + // Grid + @Override + public Set getNodeResults() { + return getResultEntities(NodeResult.class, nodeResultFactory); + } + + @Override + public Set getSwitchResults() { + return getResultEntities(SwitchResult.class, switchResultFactory); + } + + @Override + public Set getLineResults() { + return getResultEntities(LineResult.class, connectorResultFactory); + } + + @Override + public Set getTransformer2WResultResults() { + return getResultEntities(Transformer2WResult.class, connectorResultFactory); + } + + @Override + public Set getTransformer3WResultResults() { + return getResultEntities(Transformer3WResult.class, connectorResultFactory); + } + + // System Participants + @Override + public Set getLoadResults() { + return getResultEntities(LoadResult.class, systemParticipantResultFactory); + } + + @Override + public Set getPvResults() { + return getResultEntities(PvResult.class, systemParticipantResultFactory); + } + + @Override + public Set getFixedFeedInResults() { + return getResultEntities(FixedFeedInResult.class, systemParticipantResultFactory); + } + + @Override + public Set getBmResults() { + return getResultEntities(BmResult.class, systemParticipantResultFactory); + } + + @Override + public Set getChpResults() { + return getResultEntities(ChpResult.class, systemParticipantResultFactory); + } + + @Override + public Set getWecResults() { + return getResultEntities(WecResult.class, systemParticipantResultFactory); + } + + @Override + public Set getStorageResults() { + return getResultEntities(StorageResult.class, systemParticipantResultFactory); + } + + @Override + public Set getEvcsResults() { + return getResultEntities(EvcsResult.class, systemParticipantResultFactory); + } + + @Override + public Set getEvResults() { + return getResultEntities(EvResult.class, systemParticipantResultFactory); + } + + @Override + public Set getHpResults() { + return getResultEntities(HpResult.class, systemParticipantResultFactory); + } + + @Override + public Set getThermalHouseResults() { + return getResultEntities(ThermalHouseResult.class, thermalResultFactory); + } + + @Override + public Set getCylindricalStorageResult() { + return getResultEntities(CylindricalStorageResult.class, thermalResultFactory); + } + + private Set getResultEntities( + Class entityClass, SimpleEntityFactory factory) { + return filterEmptyOptionals( + simpleEntityDataStream(entityClass) + .map( + entityData -> + factory + .get(entityData) + .flatMap(loadResult -> cast(entityClass, loadResult)))) + .collect(Collectors.toSet()); + } + + private Optional cast( + Class entityClass, ResultEntity resultEntity) { + if (resultEntity.getClass().equals(entityClass)) { + // safe here as a) type is checked and b) csv data stream already filters non-fitting input + // data + return Optional.of(entityClass.cast(resultEntity)); + } else { + return Optional.empty(); + } + } +} From 3be10231caf45fbced8234294829060c69f0bc63 Mon Sep 17 00:00:00 2001 From: Niklas Steffan Date: Tue, 22 Jun 2021 11:35:17 +0200 Subject: [PATCH 074/157] spotless --- .../datamodel/io/naming/DefaultDirectoryHierarchy.java | 2 +- .../java/edu/ie3/datamodel/io/naming/FileHierarchy.java | 1 - .../edu/ie3/datamodel/io/naming/FileNamingStrategy.java | 7 ++++--- .../ie3/datamodel/io/naming/FlatDirectoryHierarchy.java | 8 -------- 4 files changed, 5 insertions(+), 13 deletions(-) diff --git a/src/main/java/edu/ie3/datamodel/io/naming/DefaultDirectoryHierarchy.java b/src/main/java/edu/ie3/datamodel/io/naming/DefaultDirectoryHierarchy.java index d32745854..76e0ed844 100644 --- a/src/main/java/edu/ie3/datamodel/io/naming/DefaultDirectoryHierarchy.java +++ b/src/main/java/edu/ie3/datamodel/io/naming/DefaultDirectoryHierarchy.java @@ -198,7 +198,7 @@ public void createDirs(boolean withOptionals) throws IOException { */ @Override public Optional getBaseDirectory() { - return Optional.of(this.baseDirectory.toString()); + return Optional.of(this.baseDirectory.toString()); } /** diff --git a/src/main/java/edu/ie3/datamodel/io/naming/FileHierarchy.java b/src/main/java/edu/ie3/datamodel/io/naming/FileHierarchy.java index f6f10f20a..0f3e1b7a0 100644 --- a/src/main/java/edu/ie3/datamodel/io/naming/FileHierarchy.java +++ b/src/main/java/edu/ie3/datamodel/io/naming/FileHierarchy.java @@ -41,5 +41,4 @@ default Optional getSubDirectory(Class cls) { * @return An option to the base directory */ Optional getBaseDirectory(); - } diff --git a/src/main/java/edu/ie3/datamodel/io/naming/FileNamingStrategy.java b/src/main/java/edu/ie3/datamodel/io/naming/FileNamingStrategy.java index 516952713..91cc114d0 100644 --- a/src/main/java/edu/ie3/datamodel/io/naming/FileNamingStrategy.java +++ b/src/main/java/edu/ie3/datamodel/io/naming/FileNamingStrategy.java @@ -304,8 +304,9 @@ public String getIdCoordinateEntityName() { } /** - * Get the full path to the id coordinate file with regard to some (not explicitly specified) base directory. - * The path does NOT start or end with any of the known file separators or file extension. + * Get the full path to the id coordinate file with regard to some (not explicitly specified) base + * directory. The path does NOT start or end with any of the known file separators or file + * extension. * * @return An optional sub path to the id coordinate file */ @@ -313,7 +314,7 @@ public Optional getIdCoordinateFilePath() { // do not adapt orElseGet, see https://www.baeldung.com/java-optional-or-else-vs-or-else-get for // details return getFilePath( - getIdCoordinateEntityName(), fileHierarchy.getBaseDirectory().orElseGet(() -> "")); + getIdCoordinateEntityName(), fileHierarchy.getBaseDirectory().orElseGet(() -> "")); } /** diff --git a/src/main/java/edu/ie3/datamodel/io/naming/FlatDirectoryHierarchy.java b/src/main/java/edu/ie3/datamodel/io/naming/FlatDirectoryHierarchy.java index 1c9203cd3..874322234 100644 --- a/src/main/java/edu/ie3/datamodel/io/naming/FlatDirectoryHierarchy.java +++ b/src/main/java/edu/ie3/datamodel/io/naming/FlatDirectoryHierarchy.java @@ -6,14 +6,7 @@ package edu.ie3.datamodel.io.naming; import edu.ie3.datamodel.models.UniqueEntity; -import org.apache.commons.io.FilenameUtils; - -import java.io.File; -import java.nio.file.Path; -import java.nio.file.Paths; -import java.util.Arrays; import java.util.Optional; -import java.util.stream.Collectors; /** Default directory hierarchy for input models */ public class FlatDirectoryHierarchy implements FileHierarchy { @@ -30,7 +23,6 @@ public Optional getSubDirectory(Class cls, Strin return Optional.empty(); } - /** * Gives the baseDirectory, which is Empty. * From 640007da42df5d90f321049a31bd84d545144616 Mon Sep 17 00:00:00 2001 From: vasilios Date: Tue, 22 Jun 2021 12:37:51 +0300 Subject: [PATCH 075/157] test: started test implementation for CsvResultEntitySource --- .../io/source/ResultEntitySource.java | 161 +++ .../io/source/csv/CsvResultEntitySource.java | 43 +- .../csv/CsvResultEntitySourceTest.groovy | 20 + .../io/source/csv/CsvTestDataMeta.groovy | 1 + .../test/common/ResultEntityTestData.groovy | 6 + .../testGridFiles/results/wec_res.csv | 1001 +++++++++++++++++ 6 files changed, 1224 insertions(+), 8 deletions(-) create mode 100644 src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvResultEntitySourceTest.groovy create mode 100644 src/test/groovy/edu/ie3/test/common/ResultEntityTestData.groovy create mode 100644 src/test/resources/testGridFiles/results/wec_res.csv diff --git a/src/main/java/edu/ie3/datamodel/io/source/ResultEntitySource.java b/src/main/java/edu/ie3/datamodel/io/source/ResultEntitySource.java index d4ac7fa5c..285aaa3ab 100644 --- a/src/main/java/edu/ie3/datamodel/io/source/ResultEntitySource.java +++ b/src/main/java/edu/ie3/datamodel/io/source/ResultEntitySource.java @@ -6,6 +6,7 @@ package edu.ie3.datamodel.io.source; import edu.ie3.datamodel.models.result.NodeResult; +import edu.ie3.datamodel.models.result.ResultEntity; import edu.ie3.datamodel.models.result.connector.LineResult; import edu.ie3.datamodel.models.result.connector.SwitchResult; import edu.ie3.datamodel.models.result.connector.Transformer2WResult; @@ -15,41 +16,201 @@ import edu.ie3.datamodel.models.result.thermal.ThermalHouseResult; import java.util.Set; +/** + * Interface that provides the capability to build entities of type + * {@link ResultEntity} container from .csv files. + * + * @version 0.1 + * @since 22 June 2021 + */ public interface ResultEntitySource { // Grid + /** + * Returns a unique set of {@link NodeResult} instances. + * + *

This set has to be unique in the sense of object uniqueness but also in the sense of {@link + * java.util.UUID} uniqueness of the provided {@link NodeResult} which has to be checked manually, + * as {@link NodeResult#equals(Object)} is NOT restricted on the uuid of {@link NodeResult}. + * + * @return a set of object and uuid unique {@link NodeResult} entities + */ Set getNodeResults(); + /** + * Returns a unique set of {@link SwitchResult} instances. + * + *

This set has to be unique in the sense of object uniqueness but also in the sense of {@link + * java.util.UUID} uniqueness of the provided {@link SwitchResult} which has to be checked manually, + * as {@link SwitchResult#equals(Object)} is NOT restricted on the uuid of {@link SwitchResult}. + * + * @return a set of object and uuid unique {@link SwitchResult} entities + */ Set getSwitchResults(); + /** + * Returns a unique set of {@link LineResult} instances. + * + *

This set has to be unique in the sense of object uniqueness but also in the sense of {@link + * java.util.UUID} uniqueness of the provided {@link LineResult} which has to be checked manually, + * as {@link LineResult#equals(Object)} is NOT restricted on the uuid of {@link LineResult}. + * + * @return a set of object and uuid unique {@link LineResult} entities + */ Set getLineResults(); + /** + * Returns a unique set of {@link Transformer2WResult} instances. + * + *

This set has to be unique in the sense of object uniqueness but also in the sense of {@link + * java.util.UUID} uniqueness of the provided {@link Transformer2WResult} which has to be checked manually, + * as {@link Transformer2WResult#equals(Object)} is NOT restricted on the uuid of {@link Transformer2WResult}. + * + * @return a set of object and uuid unique {@link Transformer2WResult} entities + */ Set getTransformer2WResultResults(); + /** + * Returns a unique set of {@link Transformer3WResult} instances. + * + *

This set has to be unique in the sense of object uniqueness but also in the sense of {@link + * java.util.UUID} uniqueness of the provided {@link Transformer3WResult} which has to be checked manually, + * as {@link Transformer3WResult#equals(Object)} is NOT restricted on the uuid of {@link Transformer3WResult}. + * + * @return a set of object and uuid unique {@link Transformer3WResult} entities + */ Set getTransformer3WResultResults(); // System Participants + /** + * Returns a unique set of {@link LoadResult} instances. + * + *

This set has to be unique in the sense of object uniqueness but also in the sense of {@link + * java.util.UUID} uniqueness of the provided {@link LoadResult} which has to be checked manually, + * as {@link LoadResult#equals(Object)} is NOT restricted on the uuid of {@link LoadResult}. + * + * @return a set of object and uuid unique {@link LoadResult} entities + */ Set getLoadResults(); + /** + * Returns a unique set of {@link PvResult} instances. + * + *

This set has to be unique in the sense of object uniqueness but also in the sense of {@link + * java.util.UUID} uniqueness of the provided {@link PvResult} which has to be checked manually, + * as {@link PvResult#equals(Object)} is NOT restricted on the uuid of {@link PvResult}. + * + * @return a set of object and uuid unique {@link PvResult} entities + */ Set getPvResults(); + /** + * Returns a unique set of {@link FixedFeedInResult} instances. + * + *

This set has to be unique in the sense of object uniqueness but also in the sense of {@link + * java.util.UUID} uniqueness of the provided {@link FixedFeedInResult} which has to be checked manually, + * as {@link FixedFeedInResult#equals(Object)} is NOT restricted on the uuid of {@link FixedFeedInResult}. + * + * @return a set of object and uuid unique {@link FixedFeedInResult} entities + */ Set getFixedFeedInResults(); + /** + * Returns a unique set of {@link BmResult} instances. + * + *

This set has to be unique in the sense of object uniqueness but also in the sense of {@link + * java.util.UUID} uniqueness of the provided {@link BmResult} which has to be checked manually, + * as {@link BmResult#equals(Object)} is NOT restricted on the uuid of {@link BmResult}. + * + * @return a set of object and uuid unique {@link BmResult} entities + */ Set getBmResults(); + /** + * Returns a unique set of {@link ChpResult} instances. + * + *

This set has to be unique in the sense of object uniqueness but also in the sense of {@link + * java.util.UUID} uniqueness of the provided {@link ChpResult} which has to be checked manually, + * as {@link ChpResult#equals(Object)} is NOT restricted on the uuid of {@link ChpResult}. + * + * @return a set of object and uuid unique {@link ChpResult} entities + */ Set getChpResults(); + /** + * Returns a unique set of {@link WecResult} instances. + * + *

This set has to be unique in the sense of object uniqueness but also in the sense of {@link + * java.util.UUID} uniqueness of the provided {@link WecResult} which has to be checked manually, + * as {@link WecResult#equals(Object)} is NOT restricted on the uuid of {@link WecResult}. + * + * @return a set of object and uuid unique {@link WecResult} entities + */ Set getWecResults(); + /** + * Returns a unique set of {@link StorageResult} instances. + * + *

This set has to be unique in the sense of object uniqueness but also in the sense of {@link + * java.util.UUID} uniqueness of the provided {@link StorageResult} which has to be checked manually, + * as {@link StorageResult#equals(Object)} is NOT restricted on the uuid of {@link StorageResult}. + * + * @return a set of object and uuid unique {@link StorageResult} entities + */ Set getStorageResults(); + /** + * Returns a unique set of {@link EvcsResult} instances. + * + *

This set has to be unique in the sense of object uniqueness but also in the sense of {@link + * java.util.UUID} uniqueness of the provided {@link EvcsResult} which has to be checked manually, + * as {@link EvcsResult#equals(Object)} is NOT restricted on the uuid of {@link EvcsResult}. + * + * @return a set of object and uuid unique {@link EvcsResult} entities + */ Set getEvcsResults(); + /** + * Returns a unique set of {@link EvResult} instances. + * + *

This set has to be unique in the sense of object uniqueness but also in the sense of {@link + * java.util.UUID} uniqueness of the provided {@link EvResult} which has to be checked manually, + * as {@link EvResult#equals(Object)} is NOT restricted on the uuid of {@link EvResult}. + * + * @return a set of object and uuid unique {@link EvResult} entities + */ Set getEvResults(); + /** + * Returns a unique set of {@link HpResult} instances. + * + *

This set has to be unique in the sense of object uniqueness but also in the sense of {@link + * java.util.UUID} uniqueness of the provided {@link HpResult} which has to be checked manually, + * as {@link HpResult#equals(Object)} is NOT restricted on the uuid of {@link HpResult}. + * + * @return a set of object and uuid unique {@link HpResult} entities + */ Set getHpResults(); + /** + * Returns a unique set of {@link CylindricalStorageResult} instances. + * + *

This set has to be unique in the sense of object uniqueness but also in the sense of {@link + * java.util.UUID} uniqueness of the provided {@link CylindricalStorageResult} which has to be checked manually, + * as {@link CylindricalStorageResult#equals(Object)} is NOT restricted on the uuid of {@link CylindricalStorageResult}. + * + * @return a set of object and uuid unique {@link CylindricalStorageResult} entities + */ Set getCylindricalStorageResult(); + /** + * Returns a unique set of {@link ThermalHouseResult} instances. + * + *

This set has to be unique in the sense of object uniqueness but also in the sense of {@link + * java.util.UUID} uniqueness of the provided {@link ThermalHouseResult} which has to be checked manually, + * as {@link ThermalHouseResult#equals(Object)} is NOT restricted on the uuid of {@link ThermalHouseResult}. + * + * @return a set of object and uuid unique {@link ThermalHouseResult} entities + */ Set getThermalHouseResults(); } diff --git a/src/main/java/edu/ie3/datamodel/io/source/csv/CsvResultEntitySource.java b/src/main/java/edu/ie3/datamodel/io/source/csv/CsvResultEntitySource.java index 40a604e52..b5937f25a 100644 --- a/src/main/java/edu/ie3/datamodel/io/source/csv/CsvResultEntitySource.java +++ b/src/main/java/edu/ie3/datamodel/io/source/csv/CsvResultEntitySource.java @@ -5,10 +5,13 @@ */ package edu.ie3.datamodel.io.source.csv; +import edu.ie3.datamodel.io.factory.SimpleEntityData; import edu.ie3.datamodel.io.factory.SimpleEntityFactory; import edu.ie3.datamodel.io.factory.result.*; import edu.ie3.datamodel.io.naming.EntityPersistenceNamingStrategy; import edu.ie3.datamodel.io.source.ResultEntitySource; +import edu.ie3.datamodel.models.input.container.SystemParticipants; +import edu.ie3.datamodel.models.input.system.SystemParticipantInput; import edu.ie3.datamodel.models.result.NodeResult; import edu.ie3.datamodel.models.result.ResultEntity; import edu.ie3.datamodel.models.result.connector.LineResult; @@ -22,6 +25,21 @@ import java.util.Set; import java.util.stream.Collectors; +/** + * Source that provides the capability to build entities of type + * {@link ResultEntity} container from .csv files. + * + *

This source is not buffered which means each call on a getter method always tries to + * read all data is necessary to return the requested objects in a hierarchical cascading way. + * + *

If performance is an issue, it is recommended to read the data cascading starting with reading + * nodes and then using the getters with arguments to avoid reading the same data multiple times. + * + *

The resulting sets are always unique on object and UUID base (with distinct UUIDs). + * + * @version 0.1 + * @since 22 June 2021 + */ public class CsvResultEntitySource extends CsvDataSource implements ResultEntitySource { private final SystemParticipantResultFactory systemParticipantResultFactory; @@ -133,14 +151,23 @@ public Set getCylindricalStorageResult() { private Set getResultEntities( Class entityClass, SimpleEntityFactory factory) { - return filterEmptyOptionals( - simpleEntityDataStream(entityClass) - .map( - entityData -> - factory - .get(entityData) - .flatMap(loadResult -> cast(entityClass, loadResult)))) - .collect(Collectors.toSet()); + return buildStreamWithFieldsToAttributesMap(entityClass, connector) + .map( + fieldsToAttributes -> { + SimpleEntityData data = new SimpleEntityData(fieldsToAttributes, entityClass); + return (Optional) factory.get(data); + }) + .filter(Optional::isPresent) + .map(Optional::get) + .collect(Collectors.toSet()); +// return filterEmptyOptionals( +// simpleEntityDataStream(entityClass) +// .map( +// entityData -> +// factory +// .get(entityData) +// .flatMap(loadResult -> cast(entityClass, loadResult)))) +// .collect(Collectors.toSet()); } private Optional cast( diff --git a/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvResultEntitySourceTest.groovy b/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvResultEntitySourceTest.groovy new file mode 100644 index 000000000..15ccf0b6f --- /dev/null +++ b/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvResultEntitySourceTest.groovy @@ -0,0 +1,20 @@ +package edu.ie3.datamodel.io.source.csv + +import spock.lang.Specification + +import edu.ie3.test.common.ResultEntityTestData as retd + +class CsvResultEntitySourceTest extends Specification implements CsvTestDataMeta { + + def "A CsvResultEntitySource should read a csv and extract entities correctly"() { + given: + def csvResultEntitySource = new CsvResultEntitySource(csvSep, + resultEntitiesFolderPath, entityPersistenceNamingStrategy) + + when: + def wecResults = csvResultEntitySource.getWecResults() + + then: + wecResults.size() == retd.wecResultsSize + } +} diff --git a/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvTestDataMeta.groovy b/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvTestDataMeta.groovy index 67999fad6..5f5cce9de 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvTestDataMeta.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvTestDataMeta.groovy @@ -18,6 +18,7 @@ trait CsvTestDataMeta { static String typeFolderPath = testParticipantsBaseFolderPath.concat(File.separator).concat("types") static String gridFolderPath = testParticipantsBaseFolderPath.concat(File.separator).concat("grid") static String participantsFolderPath = testParticipantsBaseFolderPath.concat(File.separator).concat("participants") + static String resultEntitiesFolderPath = testParticipantsBaseFolderPath.concat(File.separator).concat("results") static String timeSeriesFolderPath = testTimeSeriesBaseFolderPath static String thermalFolderPath = testParticipantsBaseFolderPath.concat(File.separator).concat("thermal") static String coordinatesFolderPath = testParticipantsBaseFolderPath.concat(File.separator).concat("coordinates") diff --git a/src/test/groovy/edu/ie3/test/common/ResultEntityTestData.groovy b/src/test/groovy/edu/ie3/test/common/ResultEntityTestData.groovy new file mode 100644 index 000000000..92b8b7c7e --- /dev/null +++ b/src/test/groovy/edu/ie3/test/common/ResultEntityTestData.groovy @@ -0,0 +1,6 @@ +package edu.ie3.test.common + +class ResultEntityTestData { + + public static final int wecResultsSize = 1000; +} diff --git a/src/test/resources/testGridFiles/results/wec_res.csv b/src/test/resources/testGridFiles/results/wec_res.csv new file mode 100644 index 000000000..fe11de42a --- /dev/null +++ b/src/test/resources/testGridFiles/results/wec_res.csv @@ -0,0 +1,1001 @@ +uuid,inputModel,p,q,time +3375cd8c-6760-4c53-baba-2ab2485520b1,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.09227124759165843,-0.044689004849606646,2011-01-01 00:00:00 +ae983220-e38e-4daf-9d28-c3740eaf38ab,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.09227124759165843,-0.044689004849606646,2011-01-01 00:00:00 +005ce986-f13a-4d8f-ae02-f23921294d9a,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.16170291318306157,-0.07831629527123292,2011-01-01 01:00:00 +8752f277-bb8a-4c38-b35e-13a241dbbd15,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.16170291318306157,-0.07831629527123292,2011-01-01 01:00:00 +25af32b2-4592-4e86-99ff-3034ae02a8d3,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.20826742975071427,-0.10086851994603553,2011-01-01 02:00:00 +2f1dcd58-4400-42f7-adf6-f7cbc2dc5fec,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.20826742975071427,-0.10086851994603553,2011-01-01 02:00:00 +48448c74-c7c4-48c3-a0c6-b250b572d3f9,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.24312665748562165,-0.11775161449562792,2011-01-01 03:00:00 +f3e2f2ca-5572-4a1e-adc6-da9b3b86cd9d,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.24312665748562165,-0.11775161449562792,2011-01-01 03:00:00 +47cee779-6f27-4ab2-849d-7803ca46341f,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.39244850039747653,-0.19007148375296465,2011-01-01 04:00:00 +a59d4d00-0b14-48fa-944c-b115308e1f72,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.39244850039747653,-0.19007148375296465,2011-01-01 04:00:00 +092b4b57-e35b-4a10-ac81-b81d77843c11,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.2828153244546617,-0.13697371322028196,2011-01-01 05:00:00 +d0d6a96e-ce4c-415d-94b9-eee956a83de9,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.2828153244546617,-0.13697371322028196,2011-01-01 05:00:00 +bdb003e1-3bc3-4a0f-a56c-90fad7c4992a,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.390987190651292,-0.18936373914087248,2011-01-01 06:00:00 +7b6b44d5-4735-496c-90a5-164a0e0bd46a,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.390987190651292,-0.18936373914087248,2011-01-01 06:00:00 +e90ed0a6-742e-405a-96a5-e818172691a7,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.6775913465991797,-0.3281724672048296,2011-01-01 07:00:00 +4e974394-f42b-4ab0-9bd4-f5fb536d7464,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.6775913465991797,-0.3281724672048296,2011-01-01 07:00:00 +2eae159c-8370-435f-ae71-24a5197d3fa6,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-1.009832423604613,-0.48908416493369605,2011-01-01 08:00:00 +22eef150-a908-4198-aa95-7c844cf7ef75,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-1.009832423604613,-0.48908416493369605,2011-01-01 08:00:00 +351e4aef-e261-43e9-a2f4-443af0c6ee43,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.8062984069548205,-0.390508141583766,2011-01-01 09:00:00 +acf559e0-ed3d-4c45-aff6-2803d35b802b,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.8062984069548205,-0.390508141583766,2011-01-01 09:00:00 +43f7d6e3-5678-429c-b337-3f616636c1b9,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.9784447637769601,-0.47388242746003273,2011-01-01 10:00:00 +cf157ff2-392b-4e20-a087-92b80d0c3af5,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.9784447637769601,-0.47388242746003273,2011-01-01 10:00:00 +67cec151-1bf6-461d-9de1-12289aa17ef6,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-1.2120573868546007,-0.5870261847856876,2011-01-01 11:00:00 +350d9d26-a780-4521-ba9a-29d92e448772,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-1.2120573868546007,-0.5870261847856876,2011-01-01 11:00:00 +c1e88f13-6f4a-44f2-a1f1-fb7705d2e2d1,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-1.08140291739408,-0.5237473371300951,2011-01-01 12:00:00 +cc97b3b2-7500-40cf-8aee-cedb9deb3c52,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-1.08140291739408,-0.5237473371300951,2011-01-01 12:00:00 +1b243c27-0963-437b-8f7e-e33be6a19ba1,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-1.4169332608223841,-0.686252099296259,2011-01-01 13:00:00 +11004faf-8788-490a-9688-405d6aacabb2,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-1.4169332608223841,-0.686252099296259,2011-01-01 13:00:00 +07965c09-e9c7-41a9-8a78-7049ddea3a61,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-1.5252263886765398,-0.7387008549180584,2011-01-01 14:00:00 +e3d6c1bf-d46b-45ad-970c-bd7a11e2fdb5,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-1.5252263886765398,-0.7387008549180584,2011-01-01 14:00:00 +728942da-6fb5-4e32-ae06-9c104ab70251,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-1.2868372575870357,-0.6232437291783229,2011-01-01 15:00:00 +031b99e4-3b0e-46c6-9fb7-1213e15da944,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-1.2868372575870357,-0.6232437291783229,2011-01-01 15:00:00 +20eed176-3649-4cde-8109-d34c1b365fa3,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.8523806614716288,-0.41282679608702033,2011-01-01 16:00:00 +cbfb6d49-fd30-4611-be00-d4fac8dca22b,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.8523806614716288,-0.41282679608702033,2011-01-01 16:00:00 +e55aa474-a926-4800-a945-a4870dd6a4f4,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.8723497046476517,-0.42249824510962963,2011-01-01 17:00:00 +8970118b-5b53-4d90-99c5-816d3f8ac94c,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.8723497046476517,-0.42249824510962963,2011-01-01 17:00:00 +efc8774a-47fc-4459-ad7a-cca2dd4d798f,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.7834227551689714,-0.3794289577613058,2011-01-01 18:00:00 +03648481-88b7-43b9-96ff-a563472bb56d,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.7834227551689714,-0.3794289577613058,2011-01-01 18:00:00 +b099c1a6-85a7-410e-89ba-99fd9343465c,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.46916511355848733,-0.2272270353151367,2011-01-01 19:00:00 +8a7cc1d7-61f5-44fa-9c4d-5bb3352949ba,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.46916511355848733,-0.2272270353151367,2011-01-01 19:00:00 +f4b37943-bd24-400f-a872-c48743134316,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.36143225859150935,-0.1750496322373388,2011-01-01 20:00:00 +01725537-0456-4d41-aade-2613ad4c75db,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.36143225859150935,-0.1750496322373388,2011-01-01 20:00:00 +a07a3a8f-1163-4dba-b4d7-28c3c893f815,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.3751862434888121,-0.1817109911527085,2011-01-01 21:00:00 +ae285535-9525-48cb-8d8c-541422c7e9bc,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.3751862434888121,-0.1817109911527085,2011-01-01 21:00:00 +020af7d4-1d47-46a0-a69f-d9dd69ffb4a3,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.29056204592907253,-0.1407256216703612,2011-01-01 22:00:00 +24d310e4-393b-47a1-8f5a-423e01cb5a92,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.29056204592907253,-0.1407256216703612,2011-01-01 22:00:00 +76df8c5e-cf43-47b3-a235-1a251c13b739,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.7166785625571813,-0.3471032699098606,2011-01-01 23:00:00 +c3d1be46-b019-4b3b-aaa5-7b41d94ca314,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.7166785625571813,-0.3471032699098606,2011-01-01 23:00:00 +78537d26-267d-49ee-8fe8-c8e6fcc2728c,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.09227124759165843,-0.044689004849606646,2011-01-02 00:00:00 +33096332-69f5-47a7-9a19-3b30fa03d35d,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.09227124759165843,-0.044689004849606646,2011-01-02 00:00:00 +024f3c9f-dec7-4ecb-864d-c460925f933d,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.16170291318306157,-0.07831629527123292,2011-01-02 01:00:00 +26515a20-4f0b-4b38-9fa5-0b44add545c9,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.16170291318306157,-0.07831629527123292,2011-01-02 01:00:00 +fc4127ed-75e9-448d-8208-6df98be6e51b,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.20826742975071427,-0.10086851994603553,2011-01-02 02:00:00 +6a94470e-e905-4f5f-b26a-935e2bdcd10f,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.20826742975071427,-0.10086851994603553,2011-01-02 02:00:00 +2d1ff63d-b881-4fda-adda-c0af8e7845b2,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.24312665748562165,-0.11775161449562792,2011-01-02 03:00:00 +5d7f0b66-ee31-417e-8ac8-69e62312d684,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.24312665748562165,-0.11775161449562792,2011-01-02 03:00:00 +f4b4ccd1-87ae-41d4-94a2-80f484b36058,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.39244850039747653,-0.19007148375296465,2011-01-02 04:00:00 +f8375cd3-693e-4563-9e66-685520a6c018,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.39244850039747653,-0.19007148375296465,2011-01-02 04:00:00 +21d4bc4b-da82-4d4b-9292-53b5ae017656,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.2828153244546617,-0.13697371322028196,2011-01-02 05:00:00 +1bfde25f-4832-4b12-9cc9-770d1383ae76,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.2828153244546617,-0.13697371322028196,2011-01-02 05:00:00 +ffeff07f-2677-445b-8927-0342246dbd5a,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.390987190651292,-0.18936373914087248,2011-01-02 06:00:00 +fd442934-55ee-4d37-b927-882e2cf6b2cc,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.390987190651292,-0.18936373914087248,2011-01-02 06:00:00 +11b7989b-6af4-4915-96bc-9ff892ec9b24,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.6775913465991797,-0.3281724672048296,2011-01-02 07:00:00 +108431b6-37c5-4682-a4bf-9281bafab0ea,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.6775913465991797,-0.3281724672048296,2011-01-02 07:00:00 +88dd0e2e-9e71-4a76-9112-72548af2ec12,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-1.009832423604613,-0.48908416493369605,2011-01-02 08:00:00 +8152642a-116e-4968-be67-035706158e39,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-1.009832423604613,-0.48908416493369605,2011-01-02 08:00:00 +b5c1b457-c24a-4aee-8759-505fec7cfe43,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.8062984069548205,-0.390508141583766,2011-01-02 09:00:00 +0dd9bbcc-a3da-4b58-ad4c-078b94c467d6,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.8062984069548205,-0.390508141583766,2011-01-02 09:00:00 +b80f03c2-6e1a-4cc8-9c75-75d2bc21945a,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.9784447637769601,-0.47388242746003273,2011-01-02 10:00:00 +0eaa8d12-864c-483e-baf1-b285cbd9a4b9,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.9784447637769601,-0.47388242746003273,2011-01-02 10:00:00 +e904aa42-c962-4aab-96db-5a3c02e9bb0d,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-1.2120573868546007,-0.5870261847856876,2011-01-02 11:00:00 +290312bb-acb9-41ed-8504-248f4f53af5c,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-1.2120573868546007,-0.5870261847856876,2011-01-02 11:00:00 +1dfe11d5-21cf-40b8-89e0-90ea02842e75,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-1.08140291739408,-0.5237473371300951,2011-01-02 12:00:00 +f69f9720-4670-45ae-8155-1ff46b42ffcd,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-1.08140291739408,-0.5237473371300951,2011-01-02 12:00:00 +d0e1b095-dae4-4aa0-a388-465d6369ebb6,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-1.4169332608223841,-0.686252099296259,2011-01-02 13:00:00 +b0f645df-7f34-4a13-9b7f-cc0ba79f0adc,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-1.4169332608223841,-0.686252099296259,2011-01-02 13:00:00 +901175db-07f9-481a-b73f-f7bcd9935470,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-1.5252263886765398,-0.7387008549180584,2011-01-02 14:00:00 +6b138357-1290-42c1-be34-439c1cd601ff,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-1.5252263886765398,-0.7387008549180584,2011-01-02 14:00:00 +b153005b-69ec-40fb-8aa9-17090cf89a08,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-1.2868372575870357,-0.6232437291783229,2011-01-02 15:00:00 +44aa2998-691f-411a-8f62-d21bcdf02964,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-1.2868372575870357,-0.6232437291783229,2011-01-02 15:00:00 +6e0a0073-0178-41ff-83b7-58db37f37066,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.8523806614716288,-0.41282679608702033,2011-01-02 16:00:00 +251f5797-fe4e-4935-b8ee-720498e8392c,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.8523806614716288,-0.41282679608702033,2011-01-02 16:00:00 +2cfa0cf8-5152-4174-b895-a12406cff6a3,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.8723497046476517,-0.42249824510962963,2011-01-02 17:00:00 +1350c8f3-d15c-4da2-bc8f-9000abfdd47d,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.8723497046476517,-0.42249824510962963,2011-01-02 17:00:00 +b13366e3-80ab-4db5-a213-27091a2cde93,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.7834227551689714,-0.3794289577613058,2011-01-02 18:00:00 +85aa5a74-11f1-4e54-b925-bcd6fded19a4,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.7834227551689714,-0.3794289577613058,2011-01-02 18:00:00 +9b8df9c3-eeb6-43af-8a2f-8c574f34b1dd,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.46916511355848733,-0.2272270353151367,2011-01-02 19:00:00 +01c4038e-ea57-4cbb-b28d-f91b92cd0b55,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.46916511355848733,-0.2272270353151367,2011-01-02 19:00:00 +f856dfeb-5f79-4c0d-96c3-f9b85754b76e,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.36143225859150935,-0.1750496322373388,2011-01-02 20:00:00 +8a1b3f89-7b24-4d35-9ece-7b19d1a49f2e,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.36143225859150935,-0.1750496322373388,2011-01-02 20:00:00 +753acda7-ef4c-4fc8-9905-f95beb1b15eb,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.3751862434888121,-0.1817109911527085,2011-01-02 21:00:00 +0e48d8e4-755b-4b9c-b141-5cd1fd2f24ca,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.3751862434888121,-0.1817109911527085,2011-01-02 21:00:00 +4dba8b6b-afeb-42fa-8e4a-c4d8f6f87a7d,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.29056204592907253,-0.1407256216703612,2011-01-02 22:00:00 +215187db-b277-4f45-b03b-35a8037097f9,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.29056204592907253,-0.1407256216703612,2011-01-02 22:00:00 +3bdc0be1-f80e-4d13-ae6e-fd2d95a74b52,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.7166785625571813,-0.3471032699098606,2011-01-02 23:00:00 +860a0f4e-4347-4188-815d-f3daed0cdcfe,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.7166785625571813,-0.3471032699098606,2011-01-02 23:00:00 +cd12bcdb-c018-456c-8eaa-e3e235a0c6f1,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.09227124759165843,-0.044689004849606646,2011-01-03 00:00:00 +e9698ba0-5e47-4127-a762-2c4f975a3b68,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.09227124759165843,-0.044689004849606646,2011-01-03 00:00:00 +c93abab9-0a21-4ee0-94e5-52dfa9fb87dd,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.16170291318306157,-0.07831629527123292,2011-01-03 01:00:00 +0ca6df46-c885-453b-98d5-1244a74617e4,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.16170291318306157,-0.07831629527123292,2011-01-03 01:00:00 +d8a0e0bd-6300-4636-bbe3-798bdccbe529,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.20826742975071427,-0.10086851994603553,2011-01-03 02:00:00 +2979a8b5-4ec5-4844-9ba7-2a5d075fb389,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.20826742975071427,-0.10086851994603553,2011-01-03 02:00:00 +c8f80dd7-9eef-49ad-91e5-938f4491adcc,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.24312665748562165,-0.11775161449562792,2011-01-03 03:00:00 +59037f8f-6a8c-4f13-b245-941860e659ff,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.24312665748562165,-0.11775161449562792,2011-01-03 03:00:00 +5b47e87d-0b48-4e58-ac2c-20856f8bbe7d,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.39244850039747653,-0.19007148375296465,2011-01-03 04:00:00 +f68ab4a2-0cfa-41e3-b861-8ad2b87fd5b7,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.39244850039747653,-0.19007148375296465,2011-01-03 04:00:00 +0fcd1d76-9fa8-43af-a786-87e01c334f81,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.2828153244546617,-0.13697371322028196,2011-01-03 05:00:00 +6277c77f-1a9b-483e-84b4-ea253e9cf419,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.2828153244546617,-0.13697371322028196,2011-01-03 05:00:00 +1c6e804e-14e6-4ff2-92df-ec7c94f87231,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.390987190651292,-0.18936373914087248,2011-01-03 06:00:00 +99648e4c-386c-43bd-a6bd-f088ae54b36b,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.390987190651292,-0.18936373914087248,2011-01-03 06:00:00 +c7716bff-cf2c-4c67-b769-02e111c4a052,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.6775913465991797,-0.3281724672048296,2011-01-03 07:00:00 +e2233470-f98a-4240-be95-df9b1c5eacda,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.6775913465991797,-0.3281724672048296,2011-01-03 07:00:00 +c7b9b6fc-93e4-4490-9619-55f67a480aad,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-1.009832423604613,-0.48908416493369605,2011-01-03 08:00:00 +93ee6eb9-03b2-41fd-a6bd-1a5ac74cc678,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-1.009832423604613,-0.48908416493369605,2011-01-03 08:00:00 +86027389-c1f1-473a-a7dc-ce4e87df61c9,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.8062984069548205,-0.390508141583766,2011-01-03 09:00:00 +74a28dc9-c950-4269-93c4-bf8287381248,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.8062984069548205,-0.390508141583766,2011-01-03 09:00:00 +16e81908-8c51-4759-ac2d-7cdb331ebe2f,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.9784447637769601,-0.47388242746003273,2011-01-03 10:00:00 +bf2ba786-0ac6-469b-ac8b-51a42d673590,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.9784447637769601,-0.47388242746003273,2011-01-03 10:00:00 +514af9bf-ee19-42fe-a91e-3a898d56360c,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-1.2120573868546007,-0.5870261847856876,2011-01-03 11:00:00 +0ca3dacf-fa19-47e6-8d71-a4b5da848010,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-1.2120573868546007,-0.5870261847856876,2011-01-03 11:00:00 +6592735d-b5d1-41da-aead-92c784663071,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-1.08140291739408,-0.5237473371300951,2011-01-03 12:00:00 +2ea30c73-4be7-4d94-92f6-92bfa2fcf16d,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-1.08140291739408,-0.5237473371300951,2011-01-03 12:00:00 +efcba061-4971-48a5-a59c-23a094ad74a7,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-1.4169332608223841,-0.686252099296259,2011-01-03 13:00:00 +0d74b2c9-8d1d-422e-bf1f-f3b48954f2f5,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-1.4169332608223841,-0.686252099296259,2011-01-03 13:00:00 +0f7f8610-0e3f-4ee4-acfc-18c63ed3546b,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-1.5252263886765398,-0.7387008549180584,2011-01-03 14:00:00 +c0925a04-1ef7-4bce-90d4-5da8734bd203,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-1.5252263886765398,-0.7387008549180584,2011-01-03 14:00:00 +0d94cc4a-259a-405b-a8e5-8d41ea21eb18,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-1.2868372575870357,-0.6232437291783229,2011-01-03 15:00:00 +22c9d195-c01b-439c-bed5-55f050d7418c,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-1.2868372575870357,-0.6232437291783229,2011-01-03 15:00:00 +d9588021-c3fe-403d-96ee-ed08cccd53d0,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.8523806614716288,-0.41282679608702033,2011-01-03 16:00:00 +d0e4cb19-1091-45d5-a4ae-2b35b2ea13bb,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.8523806614716288,-0.41282679608702033,2011-01-03 16:00:00 +5ae72022-ec85-4ecd-b4bc-37258206f845,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.8723497046476517,-0.42249824510962963,2011-01-03 17:00:00 +90c2b0b3-d4cb-4685-912c-2bd0674a49ce,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.8723497046476517,-0.42249824510962963,2011-01-03 17:00:00 +0df2996b-6336-4508-85f2-3071c64e3701,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.7834227551689714,-0.3794289577613058,2011-01-03 18:00:00 +2b0f8993-560e-4e4c-b8dd-faf3bc1ef475,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.7834227551689714,-0.3794289577613058,2011-01-03 18:00:00 +3e59d411-4169-480a-8567-ecec0aacb667,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.46916511355848733,-0.2272270353151367,2011-01-03 19:00:00 +89528d14-76e5-4401-a683-a4c07fac1c00,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.46916511355848733,-0.2272270353151367,2011-01-03 19:00:00 +797ee4fb-295f-4b85-8d9d-23ed6e898e37,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.36143225859150935,-0.1750496322373388,2011-01-03 20:00:00 +65266b16-8aae-4904-8fe8-e97465f0730f,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.36143225859150935,-0.1750496322373388,2011-01-03 20:00:00 +1475fc26-e6d8-4d0c-bce2-375e46dcd41d,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.3751862434888121,-0.1817109911527085,2011-01-03 21:00:00 +cf22ecd6-45b5-49b0-919c-736361d96c48,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.3751862434888121,-0.1817109911527085,2011-01-03 21:00:00 +d710ab62-6955-4a54-aace-659ecb159ee6,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.29056204592907253,-0.1407256216703612,2011-01-03 22:00:00 +1878bc12-7d78-475c-bd7c-3f1b0bbb2c75,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.29056204592907253,-0.1407256216703612,2011-01-03 22:00:00 +2368adf0-f712-4356-a81a-4b4a7df5e73f,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.7166785625571813,-0.3471032699098606,2011-01-03 23:00:00 +6505f762-39e6-409e-8f06-e7ac6121afca,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.7166785625571813,-0.3471032699098606,2011-01-03 23:00:00 +39dcd9d8-8764-412b-aaa7-a3bfdb5be3f1,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.09227124759165843,-0.044689004849606646,2011-01-04 00:00:00 +7a43651f-122c-422a-af81-4ab84ceae6ae,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.09227124759165843,-0.044689004849606646,2011-01-04 00:00:00 +73f58248-2b95-48c6-84b7-a03604cdb41f,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.16170291318306157,-0.07831629527123292,2011-01-04 01:00:00 +0603e9c2-05bc-43e5-972e-8a1be0c264fe,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.16170291318306157,-0.07831629527123292,2011-01-04 01:00:00 +55a9b51f-cdc0-40b2-9370-197c9e5f1051,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.20826742975071427,-0.10086851994603553,2011-01-04 02:00:00 +5d5c1fa8-25c3-405a-be86-bfbbc1305224,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.20826742975071427,-0.10086851994603553,2011-01-04 02:00:00 +4de6398b-8b85-4ee0-8386-c64d73e097c9,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.24312665748562165,-0.11775161449562792,2011-01-04 03:00:00 +78cf6f20-ca5c-487c-a32d-e6fd508841c7,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.24312665748562165,-0.11775161449562792,2011-01-04 03:00:00 +5a929cf8-0ddb-45e9-97fe-7f75f97fd16d,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.39244850039747653,-0.19007148375296465,2011-01-04 04:00:00 +d605b3f5-a094-4b6f-9499-77929e629b7f,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.39244850039747653,-0.19007148375296465,2011-01-04 04:00:00 +1395df55-bc26-4998-8674-3f266efcc303,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.2828153244546617,-0.13697371322028196,2011-01-04 05:00:00 +fc17fddd-97c0-47e7-bbc4-a54adf8e50d4,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.2828153244546617,-0.13697371322028196,2011-01-04 05:00:00 +8815724c-11de-43aa-8bd1-980fcee7e5f8,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.390987190651292,-0.18936373914087248,2011-01-04 06:00:00 +b8185fd0-bd65-4597-8cc0-4b2051ca0e8c,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.390987190651292,-0.18936373914087248,2011-01-04 06:00:00 +8c19bbec-5be5-4766-be8e-5570834f6e51,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.6775913465991797,-0.3281724672048296,2011-01-04 07:00:00 +bf930084-4fb2-4405-9983-64f6a807a857,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.6775913465991797,-0.3281724672048296,2011-01-04 07:00:00 +331a995a-6ab2-44fd-959b-1303797cf235,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-1.009832423604613,-0.48908416493369605,2011-01-04 08:00:00 +c33b5915-94af-49dd-836b-b9a52a291aed,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-1.009832423604613,-0.48908416493369605,2011-01-04 08:00:00 +334672a2-eca4-4a7b-b361-e12409d78ed6,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.8062984069548205,-0.390508141583766,2011-01-04 09:00:00 +3ebfe4c5-5b63-4090-b76d-f2f47fc4f691,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.8062984069548205,-0.390508141583766,2011-01-04 09:00:00 +2903dbe6-1379-4efe-aae7-3816b7de6c7b,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.9784447637769601,-0.47388242746003273,2011-01-04 10:00:00 +83955600-8519-41f4-bafb-d91dd319fc10,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.9784447637769601,-0.47388242746003273,2011-01-04 10:00:00 +add2f3d4-13ff-47ec-9649-ea38d9befa8d,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-1.2120573868546007,-0.5870261847856876,2011-01-04 11:00:00 +fe498707-3b12-4fc5-a31b-ed359667cac3,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-1.2120573868546007,-0.5870261847856876,2011-01-04 11:00:00 +aa7f92df-c008-49c7-a454-a6e2eb90a416,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-1.08140291739408,-0.5237473371300951,2011-01-04 12:00:00 +4e22babb-8482-4f0a-99e3-c60f37952986,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-1.08140291739408,-0.5237473371300951,2011-01-04 12:00:00 +252d4f94-68aa-4088-adc9-ad3188fa44ac,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-1.4169332608223841,-0.686252099296259,2011-01-04 13:00:00 +164d263c-f7a1-4e50-bea1-4e407b7047a5,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-1.4169332608223841,-0.686252099296259,2011-01-04 13:00:00 +6529898c-bccf-4453-a713-61ead0ecfdd6,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-1.5252263886765398,-0.7387008549180584,2011-01-04 14:00:00 +bc7dc858-2591-4870-bce7-4574b71c45dd,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-1.5252263886765398,-0.7387008549180584,2011-01-04 14:00:00 +7c3d2f32-972a-49df-8fd4-1c9d048e688f,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-1.2868372575870357,-0.6232437291783229,2011-01-04 15:00:00 +b33e3cda-8170-4636-9d1d-f4f94f432bc7,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-1.2868372575870357,-0.6232437291783229,2011-01-04 15:00:00 +8841f5d2-5982-43a3-877a-ef73c13537d2,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.8523806614716288,-0.41282679608702033,2011-01-04 16:00:00 +87fa0070-d495-44cb-b482-82099de860ba,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.8523806614716288,-0.41282679608702033,2011-01-04 16:00:00 +7c552ae1-3633-4f3b-8b75-83127686e96d,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.8723497046476517,-0.42249824510962963,2011-01-04 17:00:00 +d31fd9fd-36fd-46cf-9cc3-44fd0df9255a,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.8723497046476517,-0.42249824510962963,2011-01-04 17:00:00 +d2e63510-af05-4d5e-9c00-b92cf902ab76,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.7834227551689714,-0.3794289577613058,2011-01-04 18:00:00 +c2450765-05f9-4245-b898-9ca4741a1110,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.7834227551689714,-0.3794289577613058,2011-01-04 18:00:00 +668c10b9-2a23-4270-9546-366def339811,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.46916511355848733,-0.2272270353151367,2011-01-04 19:00:00 +76378686-6306-4a7f-9a0d-8aba27bbeb67,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.46916511355848733,-0.2272270353151367,2011-01-04 19:00:00 +f7ac2c43-4461-4e9c-8fdd-28f0f56d4540,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.36143225859150935,-0.1750496322373388,2011-01-04 20:00:00 +d70762f9-dd71-49f2-a9aa-21bcf42bc0da,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.36143225859150935,-0.1750496322373388,2011-01-04 20:00:00 +819a83a9-0beb-4a40-8173-1428428312a2,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.3751862434888121,-0.1817109911527085,2011-01-04 21:00:00 +89898942-0770-43c8-9b7d-650251907ede,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.3751862434888121,-0.1817109911527085,2011-01-04 21:00:00 +78a59183-ad48-4c67-96a1-3ed7d537a612,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.29056204592907253,-0.1407256216703612,2011-01-04 22:00:00 +85845692-e72d-4679-95cc-e0875e7ec80a,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.29056204592907253,-0.1407256216703612,2011-01-04 22:00:00 +10552a60-82a0-46fd-992d-59cec5ebe02a,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.7166785625571813,-0.3471032699098606,2011-01-04 23:00:00 +3e74ea7e-0bec-4ff2-a27c-d1b76584930b,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.7166785625571813,-0.3471032699098606,2011-01-04 23:00:00 +9f64a13f-1c3f-4177-bf0d-b0be47ea5862,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.09227124759165843,-0.044689004849606646,2011-01-05 00:00:00 +3e28ab1f-7405-4a0d-9c16-cbcad7474f55,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.09227124759165843,-0.044689004849606646,2011-01-05 00:00:00 +346887f1-fae5-43d9-8a8f-b587945fe199,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.16170291318306157,-0.07831629527123292,2011-01-05 01:00:00 +a0ebcd44-4059-4e06-9b80-4a37d6a7fc3a,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.16170291318306157,-0.07831629527123292,2011-01-05 01:00:00 +2b9d3331-af5e-40df-b7ce-c2266f0c2353,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.20826742975071427,-0.10086851994603553,2011-01-05 02:00:00 +1854d6b1-efaf-45ce-98ed-c4d4cdcfe3fc,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.20826742975071427,-0.10086851994603553,2011-01-05 02:00:00 +1307ea54-f0e1-4ecf-ae6a-4b0100488c38,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.24312665748562165,-0.11775161449562792,2011-01-05 03:00:00 +d1ff7ed3-5321-447c-8e29-c7d52a032fbe,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.24312665748562165,-0.11775161449562792,2011-01-05 03:00:00 +e44416f1-dd69-4b66-97e2-28f94c13e889,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.39244850039747653,-0.19007148375296465,2011-01-05 04:00:00 +63606828-0cf0-4b80-90b3-6bd203052c89,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.39244850039747653,-0.19007148375296465,2011-01-05 04:00:00 +026a75fa-1948-4e12-a7be-f003c5c57a00,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.2828153244546617,-0.13697371322028196,2011-01-05 05:00:00 +665de960-9465-47ec-a069-cf1e71124cea,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.2828153244546617,-0.13697371322028196,2011-01-05 05:00:00 +44d0c861-e389-4b25-afde-b19a3282fdf2,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.390987190651292,-0.18936373914087248,2011-01-05 06:00:00 +0a5920c8-ac35-41bd-9e5f-2acd4c0c021a,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.390987190651292,-0.18936373914087248,2011-01-05 06:00:00 +4842931d-9d35-4e6b-b33d-d58b1f2aade5,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.6775913465991797,-0.3281724672048296,2011-01-05 07:00:00 +8ca5ff4b-0924-4128-b3c9-0029fb5a5658,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.6775913465991797,-0.3281724672048296,2011-01-05 07:00:00 +7f922cf5-5a61-4cc3-a9c2-964688add7d4,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-1.009832423604613,-0.48908416493369605,2011-01-05 08:00:00 +1e33fc6a-df39-44f3-a027-3a2ddfe7827e,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-1.009832423604613,-0.48908416493369605,2011-01-05 08:00:00 +b5d806e4-c947-42fb-9d46-eb3c04be32a8,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.8062984069548205,-0.390508141583766,2011-01-05 09:00:00 +e7cb9281-a6a8-4060-a635-2a6568547556,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.8062984069548205,-0.390508141583766,2011-01-05 09:00:00 +9e649a17-9807-4dac-b41e-0aea93450b2a,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.9784447637769601,-0.47388242746003273,2011-01-05 10:00:00 +99f78093-4793-4b00-ba3f-4ff90bf943e2,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.9784447637769601,-0.47388242746003273,2011-01-05 10:00:00 +f9c83a41-0806-4460-8e65-ecfdbb51bb98,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-1.2120573868546007,-0.5870261847856876,2011-01-05 11:00:00 +107fb68c-c78e-42b6-98ab-74e5a7072bdd,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-1.2120573868546007,-0.5870261847856876,2011-01-05 11:00:00 +03345240-0edf-40e3-8bc0-b47d2b895393,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-1.08140291739408,-0.5237473371300951,2011-01-05 12:00:00 +7f1b9aa1-4048-4719-a119-5fb5616d2115,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-1.08140291739408,-0.5237473371300951,2011-01-05 12:00:00 +5aefa30c-f2dd-41cd-bdf7-b62bdd8dcc9f,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-1.4169332608223841,-0.686252099296259,2011-01-05 13:00:00 +1445206e-17aa-46f4-b939-49431c5f97da,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-1.4169332608223841,-0.686252099296259,2011-01-05 13:00:00 +38f5dd35-6ad6-497d-9886-c4f50fdab764,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-1.5252263886765398,-0.7387008549180584,2011-01-05 14:00:00 +2f67781b-9605-48d0-8d13-5a244b63f7eb,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-1.5252263886765398,-0.7387008549180584,2011-01-05 14:00:00 +a7176f4d-390f-4258-b0ac-a27593ccc970,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-1.2868372575870357,-0.6232437291783229,2011-01-05 15:00:00 +c790d8ff-98c8-4d9c-95ab-b6b39b87166e,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-1.2868372575870357,-0.6232437291783229,2011-01-05 15:00:00 +d610fbdf-f487-45a5-9176-ecc32b740953,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.8523806614716288,-0.41282679608702033,2011-01-05 16:00:00 +b3182e6f-d380-4aa1-a2d6-4e2429ccfdc0,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.8523806614716288,-0.41282679608702033,2011-01-05 16:00:00 +d178e4ec-683f-4cde-9e40-f0d1dbe5c3a7,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.8723497046476517,-0.42249824510962963,2011-01-05 17:00:00 +c040daf9-6ca6-483e-a25f-33185c55d3fc,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.8723497046476517,-0.42249824510962963,2011-01-05 17:00:00 +621c84dd-104d-41ff-a482-3fa85e2f3365,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.7834227551689714,-0.3794289577613058,2011-01-05 18:00:00 +64557042-1267-43ff-b43f-4c29e1e6bec1,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.7834227551689714,-0.3794289577613058,2011-01-05 18:00:00 +16d48a24-fb6f-481d-a9e0-a0f8ae42c1ee,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.46916511355848733,-0.2272270353151367,2011-01-05 19:00:00 +40bd784c-d27c-44e0-b1e9-8f2b7eacf388,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.46916511355848733,-0.2272270353151367,2011-01-05 19:00:00 +79a16f01-47b4-4fb5-a418-9a9f168d96a9,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.36143225859150935,-0.1750496322373388,2011-01-05 20:00:00 +383a5e58-03a4-49b5-883b-39b820e8b996,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.36143225859150935,-0.1750496322373388,2011-01-05 20:00:00 +e1cbe8c6-7cde-401d-b7f6-d4fc30fe9be0,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.3751862434888121,-0.1817109911527085,2011-01-05 21:00:00 +70393e37-1008-4ed2-a396-84d454fafc4c,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.3751862434888121,-0.1817109911527085,2011-01-05 21:00:00 +e96f414f-e31a-4c6b-b25b-551da37904b6,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.29056204592907253,-0.1407256216703612,2011-01-05 22:00:00 +d580f6f6-4112-4212-9c7a-ffaff869332f,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.29056204592907253,-0.1407256216703612,2011-01-05 22:00:00 +4500cd31-ade3-4527-bb50-9d5517c20160,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.7166785625571813,-0.3471032699098606,2011-01-05 23:00:00 +987ce0d3-68f0-4d30-807e-18c1bcb6619d,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.7166785625571813,-0.3471032699098606,2011-01-05 23:00:00 +f9d0c5d8-ac1e-40af-addf-ae628bfe0e1f,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.09227124759165843,-0.044689004849606646,2011-01-06 00:00:00 +be6b9f35-d883-4d1f-9979-8ed5144d083a,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.09227124759165843,-0.044689004849606646,2011-01-06 00:00:00 +2e940b2b-3f37-4deb-a145-c22bc2112288,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.16170291318306157,-0.07831629527123292,2011-01-06 01:00:00 +be134f3c-145d-480c-a82f-e7ccbef97986,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.16170291318306157,-0.07831629527123292,2011-01-06 01:00:00 +f9cef442-6e8e-467d-9c9e-f25f13af5b40,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.20826742975071427,-0.10086851994603553,2011-01-06 02:00:00 +ba1b2bdc-f21a-415c-8cea-202e1ec583c1,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.20826742975071427,-0.10086851994603553,2011-01-06 02:00:00 +ac212d0e-c0fe-469c-8086-9c6bf104d9d8,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.24312665748562165,-0.11775161449562792,2011-01-06 03:00:00 +8af2aa35-9f00-4c62-b72d-5146f6be682d,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.24312665748562165,-0.11775161449562792,2011-01-06 03:00:00 +bf0710fa-a419-46ad-a437-c87ee6eba11a,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.39244850039747653,-0.19007148375296465,2011-01-06 04:00:00 +83821dae-ed80-4843-af84-165d906ecbff,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.39244850039747653,-0.19007148375296465,2011-01-06 04:00:00 +c2e5a66f-39c3-4cb6-970c-442f8df364ad,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.2828153244546617,-0.13697371322028196,2011-01-06 05:00:00 +e4563c3d-fbaf-40ff-910b-bcb13020e318,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.2828153244546617,-0.13697371322028196,2011-01-06 05:00:00 +d82327f1-8ba8-4339-bbea-b2add2bce2b0,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.390987190651292,-0.18936373914087248,2011-01-06 06:00:00 +06c202e6-66b2-4ca2-bf12-8f83671e136b,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.390987190651292,-0.18936373914087248,2011-01-06 06:00:00 +a538a47f-6af9-4025-a98e-61be7d297b3f,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.6775913465991797,-0.3281724672048296,2011-01-06 07:00:00 +5e756b1f-164d-4736-a207-ff0fbdf71522,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.6775913465991797,-0.3281724672048296,2011-01-06 07:00:00 +ea0f3a3e-8e9a-4bef-a025-54375dec04f2,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-1.009832423604613,-0.48908416493369605,2011-01-06 08:00:00 +889e89b7-5196-4f7b-a8b2-89349647b222,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-1.009832423604613,-0.48908416493369605,2011-01-06 08:00:00 +0a78f21c-7cd2-4b60-8f24-f6e2f2d588dd,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.8062984069548205,-0.390508141583766,2011-01-06 09:00:00 +f371b9c6-bd98-48b5-876d-f7cdf855afb0,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.8062984069548205,-0.390508141583766,2011-01-06 09:00:00 +ad878cf2-bb7a-4bc7-a147-80ccd5da11f1,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.9784447637769601,-0.47388242746003273,2011-01-06 10:00:00 +217046d3-5cca-4418-90ad-396c4be6309f,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.9784447637769601,-0.47388242746003273,2011-01-06 10:00:00 +82562a91-67cf-4f17-92b3-9f2dded88d82,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-1.2120573868546007,-0.5870261847856876,2011-01-06 11:00:00 +a4496f2e-185c-41d8-a99f-895b9bdaa5a0,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-1.2120573868546007,-0.5870261847856876,2011-01-06 11:00:00 +b098f403-ccce-4754-aacd-4b237c69fe4c,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-1.08140291739408,-0.5237473371300951,2011-01-06 12:00:00 +d6aef90f-a1cd-48e2-a9f6-75cdff0a9655,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-1.08140291739408,-0.5237473371300951,2011-01-06 12:00:00 +eb32c979-2404-4990-a4c2-010d85f54a0a,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-1.4169332608223841,-0.686252099296259,2011-01-06 13:00:00 +75f55728-0956-475e-9e17-29d410cf0dbf,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-1.4169332608223841,-0.686252099296259,2011-01-06 13:00:00 +eb39fefd-86b4-4c6f-afb6-0ccdaa086bd8,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-1.5252263886765398,-0.7387008549180584,2011-01-06 14:00:00 +4e7e9034-0aaa-48ac-bb0f-fea3c01e34aa,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-1.5252263886765398,-0.7387008549180584,2011-01-06 14:00:00 +59192825-6875-4247-9348-ac3a1886b49c,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-1.2868372575870357,-0.6232437291783229,2011-01-06 15:00:00 +177eb5b5-c244-4d24-9b69-184bf33d391b,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-1.2868372575870357,-0.6232437291783229,2011-01-06 15:00:00 +1480d116-4157-4f57-9bd9-850c58861b63,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.8523806614716288,-0.41282679608702033,2011-01-06 16:00:00 +1e0ec1a3-720f-4844-a262-8203527ef105,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.8523806614716288,-0.41282679608702033,2011-01-06 16:00:00 +659625ed-3eec-4727-95d0-0e8cbf3ce3c6,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.8723497046476517,-0.42249824510962963,2011-01-06 17:00:00 +aca7bc41-18ff-4a2e-bd62-5a84fb7225a9,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.8723497046476517,-0.42249824510962963,2011-01-06 17:00:00 +d6264e25-e1a8-4968-a0b5-5ff5a245c07c,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.7834227551689714,-0.3794289577613058,2011-01-06 18:00:00 +9bc8b84d-df3d-440b-9316-a763688ce6a5,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.7834227551689714,-0.3794289577613058,2011-01-06 18:00:00 +16c37f6b-1504-4c5c-9543-77b73b7980d1,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.46916511355848733,-0.2272270353151367,2011-01-06 19:00:00 +5ae9c671-5406-4a27-8c85-761f30d789fa,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.46916511355848733,-0.2272270353151367,2011-01-06 19:00:00 +580eca4d-1a21-4346-8864-2af12579a7f3,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.36143225859150935,-0.1750496322373388,2011-01-06 20:00:00 +a3982d21-233a-4237-8e84-a83c7aeee80a,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.36143225859150935,-0.1750496322373388,2011-01-06 20:00:00 +14079245-44bf-49e9-b2b7-3512bd510fb2,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.3751862434888121,-0.1817109911527085,2011-01-06 21:00:00 +18e16cfc-deac-40a2-85f2-64930e9be5cd,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.3751862434888121,-0.1817109911527085,2011-01-06 21:00:00 +3d36b4d9-8920-4feb-8ad1-99c6fc057b94,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.29056204592907253,-0.1407256216703612,2011-01-06 22:00:00 +24958cb3-41bd-4acf-a95f-1b7391ec162d,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.29056204592907253,-0.1407256216703612,2011-01-06 22:00:00 +7532440f-f11d-4424-a055-4d890e8bb183,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.7166785625571813,-0.3471032699098606,2011-01-06 23:00:00 +7b2fcfed-3bd5-4f3d-9380-3d40992fdb6f,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.7166785625571813,-0.3471032699098606,2011-01-06 23:00:00 +0607b280-fc86-44af-9384-49806cc5daf5,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.09227124759165843,-0.044689004849606646,2011-01-07 00:00:00 +4b4d7482-e496-462d-bd33-33e96a7ae7fa,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.09227124759165843,-0.044689004849606646,2011-01-07 00:00:00 +e6bd7ee9-8695-45f6-aef6-b1afcac6b835,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.16170291318306157,-0.07831629527123292,2011-01-07 01:00:00 +4a6a3dc7-2772-4606-976d-788a7a6d6193,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.16170291318306157,-0.07831629527123292,2011-01-07 01:00:00 +e229e565-657b-4dba-aac3-6c02fa9fd623,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.20826742975071427,-0.10086851994603553,2011-01-07 02:00:00 +35c50b54-4890-48ba-b603-40ba956e4f3c,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.20826742975071427,-0.10086851994603553,2011-01-07 02:00:00 +d711d569-f767-49b4-8b62-f7ac8fe6af3f,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.24312665748562165,-0.11775161449562792,2011-01-07 03:00:00 +b54b63f7-73c4-44d9-b76d-fb81f5045b18,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.24312665748562165,-0.11775161449562792,2011-01-07 03:00:00 +a2d343c8-e967-4ee9-b128-1f6d9dfa6216,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.39244850039747653,-0.19007148375296465,2011-01-07 04:00:00 +129cb672-f7c8-4c4c-ac45-15d3509bce1b,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.39244850039747653,-0.19007148375296465,2011-01-07 04:00:00 +93f510d8-7ae1-477d-a67d-ec9ccc16b7d0,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.2828153244546617,-0.13697371322028196,2011-01-07 05:00:00 +aee1d785-3028-44b5-86e4-b75564ebf11a,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.2828153244546617,-0.13697371322028196,2011-01-07 05:00:00 +b69ed44d-61e2-4774-adcb-9e6f045dd245,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.390987190651292,-0.18936373914087248,2011-01-07 06:00:00 +193f6ad5-f987-4cfe-8949-b6de64a6e160,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.390987190651292,-0.18936373914087248,2011-01-07 06:00:00 +d4509415-e7c5-4de8-9969-5308af192c1a,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.6775913465991797,-0.3281724672048296,2011-01-07 07:00:00 +0b79fb40-3a50-4c67-8121-858d58fcc0b4,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.6775913465991797,-0.3281724672048296,2011-01-07 07:00:00 +d8af015e-8e82-4bcd-91cc-8eacb7c1b8c4,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-1.009832423604613,-0.48908416493369605,2011-01-07 08:00:00 +55ace958-48fc-48cb-a5e7-c0204225bed6,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-1.009832423604613,-0.48908416493369605,2011-01-07 08:00:00 +7e8c6aa6-3721-4449-8bd2-3e9214536102,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.8062984069548205,-0.390508141583766,2011-01-07 09:00:00 +38c8ef49-7981-43e8-a6fb-571ebf05b79f,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.8062984069548205,-0.390508141583766,2011-01-07 09:00:00 +6cdffb34-d18e-4020-b6c4-bb19311e172b,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.9784447637769601,-0.47388242746003273,2011-01-07 10:00:00 +248f251d-d48d-4634-b7a9-f7eb087208fe,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.9784447637769601,-0.47388242746003273,2011-01-07 10:00:00 +34bb0ac4-2a5f-4211-bc26-9bddcafc4d22,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-1.2120573868546007,-0.5870261847856876,2011-01-07 11:00:00 +af9b8a2a-f3df-4ff2-be24-1891a639f0a3,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-1.2120573868546007,-0.5870261847856876,2011-01-07 11:00:00 +ac94a3c0-2b59-4855-ab8d-fc2d17169346,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-1.08140291739408,-0.5237473371300951,2011-01-07 12:00:00 +aa6bc3c8-d706-4652-b45e-b78a9e66cbcc,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-1.08140291739408,-0.5237473371300951,2011-01-07 12:00:00 +9c86637d-8fdc-45fd-bd19-34f6c32490fe,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-1.4169332608223841,-0.686252099296259,2011-01-07 13:00:00 +ba1d8b0c-a865-4c47-a265-c50e8f193d19,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-1.4169332608223841,-0.686252099296259,2011-01-07 13:00:00 +e52d495f-6f05-4715-979c-e37cbd4177a7,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-1.5252263886765398,-0.7387008549180584,2011-01-07 14:00:00 +b9f45469-d4ce-46cf-ba41-c974fded27bc,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-1.5252263886765398,-0.7387008549180584,2011-01-07 14:00:00 +fe7d0d3b-24d9-4f4a-9f5c-64357c275428,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-1.2868372575870357,-0.6232437291783229,2011-01-07 15:00:00 +b5c1255d-0a99-457d-9450-1dacf3773f0f,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-1.2868372575870357,-0.6232437291783229,2011-01-07 15:00:00 +ae4806c8-a036-4ebc-9c97-2ed6ef6302e0,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.8523806614716288,-0.41282679608702033,2011-01-07 16:00:00 +2fe68d4a-163a-45e5-a014-d70ff7ab85c7,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.8523806614716288,-0.41282679608702033,2011-01-07 16:00:00 +40ff875a-0d01-41f7-9e5f-e985b037a6e7,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.8723497046476517,-0.42249824510962963,2011-01-07 17:00:00 +3e5a0b11-bf6f-4d68-8eee-78c7a3998386,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.8723497046476517,-0.42249824510962963,2011-01-07 17:00:00 +38b0020b-64a9-4374-8ad9-19291e594061,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.7834227551689714,-0.3794289577613058,2011-01-07 18:00:00 +f3025658-852d-4eb5-881e-19ebf664890f,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.7834227551689714,-0.3794289577613058,2011-01-07 18:00:00 +2cd8479e-782f-475b-82d5-b66a294be1d5,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.46916511355848733,-0.2272270353151367,2011-01-07 19:00:00 +7315ddb3-a49d-4213-abb0-76d4757f6910,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.46916511355848733,-0.2272270353151367,2011-01-07 19:00:00 +11b7747c-3294-4cb5-bce2-14ff54d3701a,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.36143225859150935,-0.1750496322373388,2011-01-07 20:00:00 +90c7d255-e030-4300-b800-552c25bdb35c,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.36143225859150935,-0.1750496322373388,2011-01-07 20:00:00 +40e26935-7eb1-4fff-889c-fb09f956fb39,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.3751862434888121,-0.1817109911527085,2011-01-07 21:00:00 +d4e30637-0bb6-47b2-b67f-b6c44b7f2045,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.3751862434888121,-0.1817109911527085,2011-01-07 21:00:00 +b80f2580-4e7a-49c9-9658-1d8c69a26763,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.29056204592907253,-0.1407256216703612,2011-01-07 22:00:00 +e1ee03da-1409-4680-b662-6ec071453c48,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.29056204592907253,-0.1407256216703612,2011-01-07 22:00:00 +5a1409ba-28cc-40b1-a3c3-f7b71777086b,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.7166785625571813,-0.3471032699098606,2011-01-07 23:00:00 +de3835d4-b6ee-4a88-9641-24b44c64ead5,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.7166785625571813,-0.3471032699098606,2011-01-07 23:00:00 +7adc9791-ff3c-4937-9a97-78b1a1b88912,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.09227124759165843,-0.044689004849606646,2011-01-08 00:00:00 +b4d8b0fd-179a-4288-a8b4-df986d7caaa1,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.09227124759165843,-0.044689004849606646,2011-01-08 00:00:00 +2a15eced-41e4-479c-955e-bfaf2aef84cc,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.16170291318306157,-0.07831629527123292,2011-01-08 01:00:00 +56b43e09-223b-4b6e-92bd-cb5267aa510c,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.16170291318306157,-0.07831629527123292,2011-01-08 01:00:00 +268e8d42-54fb-4ce3-b1ec-d0518fc7bff9,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.20826742975071427,-0.10086851994603553,2011-01-08 02:00:00 +8b98d78a-5c49-4d7a-841c-0a286273f3ed,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.20826742975071427,-0.10086851994603553,2011-01-08 02:00:00 +09dc6ec4-cd50-47ef-8735-9fd4ad7171b5,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.24312665748562165,-0.11775161449562792,2011-01-08 03:00:00 +531418cf-41d7-4c03-877f-5a3d4bb66405,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.24312665748562165,-0.11775161449562792,2011-01-08 03:00:00 +7f81fbcc-19a5-45a9-a7ec-c4282397a84d,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.39244850039747653,-0.19007148375296465,2011-01-08 04:00:00 +c087abc0-de1e-4fc3-90dc-8c46d060b5b5,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.39244850039747653,-0.19007148375296465,2011-01-08 04:00:00 +b7e715be-2823-407b-ad3a-86a53201ab20,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.2828153244546617,-0.13697371322028196,2011-01-08 05:00:00 +4450f1d2-8281-4e15-8470-8179a280b8bb,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.2828153244546617,-0.13697371322028196,2011-01-08 05:00:00 +169c716f-f856-49ca-860e-692bdf5bcb4e,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.390987190651292,-0.18936373914087248,2011-01-08 06:00:00 +4c24d4c2-e337-499a-95a4-a1675bbc9605,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.390987190651292,-0.18936373914087248,2011-01-08 06:00:00 +0d3b5ddb-d33c-4db3-9a6f-929b0e6006d7,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.6775913465991797,-0.3281724672048296,2011-01-08 07:00:00 +83c8317f-1cf2-483e-8a21-eb4d4fe613e4,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.6775913465991797,-0.3281724672048296,2011-01-08 07:00:00 +e5a12cf1-2193-4c07-9d75-d32da4ad6019,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-1.009832423604613,-0.48908416493369605,2011-01-08 08:00:00 +8f74bc5f-938b-4d04-a0f6-236c3633787a,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-1.009832423604613,-0.48908416493369605,2011-01-08 08:00:00 +2f1c5194-51e2-4c6a-93cb-b3cd5bf13d8a,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.8062984069548205,-0.390508141583766,2011-01-08 09:00:00 +3644ef54-c0df-47cc-b59a-97027dcca292,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.8062984069548205,-0.390508141583766,2011-01-08 09:00:00 +d6383aaa-02ec-4919-9412-41ca78a9fef9,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.9784447637769601,-0.47388242746003273,2011-01-08 10:00:00 +18d9a835-0410-4fe2-aae0-8f557b6b2843,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.9784447637769601,-0.47388242746003273,2011-01-08 10:00:00 +774aaec6-8c72-45f1-acf6-3c06a57d1b18,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-1.2120573868546007,-0.5870261847856876,2011-01-08 11:00:00 +cf4972ba-597e-434b-84f1-8c0f0f99dc14,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-1.2120573868546007,-0.5870261847856876,2011-01-08 11:00:00 +e6a81bae-8938-4ffb-8298-eeaab16c8cf1,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-1.08140291739408,-0.5237473371300951,2011-01-08 12:00:00 +e4419a1c-0aa9-4d82-b4a6-8d81a9414f39,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-1.08140291739408,-0.5237473371300951,2011-01-08 12:00:00 +4c1ee5d7-9a7c-4298-9422-8e3c2a905c67,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-1.4169332608223841,-0.686252099296259,2011-01-08 13:00:00 +4ec190ed-94da-4fbb-9f93-2f07c9e1dd57,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-1.4169332608223841,-0.686252099296259,2011-01-08 13:00:00 +6f8a7f61-910b-4ffa-bd9f-5af68017107d,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-1.5252263886765398,-0.7387008549180584,2011-01-08 14:00:00 +0f5f9cb8-58dd-4882-8b44-10987b1d127b,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-1.5252263886765398,-0.7387008549180584,2011-01-08 14:00:00 +4bc76aa5-3176-48a1-bd3b-0832202fa32e,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-1.2868372575870357,-0.6232437291783229,2011-01-08 15:00:00 +18433917-c127-4dae-9eb1-91ffbf997549,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-1.2868372575870357,-0.6232437291783229,2011-01-08 15:00:00 +ca427611-6fa6-4050-9e48-b16fd0c7885d,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.8523806614716288,-0.41282679608702033,2011-01-08 16:00:00 +5650bf16-bcbc-4208-a52e-527af44c3f2b,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.8523806614716288,-0.41282679608702033,2011-01-08 16:00:00 +bd1165ac-aa64-4f52-886f-9cd15ae5c61d,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.8723497046476517,-0.42249824510962963,2011-01-08 17:00:00 +08e821b7-e15f-49b9-84c2-5b3870ec35fd,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.8723497046476517,-0.42249824510962963,2011-01-08 17:00:00 +bd49f6a2-815b-402d-a438-10fd9c788902,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.7834227551689714,-0.3794289577613058,2011-01-08 18:00:00 +edd3c9d8-7d63-4754-a62c-8cb109ba1178,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.7834227551689714,-0.3794289577613058,2011-01-08 18:00:00 +3f277d24-39e0-4d61-88ec-1bcaa340d599,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.46916511355848733,-0.2272270353151367,2011-01-08 19:00:00 +37378dde-8c4c-46a4-9a70-c099cff01f0d,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.46916511355848733,-0.2272270353151367,2011-01-08 19:00:00 +147ba412-9827-4ecf-8098-cab0903a7282,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.36143225859150935,-0.1750496322373388,2011-01-08 20:00:00 +50791401-d861-44e2-aeaf-fba056337d66,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.36143225859150935,-0.1750496322373388,2011-01-08 20:00:00 +f2d66ab3-39ea-47bc-a828-20a2b551e902,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.3751862434888121,-0.1817109911527085,2011-01-08 21:00:00 +1bf35efc-6815-4df5-8263-adc70e6ccaed,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.3751862434888121,-0.1817109911527085,2011-01-08 21:00:00 +4ce9e428-4696-40e3-99e9-cbb4d68218de,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.29056204592907253,-0.1407256216703612,2011-01-08 22:00:00 +63a66b72-3b11-4962-9518-3ffbd9225817,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.29056204592907253,-0.1407256216703612,2011-01-08 22:00:00 +0e1c4d3f-d8c8-405e-b787-be9e4ef57b28,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.7166785625571813,-0.3471032699098606,2011-01-08 23:00:00 +4126ce9a-673a-444b-b0dd-f8b30511d866,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.7166785625571813,-0.3471032699098606,2011-01-08 23:00:00 +87834dd5-2fce-4c1a-b97b-f21a6816e1e7,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.09227124759165843,-0.044689004849606646,2011-01-09 00:00:00 +d5255278-82cb-47e1-bb7c-4efbbb46285d,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.09227124759165843,-0.044689004849606646,2011-01-09 00:00:00 +21ed175d-a1bf-494a-a2ff-76eb04b403a1,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.16170291318306157,-0.07831629527123292,2011-01-09 01:00:00 +b23a4261-6fa1-46ec-8601-0afde604a9e7,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.16170291318306157,-0.07831629527123292,2011-01-09 01:00:00 +ae97212a-7573-49c6-b591-f93d3a73229f,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.20826742975071427,-0.10086851994603553,2011-01-09 02:00:00 +1aa8bd8d-4c54-46c2-923d-f6fdfe344588,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.20826742975071427,-0.10086851994603553,2011-01-09 02:00:00 +ed09b6b5-5c44-4fa4-8c8f-42b82a9fbfb2,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.24312665748562165,-0.11775161449562792,2011-01-09 03:00:00 +7145479e-cd5c-4066-a8f5-9d78c81b415f,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.24312665748562165,-0.11775161449562792,2011-01-09 03:00:00 +beb4332d-a300-4919-b0a5-ec64a2bcdd99,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.39244850039747653,-0.19007148375296465,2011-01-09 04:00:00 +5b2a558f-ed69-4c74-b564-372904ba6b0b,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.39244850039747653,-0.19007148375296465,2011-01-09 04:00:00 +776f60f9-870a-471c-b92d-e119448b64dc,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.2828153244546617,-0.13697371322028196,2011-01-09 05:00:00 +c74dac33-6e6e-41a9-8fd7-8d889b9f570e,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.2828153244546617,-0.13697371322028196,2011-01-09 05:00:00 +d9318807-b3c6-47cc-8701-b2fa6056c692,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.390987190651292,-0.18936373914087248,2011-01-09 06:00:00 +94bc2e6c-2c33-4a89-95ed-26baa82fbc32,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.390987190651292,-0.18936373914087248,2011-01-09 06:00:00 +92ce8270-1d8e-4802-9e0b-49f03a1296c3,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.6775913465991797,-0.3281724672048296,2011-01-09 07:00:00 +aa388d08-1374-424f-b9f4-d4ae29b4ceef,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.6775913465991797,-0.3281724672048296,2011-01-09 07:00:00 +4edba2a5-7ba8-41c9-a35d-4f42c4288f24,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-1.009832423604613,-0.48908416493369605,2011-01-09 08:00:00 +db3e7cbd-8e47-4120-b543-428e5d5650a0,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-1.009832423604613,-0.48908416493369605,2011-01-09 08:00:00 +670c09d7-6cc9-451c-9be7-8131ff16937a,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.8062984069548205,-0.390508141583766,2011-01-09 09:00:00 +d3596d31-4f7a-4518-a084-78bb2c9547e6,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.8062984069548205,-0.390508141583766,2011-01-09 09:00:00 +84ed866c-7e59-474d-aa1d-037bb0e692e8,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.9784447637769601,-0.47388242746003273,2011-01-09 10:00:00 +90b7bc71-a983-42bb-81c4-36219463f139,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.9784447637769601,-0.47388242746003273,2011-01-09 10:00:00 +6c402b5c-34c8-4293-b0be-09cca7ad2193,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-1.2120573868546007,-0.5870261847856876,2011-01-09 11:00:00 +d077dc35-7e95-4929-8fdd-6f949dcd5e4f,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-1.2120573868546007,-0.5870261847856876,2011-01-09 11:00:00 +6c6546e4-88b2-48fb-b082-6f903b893f6b,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-1.08140291739408,-0.5237473371300951,2011-01-09 12:00:00 +a33e97ae-76bb-47f8-a982-2043840188bf,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-1.08140291739408,-0.5237473371300951,2011-01-09 12:00:00 +68038c55-a07a-4739-a335-4f08f35dfd39,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-1.4169332608223841,-0.686252099296259,2011-01-09 13:00:00 +86c638c6-42e2-4845-81fb-af836235daba,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-1.4169332608223841,-0.686252099296259,2011-01-09 13:00:00 +b83b8979-5921-42d0-932b-fa6d6eb4a53f,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-1.5252263886765398,-0.7387008549180584,2011-01-09 14:00:00 +315c7f77-bbda-4ce5-bed5-0fadcdfda570,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-1.5252263886765398,-0.7387008549180584,2011-01-09 14:00:00 +89e57e57-851b-4b7c-a6b7-ae750224d333,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-1.2868372575870357,-0.6232437291783229,2011-01-09 15:00:00 +d6bb92cd-b793-40d7-81f5-4348d8967673,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-1.2868372575870357,-0.6232437291783229,2011-01-09 15:00:00 +e42cc6ef-d472-41e4-b7fb-245c228cbc45,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.8523806614716288,-0.41282679608702033,2011-01-09 16:00:00 +b31c12e2-1480-4b38-9642-a5b2bb56a7c6,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.8523806614716288,-0.41282679608702033,2011-01-09 16:00:00 +1422e9e9-86c9-42a8-9088-1a25099f4344,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.8723497046476517,-0.42249824510962963,2011-01-09 17:00:00 +7ee52b83-45a4-4069-b60e-82309ea0d77f,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.8723497046476517,-0.42249824510962963,2011-01-09 17:00:00 +af2af956-a48d-4b9e-9295-7ce888a55f83,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.7834227551689714,-0.3794289577613058,2011-01-09 18:00:00 +17788715-a166-41ae-9ecb-d48cfd1e16ff,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.7834227551689714,-0.3794289577613058,2011-01-09 18:00:00 +cbd29c3f-9321-47f9-9025-0bb2d7ce9324,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.46916511355848733,-0.2272270353151367,2011-01-09 19:00:00 +d2422a6d-6e4d-4e47-882c-a85195ff1c51,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.46916511355848733,-0.2272270353151367,2011-01-09 19:00:00 +3879bffd-39a7-4b3c-abd9-71937067fce8,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.36143225859150935,-0.1750496322373388,2011-01-09 20:00:00 +c762d199-2109-42bb-a7bb-ddb88fd9a3f7,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.36143225859150935,-0.1750496322373388,2011-01-09 20:00:00 +3852baf4-5f0e-4f83-b60a-454eef4177c8,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.3751862434888121,-0.1817109911527085,2011-01-09 21:00:00 +49aba523-034f-47e6-96f9-6a2c5abf2527,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.3751862434888121,-0.1817109911527085,2011-01-09 21:00:00 +7201de02-f3ba-43a1-b733-c3d8537baf08,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.29056204592907253,-0.1407256216703612,2011-01-09 22:00:00 +47529e98-4b2a-4ff7-b685-9ac7a5d81a45,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.29056204592907253,-0.1407256216703612,2011-01-09 22:00:00 +a912a3ce-3314-4e23-a272-51235f3fb22d,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.7166785625571813,-0.3471032699098606,2011-01-09 23:00:00 +16913f90-7673-4e98-a75b-75f3b27920d4,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.7166785625571813,-0.3471032699098606,2011-01-09 23:00:00 +936a5b67-fd79-4f79-8db6-c8589206882b,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.09227124759165843,-0.044689004849606646,2011-01-10 00:00:00 +e9ffd631-e259-4a8d-a90b-0f6f25126d6f,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.09227124759165843,-0.044689004849606646,2011-01-10 00:00:00 +67914228-0140-431c-a3d9-f4e5e5b63c77,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.16170291318306157,-0.07831629527123292,2011-01-10 01:00:00 +8b8bbc7c-ed8f-46b5-911e-7de88a000ad3,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.16170291318306157,-0.07831629527123292,2011-01-10 01:00:00 +a2fc0900-520a-43c7-961b-c17ad0b9719e,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.20826742975071427,-0.10086851994603553,2011-01-10 02:00:00 +ab785a9c-b032-422a-ba99-ec8d57ddd766,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.20826742975071427,-0.10086851994603553,2011-01-10 02:00:00 +32730781-4df4-43eb-995f-1c9c73f4a13b,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.24312665748562165,-0.11775161449562792,2011-01-10 03:00:00 +06a25151-e075-49ed-b0c9-06ab95ef0f8d,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.24312665748562165,-0.11775161449562792,2011-01-10 03:00:00 +76c9f2d3-d39b-4fd0-ae9c-0b24ef86dfb4,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.39244850039747653,-0.19007148375296465,2011-01-10 04:00:00 +a08237e3-39f8-4326-9afa-1469293ffefb,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.39244850039747653,-0.19007148375296465,2011-01-10 04:00:00 +c9f76040-9e7f-4e8b-9161-bf9452f51b35,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.2828153244546617,-0.13697371322028196,2011-01-10 05:00:00 +e14a91f3-3e39-4858-b580-c1300efc9cc3,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.2828153244546617,-0.13697371322028196,2011-01-10 05:00:00 +2b8399a2-523d-4366-bbcf-20443f137a06,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.390987190651292,-0.18936373914087248,2011-01-10 06:00:00 +a4d2ac6f-2ff5-4d0d-be25-109be4ce31e5,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.390987190651292,-0.18936373914087248,2011-01-10 06:00:00 +7b3ecce3-8859-40c1-8b0a-2e4c4336f7f0,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.6775913465991797,-0.3281724672048296,2011-01-10 07:00:00 +8584945f-26ba-4806-a24c-0bfe439909f6,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.6775913465991797,-0.3281724672048296,2011-01-10 07:00:00 +66269633-d74c-458f-bba7-c2fb3e3902b9,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-1.009832423604613,-0.48908416493369605,2011-01-10 08:00:00 +a08fc2b6-f098-4fb9-84f3-0262e361559a,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-1.009832423604613,-0.48908416493369605,2011-01-10 08:00:00 +d0b3a063-d3c5-4c2b-90ff-d9dc26852e80,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.8062984069548205,-0.390508141583766,2011-01-10 09:00:00 +3261ed3e-8d97-479d-93f3-0f636cb48720,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.8062984069548205,-0.390508141583766,2011-01-10 09:00:00 +148e7059-a100-4165-8bd7-e871eae06814,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.9784447637769601,-0.47388242746003273,2011-01-10 10:00:00 +41841791-ea09-4ad6-b7bc-7d96e2c2b486,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.9784447637769601,-0.47388242746003273,2011-01-10 10:00:00 +16d13e1d-93bc-4ebd-bf82-65a5fb92bac0,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-1.2120573868546007,-0.5870261847856876,2011-01-10 11:00:00 +7e89eb73-3177-4eab-b10a-6d692595a999,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-1.2120573868546007,-0.5870261847856876,2011-01-10 11:00:00 +45a6c5bb-2edf-41db-8e9d-ba754e682fd4,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-1.08140291739408,-0.5237473371300951,2011-01-10 12:00:00 +173c64e0-2850-4af8-b431-02d9a18101a1,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-1.08140291739408,-0.5237473371300951,2011-01-10 12:00:00 +7180cfcd-8f62-4d33-8d62-1f66af4e80e2,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-1.4169332608223841,-0.686252099296259,2011-01-10 13:00:00 +c0e54f58-a2f2-4b23-bb2b-b3de4469357a,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-1.4169332608223841,-0.686252099296259,2011-01-10 13:00:00 +07d20157-1b0a-4517-83fe-fc4045fa7e54,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-1.5252263886765398,-0.7387008549180584,2011-01-10 14:00:00 +7e41e5bf-006f-4a3f-b91b-13e99a308714,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-1.5252263886765398,-0.7387008549180584,2011-01-10 14:00:00 +af6644bb-45ae-49f0-b2c6-da118a29eeb3,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-1.2868372575870357,-0.6232437291783229,2011-01-10 15:00:00 +7941c4ba-2bf1-468f-a707-c7a8059671f8,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-1.2868372575870357,-0.6232437291783229,2011-01-10 15:00:00 +58567e66-444e-44d3-989d-58a3eb247c3f,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.8523806614716288,-0.41282679608702033,2011-01-10 16:00:00 +1fbe92b4-54d8-49b5-abea-c6904540dc9f,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.8523806614716288,-0.41282679608702033,2011-01-10 16:00:00 +66875b64-719f-45ed-93d4-6da9fbf6b0ff,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.8723497046476517,-0.42249824510962963,2011-01-10 17:00:00 +ceb669dd-7278-45c3-a71c-812ed3a23483,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.8723497046476517,-0.42249824510962963,2011-01-10 17:00:00 +4f6b9ff8-f098-4972-8d6d-8e24306d9759,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.7834227551689714,-0.3794289577613058,2011-01-10 18:00:00 +268c4758-e3f9-4ea0-9980-d86f70585314,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.7834227551689714,-0.3794289577613058,2011-01-10 18:00:00 +e9b51974-7b5c-42a0-9d80-1fbc9a9381d0,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.46916511355848733,-0.2272270353151367,2011-01-10 19:00:00 +9f19a4ca-6273-4dd0-af9d-bf0c66cff4b8,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.46916511355848733,-0.2272270353151367,2011-01-10 19:00:00 +ad6da0fd-e87a-4766-b16a-ca381b21d8a4,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.36143225859150935,-0.1750496322373388,2011-01-10 20:00:00 +1e2ca548-d465-43f1-8b64-f7a93061e1e8,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.36143225859150935,-0.1750496322373388,2011-01-10 20:00:00 +ae4781e0-ddaa-495b-9940-c36060bb1997,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.3751862434888121,-0.1817109911527085,2011-01-10 21:00:00 +0d33479a-01cc-47c5-a964-432faa1e351c,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.3751862434888121,-0.1817109911527085,2011-01-10 21:00:00 +eeb40222-793d-4d27-92bc-c8fc477d3eb4,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.29056204592907253,-0.1407256216703612,2011-01-10 22:00:00 +f50744c8-9117-4e5e-819d-46c9758d0841,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.29056204592907253,-0.1407256216703612,2011-01-10 22:00:00 +0f9fde1d-a16c-4a61-8a17-e49267499180,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.7166785625571813,-0.3471032699098606,2011-01-10 23:00:00 +5cc14a01-1f34-4b20-a57a-8427019407fe,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.7166785625571813,-0.3471032699098606,2011-01-10 23:00:00 +afeee654-700a-456b-a12a-c6e26fee08ff,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.09227124759165843,-0.044689004849606646,2011-01-11 00:00:00 +cba4d242-df94-412a-9d3d-d4590cc7c349,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.09227124759165843,-0.044689004849606646,2011-01-11 00:00:00 +eee7b077-da05-4330-9606-e48058aae151,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.16170291318306157,-0.07831629527123292,2011-01-11 01:00:00 +6da73ea3-b72e-4859-ba1d-f28759c71b5f,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.16170291318306157,-0.07831629527123292,2011-01-11 01:00:00 +47aa3cfe-af92-45b2-b576-67713ce4cf55,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.20826742975071427,-0.10086851994603553,2011-01-11 02:00:00 +abb9cbec-e087-42ff-8e24-e5a29fdb3e85,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.20826742975071427,-0.10086851994603553,2011-01-11 02:00:00 +88b5ecfc-d15c-4f95-a00c-9473a3d8a2df,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.24312665748562165,-0.11775161449562792,2011-01-11 03:00:00 +291fd0d4-1b2a-4943-957b-0d861c5eb8f5,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.24312665748562165,-0.11775161449562792,2011-01-11 03:00:00 +7872de96-1cec-44a3-8387-ea3f8edbdaa1,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.39244850039747653,-0.19007148375296465,2011-01-11 04:00:00 +4f7b55e6-6d25-47a9-8d9f-7129e0944d9d,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.39244850039747653,-0.19007148375296465,2011-01-11 04:00:00 +2664b768-c946-4d81-a75a-a785a384160a,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.2828153244546617,-0.13697371322028196,2011-01-11 05:00:00 +bec6da51-c477-4996-8a1e-f65312b28724,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.2828153244546617,-0.13697371322028196,2011-01-11 05:00:00 +2ab79b2e-0a20-47df-bc23-35b9548cd6a7,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.390987190651292,-0.18936373914087248,2011-01-11 06:00:00 +4d230ba6-25c7-47df-8e4b-aa51e4c9ee37,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.390987190651292,-0.18936373914087248,2011-01-11 06:00:00 +d52e8c5c-0e46-4f06-b74e-51bd94a2198e,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.6775913465991797,-0.3281724672048296,2011-01-11 07:00:00 +90c1e1a7-7fd3-4f04-9200-eb1b31b67af5,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.6775913465991797,-0.3281724672048296,2011-01-11 07:00:00 +b29f09e2-f054-498b-9d21-fe1ed69a53be,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-1.009832423604613,-0.48908416493369605,2011-01-11 08:00:00 +7df55acd-77dc-4f35-9a10-5f29744c4ef4,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-1.009832423604613,-0.48908416493369605,2011-01-11 08:00:00 +e13ad63f-38fc-466f-9bbb-a49543c10f7f,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.8062984069548205,-0.390508141583766,2011-01-11 09:00:00 +b521b672-bbc9-4ea1-a578-ed8870367f53,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.8062984069548205,-0.390508141583766,2011-01-11 09:00:00 +b55fa3ac-9169-41c1-b1e8-cf7ab8c74cd0,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.9784447637769601,-0.47388242746003273,2011-01-11 10:00:00 +7435a8d7-8164-47fb-bf88-4d40e4669504,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.9784447637769601,-0.47388242746003273,2011-01-11 10:00:00 +ba403f71-2a3a-4b27-bf24-61f457ff4ef7,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-1.2120573868546007,-0.5870261847856876,2011-01-11 11:00:00 +8aa47b5d-13b0-4c9c-8647-7b4547e9d750,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-1.2120573868546007,-0.5870261847856876,2011-01-11 11:00:00 +9b597285-93d2-4792-afc1-f9dbce40f995,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-1.08140291739408,-0.5237473371300951,2011-01-11 12:00:00 +d979198a-2d36-42cd-a1ae-c91466ee937b,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-1.08140291739408,-0.5237473371300951,2011-01-11 12:00:00 +1e85f3d2-37dc-42b7-aee8-c6ee6da67fe2,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-1.4169332608223841,-0.686252099296259,2011-01-11 13:00:00 +d1a1fda8-b013-4d26-8c3f-a1b480dcd53f,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-1.4169332608223841,-0.686252099296259,2011-01-11 13:00:00 +9e0d8422-ab57-4551-92c8-5213be41e59a,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-1.5252263886765398,-0.7387008549180584,2011-01-11 14:00:00 +85cfc7a8-f1c3-4f2b-8a87-f754a6120ef4,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-1.5252263886765398,-0.7387008549180584,2011-01-11 14:00:00 +1437228a-fc06-46a9-b4b1-bb4007234e92,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-1.2868372575870357,-0.6232437291783229,2011-01-11 15:00:00 +bb32a542-7848-4e69-8181-3b2a82ed299e,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-1.2868372575870357,-0.6232437291783229,2011-01-11 15:00:00 +2354b14d-82f1-434e-980e-7fed20a62051,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.8523806614716288,-0.41282679608702033,2011-01-11 16:00:00 +d2ab7576-1d23-4dca-b573-63d77e27a926,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.8523806614716288,-0.41282679608702033,2011-01-11 16:00:00 +c80a98d6-f81b-4f33-8592-42d71ed2fe3e,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.8723497046476517,-0.42249824510962963,2011-01-11 17:00:00 +eff31eff-4818-4a77-80ef-d3faaf7b739c,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.8723497046476517,-0.42249824510962963,2011-01-11 17:00:00 +7ddcad5e-3e3c-4d2b-9e8d-69dbee031813,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.7834227551689714,-0.3794289577613058,2011-01-11 18:00:00 +4e51225c-86c0-45ad-84be-6d9d4412cc1f,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.7834227551689714,-0.3794289577613058,2011-01-11 18:00:00 +d3aa4984-6c5a-49c1-8e90-f129d4b98cab,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.46916511355848733,-0.2272270353151367,2011-01-11 19:00:00 +c7b00af0-f64d-40c7-ac4a-45a572033de2,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.46916511355848733,-0.2272270353151367,2011-01-11 19:00:00 +8df8bfc2-f67b-4a6a-bb27-b1faf71b0d0e,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.36143225859150935,-0.1750496322373388,2011-01-11 20:00:00 +29662900-e5c0-4ff3-88f5-f57e916e59d0,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.36143225859150935,-0.1750496322373388,2011-01-11 20:00:00 +7f506d08-617d-4701-a5d2-258ae864e3b7,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.3751862434888121,-0.1817109911527085,2011-01-11 21:00:00 +2978cab0-78e7-490d-928f-ab2acd1b6501,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.3751862434888121,-0.1817109911527085,2011-01-11 21:00:00 +2c2a23c8-3d11-4492-a231-c986f43d1b3c,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.29056204592907253,-0.1407256216703612,2011-01-11 22:00:00 +40db8c2b-c4ee-46d9-a547-a40771c23c58,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.29056204592907253,-0.1407256216703612,2011-01-11 22:00:00 +d5ae964f-66c0-4966-955f-25bc310a73f3,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.7166785625571813,-0.3471032699098606,2011-01-11 23:00:00 +61697962-10b7-4448-baf3-5ecfd3cbe303,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.7166785625571813,-0.3471032699098606,2011-01-11 23:00:00 +6515146d-7258-4b75-857d-d4b781e79e69,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.09227124759165843,-0.044689004849606646,2011-01-12 00:00:00 +357e31b2-5b2c-4c8e-b5ca-6a0618e85b5e,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.09227124759165843,-0.044689004849606646,2011-01-12 00:00:00 +d2dc4286-ae4b-41bb-ab0e-165652f7892c,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.16170291318306157,-0.07831629527123292,2011-01-12 01:00:00 +f7ba4580-0767-40b9-be50-30da3572c400,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.16170291318306157,-0.07831629527123292,2011-01-12 01:00:00 +426efded-7d52-4780-b856-06284603a11e,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.20826742975071427,-0.10086851994603553,2011-01-12 02:00:00 +eec85a29-415b-43fc-a5c0-465454038e36,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.20826742975071427,-0.10086851994603553,2011-01-12 02:00:00 +0d2b5876-65b3-4c40-bddf-4fd92db69e41,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.24312665748562165,-0.11775161449562792,2011-01-12 03:00:00 +a5ac5e8d-c183-486c-9816-c74f1df5a1fb,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.24312665748562165,-0.11775161449562792,2011-01-12 03:00:00 +303cd054-feff-454e-8cb7-af9cf480b150,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.39244850039747653,-0.19007148375296465,2011-01-12 04:00:00 +c91d0ab9-f170-4bcb-8ead-6ff94535379d,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.39244850039747653,-0.19007148375296465,2011-01-12 04:00:00 +b9abbd48-f8b5-4090-a23d-9f63208d1844,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.2828153244546617,-0.13697371322028196,2011-01-12 05:00:00 +5422b54d-17e4-468d-a977-16494e7dd2ff,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.2828153244546617,-0.13697371322028196,2011-01-12 05:00:00 +7ca5815c-e9c9-4335-8efd-af0526d0322f,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.390987190651292,-0.18936373914087248,2011-01-12 06:00:00 +1a7bead6-ff43-464e-8751-6d81bf9b96a3,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.390987190651292,-0.18936373914087248,2011-01-12 06:00:00 +02e46aac-770d-4647-8e9f-4b8facd78e96,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.6775913465991797,-0.3281724672048296,2011-01-12 07:00:00 +83ed25fd-d4b5-4b13-a489-9572e278a4ec,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.6775913465991797,-0.3281724672048296,2011-01-12 07:00:00 +a9a2dcb9-119e-4a2b-878f-cdb9e90e1546,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-1.009832423604613,-0.48908416493369605,2011-01-12 08:00:00 +f6508ac0-19a2-499b-9560-4bfe93545b44,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-1.009832423604613,-0.48908416493369605,2011-01-12 08:00:00 +cc6e275e-ee7a-4c59-a9d6-6bf1cb63da61,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.8062984069548205,-0.390508141583766,2011-01-12 09:00:00 +e2b46a56-5755-4bde-9109-61df14f0e8fa,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.8062984069548205,-0.390508141583766,2011-01-12 09:00:00 +80114b85-d1c6-4a49-9ee9-ed46a300b233,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.9784447637769601,-0.47388242746003273,2011-01-12 10:00:00 +71ed0b98-f3c5-4d97-8f15-58e03f89ae74,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.9784447637769601,-0.47388242746003273,2011-01-12 10:00:00 +68b4ec43-a5e4-4160-b756-1f092e4a242c,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-1.2120573868546007,-0.5870261847856876,2011-01-12 11:00:00 +f9788a2f-2c29-4745-be6c-4955a3f95604,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-1.2120573868546007,-0.5870261847856876,2011-01-12 11:00:00 +c784641c-86c6-4400-ac05-89b69df7f05e,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-1.08140291739408,-0.5237473371300951,2011-01-12 12:00:00 +78180233-ca53-4077-b1cc-cbb828d5d135,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-1.08140291739408,-0.5237473371300951,2011-01-12 12:00:00 +672233c7-67c2-4477-95d0-6a74b7d360b4,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-1.4169332608223841,-0.686252099296259,2011-01-12 13:00:00 +f6260ace-e739-4b16-b817-c54da5e6921b,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-1.4169332608223841,-0.686252099296259,2011-01-12 13:00:00 +bdd0c46e-c548-420d-93c6-64bad0f822cc,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-1.5252263886765398,-0.7387008549180584,2011-01-12 14:00:00 +beca47ab-7292-49f1-bf97-b0e7102fd4ca,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-1.5252263886765398,-0.7387008549180584,2011-01-12 14:00:00 +d9c50038-9d4e-47dc-acd9-f96b84925674,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-1.2868372575870357,-0.6232437291783229,2011-01-12 15:00:00 +0dc86747-2b85-4557-a82a-c7ae034c99f6,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-1.2868372575870357,-0.6232437291783229,2011-01-12 15:00:00 +5698e50f-990e-4deb-b5bf-6a2fa83a420a,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.8523806614716288,-0.41282679608702033,2011-01-12 16:00:00 +1c96c957-66d3-4943-b899-68af75f2c3ce,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.8523806614716288,-0.41282679608702033,2011-01-12 16:00:00 +d936ee78-fe42-47a0-804c-1541064af005,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.8723497046476517,-0.42249824510962963,2011-01-12 17:00:00 +3d64be66-3800-4827-aefd-583abc4ed469,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.8723497046476517,-0.42249824510962963,2011-01-12 17:00:00 +a696e311-7d1d-4def-9f59-9bca5b29542a,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.7834227551689714,-0.3794289577613058,2011-01-12 18:00:00 +e7ecda81-27d6-4e82-ad52-c4db20eb4a68,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.7834227551689714,-0.3794289577613058,2011-01-12 18:00:00 +cb02f7ba-c29c-4996-992f-9007542ea991,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.46916511355848733,-0.2272270353151367,2011-01-12 19:00:00 +8c59fdf0-3273-4e0f-8695-2fff4f3046e2,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.46916511355848733,-0.2272270353151367,2011-01-12 19:00:00 +c3259c14-282a-4902-b724-b8c67499b885,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.36143225859150935,-0.1750496322373388,2011-01-12 20:00:00 +34b4318e-89cc-451f-81c7-e63a19c19e08,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.36143225859150935,-0.1750496322373388,2011-01-12 20:00:00 +5d69c6b0-c6a0-4687-b951-bd6cbb5e7fea,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.3751862434888121,-0.1817109911527085,2011-01-12 21:00:00 +b4002336-d20d-421b-814b-8510cadaba34,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.3751862434888121,-0.1817109911527085,2011-01-12 21:00:00 +a1fe8d2d-674c-4695-8392-c367a284c50e,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.29056204592907253,-0.1407256216703612,2011-01-12 22:00:00 +c5e6e5c1-e9fd-4e67-9565-666b640d6c93,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.29056204592907253,-0.1407256216703612,2011-01-12 22:00:00 +736bc296-e3e0-41d5-9678-64e321068b99,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.7166785625571813,-0.3471032699098606,2011-01-12 23:00:00 +dd41b216-eb32-452f-9992-465a2f5042e1,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.7166785625571813,-0.3471032699098606,2011-01-12 23:00:00 +50317e68-e6c9-4ac6-b180-4df9b000ea01,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.09227124759165843,-0.044689004849606646,2011-01-13 00:00:00 +63895454-a8eb-4a30-bb12-d239a7eebaf3,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.09227124759165843,-0.044689004849606646,2011-01-13 00:00:00 +d17c4b0f-b8b7-42f6-be2f-e9d2011ce05c,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.16170291318306157,-0.07831629527123292,2011-01-13 01:00:00 +c84d0e85-ed9b-4443-af46-aa0f857d213b,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.16170291318306157,-0.07831629527123292,2011-01-13 01:00:00 +25a59df3-86c7-42ca-9e75-4a17ac695037,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.20826742975071427,-0.10086851994603553,2011-01-13 02:00:00 +45d99d94-e1eb-4666-b62c-a9466cabe71f,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.20826742975071427,-0.10086851994603553,2011-01-13 02:00:00 +35bf542a-a949-4c3a-b571-6cf313aad6c0,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.24312665748562165,-0.11775161449562792,2011-01-13 03:00:00 +982be35b-be71-45ff-9408-871ddff42808,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.24312665748562165,-0.11775161449562792,2011-01-13 03:00:00 +2d5b9445-7641-4c3b-a2c5-f2cd22cc268f,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.39244850039747653,-0.19007148375296465,2011-01-13 04:00:00 +23095a09-9772-4298-8a97-6b90ff132be0,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.39244850039747653,-0.19007148375296465,2011-01-13 04:00:00 +012ae511-277f-47a9-b470-4282126c06c4,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.2828153244546617,-0.13697371322028196,2011-01-13 05:00:00 +0b3268c7-b60c-4d8c-aec6-6a89c4efb222,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.2828153244546617,-0.13697371322028196,2011-01-13 05:00:00 +be5fb94b-c3cf-42b7-a733-6d7f99c9adb0,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.390987190651292,-0.18936373914087248,2011-01-13 06:00:00 +43369e00-23c2-47b6-9f32-305c06b011e4,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.390987190651292,-0.18936373914087248,2011-01-13 06:00:00 +b4e84b53-50f4-4f63-aef6-f9d836d8ce9e,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.6775913465991797,-0.3281724672048296,2011-01-13 07:00:00 +36ef71c4-3e35-4c8b-8e7b-5f479d31c221,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.6775913465991797,-0.3281724672048296,2011-01-13 07:00:00 +0203adcb-6937-4ecb-8f12-ac9380b968b7,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-1.009832423604613,-0.48908416493369605,2011-01-13 08:00:00 +296d591a-33be-425f-8886-d7c5a4788abf,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-1.009832423604613,-0.48908416493369605,2011-01-13 08:00:00 +307fe4bb-aa9b-4428-9a47-5a8e39c30496,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.8062984069548205,-0.390508141583766,2011-01-13 09:00:00 +e7a58143-bbe0-491a-ab35-6ee4e2dc391a,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.8062984069548205,-0.390508141583766,2011-01-13 09:00:00 +16fddebd-8717-428f-bf43-2e5f02830312,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.9784447637769601,-0.47388242746003273,2011-01-13 10:00:00 +4890b11a-7c06-42f3-907a-8c235e207382,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.9784447637769601,-0.47388242746003273,2011-01-13 10:00:00 +4340c201-f9d4-4217-a7e8-c6e16b56c1f9,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-1.2120573868546007,-0.5870261847856876,2011-01-13 11:00:00 +6ee9fa32-50b5-4795-8066-51be1fcf7dc6,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-1.2120573868546007,-0.5870261847856876,2011-01-13 11:00:00 +f97d9ee5-0b5d-4523-aa42-2f0d3d26e852,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-1.08140291739408,-0.5237473371300951,2011-01-13 12:00:00 +dfc5b74a-5d53-44c8-889d-2bc08a3a2e3e,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-1.08140291739408,-0.5237473371300951,2011-01-13 12:00:00 +f09c9605-836f-4baa-8a9b-c4efe35ab002,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-1.4169332608223841,-0.686252099296259,2011-01-13 13:00:00 +2805d536-fa25-4078-a63b-eea953448b77,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-1.4169332608223841,-0.686252099296259,2011-01-13 13:00:00 +b96cc923-8404-43b0-9002-546afe8a3148,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-1.5252263886765398,-0.7387008549180584,2011-01-13 14:00:00 +06069f4c-dbbe-4b58-b98b-7ba9531ed854,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-1.5252263886765398,-0.7387008549180584,2011-01-13 14:00:00 +e3a0d383-3e27-45a8-8b05-8cd4dbde3cf7,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-1.2868372575870357,-0.6232437291783229,2011-01-13 15:00:00 +5ae62f8d-1aa5-429c-9e83-7668e7bcea59,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-1.2868372575870357,-0.6232437291783229,2011-01-13 15:00:00 +26e539bc-2b67-4492-bc48-42a6430cbb9d,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.8523806614716288,-0.41282679608702033,2011-01-13 16:00:00 +7443911f-3f14-4cca-a551-6e050f8c7d80,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.8523806614716288,-0.41282679608702033,2011-01-13 16:00:00 +bbf44cf4-fc01-477b-9644-449dfc34f3fb,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.8723497046476517,-0.42249824510962963,2011-01-13 17:00:00 +49b972ac-7f68-4e79-804d-32748e021e8b,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.8723497046476517,-0.42249824510962963,2011-01-13 17:00:00 +de9c7daa-8fc1-4228-bb4b-61accb15b68f,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.7834227551689714,-0.3794289577613058,2011-01-13 18:00:00 +97685d01-1afb-4dfe-9227-ce627266881c,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.7834227551689714,-0.3794289577613058,2011-01-13 18:00:00 +dcb432b5-c45b-4e13-babd-c3d76a161687,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.46916511355848733,-0.2272270353151367,2011-01-13 19:00:00 +9ce3e672-9556-4f97-956f-3edeea405e4a,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.46916511355848733,-0.2272270353151367,2011-01-13 19:00:00 +22286216-5885-406c-982f-ff7e39eb0318,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.36143225859150935,-0.1750496322373388,2011-01-13 20:00:00 +3c2ec808-fa55-439c-8460-bf43f82aae58,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.36143225859150935,-0.1750496322373388,2011-01-13 20:00:00 +3e2ebf8d-d90c-4f11-a860-3a19a80d652a,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.3751862434888121,-0.1817109911527085,2011-01-13 21:00:00 +30fb692f-bb30-4bed-ad5c-6da95f8ceb33,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.3751862434888121,-0.1817109911527085,2011-01-13 21:00:00 +b848d4ce-74cb-47f7-bf1a-9528d9361518,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.29056204592907253,-0.1407256216703612,2011-01-13 22:00:00 +abce4ca8-a659-4e13-811d-6cee51adeaaa,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.29056204592907253,-0.1407256216703612,2011-01-13 22:00:00 +c0a0e5da-5bf9-4c8f-b86f-8ea2a41084fe,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.7166785625571813,-0.3471032699098606,2011-01-13 23:00:00 +e22acbd3-6d53-4864-9467-4a822fa40e8f,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.7166785625571813,-0.3471032699098606,2011-01-13 23:00:00 +87a554ab-ac0d-4c37-b8e4-f44faf70fee6,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.09227124759165843,-0.044689004849606646,2011-01-14 00:00:00 +216020f1-aa3c-4021-ae3e-7da195f477b3,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.09227124759165843,-0.044689004849606646,2011-01-14 00:00:00 +e0c13bcd-76b4-4f58-a9f0-afb52d8f2bf9,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.16170291318306157,-0.07831629527123292,2011-01-14 01:00:00 +ca0b3d9b-f608-40fd-bc16-4fa0544cf1c3,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.16170291318306157,-0.07831629527123292,2011-01-14 01:00:00 +652d6aef-0a6d-4e36-b957-1dda744cfef3,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.20826742975071427,-0.10086851994603553,2011-01-14 02:00:00 +4f764e9e-f376-4cca-b126-febb338ef016,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.20826742975071427,-0.10086851994603553,2011-01-14 02:00:00 +c09858bf-fe4a-4ced-a635-db6a5860427b,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.24312665748562165,-0.11775161449562792,2011-01-14 03:00:00 +4254aff1-312d-4358-b518-369a0a36c7cd,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.24312665748562165,-0.11775161449562792,2011-01-14 03:00:00 +26676838-c59a-4160-8d3f-1e2cde015b83,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.39244850039747653,-0.19007148375296465,2011-01-14 04:00:00 +b6c8e62f-7c04-4be9-ae22-7da0155cb2d1,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.39244850039747653,-0.19007148375296465,2011-01-14 04:00:00 +0de28539-20a1-4f18-b916-7481a850743f,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.2828153244546617,-0.13697371322028196,2011-01-14 05:00:00 +f5c7b32c-3818-43c0-8355-2b4e8fc36d8c,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.2828153244546617,-0.13697371322028196,2011-01-14 05:00:00 +dd27cf02-8185-4c09-b088-5341274fa870,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.390987190651292,-0.18936373914087248,2011-01-14 06:00:00 +f9455951-6a69-44a8-b40e-c9607fbb1ebd,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.390987190651292,-0.18936373914087248,2011-01-14 06:00:00 +77f6b723-7977-4b85-a3f9-3fd16e7814b6,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.6775913465991797,-0.3281724672048296,2011-01-14 07:00:00 +c67368e9-25a2-4568-b0b6-62dce2ee8eed,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.6775913465991797,-0.3281724672048296,2011-01-14 07:00:00 +a7f008ad-c7d8-4ad5-b6e5-00c85b1799e9,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-1.009832423604613,-0.48908416493369605,2011-01-14 08:00:00 +a73e5fdb-8aee-4926-a7e7-3a24abed7f41,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-1.009832423604613,-0.48908416493369605,2011-01-14 08:00:00 +8ea19cc6-4618-4865-ad38-cb779473df96,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.8062984069548205,-0.390508141583766,2011-01-14 09:00:00 +d0cc24fc-4c4b-45a5-8f76-c03caa9e050e,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.8062984069548205,-0.390508141583766,2011-01-14 09:00:00 +a22da0c7-0457-4b13-a74e-3eecb8c48469,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.9784447637769601,-0.47388242746003273,2011-01-14 10:00:00 +28edeec8-ebc6-47d5-aac1-6d68188363fa,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.9784447637769601,-0.47388242746003273,2011-01-14 10:00:00 +afc6886a-22f7-40ea-9021-a053f05690ac,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-1.2120573868546007,-0.5870261847856876,2011-01-14 11:00:00 +6f59c303-75d9-4301-bbaa-6cf10ca53687,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-1.2120573868546007,-0.5870261847856876,2011-01-14 11:00:00 +ab36074f-15cb-4de9-a605-6a2a31500195,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-1.08140291739408,-0.5237473371300951,2011-01-14 12:00:00 +2ec30bac-0516-4d91-820b-732e39f5373a,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-1.08140291739408,-0.5237473371300951,2011-01-14 12:00:00 +517ece22-2c76-4001-9d26-11cb392dc15c,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-1.4169332608223841,-0.686252099296259,2011-01-14 13:00:00 +20442d46-17ca-4c99-a5f2-76e76b8eb109,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-1.4169332608223841,-0.686252099296259,2011-01-14 13:00:00 +c122c2d9-3f7f-4c84-b02d-642bfd639377,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-1.5252263886765398,-0.7387008549180584,2011-01-14 14:00:00 +10e5e50d-3cfe-4110-8eeb-1b6864bb3a59,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-1.5252263886765398,-0.7387008549180584,2011-01-14 14:00:00 +42901581-b6b5-4c3d-95e8-410f3a821cb9,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-1.2868372575870357,-0.6232437291783229,2011-01-14 15:00:00 +127c8a0b-75cf-4572-98f3-62d8418b2995,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-1.2868372575870357,-0.6232437291783229,2011-01-14 15:00:00 +2517c2a5-426c-45c7-9fea-37f70b6624bd,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.8523806614716288,-0.41282679608702033,2011-01-14 16:00:00 +b10b6c7a-ef3d-4d7c-bf9c-b0769d3e1cd2,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.8523806614716288,-0.41282679608702033,2011-01-14 16:00:00 +635bfeea-6ea9-4682-a305-e4dfaacdf5fa,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.8723497046476517,-0.42249824510962963,2011-01-14 17:00:00 +b6efc2fd-6a48-4af9-b025-e512cedaa745,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.8723497046476517,-0.42249824510962963,2011-01-14 17:00:00 +5395e2f7-b407-4e1a-9ad4-0ef3f7491785,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.7834227551689714,-0.3794289577613058,2011-01-14 18:00:00 +5e0c2950-d869-455c-9fdb-aa70ed19bf7b,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.7834227551689714,-0.3794289577613058,2011-01-14 18:00:00 +4efc9748-72e8-480c-9c19-20eefbc44c4b,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.46916511355848733,-0.2272270353151367,2011-01-14 19:00:00 +e79147bd-3530-4dcc-bf4e-38b05a29565e,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.46916511355848733,-0.2272270353151367,2011-01-14 19:00:00 +ad349c77-a556-486f-9437-852d3501935c,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.36143225859150935,-0.1750496322373388,2011-01-14 20:00:00 +d66fc32f-aec9-43da-8316-3a443e8c1c9f,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.36143225859150935,-0.1750496322373388,2011-01-14 20:00:00 +38c8a4a6-9048-490a-9e8c-66d4dc11b4c0,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.3751862434888121,-0.1817109911527085,2011-01-14 21:00:00 +ac0e3a6c-f22a-4ae0-82fd-4392c5d1a6ef,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.3751862434888121,-0.1817109911527085,2011-01-14 21:00:00 +8c9f75b3-a830-49a0-94eb-56d283e8f390,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.29056204592907253,-0.1407256216703612,2011-01-14 22:00:00 +a2da47fb-dc11-4738-830a-bbcf319567b4,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.29056204592907253,-0.1407256216703612,2011-01-14 22:00:00 +00aa7b93-29a3-467d-81de-1af0c6431fba,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.7166785625571813,-0.3471032699098606,2011-01-14 23:00:00 +8e80bdb4-6b84-4b4f-b309-9aca730cbc18,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.7166785625571813,-0.3471032699098606,2011-01-14 23:00:00 +3e46ce89-a7c1-48d9-8de0-43ff05b05529,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.09227124759165843,-0.044689004849606646,2011-01-15 00:00:00 +dff81143-8b2f-42e1-8c56-9ffa55f21ac8,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.09227124759165843,-0.044689004849606646,2011-01-15 00:00:00 +324a1b64-b4c7-43ce-8b77-b105e329eae5,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.16170291318306157,-0.07831629527123292,2011-01-15 01:00:00 +2c869e36-9558-4582-bc45-fe7e451b9f01,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.16170291318306157,-0.07831629527123292,2011-01-15 01:00:00 +383700e4-d7b1-488e-8931-8ce3f43989a1,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.20826742975071427,-0.10086851994603553,2011-01-15 02:00:00 +82c87e75-64c7-4a18-9dda-328c21b7e14e,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.20826742975071427,-0.10086851994603553,2011-01-15 02:00:00 +ec9596a8-048a-43d7-b8e5-5cdbcc4411dc,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.24312665748562165,-0.11775161449562792,2011-01-15 03:00:00 +fbddbb0c-0b48-4cf1-8183-fb5a22a313fe,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.24312665748562165,-0.11775161449562792,2011-01-15 03:00:00 +b7f8ebcc-4166-4cfb-bb8f-9fa438600f4b,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.39244850039747653,-0.19007148375296465,2011-01-15 04:00:00 +1ab397b4-3423-4086-a51a-a7875409409a,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.39244850039747653,-0.19007148375296465,2011-01-15 04:00:00 +225c3576-9753-4bdb-862e-8b9e79990c27,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.2828153244546617,-0.13697371322028196,2011-01-15 05:00:00 +3a09ee84-3ebd-4bb7-9a39-98c29035b148,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.2828153244546617,-0.13697371322028196,2011-01-15 05:00:00 +13bc6b0c-0e9e-4bcc-9912-08da3bb92cca,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.390987190651292,-0.18936373914087248,2011-01-15 06:00:00 +95b5240c-6363-40a8-9b8f-cce308c62aa7,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.390987190651292,-0.18936373914087248,2011-01-15 06:00:00 +791d6a22-ca37-4e5d-bdce-89df1b8153d2,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.6775913465991797,-0.3281724672048296,2011-01-15 07:00:00 +f2ebc806-0c00-4de4-8b60-a1c70f76262e,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.6775913465991797,-0.3281724672048296,2011-01-15 07:00:00 +4acbd49a-6b68-44c8-9359-bd014e394bfe,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-1.009832423604613,-0.48908416493369605,2011-01-15 08:00:00 +9f1d3b81-7c14-4599-a4e4-9e22f7ce9662,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-1.009832423604613,-0.48908416493369605,2011-01-15 08:00:00 +84d6c3a8-b84a-4cc9-90d4-a6ca066f4579,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.8062984069548205,-0.390508141583766,2011-01-15 09:00:00 +b5b4d8af-79cb-49b8-b334-3aa6dc3f92a9,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.8062984069548205,-0.390508141583766,2011-01-15 09:00:00 +b2cdc131-fcf0-43df-aaff-b8ed3354fa03,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.9784447637769601,-0.47388242746003273,2011-01-15 10:00:00 +834565e8-b016-4a7a-93ca-b18bcf20bb24,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.9784447637769601,-0.47388242746003273,2011-01-15 10:00:00 +712c12f6-e9f0-40e3-8922-39548eb43a23,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-1.2120573868546007,-0.5870261847856876,2011-01-15 11:00:00 +846bf99a-1b4e-419a-ab40-24091cd2c6db,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-1.2120573868546007,-0.5870261847856876,2011-01-15 11:00:00 +c8816762-1289-4e89-8df1-04cc9deab008,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-1.08140291739408,-0.5237473371300951,2011-01-15 12:00:00 +63a75a44-6d4b-46fd-8d36-b9fa380dcef3,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-1.08140291739408,-0.5237473371300951,2011-01-15 12:00:00 +cffc0996-ac7d-4f35-b7a7-f6f5b109d633,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-1.4169332608223841,-0.686252099296259,2011-01-15 13:00:00 +50704590-00f6-4db6-b1f1-a9ee8ad3f181,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-1.4169332608223841,-0.686252099296259,2011-01-15 13:00:00 +b37c68b2-82b5-4cad-8e49-d8b191308858,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-1.5252263886765398,-0.7387008549180584,2011-01-15 14:00:00 +00f76537-86bb-4ff2-bda1-798469738267,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-1.5252263886765398,-0.7387008549180584,2011-01-15 14:00:00 +c8efd150-3d44-4525-995c-a60fb49902fb,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-1.2868372575870357,-0.6232437291783229,2011-01-15 15:00:00 +3cd86b8a-8d10-4495-b3e3-388d5055955a,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-1.2868372575870357,-0.6232437291783229,2011-01-15 15:00:00 +9786dfbb-b98b-43d2-ba55-1614e21222cf,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.8523806614716288,-0.41282679608702033,2011-01-15 16:00:00 +2e484266-2625-4969-88f9-b826985b8cdc,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.8523806614716288,-0.41282679608702033,2011-01-15 16:00:00 +e229f5a7-ef60-4b8a-b529-16843f195ff1,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.8723497046476517,-0.42249824510962963,2011-01-15 17:00:00 +9a41677c-ac00-43a4-9d16-6c6d6f31758f,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.8723497046476517,-0.42249824510962963,2011-01-15 17:00:00 +b8403918-8c96-4ceb-9d43-814c703fbfa5,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.7834227551689714,-0.3794289577613058,2011-01-15 18:00:00 +99b92526-c0a3-405e-be31-f7b972647803,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.7834227551689714,-0.3794289577613058,2011-01-15 18:00:00 +e441d973-722c-40e0-a1f4-237e3c93b182,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.46916511355848733,-0.2272270353151367,2011-01-15 19:00:00 +1fe4e925-f105-45d4-9cfe-ea851f71d8c0,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.46916511355848733,-0.2272270353151367,2011-01-15 19:00:00 +76d35b05-be3d-42a6-b6ec-428a014a6946,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.36143225859150935,-0.1750496322373388,2011-01-15 20:00:00 +4c2ece6f-28cc-4cf3-aec6-6f01c042ad36,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.36143225859150935,-0.1750496322373388,2011-01-15 20:00:00 +97516944-5ced-4494-afca-494351d8d366,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.3751862434888121,-0.1817109911527085,2011-01-15 21:00:00 +26c67a4b-454c-40ac-ab8c-d0378f998cf1,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.3751862434888121,-0.1817109911527085,2011-01-15 21:00:00 +fdf03c3e-5e79-4c73-9168-c86ee86e8dab,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.29056204592907253,-0.1407256216703612,2011-01-15 22:00:00 +be4c840e-063e-4ef2-a64d-52be0adb2afd,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.29056204592907253,-0.1407256216703612,2011-01-15 22:00:00 +dda87af0-c412-4401-b2d1-5c30deec7060,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.7166785625571813,-0.3471032699098606,2011-01-15 23:00:00 +eed6b8a3-ef37-4458-a0a1-92bffd0268c4,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.7166785625571813,-0.3471032699098606,2011-01-15 23:00:00 +57d091f0-74e8-4dc7-a8be-282c6755c186,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.09227124759165843,-0.044689004849606646,2011-01-16 00:00:00 +f834738a-92e9-4f94-acad-8b73bd750cc7,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.09227124759165843,-0.044689004849606646,2011-01-16 00:00:00 +64b5d365-a07c-4f52-b498-d238d2924054,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.16170291318306157,-0.07831629527123292,2011-01-16 01:00:00 +653c0090-7e92-47dc-a2b2-c1017968da67,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.16170291318306157,-0.07831629527123292,2011-01-16 01:00:00 +7758384a-244e-412f-972e-3ff90d59e6c7,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.20826742975071427,-0.10086851994603553,2011-01-16 02:00:00 +f3202c09-8007-44d5-ab30-724eb3bf6cfa,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.20826742975071427,-0.10086851994603553,2011-01-16 02:00:00 +98442ebb-b8ef-4810-8400-87441acacedf,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.24312665748562165,-0.11775161449562792,2011-01-16 03:00:00 +65490d8f-e7e6-4889-bb9c-1b6a3741f101,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.24312665748562165,-0.11775161449562792,2011-01-16 03:00:00 +55432db1-8436-402e-97ce-a1a672bf62ce,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.39244850039747653,-0.19007148375296465,2011-01-16 04:00:00 +f1131a09-5ae5-4d37-b804-73d6d75b0347,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.39244850039747653,-0.19007148375296465,2011-01-16 04:00:00 +f034c2ec-6914-49ce-9dd7-125715770713,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.2828153244546617,-0.13697371322028196,2011-01-16 05:00:00 +e82ffa0b-272e-4365-8ac1-ca0a28a6ce3d,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.2828153244546617,-0.13697371322028196,2011-01-16 05:00:00 +66540a71-eeec-45da-9a1b-19f9deae85ec,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.390987190651292,-0.18936373914087248,2011-01-16 06:00:00 +c286affa-4b86-4232-81b3-5ab1bb5f5079,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.390987190651292,-0.18936373914087248,2011-01-16 06:00:00 +6ab0513d-52a2-4767-ad8c-93438accad9f,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.6775913465991797,-0.3281724672048296,2011-01-16 07:00:00 +792d3794-4530-438a-a6e7-430b15bb545b,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.6775913465991797,-0.3281724672048296,2011-01-16 07:00:00 +a26dfc16-c16a-415e-8074-f759305faf7d,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-1.009832423604613,-0.48908416493369605,2011-01-16 08:00:00 +6c7ae672-b8cd-43b5-a326-ff69a5e91f6e,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-1.009832423604613,-0.48908416493369605,2011-01-16 08:00:00 +6b0a9eb6-1e5f-4d45-9944-153b76992a4d,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.8062984069548205,-0.390508141583766,2011-01-16 09:00:00 +dd49c563-f1ed-4924-98f1-47a86834e2da,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.8062984069548205,-0.390508141583766,2011-01-16 09:00:00 +99179ffe-6d36-434a-8dc3-fac833963987,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.9784447637769601,-0.47388242746003273,2011-01-16 10:00:00 +fb45d55a-0a05-428a-a2e4-c87e24e52bb2,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.9784447637769601,-0.47388242746003273,2011-01-16 10:00:00 +86b63c60-3103-4e6c-a1c5-37631cdc639d,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-1.2120573868546007,-0.5870261847856876,2011-01-16 11:00:00 +0900a507-a5a6-4aba-9ad1-b317fbf57141,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-1.2120573868546007,-0.5870261847856876,2011-01-16 11:00:00 +dc07a855-78e0-4073-854a-fbd101b438ee,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-1.08140291739408,-0.5237473371300951,2011-01-16 12:00:00 +7b5f8c62-d9b3-419a-b105-0265787cc23f,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-1.08140291739408,-0.5237473371300951,2011-01-16 12:00:00 +4f68acb5-7233-433c-bd97-51cd58d6565f,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-1.4169332608223841,-0.686252099296259,2011-01-16 13:00:00 +393d5f17-1247-481b-89c9-a47ffb32df2f,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-1.4169332608223841,-0.686252099296259,2011-01-16 13:00:00 +a11875df-b70a-4dfc-a18d-dc78aea82a6c,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-1.5252263886765398,-0.7387008549180584,2011-01-16 14:00:00 +3700042e-bfd6-4d7d-96fa-29f3139a024b,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-1.5252263886765398,-0.7387008549180584,2011-01-16 14:00:00 +76ec22d1-f69c-4399-93ec-da62aebb8801,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-1.2868372575870357,-0.6232437291783229,2011-01-16 15:00:00 +f1e4bfc4-ef4c-4cba-bcea-90b28f5e47b8,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-1.2868372575870357,-0.6232437291783229,2011-01-16 15:00:00 +da7c06e0-8af6-4a35-879e-bd1b933eede5,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.8523806614716288,-0.41282679608702033,2011-01-16 16:00:00 +f63e1f5f-80c8-4e87-aeba-787435d5b1fb,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.8523806614716288,-0.41282679608702033,2011-01-16 16:00:00 +c59d4145-0a6d-4c16-b4ba-40c8fb38f918,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.8723497046476517,-0.42249824510962963,2011-01-16 17:00:00 +31716925-51e1-4fbc-a3ec-2e99586eeb20,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.8723497046476517,-0.42249824510962963,2011-01-16 17:00:00 +d837da0c-0cc8-4d02-9bcd-6421625657ad,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.7834227551689714,-0.3794289577613058,2011-01-16 18:00:00 +24395576-7f8a-4b15-bab8-cd4eaa7db53e,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.7834227551689714,-0.3794289577613058,2011-01-16 18:00:00 +4bf0b888-18e7-4636-9d12-6d81215a781c,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.46916511355848733,-0.2272270353151367,2011-01-16 19:00:00 +91332074-32df-419d-b059-510b390daaf1,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.46916511355848733,-0.2272270353151367,2011-01-16 19:00:00 +8adb9bf8-28b9-400e-aba3-a6970e0f7fa5,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.36143225859150935,-0.1750496322373388,2011-01-16 20:00:00 +d77d787c-c600-428c-b20e-52aebb41bb4d,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.36143225859150935,-0.1750496322373388,2011-01-16 20:00:00 +34ebfa8b-a37e-4c25-a771-0b239555350b,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.3751862434888121,-0.1817109911527085,2011-01-16 21:00:00 +8da276dd-654f-4823-97c4-e1ccb15951b5,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.3751862434888121,-0.1817109911527085,2011-01-16 21:00:00 +197d9311-a650-4cb9-ba84-028dbd97f77d,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.29056204592907253,-0.1407256216703612,2011-01-16 22:00:00 +546f0ac8-b54d-46e8-a326-4b62795f3af3,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.29056204592907253,-0.1407256216703612,2011-01-16 22:00:00 +0605918d-ab8f-4ebb-b62f-e991f0c17541,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.7166785625571813,-0.3471032699098606,2011-01-16 23:00:00 +43b67bbb-bee0-460a-ac45-8669e282ff24,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.7166785625571813,-0.3471032699098606,2011-01-16 23:00:00 +cc00f810-b6a0-4551-8b6f-22dfd1d3d93e,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.09227124759165843,-0.044689004849606646,2011-01-17 00:00:00 +9ef20f55-9d34-4128-81e9-36af435486bd,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.09227124759165843,-0.044689004849606646,2011-01-17 00:00:00 +eed820cd-9b75-4e38-8ed3-b673fba96044,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.16170291318306157,-0.07831629527123292,2011-01-17 01:00:00 +2cda4ce6-56d1-4d8a-9660-9eb2514eb899,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.16170291318306157,-0.07831629527123292,2011-01-17 01:00:00 +01442b1b-3bf1-475e-8c4f-58c36fbc11d8,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.20826742975071427,-0.10086851994603553,2011-01-17 02:00:00 +2f161402-41af-4d9d-94ac-802d17d6a0b1,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.20826742975071427,-0.10086851994603553,2011-01-17 02:00:00 +244bc41d-4d0d-45f1-9805-af47b017309a,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.24312665748562165,-0.11775161449562792,2011-01-17 03:00:00 +41b3c324-3d6d-4543-a132-affb529d7e5b,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.24312665748562165,-0.11775161449562792,2011-01-17 03:00:00 +2f6a038e-0438-4690-8b4e-10169ea075c5,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.39244850039747653,-0.19007148375296465,2011-01-17 04:00:00 +67420216-a730-4a2f-91d1-715458bf3d5c,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.39244850039747653,-0.19007148375296465,2011-01-17 04:00:00 +eb90076f-c299-4a07-a2e2-b836fd31f4e4,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.2828153244546617,-0.13697371322028196,2011-01-17 05:00:00 +4a4a0779-5b8b-481f-bfc3-7d9471b3df65,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.2828153244546617,-0.13697371322028196,2011-01-17 05:00:00 +c51887e6-0604-4706-9d4e-755ad76a8287,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.390987190651292,-0.18936373914087248,2011-01-17 06:00:00 +ddd1ccdc-ba7e-4141-9eaa-5a9736dd7838,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.390987190651292,-0.18936373914087248,2011-01-17 06:00:00 +c331ca75-e852-49ba-8868-4a06093ce1c7,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.6775913465991797,-0.3281724672048296,2011-01-17 07:00:00 +71640b55-b2fe-4186-a6f5-c7bfaed3e5b1,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.6775913465991797,-0.3281724672048296,2011-01-17 07:00:00 +5b40eaff-deda-45ac-9303-778f94e8e107,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-1.009832423604613,-0.48908416493369605,2011-01-17 08:00:00 +1ff6f53b-a95c-409d-bb1e-b9dfc1aabe8d,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-1.009832423604613,-0.48908416493369605,2011-01-17 08:00:00 +290986ea-c783-4d7e-aa9b-51818e7c8e9d,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.8062984069548205,-0.390508141583766,2011-01-17 09:00:00 +4963fae3-f600-45b1-bf47-8742ad5fb644,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.8062984069548205,-0.390508141583766,2011-01-17 09:00:00 +87be9a24-8e78-4b06-80db-9925066a0ff9,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.9784447637769601,-0.47388242746003273,2011-01-17 10:00:00 +75436358-1114-492f-9eda-880dfcac2f5e,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.9784447637769601,-0.47388242746003273,2011-01-17 10:00:00 +026a3e97-701d-4ef0-baa0-5ce0e573ed9e,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-1.2120573868546007,-0.5870261847856876,2011-01-17 11:00:00 +283f88e5-9cf7-48a1-800f-1ebc5373ca74,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-1.2120573868546007,-0.5870261847856876,2011-01-17 11:00:00 +04530c92-d092-437e-bed7-f23b7c5566f8,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-1.08140291739408,-0.5237473371300951,2011-01-17 12:00:00 +967de265-9fb0-4804-83d6-eecc366fe0e6,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-1.08140291739408,-0.5237473371300951,2011-01-17 12:00:00 +1212635b-c4af-400b-a46c-26fddeb94740,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-1.4169332608223841,-0.686252099296259,2011-01-17 13:00:00 +be118272-22fd-4293-9c93-572079ebd273,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-1.4169332608223841,-0.686252099296259,2011-01-17 13:00:00 +4c4f0d2d-5146-44da-b4b8-b54e584e199b,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-1.5252263886765398,-0.7387008549180584,2011-01-17 14:00:00 +8f7a431f-c19f-45c8-8160-99234ccc21da,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-1.5252263886765398,-0.7387008549180584,2011-01-17 14:00:00 +3d3be1ff-a57d-416f-a5c5-62a5946c21f9,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-1.2868372575870357,-0.6232437291783229,2011-01-17 15:00:00 +bb0bd578-e008-4d8a-9856-f5a90891c891,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-1.2868372575870357,-0.6232437291783229,2011-01-17 15:00:00 +c63f3367-720e-4956-b415-edf4dbf8559d,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.8523806614716288,-0.41282679608702033,2011-01-17 16:00:00 +a8fb649c-e760-4a72-a178-2dec7a0fb8f1,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.8523806614716288,-0.41282679608702033,2011-01-17 16:00:00 +398fb9cf-2a5a-46ff-be6c-1bf9727823ea,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.8723497046476517,-0.42249824510962963,2011-01-17 17:00:00 +c7ff7d7e-016e-469c-a114-13a8c0548f71,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.8723497046476517,-0.42249824510962963,2011-01-17 17:00:00 +78495d76-6a60-4afd-9e94-2b9f12e73921,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.7834227551689714,-0.3794289577613058,2011-01-17 18:00:00 +e753c4c5-8e31-44ef-a61c-744237162130,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.7834227551689714,-0.3794289577613058,2011-01-17 18:00:00 +4e1954fe-d2c1-4a44-ac17-eff4c4428026,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.46916511355848733,-0.2272270353151367,2011-01-17 19:00:00 +c48f919f-c464-405a-a86f-eb5a85a56788,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.46916511355848733,-0.2272270353151367,2011-01-17 19:00:00 +7f69103c-4b2c-411e-833b-1c65425a8b47,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.36143225859150935,-0.1750496322373388,2011-01-17 20:00:00 +25d4cfbd-46a3-42a0-89f1-043eecda761f,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.36143225859150935,-0.1750496322373388,2011-01-17 20:00:00 +8b07e6a6-3664-4759-8d26-1dbd54bbc1df,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.3751862434888121,-0.1817109911527085,2011-01-17 21:00:00 +b94153d1-4460-474f-9d15-cf081f5bc04f,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.3751862434888121,-0.1817109911527085,2011-01-17 21:00:00 +8b044c7e-9d89-42e2-8ced-ead4c20892ad,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.29056204592907253,-0.1407256216703612,2011-01-17 22:00:00 +90497bd6-0f50-4136-b373-94ccfe7713ed,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.29056204592907253,-0.1407256216703612,2011-01-17 22:00:00 +f472218e-65db-4c87-828d-7fdb2af7a56c,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.7166785625571813,-0.3471032699098606,2011-01-17 23:00:00 +575fa72c-a03a-41fe-b868-b85f222b0f5c,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.7166785625571813,-0.3471032699098606,2011-01-17 23:00:00 +8f07824b-a2e4-456c-ba24-e52ad3f4e69c,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.09227124759165843,-0.044689004849606646,2011-01-18 00:00:00 +11e020cc-afc9-4e59-b686-6ce7ad9ad517,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.09227124759165843,-0.044689004849606646,2011-01-18 00:00:00 +a08b4239-bfc4-4a37-a72d-8c4ce938b197,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.16170291318306157,-0.07831629527123292,2011-01-18 01:00:00 +6242d842-1040-4a41-ba44-e78646c4cd85,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.16170291318306157,-0.07831629527123292,2011-01-18 01:00:00 +7064f3aa-d8e9-4a13-ba5c-bd08cb89adbb,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.20826742975071427,-0.10086851994603553,2011-01-18 02:00:00 +da49007d-5efb-4fd1-a333-587510107db0,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.20826742975071427,-0.10086851994603553,2011-01-18 02:00:00 +fc047e29-d263-4030-9cc9-da7c27d6d93d,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.24312665748562165,-0.11775161449562792,2011-01-18 03:00:00 +67be167b-ebaf-44ec-9126-3b2decabfe65,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.24312665748562165,-0.11775161449562792,2011-01-18 03:00:00 +0a74b190-b59f-43eb-873d-8bf821bf14b3,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.39244850039747653,-0.19007148375296465,2011-01-18 04:00:00 +9451050d-8a5d-4b95-98f8-e1789d4e543c,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.39244850039747653,-0.19007148375296465,2011-01-18 04:00:00 +6a76a53d-e994-4646-8fa8-9534d84e013b,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.2828153244546617,-0.13697371322028196,2011-01-18 05:00:00 +cc77f48f-c060-4d18-9cdb-3f0d2d9f1d2f,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.2828153244546617,-0.13697371322028196,2011-01-18 05:00:00 +38be8ed0-40d5-46c3-853d-efadda4f681a,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.390987190651292,-0.18936373914087248,2011-01-18 06:00:00 +0349d2a6-a43d-41eb-ae7d-8bcb83d3f030,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.390987190651292,-0.18936373914087248,2011-01-18 06:00:00 +11cf2ae5-1646-4dcf-a4ec-e3648dbe7aed,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.6775913465991797,-0.3281724672048296,2011-01-18 07:00:00 +9d0836fb-2473-4e4a-912c-e2eb9b7a408e,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.6775913465991797,-0.3281724672048296,2011-01-18 07:00:00 +b518675a-9c62-402e-9e7e-476cc3e9687a,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-1.009832423604613,-0.48908416493369605,2011-01-18 08:00:00 +f428687c-2728-439d-94f1-eb34426f0f5a,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-1.009832423604613,-0.48908416493369605,2011-01-18 08:00:00 +fddca44c-1a8b-45d7-b097-cb31257be270,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.8062984069548205,-0.390508141583766,2011-01-18 09:00:00 +353d6c64-02ff-4dc8-af11-15d02106ee8d,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.8062984069548205,-0.390508141583766,2011-01-18 09:00:00 +11f9fc63-8bf6-4247-994c-0728a4f951f7,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.9784447637769601,-0.47388242746003273,2011-01-18 10:00:00 +81394769-2882-41a1-9907-1f8a03d1f11f,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.9784447637769601,-0.47388242746003273,2011-01-18 10:00:00 +e5670579-cc44-42ca-88a0-aa1c3ed4e80e,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-1.2120573868546007,-0.5870261847856876,2011-01-18 11:00:00 +6c51cac7-b16c-4314-b49e-92746e743b70,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-1.2120573868546007,-0.5870261847856876,2011-01-18 11:00:00 +c4603f77-bd96-4084-8657-e930f1ae6937,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-1.08140291739408,-0.5237473371300951,2011-01-18 12:00:00 +f6fc1fe5-64fa-4bac-b0c5-c8ace90d12f0,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-1.08140291739408,-0.5237473371300951,2011-01-18 12:00:00 +2afa0818-262a-454f-bc75-f33d933983ee,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-1.4169332608223841,-0.686252099296259,2011-01-18 13:00:00 +adfe1467-ae30-4eeb-aee0-272eeabe0b82,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-1.4169332608223841,-0.686252099296259,2011-01-18 13:00:00 +a442df18-cfab-4abe-a46a-bc422ac706ce,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-1.5252263886765398,-0.7387008549180584,2011-01-18 14:00:00 +87b79317-e0e3-40a6-a2f9-eb251aa972fe,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-1.5252263886765398,-0.7387008549180584,2011-01-18 14:00:00 +f1c3e831-1ec0-4889-9818-0212622fc11a,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-1.2868372575870357,-0.6232437291783229,2011-01-18 15:00:00 +5e731a3d-2df3-4481-9f55-6ca6813e2b2f,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-1.2868372575870357,-0.6232437291783229,2011-01-18 15:00:00 +5ba9097c-d838-496c-8838-7cdee2a44a40,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.8523806614716288,-0.41282679608702033,2011-01-18 16:00:00 +1468ed17-97e2-43f3-adee-52b1284a4c6f,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.8523806614716288,-0.41282679608702033,2011-01-18 16:00:00 +5330c78b-79f1-4bef-ba05-f2e732d8a73e,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.8723497046476517,-0.42249824510962963,2011-01-18 17:00:00 +b638da4f-0840-4843-8a2b-1b2acd874ad0,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.8723497046476517,-0.42249824510962963,2011-01-18 17:00:00 +16dedefd-4096-4f78-985f-d3704941362f,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.7834227551689714,-0.3794289577613058,2011-01-18 18:00:00 +0872cb68-2200-40ff-b83d-6b3e5f28b57b,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.7834227551689714,-0.3794289577613058,2011-01-18 18:00:00 +b782263e-c06a-4748-a807-1bef41be6747,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.46916511355848733,-0.2272270353151367,2011-01-18 19:00:00 +16a5ed12-ad7c-4843-813d-c031f7dfc16d,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.46916511355848733,-0.2272270353151367,2011-01-18 19:00:00 +075c880e-e562-445b-92b4-0cf9c1583ced,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.36143225859150935,-0.1750496322373388,2011-01-18 20:00:00 +e7d5c63d-48cd-47ae-b429-daef79e62880,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.36143225859150935,-0.1750496322373388,2011-01-18 20:00:00 +bc27c07a-40ae-40c3-9d70-8d2b2cf3be24,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.3751862434888121,-0.1817109911527085,2011-01-18 21:00:00 +4523b122-1de7-4e7d-a29a-bbad3b8298df,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.3751862434888121,-0.1817109911527085,2011-01-18 21:00:00 +b43bc340-bcd6-4771-aec7-7c8fd47b4808,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.29056204592907253,-0.1407256216703612,2011-01-18 22:00:00 +47c0e058-481c-487a-abc5-5d80e8a52e0a,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.29056204592907253,-0.1407256216703612,2011-01-18 22:00:00 +9dabfd12-1f6b-4459-bc91-765b023cae83,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.7166785625571813,-0.3471032699098606,2011-01-18 23:00:00 +0a31f91b-ed8f-4f8d-b801-2bbc1e59e055,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.7166785625571813,-0.3471032699098606,2011-01-18 23:00:00 +50276e4b-53d9-4577-8b73-36ae59403d84,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.09227124759165843,-0.044689004849606646,2011-01-19 00:00:00 +0c766cbb-b9c7-45e2-ae75-5fee8acd5749,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.09227124759165843,-0.044689004849606646,2011-01-19 00:00:00 +1b63169c-258f-4af0-a4cc-0fbb398f62d7,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.16170291318306157,-0.07831629527123292,2011-01-19 01:00:00 +0349eb44-6cef-4941-b362-48a1c96099e5,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.16170291318306157,-0.07831629527123292,2011-01-19 01:00:00 +3cdf1045-3177-4db2-9f55-cdc0b47c8beb,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.20826742975071427,-0.10086851994603553,2011-01-19 02:00:00 +1fdc192d-2863-4a9f-a676-1f99a3415a9d,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.20826742975071427,-0.10086851994603553,2011-01-19 02:00:00 +e54152df-b301-4802-a0d7-f1810794d7dd,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.24312665748562165,-0.11775161449562792,2011-01-19 03:00:00 +eab2a03c-627a-40d6-8644-4e9a0cf23e72,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.24312665748562165,-0.11775161449562792,2011-01-19 03:00:00 +7aa41a4f-4511-4bdc-ab4b-1471298f2179,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.39244850039747653,-0.19007148375296465,2011-01-19 04:00:00 +5b25417f-2a50-4abc-8769-607d7e66c1d2,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.39244850039747653,-0.19007148375296465,2011-01-19 04:00:00 +beb3977e-37a0-4e0d-b26b-caa3b725b584,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.2828153244546617,-0.13697371322028196,2011-01-19 05:00:00 +9860e5e0-336d-4e5f-bb00-e18b047135bd,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.2828153244546617,-0.13697371322028196,2011-01-19 05:00:00 +4340ef6c-aed8-46c3-be5b-7f60d805c5f7,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.390987190651292,-0.18936373914087248,2011-01-19 06:00:00 +508ab8c9-5ccf-44a2-8dc5-fcbafaff779f,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.390987190651292,-0.18936373914087248,2011-01-19 06:00:00 +04ae3de5-503c-4dc2-bdc8-a4444d10a76e,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.6775913465991797,-0.3281724672048296,2011-01-19 07:00:00 +869c08ae-4e2b-41d1-9892-35c61b12f3e6,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.6775913465991797,-0.3281724672048296,2011-01-19 07:00:00 +a77a2a87-37dd-4a5e-8bec-c604b1828e35,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-1.009832423604613,-0.48908416493369605,2011-01-19 08:00:00 +d46504ab-66bc-4ddf-9ecf-2c202187555e,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-1.009832423604613,-0.48908416493369605,2011-01-19 08:00:00 +0f19c3a4-47f4-45e2-a4ae-a7f614190a3e,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.8062984069548205,-0.390508141583766,2011-01-19 09:00:00 +fa365be3-69da-4ed9-8e6e-1245b4825fad,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.8062984069548205,-0.390508141583766,2011-01-19 09:00:00 +9b37166b-34bd-4ee1-8ba5-7ce117face9a,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.9784447637769601,-0.47388242746003273,2011-01-19 10:00:00 +912155a4-e286-47e0-be10-4da35cac5cc8,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.9784447637769601,-0.47388242746003273,2011-01-19 10:00:00 +838daf12-1898-47aa-ace1-52a0334b21a7,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-1.2120573868546007,-0.5870261847856876,2011-01-19 11:00:00 +0f6f116f-4f20-4dc0-b116-3f2dd7723ee7,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-1.2120573868546007,-0.5870261847856876,2011-01-19 11:00:00 +a3bfe5e4-74cd-4560-ad6d-e14d6d5ddf4f,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-1.08140291739408,-0.5237473371300951,2011-01-19 12:00:00 +1d84e9a9-deeb-446a-a38d-2c0ab5c26fa7,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-1.08140291739408,-0.5237473371300951,2011-01-19 12:00:00 +3ac9ef49-2edf-44ef-a6e5-d33971216aee,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-1.4169332608223841,-0.686252099296259,2011-01-19 13:00:00 +50d48bae-dcf1-4526-8e18-64543f9533e6,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-1.4169332608223841,-0.686252099296259,2011-01-19 13:00:00 +8181a583-d031-4798-b193-689899aa80b9,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-1.5252263886765398,-0.7387008549180584,2011-01-19 14:00:00 +13f92f41-c405-4759-99d8-d4674d039345,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-1.5252263886765398,-0.7387008549180584,2011-01-19 14:00:00 +64628042-7bff-454c-8f01-e50ba67244bc,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-1.2868372575870357,-0.6232437291783229,2011-01-19 15:00:00 +95bb1584-9cd9-499e-a38c-75c0004080aa,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-1.2868372575870357,-0.6232437291783229,2011-01-19 15:00:00 +d7684aad-2a17-4949-b760-18ab15f38b44,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.8523806614716288,-0.41282679608702033,2011-01-19 16:00:00 +0dd635a0-5c79-4739-b8fb-3bac5b8d64ff,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.8523806614716288,-0.41282679608702033,2011-01-19 16:00:00 +ed101e11-3182-4517-b4c9-ac621e723f07,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.8723497046476517,-0.42249824510962963,2011-01-19 17:00:00 +02355150-0b4e-4825-8ecc-870b1c2d9fd4,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.8723497046476517,-0.42249824510962963,2011-01-19 17:00:00 +85f00816-f7e7-45e6-9db3-029357a0c5ad,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.7834227551689714,-0.3794289577613058,2011-01-19 18:00:00 +c4e43d60-ba57-4717-9100-d7bfa78b1d73,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.7834227551689714,-0.3794289577613058,2011-01-19 18:00:00 +f5b746c4-89ca-4a66-bd10-1d424dab9118,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.46916511355848733,-0.2272270353151367,2011-01-19 19:00:00 +b6374de0-e8b2-4ec6-975d-cc9de38cba64,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.46916511355848733,-0.2272270353151367,2011-01-19 19:00:00 +1a12b98d-d8a5-4d51-b706-dea2707c3c13,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.36143225859150935,-0.1750496322373388,2011-01-19 20:00:00 +0555e2bc-534c-451c-88c3-b6cf8462de3e,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.36143225859150935,-0.1750496322373388,2011-01-19 20:00:00 +0083503a-1621-4707-80e5-bcb06bd52df9,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.3751862434888121,-0.1817109911527085,2011-01-19 21:00:00 +2fdc405b-fec2-4bde-aa86-739fd6310b3c,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.3751862434888121,-0.1817109911527085,2011-01-19 21:00:00 +5ad06501-cbd3-44e3-a5e1-9007f4c07fc7,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.29056204592907253,-0.1407256216703612,2011-01-19 22:00:00 +37f2f0c1-22e2-4b78-8264-2f332f0dc617,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.29056204592907253,-0.1407256216703612,2011-01-19 22:00:00 +8e9bbe8f-31d4-4ba1-a584-10ededb4e471,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.7166785625571813,-0.3471032699098606,2011-01-19 23:00:00 +c4f1db0f-9658-4f36-b562-b1159e33d78f,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.7166785625571813,-0.3471032699098606,2011-01-19 23:00:00 +2b2b1959-7ca5-46bf-a2da-2f2d02d8995a,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.09227124759165843,-0.044689004849606646,2011-01-20 00:00:00 +5e24d784-cb72-4510-b2e3-56f7d8f7c4c8,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.09227124759165843,-0.044689004849606646,2011-01-20 00:00:00 +726a8283-bdd0-4da7-9beb-e8b0e675a400,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.16170291318306157,-0.07831629527123292,2011-01-20 01:00:00 +80e9d1e8-2fe3-402c-87b1-d9de14f145d8,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.16170291318306157,-0.07831629527123292,2011-01-20 01:00:00 +9e92bb51-92e3-49a9-a5ca-a9373642a1bb,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.20826742975071427,-0.10086851994603553,2011-01-20 02:00:00 +2be7df8f-3abb-4eec-9c10-62869f6a62b3,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.20826742975071427,-0.10086851994603553,2011-01-20 02:00:00 +03d38a3a-4f00-4be1-901c-b6b051b5050f,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.24312665748562165,-0.11775161449562792,2011-01-20 03:00:00 +d4a48ddb-9907-4ab1-abfc-ef5717dd3002,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.24312665748562165,-0.11775161449562792,2011-01-20 03:00:00 +2f78ca4f-5a4f-4344-99e2-497d09545c01,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.39244850039747653,-0.19007148375296465,2011-01-20 04:00:00 +0dd7a576-4e24-4630-bf1b-fdd585fc3998,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.39244850039747653,-0.19007148375296465,2011-01-20 04:00:00 +451c287b-a2fc-4dfd-bba1-49d934e8436a,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.2828153244546617,-0.13697371322028196,2011-01-20 05:00:00 +0e186b8e-4ded-4a6b-8d8f-eb16f499fbff,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.2828153244546617,-0.13697371322028196,2011-01-20 05:00:00 +ae555a3a-92f8-4d03-abdb-3663548739bb,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.390987190651292,-0.18936373914087248,2011-01-20 06:00:00 +36e12d84-4d68-4593-8020-dcd8705190c8,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.390987190651292,-0.18936373914087248,2011-01-20 06:00:00 +0cf5ee83-45ed-4f5c-83f5-651f99abf80e,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.6775913465991797,-0.3281724672048296,2011-01-20 07:00:00 +66051a2f-baa8-4f72-8a34-1d28d74f5207,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.6775913465991797,-0.3281724672048296,2011-01-20 07:00:00 +caba6938-b032-4bf8-9fad-ac1c08a76206,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-1.009832423604613,-0.48908416493369605,2011-01-20 08:00:00 +ef7d98b8-e3d0-4127-a637-88a92c51a551,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-1.009832423604613,-0.48908416493369605,2011-01-20 08:00:00 +5233b319-333f-4573-ad65-8460aeaedccc,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.8062984069548205,-0.390508141583766,2011-01-20 09:00:00 +71ad16bf-d2b0-4b7e-812a-4d104721cf7f,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.8062984069548205,-0.390508141583766,2011-01-20 09:00:00 +4cf96840-97f5-420e-bf79-5137ae3a8b28,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.9784447637769601,-0.47388242746003273,2011-01-20 10:00:00 +182a0260-51cb-4857-9e54-1a27600fcbb2,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.9784447637769601,-0.47388242746003273,2011-01-20 10:00:00 +7208962c-c53b-4c09-9419-b304691d894a,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-1.2120573868546007,-0.5870261847856876,2011-01-20 11:00:00 +c0048740-0f08-4132-9c0d-9efe4953b1e0,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-1.2120573868546007,-0.5870261847856876,2011-01-20 11:00:00 +141b884c-4bdf-4a2d-8159-c0f148e602cd,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-1.08140291739408,-0.5237473371300951,2011-01-20 12:00:00 +e2909913-1c2b-4039-a295-1b8b4e176793,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-1.08140291739408,-0.5237473371300951,2011-01-20 12:00:00 +5f59d0c7-aaa2-40a5-8fcb-74764a540278,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-1.4169332608223841,-0.686252099296259,2011-01-20 13:00:00 +8c348f76-c5ee-4bf7-beb5-e31b5703e77f,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-1.4169332608223841,-0.686252099296259,2011-01-20 13:00:00 +38b57a46-1656-4037-af65-035ea6e4475d,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-1.5252263886765398,-0.7387008549180584,2011-01-20 14:00:00 +d7537b04-5832-4d74-ac07-5f75e57c504c,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-1.5252263886765398,-0.7387008549180584,2011-01-20 14:00:00 +79cdb3b3-a918-4be8-a231-c384d6fcecad,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-1.2868372575870357,-0.6232437291783229,2011-01-20 15:00:00 +d018fb4f-3f60-4e81-ac8b-d8d4d7b41030,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-1.2868372575870357,-0.6232437291783229,2011-01-20 15:00:00 +9bf697aa-0be7-4395-9b30-7d939591beeb,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.8523806614716288,-0.41282679608702033,2011-01-20 16:00:00 +230cf952-5ef3-48a3-838f-646fd7517c5c,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.8523806614716288,-0.41282679608702033,2011-01-20 16:00:00 +34f940d0-03f3-42b0-919c-0570e4c45bd9,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.8723497046476517,-0.42249824510962963,2011-01-20 17:00:00 +213748fd-efc1-4284-8464-73bca757e28c,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.8723497046476517,-0.42249824510962963,2011-01-20 17:00:00 +9418ac80-0e09-4f24-8f17-477833aa5648,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.7834227551689714,-0.3794289577613058,2011-01-20 18:00:00 +43d01229-a28b-41af-926f-dfa294ad4f0a,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.7834227551689714,-0.3794289577613058,2011-01-20 18:00:00 +d5abd7fe-f9ad-406d-bbcf-90a3c145d211,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.46916511355848733,-0.2272270353151367,2011-01-20 19:00:00 +88d6e4ca-93c0-4a84-9163-0bb57203922c,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.46916511355848733,-0.2272270353151367,2011-01-20 19:00:00 +5c9c68e1-8808-447f-a96b-d212b8fe555d,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.36143225859150935,-0.1750496322373388,2011-01-20 20:00:00 +d23e0b5e-6b31-441e-bb90-2437c5810299,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.36143225859150935,-0.1750496322373388,2011-01-20 20:00:00 +a5ebf069-c8ac-4585-bb09-cf267d5a67b0,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.3751862434888121,-0.1817109911527085,2011-01-20 21:00:00 +a8b81f64-0060-48b2-ad64-1a65e7495795,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.3751862434888121,-0.1817109911527085,2011-01-20 21:00:00 +d42bcc31-86a6-4814-87bf-c8b9b13d230b,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.29056204592907253,-0.1407256216703612,2011-01-20 22:00:00 +18685845-9f73-41ec-b2dd-9b0d09109c43,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.29056204592907253,-0.1407256216703612,2011-01-20 22:00:00 +cb650226-ddfe-474b-b306-ca14445ec45b,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.7166785625571813,-0.3471032699098606,2011-01-20 23:00:00 +6062b01b-62f7-460f-87ee-b4855bda43b4,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.7166785625571813,-0.3471032699098606,2011-01-20 23:00:00 +fab3d40c-a9e7-40e6-9a8c-549d17584c77,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.09227124759165843,-0.044689004849606646,2011-01-21 00:00:00 +78c67a2a-3fe3-4edd-9194-ce045a6b8b9a,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.09227124759165843,-0.044689004849606646,2011-01-21 00:00:00 +529bda13-9077-410b-aea2-0cd918fcc064,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.16170291318306157,-0.07831629527123292,2011-01-21 01:00:00 +83591ab2-c0cc-4393-860f-51299fda7952,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.16170291318306157,-0.07831629527123292,2011-01-21 01:00:00 +acf44ea0-0aa4-42c8-b9bd-3800029fba2b,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.20826742975071427,-0.10086851994603553,2011-01-21 02:00:00 +1e5e5200-ed5e-4467-9cb8-a39d8091ccfb,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.20826742975071427,-0.10086851994603553,2011-01-21 02:00:00 +756c18a6-9d97-4051-8167-2159ee5b8a88,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.24312665748562165,-0.11775161449562792,2011-01-21 03:00:00 +b75570a8-03e3-4716-81a3-cbb3db517fcb,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.24312665748562165,-0.11775161449562792,2011-01-21 03:00:00 +ef78bcf3-7b6b-496d-b6fd-4efbe7d951a0,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.39244850039747653,-0.19007148375296465,2011-01-21 04:00:00 +0092daac-b2f4-4c43-b32a-65033293862c,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.39244850039747653,-0.19007148375296465,2011-01-21 04:00:00 +ebd9b0db-1fe6-46c7-8f19-4a7df0f152da,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.2828153244546617,-0.13697371322028196,2011-01-21 05:00:00 +ca838971-38d1-436e-b395-2793ec0ae8d5,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.2828153244546617,-0.13697371322028196,2011-01-21 05:00:00 +558c090b-e5ce-4c2b-9760-cacb14ba3488,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.390987190651292,-0.18936373914087248,2011-01-21 06:00:00 +1b57733a-7b35-4e12-b35b-92da97b886f3,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.390987190651292,-0.18936373914087248,2011-01-21 06:00:00 +fce3d94b-c6ca-4455-9908-a10a0ca40bfb,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.6775913465991797,-0.3281724672048296,2011-01-21 07:00:00 +07537232-9daf-42a1-b41c-3b8d64b056eb,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.6775913465991797,-0.3281724672048296,2011-01-21 07:00:00 +c654fe83-7e5d-4e4f-87e5-a8e24053af45,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-1.009832423604613,-0.48908416493369605,2011-01-21 08:00:00 +e02dbd56-db98-4655-818e-7421376c04c5,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-1.009832423604613,-0.48908416493369605,2011-01-21 08:00:00 +ec143df3-cd77-4526-bb92-038ca72b378d,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.8062984069548205,-0.390508141583766,2011-01-21 09:00:00 +5e5b1f33-0071-4f65-a670-ef6700bda4ae,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.8062984069548205,-0.390508141583766,2011-01-21 09:00:00 +2b7fbd48-8f8b-4f6b-8b00-85bdaaf0ffdb,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.9784447637769601,-0.47388242746003273,2011-01-21 10:00:00 +9e44be15-1189-462c-92a4-d7a58d421216,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.9784447637769601,-0.47388242746003273,2011-01-21 10:00:00 +3d02fc7f-05f0-44d5-8aaa-d76e72d55023,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-1.2120573868546007,-0.5870261847856876,2011-01-21 11:00:00 +e4e24e53-6f12-4348-a62e-cb8e2f6d16eb,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-1.2120573868546007,-0.5870261847856876,2011-01-21 11:00:00 +1c347b4f-4261-4775-ab2f-f7f10a9426c4,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-1.08140291739408,-0.5237473371300951,2011-01-21 12:00:00 +7f7e509c-9289-44d4-870c-112f7684e601,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-1.08140291739408,-0.5237473371300951,2011-01-21 12:00:00 +43015979-9133-4808-949b-f550e413b1bc,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-1.4169332608223841,-0.686252099296259,2011-01-21 13:00:00 +6664414c-6686-4f7a-b1fd-342e2ab9f161,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-1.4169332608223841,-0.686252099296259,2011-01-21 13:00:00 +e61f432c-386a-460c-8e05-26c5daac89e3,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-1.5252263886765398,-0.7387008549180584,2011-01-21 14:00:00 +26640fcf-a309-41dd-acea-552b9a8f9c99,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-1.5252263886765398,-0.7387008549180584,2011-01-21 14:00:00 +3b2c9d1a-b3e1-4563-8596-8ad3f5394853,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-1.2868372575870357,-0.6232437291783229,2011-01-21 15:00:00 +3632f371-39f0-4b6f-8216-2e56dc46ba0c,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-1.2868372575870357,-0.6232437291783229,2011-01-21 15:00:00 +ac3f29c0-9f55-44a9-bd07-81140b685dd2,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.8523806614716288,-0.41282679608702033,2011-01-21 16:00:00 +773ab1c0-9e56-4d4c-93d3-b9f7cd8a1fea,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.8523806614716288,-0.41282679608702033,2011-01-21 16:00:00 +5bd977c5-e4d9-4871-8181-140b2546b40e,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.8723497046476517,-0.42249824510962963,2011-01-21 17:00:00 +ccd68878-f5a4-498d-80b4-833e8aa2810a,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.8723497046476517,-0.42249824510962963,2011-01-21 17:00:00 +95288dc9-9110-4f14-b161-6692ba46a0a0,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.7834227551689714,-0.3794289577613058,2011-01-21 18:00:00 +3068e8ed-6f5a-4d02-b08d-ebab92f5fb52,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.7834227551689714,-0.3794289577613058,2011-01-21 18:00:00 +9440133c-d745-4adc-bbaf-0cfd42123699,f9eaec6e-ce25-42d7-8265-2f8f4679a816,-0.46916511355848733,-0.2272270353151367,2011-01-21 19:00:00 +df4eed1b-638c-4455-9db4-e84abe732502,d6ad8c73-716a-4244-9ae2-4a3735e492ab,-0.46916511355848733,-0.2272270353151367,2011-01-21 19:00:00 \ No newline at end of file From 64d12c66df3b6901964072160cfffe9f909077be Mon Sep 17 00:00:00 2001 From: Johannes Hiry Date: Tue, 22 Jun 2021 20:06:49 +0200 Subject: [PATCH 076/157] minor adaptions + fixes --- .../io/source/ResultEntitySource.java | 41 +++++++++++-------- .../io/source/csv/CsvResultEntitySource.java | 35 +++++----------- .../csv/CsvResultEntitySourceTest.groovy | 23 +++++++---- .../test/common/ResultEntityTestData.groovy | 7 +++- 4 files changed, 53 insertions(+), 53 deletions(-) diff --git a/src/main/java/edu/ie3/datamodel/io/source/ResultEntitySource.java b/src/main/java/edu/ie3/datamodel/io/source/ResultEntitySource.java index 285aaa3ab..c2bc1bd35 100644 --- a/src/main/java/edu/ie3/datamodel/io/source/ResultEntitySource.java +++ b/src/main/java/edu/ie3/datamodel/io/source/ResultEntitySource.java @@ -17,15 +17,14 @@ import java.util.Set; /** - * Interface that provides the capability to build entities of type - * {@link ResultEntity} container from .csv files. + * Interface that provides the capability to build entities of type {@link ResultEntity} container + * from .csv files. * * @version 0.1 * @since 22 June 2021 */ public interface ResultEntitySource { - // Grid /** * Returns a unique set of {@link NodeResult} instances. * @@ -41,8 +40,9 @@ public interface ResultEntitySource { * Returns a unique set of {@link SwitchResult} instances. * *

This set has to be unique in the sense of object uniqueness but also in the sense of {@link - * java.util.UUID} uniqueness of the provided {@link SwitchResult} which has to be checked manually, - * as {@link SwitchResult#equals(Object)} is NOT restricted on the uuid of {@link SwitchResult}. + * java.util.UUID} uniqueness of the provided {@link SwitchResult} which has to be checked + * manually, as {@link SwitchResult#equals(Object)} is NOT restricted on the uuid of {@link + * SwitchResult}. * * @return a set of object and uuid unique {@link SwitchResult} entities */ @@ -63,8 +63,9 @@ public interface ResultEntitySource { * Returns a unique set of {@link Transformer2WResult} instances. * *

This set has to be unique in the sense of object uniqueness but also in the sense of {@link - * java.util.UUID} uniqueness of the provided {@link Transformer2WResult} which has to be checked manually, - * as {@link Transformer2WResult#equals(Object)} is NOT restricted on the uuid of {@link Transformer2WResult}. + * java.util.UUID} uniqueness of the provided {@link Transformer2WResult} which has to be checked + * manually, as {@link Transformer2WResult#equals(Object)} is NOT restricted on the uuid of {@link + * Transformer2WResult}. * * @return a set of object and uuid unique {@link Transformer2WResult} entities */ @@ -74,14 +75,14 @@ public interface ResultEntitySource { * Returns a unique set of {@link Transformer3WResult} instances. * *

This set has to be unique in the sense of object uniqueness but also in the sense of {@link - * java.util.UUID} uniqueness of the provided {@link Transformer3WResult} which has to be checked manually, - * as {@link Transformer3WResult#equals(Object)} is NOT restricted on the uuid of {@link Transformer3WResult}. + * java.util.UUID} uniqueness of the provided {@link Transformer3WResult} which has to be checked + * manually, as {@link Transformer3WResult#equals(Object)} is NOT restricted on the uuid of {@link + * Transformer3WResult}. * * @return a set of object and uuid unique {@link Transformer3WResult} entities */ Set getTransformer3WResultResults(); - // System Participants /** * Returns a unique set of {@link LoadResult} instances. * @@ -108,8 +109,9 @@ public interface ResultEntitySource { * Returns a unique set of {@link FixedFeedInResult} instances. * *

This set has to be unique in the sense of object uniqueness but also in the sense of {@link - * java.util.UUID} uniqueness of the provided {@link FixedFeedInResult} which has to be checked manually, - * as {@link FixedFeedInResult#equals(Object)} is NOT restricted on the uuid of {@link FixedFeedInResult}. + * java.util.UUID} uniqueness of the provided {@link FixedFeedInResult} which has to be checked + * manually, as {@link FixedFeedInResult#equals(Object)} is NOT restricted on the uuid of {@link + * FixedFeedInResult}. * * @return a set of object and uuid unique {@link FixedFeedInResult} entities */ @@ -152,8 +154,9 @@ public interface ResultEntitySource { * Returns a unique set of {@link StorageResult} instances. * *

This set has to be unique in the sense of object uniqueness but also in the sense of {@link - * java.util.UUID} uniqueness of the provided {@link StorageResult} which has to be checked manually, - * as {@link StorageResult#equals(Object)} is NOT restricted on the uuid of {@link StorageResult}. + * java.util.UUID} uniqueness of the provided {@link StorageResult} which has to be checked + * manually, as {@link StorageResult#equals(Object)} is NOT restricted on the uuid of {@link + * StorageResult}. * * @return a set of object and uuid unique {@link StorageResult} entities */ @@ -196,8 +199,9 @@ public interface ResultEntitySource { * Returns a unique set of {@link CylindricalStorageResult} instances. * *

This set has to be unique in the sense of object uniqueness but also in the sense of {@link - * java.util.UUID} uniqueness of the provided {@link CylindricalStorageResult} which has to be checked manually, - * as {@link CylindricalStorageResult#equals(Object)} is NOT restricted on the uuid of {@link CylindricalStorageResult}. + * java.util.UUID} uniqueness of the provided {@link CylindricalStorageResult} which has to be + * checked manually, as {@link CylindricalStorageResult#equals(Object)} is NOT restricted on the + * uuid of {@link CylindricalStorageResult}. * * @return a set of object and uuid unique {@link CylindricalStorageResult} entities */ @@ -207,8 +211,9 @@ public interface ResultEntitySource { * Returns a unique set of {@link ThermalHouseResult} instances. * *

This set has to be unique in the sense of object uniqueness but also in the sense of {@link - * java.util.UUID} uniqueness of the provided {@link ThermalHouseResult} which has to be checked manually, - * as {@link ThermalHouseResult#equals(Object)} is NOT restricted on the uuid of {@link ThermalHouseResult}. + * java.util.UUID} uniqueness of the provided {@link ThermalHouseResult} which has to be checked + * manually, as {@link ThermalHouseResult#equals(Object)} is NOT restricted on the uuid of {@link + * ThermalHouseResult}. * * @return a set of object and uuid unique {@link ThermalHouseResult} entities */ diff --git a/src/main/java/edu/ie3/datamodel/io/source/csv/CsvResultEntitySource.java b/src/main/java/edu/ie3/datamodel/io/source/csv/CsvResultEntitySource.java index b5937f25a..6539a3646 100644 --- a/src/main/java/edu/ie3/datamodel/io/source/csv/CsvResultEntitySource.java +++ b/src/main/java/edu/ie3/datamodel/io/source/csv/CsvResultEntitySource.java @@ -5,13 +5,10 @@ */ package edu.ie3.datamodel.io.source.csv; -import edu.ie3.datamodel.io.factory.SimpleEntityData; import edu.ie3.datamodel.io.factory.SimpleEntityFactory; import edu.ie3.datamodel.io.factory.result.*; import edu.ie3.datamodel.io.naming.EntityPersistenceNamingStrategy; import edu.ie3.datamodel.io.source.ResultEntitySource; -import edu.ie3.datamodel.models.input.container.SystemParticipants; -import edu.ie3.datamodel.models.input.system.SystemParticipantInput; import edu.ie3.datamodel.models.result.NodeResult; import edu.ie3.datamodel.models.result.ResultEntity; import edu.ie3.datamodel.models.result.connector.LineResult; @@ -26,15 +23,12 @@ import java.util.stream.Collectors; /** - * Source that provides the capability to build entities of type - * {@link ResultEntity} container from .csv files. + * Source that provides the capability to build entities of type {@link ResultEntity} container from + * .csv files. * *

This source is not buffered which means each call on a getter method always tries to * read all data is necessary to return the requested objects in a hierarchical cascading way. * - *

If performance is an issue, it is recommended to read the data cascading starting with reading - * nodes and then using the getters with arguments to avoid reading the same data multiple times. - * *

The resulting sets are always unique on object and UUID base (with distinct UUIDs). * * @version 0.1 @@ -151,23 +145,14 @@ public Set getCylindricalStorageResult() { private Set getResultEntities( Class entityClass, SimpleEntityFactory factory) { - return buildStreamWithFieldsToAttributesMap(entityClass, connector) - .map( - fieldsToAttributes -> { - SimpleEntityData data = new SimpleEntityData(fieldsToAttributes, entityClass); - return (Optional) factory.get(data); - }) - .filter(Optional::isPresent) - .map(Optional::get) - .collect(Collectors.toSet()); -// return filterEmptyOptionals( -// simpleEntityDataStream(entityClass) -// .map( -// entityData -> -// factory -// .get(entityData) -// .flatMap(loadResult -> cast(entityClass, loadResult)))) -// .collect(Collectors.toSet()); + return filterEmptyOptionals( + simpleEntityDataStream(entityClass) + .map( + entityData -> + factory + .get(entityData) + .flatMap(loadResult -> cast(entityClass, loadResult)))) + .collect(Collectors.toSet()); } private Optional cast( diff --git a/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvResultEntitySourceTest.groovy b/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvResultEntitySourceTest.groovy index 15ccf0b6f..1d41c2a4f 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvResultEntitySourceTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvResultEntitySourceTest.groovy @@ -1,3 +1,8 @@ +/* + * © 2021. TU Dortmund University, + * Institute of Energy Systems, Energy Efficiency and Energy Economics, + * Research group Distribution grid planning and operation + */ package edu.ie3.datamodel.io.source.csv import spock.lang.Specification @@ -6,15 +11,15 @@ import edu.ie3.test.common.ResultEntityTestData as retd class CsvResultEntitySourceTest extends Specification implements CsvTestDataMeta { - def "A CsvResultEntitySource should read a csv and extract entities correctly"() { - given: - def csvResultEntitySource = new CsvResultEntitySource(csvSep, - resultEntitiesFolderPath, entityPersistenceNamingStrategy) + def "A CsvResultEntitySource should read a csv and extract entities correctly"() { + given: + def csvResultEntitySource = new CsvResultEntitySource(csvSep, + resultEntitiesFolderPath, entityPersistenceNamingStrategy) - when: - def wecResults = csvResultEntitySource.getWecResults() + when: + def wecResults = csvResultEntitySource.getWecResults() - then: - wecResults.size() == retd.wecResultsSize - } + then: + wecResults.size() == retd.wecResultsSize + } } diff --git a/src/test/groovy/edu/ie3/test/common/ResultEntityTestData.groovy b/src/test/groovy/edu/ie3/test/common/ResultEntityTestData.groovy index 92b8b7c7e..ea6985fc7 100644 --- a/src/test/groovy/edu/ie3/test/common/ResultEntityTestData.groovy +++ b/src/test/groovy/edu/ie3/test/common/ResultEntityTestData.groovy @@ -1,6 +1,11 @@ +/* + * © 2021. TU Dortmund University, + * Institute of Energy Systems, Energy Efficiency and Energy Economics, + * Research group Distribution grid planning and operation + */ package edu.ie3.test.common class ResultEntityTestData { - public static final int wecResultsSize = 1000; + public static final int wecResultsSize = 1000 } From c09a24b1751d951ce39478a11fae78cc7dfb1e97 Mon Sep 17 00:00:00 2001 From: vasilios Date: Wed, 23 Jun 2021 12:10:54 +0300 Subject: [PATCH 077/157] test: extended test for CsvResultEntitySource --- .../csv/CsvResultEntitySourceTest.groovy | 14 +- .../test/common/ResultEntityTestData.groovy | 16 + .../testGridFiles/results/bm_res.csv | 2 + .../testGridFiles/results/pv_res.csv | 1001 +++++++++++++++++ 4 files changed, 1032 insertions(+), 1 deletion(-) create mode 100644 src/test/resources/testGridFiles/results/bm_res.csv create mode 100644 src/test/resources/testGridFiles/results/pv_res.csv diff --git a/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvResultEntitySourceTest.groovy b/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvResultEntitySourceTest.groovy index 1d41c2a4f..a5a9f195a 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvResultEntitySourceTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvResultEntitySourceTest.groovy @@ -17,9 +17,21 @@ class CsvResultEntitySourceTest extends Specification implements CsvTestDataMeta resultEntitiesFolderPath, entityPersistenceNamingStrategy) when: - def wecResults = csvResultEntitySource.getWecResults() + def wecResults = csvResultEntitySource.getWecResults() // existent + def pvResults = csvResultEntitySource.getPvResults() // existent + def bmResults = csvResultEntitySource.getBmResults() // existent + def chpResults = csvResultEntitySource.getChpResults() // non-existent then: wecResults.size() == retd.wecResultsSize + pvResults.size() == retd.pvResultsSize + bmResults.size() == retd.bmResultsSize + chpResults.isEmpty() + + bmResults.first().getUuid() == retd.bmResultUuid + bmResults.first().getInputModel() == retd.bmInputModelUuid + bmResults.first().getP() == retd.bmActivePower + bmResults.first().getQ() == retd.bmReactivePower + bmResults.first().getTime() == retd.bmZonedDateTime } } diff --git a/src/test/groovy/edu/ie3/test/common/ResultEntityTestData.groovy b/src/test/groovy/edu/ie3/test/common/ResultEntityTestData.groovy index ea6985fc7..f4214acc6 100644 --- a/src/test/groovy/edu/ie3/test/common/ResultEntityTestData.groovy +++ b/src/test/groovy/edu/ie3/test/common/ResultEntityTestData.groovy @@ -5,7 +5,23 @@ */ package edu.ie3.test.common +import edu.ie3.util.TimeUtil +import edu.ie3.util.quantities.PowerSystemUnits +import tech.units.indriya.ComparableQuantity +import tech.units.indriya.quantity.Quantities + +import javax.measure.quantity.Power +import java.time.ZonedDateTime + class ResultEntityTestData { public static final int wecResultsSize = 1000 + public static final int pvResultsSize = 1000 + public static final int bmResultsSize = 1 + + public static final UUID bmResultUuid = UUID.fromString("44b9be7a-af97-4c2a-bb84-9d21abba442f") + public static final UUID bmInputModelUuid = UUID.fromString("66df67d0-c789-4393-b0a5-897a3bc821a2") + public static final ComparableQuantity bmActivePower = Quantities.getQuantity(-1, PowerSystemUnits.MEGAWATT) + public static final ComparableQuantity bmReactivePower = Quantities.getQuantity(-5, PowerSystemUnits.MEGAVAR) + public static final ZonedDateTime bmZonedDateTime = TimeUtil.withDefaults.toZonedDateTime("2011-01-01 00:00:00") } diff --git a/src/test/resources/testGridFiles/results/bm_res.csv b/src/test/resources/testGridFiles/results/bm_res.csv new file mode 100644 index 000000000..cbd82a361 --- /dev/null +++ b/src/test/resources/testGridFiles/results/bm_res.csv @@ -0,0 +1,2 @@ +uuid,inputModel,p,q,time +44b9be7a-af97-4c2a-bb84-9d21abba442f,66df67d0-c789-4393-b0a5-897a3bc821a2,-1,-5,2011-01-01 00:00:00 \ No newline at end of file diff --git a/src/test/resources/testGridFiles/results/pv_res.csv b/src/test/resources/testGridFiles/results/pv_res.csv new file mode 100644 index 000000000..a7dffdd53 --- /dev/null +++ b/src/test/resources/testGridFiles/results/pv_res.csv @@ -0,0 +1,1001 @@ +uuid,inputModel,p,q,time +44b9be7a-af97-4c2a-bb84-9d21abca442e,53df57d0-c789-4393-b0a5-897a3bc821a2,0,0,2011-01-01 00:00:00 +8e8d0a05-fca1-4f93-95cc-0dfcec786310,fad9b8c1-9ded-4856-ab91-f41217259363,0,0,2011-01-01 00:00:00 +6b61cf3f-6324-41de-8be0-879019a3079b,5a612315-ad74-4d98-b350-7e44630b8a6e,0,0,2011-01-01 00:00:00 +60eb3de2-ea21-46b9-94e9-dc272cd19d12,cb646f5c-890a-4317-81eb-c7aeffb86389,0,0,2011-01-01 00:00:00 +44bb9253-d58c-4660-ae81-fcc1327954a0,5b38af42-1ee4-4a41-b666-ea141187df37,0,0,2011-01-01 00:00:00 +3635d6f6-6715-45c6-b5ce-98f660ad891c,6a909b40-9c28-4e7a-9a86-f52bb0c9d7e9,0,0,2011-01-01 00:00:00 +5099eb8a-9990-4560-a109-10f8261b85f7,4e655530-909f-4acf-8ed9-d19f849265df,0,0,2011-01-01 00:00:00 +1ad088a5-0025-487a-9f75-02537393533f,83f68d87-a893-4e7f-b21d-4874929f927d,0,0,2011-01-01 00:00:00 +1099af24-962f-41cf-bdf9-c2acf1729376,3d74e9fc-be60-41bf-9339-cd067c9378a2,0,0,2011-01-01 00:00:00 +3d86170a-bc2e-4aa5-94b3-426dfea6ee7f,645b0617-e6ab-438b-a141-9c497d720e4b,0,0,2011-01-01 00:00:00 +96a71a5c-a5fb-452f-b7d8-c7f9bc272aa5,71e4f6f1-2b50-41ce-adb7-80a4e309bd63,0,0,2011-01-01 00:00:00 +a377f1dc-1bd2-4cff-a58b-7486e23c6dc9,90a5aeab-5a04-4580-bc1c-4d8ea399cc8c,0,0,2011-01-01 00:00:00 +5880b9e2-efc5-4c97-afb6-44545e3f81bf,51ed457c-81ff-470f-b45b-30a94a965c36,0,0,2011-01-01 00:00:00 +d591f523-f45d-40b0-a198-a66bd3bdbc74,fa6d5184-b205-4b1b-839f-7b21ac956c28,0,0,2011-01-01 00:00:00 +e0bcb4f5-b1db-495d-9557-efa867336479,e04c6258-0ee5-4928-96c1-8e04acbbcc8f,0,0,2011-01-01 00:00:00 +f261254f-f56b-47a7-a9a3-c0840e11ba8f,e87c9d51-cfec-4e04-9790-16cd6b238d51,0,0,2011-01-01 00:00:00 +f26a0a82-914e-4688-b866-de28b212a386,0c8bcc26-ce6e-4d2c-acdd-e304cfb3c02f,0,0,2011-01-01 00:00:00 +7d7dc918-88de-43ad-a790-53c416f46797,19d949f2-54ff-483c-928b-2438fc760385,0,0,2011-01-01 00:00:00 +74b2660f-fcfe-4eb2-b56c-40be91848bcc,b938f0ab-e2c4-469e-9979-303d42224932,0,0,2011-01-01 00:00:00 +52c6a5f8-8e01-4cca-9132-bfabc0b718e5,0a2cdd93-b055-4e0b-8fce-088968316df4,0,0,2011-01-01 00:00:00 +56c8bd88-ca63-44e4-b594-6fe33441cfa4,4ff2235f-24d6-440c-bf09-76ef3eaa340d,0,0,2011-01-01 00:00:00 +5a60eba5-d525-4355-bc68-a5298d51650b,3776dfa9-f161-419e-9014-9cfb5a379025,0,0,2011-01-01 00:00:00 +19943147-03f6-4beb-96fa-24264ce8e908,5206abaa-3abc-4a15-a8f2-778139a3fc65,0,0,2011-01-01 00:00:00 +174454fe-64fd-4e59-b2f5-f411bd852451,83a0dcd8-d6ad-49bf-8cbc-5a5774ed18ac,0,0,2011-01-01 00:00:00 +b44b522e-7972-4543-bc5e-907cb870b30d,2f99a367-0fc2-4ca2-ab58-cb5d7004a6bd,0,0,2011-01-01 00:00:00 +5925e4ac-00d7-4a3b-8bff-910f3e4f9819,de8cfef5-7620-4b9e-9a10-1faebb5a80c0,0,0,2011-01-01 00:00:00 +8dc40200-f14a-487f-a254-8726c1cf2ef1,287285e2-c0ac-40dc-a15f-82a5de6ef37f,0,0,2011-01-01 00:00:00 +09060903-9219-4349-8c9b-9d0edddfecfe,d350f4a1-c675-4f22-8fda-26ad0bd03edb,0,0,2011-01-01 00:00:00 +a8d2b42c-e470-4035-b6b0-53ef3cdcf2d2,a364e957-2dcc-49c2-b213-2a68d9c3ee83,0,0,2011-01-01 00:00:00 +629da66f-6ac6-4776-b8c1-e18a386df72e,a50f12e1-33ed-4992-8579-da1800d5eff7,0,0,2011-01-01 00:00:00 +23ec865b-38f8-4f13-8aad-961c8ad74e8f,d142aeef-1b06-4910-88b5-0bce6ef7c1e2,0,0,2011-01-01 00:00:00 +ef911d9c-3555-4f26-b180-5d80e12dd069,41a126ec-6254-4b68-821b-ecebb98ad0fd,0,0,2011-01-01 00:00:00 +b57613ad-7e28-4dda-8f48-56b86a40a58c,c023f6f8-c35c-46d4-9ab7-1d098994d65d,0,0,2011-01-01 00:00:00 +450943c4-03f8-4f1a-a044-fe5c44df429b,114efaa0-dd3f-47ce-bbbe-856cacb034d1,0,0,2011-01-01 00:00:00 +e486001c-3f56-4833-8794-24383b30b377,bb929fcc-a67e-423c-9569-73364746383d,0,0,2011-01-01 00:00:00 +af1cbe8d-3104-4078-bdf0-157aa3e31581,61788990-7681-42c0-9d0c-cfd22d4d3a83,0,0,2011-01-01 00:00:00 +3f851953-b903-4a8c-8b78-ab54af23c75a,0818deae-c7d9-4252-ac4c-f147004e5752,0,0,2011-01-01 00:00:00 +3b703d1e-dd2f-4994-beb6-8a2fd15feacc,241b5dad-aaac-4f7c-8152-a32839fcfa13,0,0,2011-01-01 00:00:00 +67ac51c6-d0d9-47eb-8078-f535bc3aea15,dcc2950b-23cc-407d-b53f-0056234f7ee1,0,0,2011-01-01 00:00:00 +601b047d-a136-4e41-9a2c-d2814df626c9,e447506e-3d43-4bce-8aab-a7ca8b7fbc45,0,0,2011-01-01 00:00:00 +f7c76dba-d353-4513-987f-7b0ea7590466,75a4050d-bdfd-4ca4-a1fd-a5d729613ed5,0,0,2011-01-01 00:00:00 +5136221d-597d-4128-aa8b-b0a8d1029aad,6cac0624-6336-4418-bcf0-990abcdb824b,0,0,2011-01-01 00:00:00 +a65dbeae-a2c1-4ba8-89f0-2ee0061acfde,95b1b117-1c7b-4a69-b10e-8963fbced23a,0,0,2011-01-01 00:00:00 +71f37c51-7165-498b-a8d9-a9bca689c6fb,033e5854-65d9-4a14-8b5c-6aa675ded4a2,0,0,2011-01-01 00:00:00 +65a1f97a-1fbd-4571-a912-3818b4f72372,ef4764b4-27b9-44bd-8b7d-6903df8b4a72,0,0,2011-01-01 00:00:00 +7607bf14-410d-4599-a4a3-c3d245dc9a98,1a738cc5-b8f0-41f0-9f60-85073dc80136,0,0,2011-01-01 00:00:00 +0c0f63a1-46a2-4275-a53f-8fe0b1773f17,2560c371-f420-4c2a-b4e6-e04c11b64c03,0,0,2011-01-01 00:00:00 +b9f0b50a-c71e-443e-a9be-c5b7c55c8fee,6291eea2-689c-48f3-b7a9-5054bf567cab,0,0,2011-01-01 00:00:00 +22a82d3c-c782-4f1c-b275-5abb0f79d7d2,9b3ae847-e2ea-4598-b56e-35501f61f70c,0,0,2011-01-01 00:00:00 +d1dee914-0d4d-486a-94a7-7ff391f7af21,4fa4ce55-0944-463a-a91b-3a3806286e0b,0,0,2011-01-01 00:00:00 +a57c08e7-9f0d-4872-93bc-f37bc70d1265,d3bacaf6-8558-4df5-8481-8d684ef3e14d,0,0,2011-01-01 00:00:00 +d906fefa-8116-48df-b045-6e7c0d229d93,0fbb53fd-cadb-4170-9f31-5af1cd05fd11,0,0,2011-01-01 00:00:00 +44664644-621b-464c-a046-db25ce02c25b,cbcfa285-fe3a-4a98-bb4a-05d28d466c79,0,0,2011-01-01 00:00:00 +b646f163-1ab0-4e40-8269-d498bf8bbe40,3c98b5a6-1d44-449e-83e4-d610a4846d8f,0,0,2011-01-01 00:00:00 +3628f72e-74fb-4b88-93ae-7a530661a442,4fc73066-d9a2-4175-84e5-f3692e050492,0,0,2011-01-01 00:00:00 +ef66981a-7e7f-463c-9211-0b71fb69b104,a1eb7fc1-3bee-4b65-a387-ef3046644bf0,0,0,2011-01-01 00:00:00 +136dd74d-fa83-4d7d-8654-b0a4b8229cea,b8209f35-1405-4f7f-b1ec-3c853954e2a8,0,0,2011-01-01 00:00:00 +075daea8-38e6-4b1b-a1a3-618a26b1132e,9d7cd8e2-d859-4f4f-9c01-abba06ef2e2c,0,0,2011-01-01 00:00:00 +141b8ec6-e625-4a8f-9121-5454d0e30e31,23e79154-30f9-44c5-b9c7-ab80ab7a4b6a,0,0,2011-01-01 00:00:00 +c2ed3c8d-5a65-4589-8753-b523fb415179,62b0cca9-b44c-4eda-999f-ae2832319848,0,0,2011-01-01 00:00:00 +4c0c48f6-f9fd-4c5d-9074-1a1902af9968,26647b27-a278-4ddb-a68e-8437d24798ca,0,0,2011-01-01 00:00:00 +da061ff9-9c9c-4b44-8279-b7ab641b39c4,de40f0bd-3793-4b02-b663-31d282b33f61,0,0,2011-01-01 00:00:00 +0487eb06-e820-4429-9e18-2bd2fc5f6680,819018d3-4601-4c39-9d41-4a911572d406,0,0,2011-01-01 00:00:00 +7bc46274-fe3b-4564-b68b-b9c8f33ab90b,0fbb53fd-cadb-4170-9f31-5af1cd05fd11,0,0,2011-01-01 01:00:00 +7ad3cb3a-0c0c-481f-a4a5-03db4abb4434,4ff2235f-24d6-440c-bf09-76ef3eaa340d,0,0,2011-01-01 01:00:00 +a7ab650e-18c2-4064-8623-b3a41e75ce38,b938f0ab-e2c4-469e-9979-303d42224932,0,0,2011-01-01 01:00:00 +0bc9cf60-8b81-4413-8d10-30bf5349b1a5,3c98b5a6-1d44-449e-83e4-d610a4846d8f,0,0,2011-01-01 01:00:00 +08ccba68-730e-4b03-b16a-035a56602c67,9b3ae847-e2ea-4598-b56e-35501f61f70c,0,0,2011-01-01 01:00:00 +a01470e7-cc89-49cd-8c67-ad4ee62c44d5,de40f0bd-3793-4b02-b663-31d282b33f61,0,0,2011-01-01 01:00:00 +d0ca11ba-f106-4922-a7a8-9bca0c45c87c,6291eea2-689c-48f3-b7a9-5054bf567cab,0,0,2011-01-01 01:00:00 +8ae6f259-3405-4004-820b-e019f55733be,4fa4ce55-0944-463a-a91b-3a3806286e0b,0,0,2011-01-01 01:00:00 +675a7c2e-535b-47b2-848a-c0c7d1aab3f2,4e655530-909f-4acf-8ed9-d19f849265df,0,0,2011-01-01 01:00:00 +5bcdda82-3942-4112-8e61-f70804ffc672,3776dfa9-f161-419e-9014-9cfb5a379025,0,0,2011-01-01 01:00:00 +6441e7ea-f348-4a45-9e13-6b0970da8799,2f99a367-0fc2-4ca2-ab58-cb5d7004a6bd,0,0,2011-01-01 01:00:00 +f93e8bd9-e45b-4f9a-bf47-e2e643d6c56e,e04c6258-0ee5-4928-96c1-8e04acbbcc8f,0,0,2011-01-01 01:00:00 +99fac5a8-2ff5-4f4c-a0b1-29179db60471,62b0cca9-b44c-4eda-999f-ae2832319848,0,0,2011-01-01 01:00:00 +35150000-fa06-4b11-b2a0-db4dad038fd1,9d7cd8e2-d859-4f4f-9c01-abba06ef2e2c,0,0,2011-01-01 01:00:00 +e8e4f1a2-8f6e-433e-858f-f2c1d3aafb5f,114efaa0-dd3f-47ce-bbbe-856cacb034d1,0,0,2011-01-01 01:00:00 +0ab340e1-b22e-4941-a597-348a51fa20d0,3d74e9fc-be60-41bf-9339-cd067c9378a2,0,0,2011-01-01 01:00:00 +6b3d601a-9641-46fd-9264-e47fa58f8329,4fc73066-d9a2-4175-84e5-f3692e050492,0,0,2011-01-01 01:00:00 +e9c96f7b-b2f4-42b3-a90d-2dc6d975fb4b,23e79154-30f9-44c5-b9c7-ab80ab7a4b6a,0,0,2011-01-01 01:00:00 +0501055b-ed12-4d9d-bf2b-d11c807aae02,fa6d5184-b205-4b1b-839f-7b21ac956c28,0,0,2011-01-01 01:00:00 +bc6bedfc-2cf0-4958-a144-f339e2c60757,90a5aeab-5a04-4580-bc1c-4d8ea399cc8c,0,0,2011-01-01 01:00:00 +09a3387c-518a-4292-af47-3663cdb58dfa,41a126ec-6254-4b68-821b-ecebb98ad0fd,0,0,2011-01-01 01:00:00 +b0a5c71a-5d30-4dd0-97a1-b175c4cf86b4,bb929fcc-a67e-423c-9569-73364746383d,0,0,2011-01-01 01:00:00 +4726db10-9045-4361-a071-79cb31005fa4,cbcfa285-fe3a-4a98-bb4a-05d28d466c79,0,0,2011-01-01 01:00:00 +ae1db99a-5bf3-45ac-a404-6231fe2f498b,c023f6f8-c35c-46d4-9ab7-1d098994d65d,0,0,2011-01-01 01:00:00 +d1a4a9ee-c45a-4c7f-956c-ad9e9d45c7bb,71e4f6f1-2b50-41ce-adb7-80a4e309bd63,0,0,2011-01-01 01:00:00 +17a16e24-a0db-4c8a-8af0-351d735a2cb9,d3bacaf6-8558-4df5-8481-8d684ef3e14d,0,0,2011-01-01 01:00:00 +6f900e13-428b-448d-b2e4-4071b417d8dd,5a612315-ad74-4d98-b350-7e44630b8a6e,0,0,2011-01-01 01:00:00 +e86a8a0c-ac95-4bf4-86e3-f1f1b2e3a798,0c8bcc26-ce6e-4d2c-acdd-e304cfb3c02f,0,0,2011-01-01 01:00:00 +fda95825-2c65-45b6-a528-f8acee2bdf22,e447506e-3d43-4bce-8aab-a7ca8b7fbc45,0,0,2011-01-01 01:00:00 +012e5261-549a-41e0-a1e7-9e4eeda3f1e9,19d949f2-54ff-483c-928b-2438fc760385,0,0,2011-01-01 01:00:00 +18158a06-cf4a-4428-8e3f-43eb17a5a5d5,5206abaa-3abc-4a15-a8f2-778139a3fc65,0,0,2011-01-01 01:00:00 +3d89846f-ea41-4c8c-af10-8f864d163af1,e87c9d51-cfec-4e04-9790-16cd6b238d51,0,0,2011-01-01 01:00:00 +b842c04e-aede-4a2e-8f27-e30726049749,ef4764b4-27b9-44bd-8b7d-6903df8b4a72,0,0,2011-01-01 01:00:00 +b8f17f01-2da6-40e3-9ab5-426e2a2eeca2,2560c371-f420-4c2a-b4e6-e04c11b64c03,0,0,2011-01-01 01:00:00 +5a4cad41-9835-482b-820b-00e3cc287c63,a50f12e1-33ed-4992-8579-da1800d5eff7,0,0,2011-01-01 01:00:00 +1124b4bf-4cd2-4b04-b8a9-7655559a1811,de8cfef5-7620-4b9e-9a10-1faebb5a80c0,0,0,2011-01-01 01:00:00 +c6a421f3-b9a6-4337-a196-899446e9c47b,75a4050d-bdfd-4ca4-a1fd-a5d729613ed5,0,0,2011-01-01 01:00:00 +a15d378f-844d-43ba-beb4-65e4c43937b2,0a2cdd93-b055-4e0b-8fce-088968316df4,0,0,2011-01-01 01:00:00 +24326e9c-dcdb-426d-b848-8d8381381bca,26647b27-a278-4ddb-a68e-8437d24798ca,0,0,2011-01-01 01:00:00 +f8de8998-584c-4e36-9167-b6931cc853a4,033e5854-65d9-4a14-8b5c-6aa675ded4a2,0,0,2011-01-01 01:00:00 +de04eebc-44ac-405d-a23e-59955bd1eaa7,241b5dad-aaac-4f7c-8152-a32839fcfa13,0,0,2011-01-01 01:00:00 +e7e507a5-0843-4f20-bbd5-ee19c6ddcdab,b8209f35-1405-4f7f-b1ec-3c853954e2a8,0,0,2011-01-01 01:00:00 +e36b27ec-97c5-4d1f-869a-1eb6a2790a3d,83a0dcd8-d6ad-49bf-8cbc-5a5774ed18ac,0,0,2011-01-01 01:00:00 +09b3e143-cc6e-4115-9b0a-fcc5b7d35a8d,0818deae-c7d9-4252-ac4c-f147004e5752,0,0,2011-01-01 01:00:00 +b8bc69a0-603c-4bce-a97f-f84f664bf361,83f68d87-a893-4e7f-b21d-4874929f927d,0,0,2011-01-01 01:00:00 +4d1f990a-ebaa-43b6-9c53-da233488d3f6,287285e2-c0ac-40dc-a15f-82a5de6ef37f,0,0,2011-01-01 01:00:00 +6d41588a-358a-449d-afaa-c2dc9aea21a4,a364e957-2dcc-49c2-b213-2a68d9c3ee83,0,0,2011-01-01 01:00:00 +60f61233-6031-4b28-9e01-dc252af02c46,d142aeef-1b06-4910-88b5-0bce6ef7c1e2,0,0,2011-01-01 01:00:00 +8ba11fdb-5167-4f38-b8a3-e7def218b781,6a909b40-9c28-4e7a-9a86-f52bb0c9d7e9,0,0,2011-01-01 01:00:00 +e44e638e-aa1a-41f5-9531-c884851e7dd7,cb646f5c-890a-4317-81eb-c7aeffb86389,0,0,2011-01-01 01:00:00 +edb97c6b-fa7d-4003-8707-c90d01072193,6cac0624-6336-4418-bcf0-990abcdb824b,0,0,2011-01-01 01:00:00 +4cc27834-b178-416a-a1e0-a6ebc49a3c3b,51ed457c-81ff-470f-b45b-30a94a965c36,0,0,2011-01-01 01:00:00 +49caf917-fdc9-4db2-a86a-f5c0f022c98d,a1eb7fc1-3bee-4b65-a387-ef3046644bf0,0,0,2011-01-01 01:00:00 +dc8ae1ff-258f-4cce-9b89-5ba708107e62,dcc2950b-23cc-407d-b53f-0056234f7ee1,0,0,2011-01-01 01:00:00 +45d776dd-8dcb-4079-b09e-223afcd7a769,5b38af42-1ee4-4a41-b666-ea141187df37,0,0,2011-01-01 01:00:00 +205d02a7-cafc-4e0e-9af9-db97a6301405,53df57d0-c789-4393-b0a5-897a3bc821a2,0,0,2011-01-01 01:00:00 +85524587-5402-4b4b-9211-75edb37e6006,1a738cc5-b8f0-41f0-9f60-85073dc80136,0,0,2011-01-01 01:00:00 +c7b058e9-33a5-41ee-87b3-298351b056be,d350f4a1-c675-4f22-8fda-26ad0bd03edb,0,0,2011-01-01 01:00:00 +84c32912-70f0-469d-be32-c710ee59aa46,95b1b117-1c7b-4a69-b10e-8963fbced23a,0,0,2011-01-01 01:00:00 +c806565b-acc6-4edb-973b-052abf0a46cb,645b0617-e6ab-438b-a141-9c497d720e4b,0,0,2011-01-01 01:00:00 +2fa9ce5d-1439-492f-8cd3-fee0bbc68b16,61788990-7681-42c0-9d0c-cfd22d4d3a83,0,0,2011-01-01 01:00:00 +fef5db89-91ce-4a83-a33f-bcf53669845c,819018d3-4601-4c39-9d41-4a911572d406,0,0,2011-01-01 01:00:00 +cdaf74e1-145b-4f0e-b910-08e7ceced64e,fad9b8c1-9ded-4856-ab91-f41217259363,0,0,2011-01-01 01:00:00 +457987f3-90fa-40e8-b1d8-a3c5e192d5c9,cbcfa285-fe3a-4a98-bb4a-05d28d466c79,0,0,2011-01-01 02:00:00 +8e3c1eda-4b7e-4b4b-8f83-80667f030165,819018d3-4601-4c39-9d41-4a911572d406,0,0,2011-01-01 02:00:00 +b1d866a5-ddc1-4423-b519-bad450b5c7bd,a1eb7fc1-3bee-4b65-a387-ef3046644bf0,0,0,2011-01-01 02:00:00 +7271f13c-9812-48bb-8de4-9d647ac1b698,4fa4ce55-0944-463a-a91b-3a3806286e0b,0,0,2011-01-01 02:00:00 +ec05c995-ac20-4342-9327-dcd3974be5b7,c023f6f8-c35c-46d4-9ab7-1d098994d65d,0,0,2011-01-01 02:00:00 +52155534-eec3-4fa0-bedc-324175b04c4b,114efaa0-dd3f-47ce-bbbe-856cacb034d1,0,0,2011-01-01 02:00:00 +213e5c6a-b402-4017-b56f-19a96a64bc96,6a909b40-9c28-4e7a-9a86-f52bb0c9d7e9,0,0,2011-01-01 02:00:00 +64b868d7-c3ed-49f1-b4fb-18bcfbc745c5,dcc2950b-23cc-407d-b53f-0056234f7ee1,0,0,2011-01-01 02:00:00 +4087a152-9b40-4053-8808-a1530fe12407,9d7cd8e2-d859-4f4f-9c01-abba06ef2e2c,0,0,2011-01-01 02:00:00 +0cb19f45-8486-4419-81eb-1d3b738e7062,62b0cca9-b44c-4eda-999f-ae2832319848,0,0,2011-01-01 02:00:00 +8919caee-743c-4e71-9a7c-7c9747b12360,6291eea2-689c-48f3-b7a9-5054bf567cab,0,0,2011-01-01 02:00:00 +be3542a7-4f4f-4a7f-bf61-9e622829b8aa,5a612315-ad74-4d98-b350-7e44630b8a6e,0,0,2011-01-01 02:00:00 +ce3d41e8-5833-44f4-90b2-6f3c5e3b86ca,bb929fcc-a67e-423c-9569-73364746383d,0,0,2011-01-01 02:00:00 +046cdcc4-bb39-4b02-9563-c95ab7328aa7,41a126ec-6254-4b68-821b-ecebb98ad0fd,0,0,2011-01-01 02:00:00 +5bf3c8ab-e1d4-4bc5-b3fc-840044df0f26,3776dfa9-f161-419e-9014-9cfb5a379025,0,0,2011-01-01 02:00:00 +0f6603c5-ad3a-48ae-8b7d-254b82a52807,e447506e-3d43-4bce-8aab-a7ca8b7fbc45,0,0,2011-01-01 02:00:00 +c00ee42e-0072-487d-8259-6b9851b3214b,4fc73066-d9a2-4175-84e5-f3692e050492,0,0,2011-01-01 02:00:00 +fc31f33d-23ad-4fb5-92f1-1ad727c27257,19d949f2-54ff-483c-928b-2438fc760385,0,0,2011-01-01 02:00:00 +55479234-7fcb-4b60-92d0-61b4a20cb6fa,5b38af42-1ee4-4a41-b666-ea141187df37,0,0,2011-01-01 02:00:00 +3c70dd92-5d16-4a58-8a36-d44b7c51e1f1,fad9b8c1-9ded-4856-ab91-f41217259363,0,0,2011-01-01 02:00:00 +aa52ce04-972c-43f2-9a5b-5af0ce030591,d3bacaf6-8558-4df5-8481-8d684ef3e14d,0,0,2011-01-01 02:00:00 +fcd39857-05ba-4aa0-a57f-0f4b4b91a8f2,4ff2235f-24d6-440c-bf09-76ef3eaa340d,0,0,2011-01-01 02:00:00 +791e1a6a-7205-4d10-8958-b53e9a0126d2,0c8bcc26-ce6e-4d2c-acdd-e304cfb3c02f,0,0,2011-01-01 02:00:00 +9870e86b-b950-4c36-8dbd-2e641cbecb1f,0a2cdd93-b055-4e0b-8fce-088968316df4,0,0,2011-01-01 02:00:00 +0f8acc8b-e0ae-404f-9aec-9fc72612e9b0,4e655530-909f-4acf-8ed9-d19f849265df,0,0,2011-01-01 02:00:00 +64778b51-f31a-4786-9e7d-a7e8f051da55,2f99a367-0fc2-4ca2-ab58-cb5d7004a6bd,0,0,2011-01-01 02:00:00 +5a1dafc2-2bec-4501-90ff-66755d0f1712,e87c9d51-cfec-4e04-9790-16cd6b238d51,0,0,2011-01-01 02:00:00 +4f853a1c-6b83-420f-ae42-766dd3c1dc46,241b5dad-aaac-4f7c-8152-a32839fcfa13,0,0,2011-01-01 02:00:00 +1a28c03f-ac0d-48ba-ab75-9334ef08817e,de8cfef5-7620-4b9e-9a10-1faebb5a80c0,0,0,2011-01-01 02:00:00 +7f2449b6-a339-4033-a158-5d3cb68a84ae,0fbb53fd-cadb-4170-9f31-5af1cd05fd11,0,0,2011-01-01 02:00:00 +349854ab-5124-4fe1-907b-b221783d587e,287285e2-c0ac-40dc-a15f-82a5de6ef37f,0,0,2011-01-01 02:00:00 +4a4832e9-04ef-47a7-8dae-b7f9d13ad840,1a738cc5-b8f0-41f0-9f60-85073dc80136,0,0,2011-01-01 02:00:00 +7bdb6c8b-5a24-455a-b3ae-803fee3ea7bc,95b1b117-1c7b-4a69-b10e-8963fbced23a,0,0,2011-01-01 02:00:00 +2dcee1d7-524e-476a-b354-34478b1aad13,71e4f6f1-2b50-41ce-adb7-80a4e309bd63,0,0,2011-01-01 02:00:00 +85109592-6ca9-4b5a-8b46-119db57035d5,e04c6258-0ee5-4928-96c1-8e04acbbcc8f,0,0,2011-01-01 02:00:00 +ab2cb2a4-1af5-40ef-b923-f25d85a0f018,5206abaa-3abc-4a15-a8f2-778139a3fc65,0,0,2011-01-01 02:00:00 +659c141c-183c-44d1-8bc5-b31a7b336b76,a50f12e1-33ed-4992-8579-da1800d5eff7,0,0,2011-01-01 02:00:00 +4bb4aa08-6aa7-4560-9448-61352050135b,90a5aeab-5a04-4580-bc1c-4d8ea399cc8c,0,0,2011-01-01 02:00:00 +f8f6eb50-ac57-40e3-9d1c-094aa4600159,033e5854-65d9-4a14-8b5c-6aa675ded4a2,0,0,2011-01-01 02:00:00 +01dbb78a-24cc-423f-90a4-08d0453277df,51ed457c-81ff-470f-b45b-30a94a965c36,0,0,2011-01-01 02:00:00 +86c0b507-4b41-43f1-b864-178d25e8367a,61788990-7681-42c0-9d0c-cfd22d4d3a83,0,0,2011-01-01 02:00:00 +4005f10a-053c-472c-8ccf-ee1a1f50dca2,2560c371-f420-4c2a-b4e6-e04c11b64c03,0,0,2011-01-01 02:00:00 +1cc5b942-adf9-499b-bb5f-44715c1c4487,3d74e9fc-be60-41bf-9339-cd067c9378a2,0,0,2011-01-01 02:00:00 +0d5ae931-ff9d-4fd5-8726-6321153582e2,83a0dcd8-d6ad-49bf-8cbc-5a5774ed18ac,0,0,2011-01-01 02:00:00 +f666b393-3b1a-4ff7-a45b-1a41595e4b1f,d142aeef-1b06-4910-88b5-0bce6ef7c1e2,0,0,2011-01-01 02:00:00 +71e982a3-d5d5-4e6f-8396-3dfd7dc9ea1d,26647b27-a278-4ddb-a68e-8437d24798ca,0,0,2011-01-01 02:00:00 +ebf49b6c-6537-4a70-b025-0441492ec266,83f68d87-a893-4e7f-b21d-4874929f927d,0,0,2011-01-01 02:00:00 +7477b442-ed68-4c5a-9509-d4a65b08b146,53df57d0-c789-4393-b0a5-897a3bc821a2,0,0,2011-01-01 02:00:00 +9bfc1fb6-e4e5-4176-b56c-715838fd1143,75a4050d-bdfd-4ca4-a1fd-a5d729613ed5,0,0,2011-01-01 02:00:00 +271151f2-0b2f-498e-8c08-9aa555a6d5b2,b938f0ab-e2c4-469e-9979-303d42224932,0,0,2011-01-01 02:00:00 +5fb06ecc-6507-42d8-bb6b-c8abcd001c79,6cac0624-6336-4418-bcf0-990abcdb824b,0,0,2011-01-01 02:00:00 +592911aa-7cf1-432f-aba4-d7002203a38a,ef4764b4-27b9-44bd-8b7d-6903df8b4a72,0,0,2011-01-01 02:00:00 +0204e6e3-4183-4bd5-8ebc-6812315b4e44,a364e957-2dcc-49c2-b213-2a68d9c3ee83,0,0,2011-01-01 02:00:00 +db2b5619-c03e-410d-8d10-ad8f3ec34cde,23e79154-30f9-44c5-b9c7-ab80ab7a4b6a,0,0,2011-01-01 02:00:00 +46cba61f-9812-4459-a321-a61939e34483,de40f0bd-3793-4b02-b663-31d282b33f61,0,0,2011-01-01 02:00:00 +51da6134-1fa5-47c5-8fe8-58ee122fc58a,cb646f5c-890a-4317-81eb-c7aeffb86389,0,0,2011-01-01 02:00:00 +b2a307ef-1f3b-4963-abf2-1350126dc9ae,fa6d5184-b205-4b1b-839f-7b21ac956c28,0,0,2011-01-01 02:00:00 +564e7f90-4e65-4c2f-a1c8-46c2f35f397d,3c98b5a6-1d44-449e-83e4-d610a4846d8f,0,0,2011-01-01 02:00:00 +63be5bee-13eb-4289-bfc4-95bd54242a26,d350f4a1-c675-4f22-8fda-26ad0bd03edb,0,0,2011-01-01 02:00:00 +e148019e-f5fc-4450-9138-3e3da793345a,9b3ae847-e2ea-4598-b56e-35501f61f70c,0,0,2011-01-01 02:00:00 +1ff453a9-208f-49a4-85fa-837c8877a321,b8209f35-1405-4f7f-b1ec-3c853954e2a8,0,0,2011-01-01 02:00:00 +2dd4f6c8-c2a2-40f6-ba71-71ea1cc1aa1b,645b0617-e6ab-438b-a141-9c497d720e4b,0,0,2011-01-01 02:00:00 +9e941998-80e2-475e-a0ab-88a4008c09db,0818deae-c7d9-4252-ac4c-f147004e5752,0,0,2011-01-01 02:00:00 +86d64cd6-3b33-4dc1-8568-89a789c6bce4,0fbb53fd-cadb-4170-9f31-5af1cd05fd11,0,0,2011-01-01 03:00:00 +254099c4-d16c-4340-9f01-8f0753ab46d3,95b1b117-1c7b-4a69-b10e-8963fbced23a,0,0,2011-01-01 03:00:00 +5175b2e6-4b62-4845-b832-34b034712e24,26647b27-a278-4ddb-a68e-8437d24798ca,0,0,2011-01-01 03:00:00 +0fe6cbc3-573a-4d5f-bf16-22647037b390,4fa4ce55-0944-463a-a91b-3a3806286e0b,0,0,2011-01-01 03:00:00 +80b926ea-858b-4da7-8923-6b353d076454,cbcfa285-fe3a-4a98-bb4a-05d28d466c79,0,0,2011-01-01 03:00:00 +146099c8-644a-4faf-84bd-a533fc9b3ac5,83a0dcd8-d6ad-49bf-8cbc-5a5774ed18ac,0,0,2011-01-01 03:00:00 +30187fd7-18c9-40dc-8380-5c622820a76f,a364e957-2dcc-49c2-b213-2a68d9c3ee83,0,0,2011-01-01 03:00:00 +5cddf7f1-a17d-4fef-a89f-3ff3b83502ad,de8cfef5-7620-4b9e-9a10-1faebb5a80c0,0,0,2011-01-01 03:00:00 +e4464244-fbeb-4f5e-9483-35b2b101ff40,0818deae-c7d9-4252-ac4c-f147004e5752,0,0,2011-01-01 03:00:00 +ecb2b775-44da-4df2-a16d-e04c82eda623,b8209f35-1405-4f7f-b1ec-3c853954e2a8,0,0,2011-01-01 03:00:00 +9d942e4a-a7aa-4444-89ba-69e6515787ba,9b3ae847-e2ea-4598-b56e-35501f61f70c,0,0,2011-01-01 03:00:00 +d6f93542-d08a-4664-a936-64dc7fb24864,645b0617-e6ab-438b-a141-9c497d720e4b,0,0,2011-01-01 03:00:00 +15f2191b-a4af-450f-923b-80a07c766882,3c98b5a6-1d44-449e-83e4-d610a4846d8f,0,0,2011-01-01 03:00:00 +384fcbae-b457-4a14-8aab-d5f26441a486,e447506e-3d43-4bce-8aab-a7ca8b7fbc45,0,0,2011-01-01 03:00:00 +d9e899db-1559-4c62-ae16-67f6e8c52367,23e79154-30f9-44c5-b9c7-ab80ab7a4b6a,0,0,2011-01-01 03:00:00 +3aca1db9-e5f5-49d6-9c43-7719dcbc42d6,d142aeef-1b06-4910-88b5-0bce6ef7c1e2,0,0,2011-01-01 03:00:00 +ced1dc35-57c3-4889-9ea5-a17d852dbc74,90a5aeab-5a04-4580-bc1c-4d8ea399cc8c,0,0,2011-01-01 03:00:00 +0c29af37-6848-4074-95cf-095af97f9722,241b5dad-aaac-4f7c-8152-a32839fcfa13,0,0,2011-01-01 03:00:00 +8adfde41-010e-40b8-b0c4-206b5a2084a3,4ff2235f-24d6-440c-bf09-76ef3eaa340d,0,0,2011-01-01 03:00:00 +7fef0a14-40d6-4c7f-bbc8-13502a725c72,033e5854-65d9-4a14-8b5c-6aa675ded4a2,0,0,2011-01-01 03:00:00 +62a825cb-87d3-4da9-ad86-73051508b30a,2560c371-f420-4c2a-b4e6-e04c11b64c03,0,0,2011-01-01 03:00:00 +19b31273-3cca-4475-b3a8-815e73f755d7,6291eea2-689c-48f3-b7a9-5054bf567cab,0,0,2011-01-01 03:00:00 +40c68cd4-a7b0-4511-9b00-bcf7cd4f8fdc,5206abaa-3abc-4a15-a8f2-778139a3fc65,0,0,2011-01-01 03:00:00 +381241eb-2d23-4b06-81c5-ae6b54d59515,4e655530-909f-4acf-8ed9-d19f849265df,0,0,2011-01-01 03:00:00 +2f8c88a2-85da-4c9b-a557-9f0268d5bc17,3d74e9fc-be60-41bf-9339-cd067c9378a2,0,0,2011-01-01 03:00:00 +74b37dca-bf44-40b1-9850-c91ab25b7ede,fad9b8c1-9ded-4856-ab91-f41217259363,0,0,2011-01-01 03:00:00 +4f389d3c-aad4-43ff-9963-b0bc53b2e603,61788990-7681-42c0-9d0c-cfd22d4d3a83,0,0,2011-01-01 03:00:00 +67eec293-8323-4e46-ac23-1eebb8bfc3ef,53df57d0-c789-4393-b0a5-897a3bc821a2,0,0,2011-01-01 03:00:00 +a189618c-fdfc-44a8-816f-fcc9fe63e3fc,83f68d87-a893-4e7f-b21d-4874929f927d,0,0,2011-01-01 03:00:00 +ef5670e4-9249-4c6b-8993-bf094b406654,19d949f2-54ff-483c-928b-2438fc760385,0,0,2011-01-01 03:00:00 +7b815ea3-f1d5-4f3b-8163-25147dc291bd,c023f6f8-c35c-46d4-9ab7-1d098994d65d,0,0,2011-01-01 03:00:00 +bb03de3b-ebfe-45ce-96f9-e9d8003db778,9d7cd8e2-d859-4f4f-9c01-abba06ef2e2c,0,0,2011-01-01 03:00:00 +b71b0c94-e6c7-4b4b-b431-2ba1b7e96d77,62b0cca9-b44c-4eda-999f-ae2832319848,0,0,2011-01-01 03:00:00 +3dd245d5-0c20-4176-b97e-bf1df97f9575,e04c6258-0ee5-4928-96c1-8e04acbbcc8f,0,0,2011-01-01 03:00:00 +6943a0b9-27ff-4391-8d9b-973561a51fbf,6cac0624-6336-4418-bcf0-990abcdb824b,0,0,2011-01-01 03:00:00 +0fb10da7-ee09-41a1-85fa-2f6b3683fc18,d350f4a1-c675-4f22-8fda-26ad0bd03edb,0,0,2011-01-01 03:00:00 +9bf17c80-74d3-4502-98d6-5accdbc054fb,cb646f5c-890a-4317-81eb-c7aeffb86389,0,0,2011-01-01 03:00:00 +afea6616-cb97-4f4a-8de1-f49ae0d57b8e,4fc73066-d9a2-4175-84e5-f3692e050492,0,0,2011-01-01 03:00:00 +283b5bb9-d497-4559-b778-0de17eb3cff4,71e4f6f1-2b50-41ce-adb7-80a4e309bd63,0,0,2011-01-01 03:00:00 +04a9ad5c-90a8-4177-aa28-4235dda7699d,ef4764b4-27b9-44bd-8b7d-6903df8b4a72,0,0,2011-01-01 03:00:00 +3e7a682f-2dab-40a9-b38a-697eeb6e20fc,fa6d5184-b205-4b1b-839f-7b21ac956c28,0,0,2011-01-01 03:00:00 +796ad211-8a63-4a6d-9c8c-f1e63ddec31a,e87c9d51-cfec-4e04-9790-16cd6b238d51,0,0,2011-01-01 03:00:00 +91fe31ad-ff8b-42d3-bca4-543baa7043d2,41a126ec-6254-4b68-821b-ecebb98ad0fd,0,0,2011-01-01 03:00:00 +ad2071e9-cc06-4308-bf96-3f3dcd98773a,114efaa0-dd3f-47ce-bbbe-856cacb034d1,0,0,2011-01-01 03:00:00 +841cdc4f-7dc1-4266-bd30-3b496294e816,6a909b40-9c28-4e7a-9a86-f52bb0c9d7e9,0,0,2011-01-01 03:00:00 +6a8a58f6-93e6-4557-8475-c497348c2ad6,0a2cdd93-b055-4e0b-8fce-088968316df4,0,0,2011-01-01 03:00:00 +719404a2-39bd-4d7a-b087-48b765d02c72,2f99a367-0fc2-4ca2-ab58-cb5d7004a6bd,0,0,2011-01-01 03:00:00 +fbecbdf3-3942-4f57-8cf4-9e7784a79396,dcc2950b-23cc-407d-b53f-0056234f7ee1,0,0,2011-01-01 03:00:00 +0ca30e1a-a4fd-4c07-82aa-57dd33217361,de40f0bd-3793-4b02-b663-31d282b33f61,0,0,2011-01-01 03:00:00 +8c500a75-eacf-49df-b04d-bad3b89036d4,a1eb7fc1-3bee-4b65-a387-ef3046644bf0,0,0,2011-01-01 03:00:00 +a406fb6f-5826-452a-9fe6-020a20f96380,1a738cc5-b8f0-41f0-9f60-85073dc80136,0,0,2011-01-01 03:00:00 +7a6c3d84-3708-42cd-a384-b77d1059ff2b,5b38af42-1ee4-4a41-b666-ea141187df37,0,0,2011-01-01 03:00:00 +15ef71fd-e6d8-4cb4-9b83-22f7ec204cd2,b938f0ab-e2c4-469e-9979-303d42224932,0,0,2011-01-01 03:00:00 +2c879dd4-1795-442c-90c2-af7bd92d54da,d3bacaf6-8558-4df5-8481-8d684ef3e14d,0,0,2011-01-01 03:00:00 +3b0f2973-d964-4441-a30c-ec45d88e6ee1,a50f12e1-33ed-4992-8579-da1800d5eff7,0,0,2011-01-01 03:00:00 +6466913d-1d00-4fff-b83e-16803583457c,51ed457c-81ff-470f-b45b-30a94a965c36,0,0,2011-01-01 03:00:00 +cee71023-80c0-47d1-9e1f-c666e99d9858,0c8bcc26-ce6e-4d2c-acdd-e304cfb3c02f,0,0,2011-01-01 03:00:00 +9a2a9bfa-4d96-49b5-a9c5-268a7545a069,5a612315-ad74-4d98-b350-7e44630b8a6e,0,0,2011-01-01 03:00:00 +64722661-a14c-44e4-8ada-d6dfa15e8dff,75a4050d-bdfd-4ca4-a1fd-a5d729613ed5,0,0,2011-01-01 03:00:00 +bbe68a3f-8603-483d-9573-74b111603754,3776dfa9-f161-419e-9014-9cfb5a379025,0,0,2011-01-01 03:00:00 +6faba33e-f160-4a93-89f6-013384991315,287285e2-c0ac-40dc-a15f-82a5de6ef37f,0,0,2011-01-01 03:00:00 +2dc499a3-c9a1-4c5b-a10c-d1b829e1a547,bb929fcc-a67e-423c-9569-73364746383d,0,0,2011-01-01 03:00:00 +6ea5e4ba-339c-4751-96e4-805a1307e7f5,819018d3-4601-4c39-9d41-4a911572d406,0,0,2011-01-01 03:00:00 +676925d5-b40e-44d6-8f65-c43d8eb114cf,9b3ae847-e2ea-4598-b56e-35501f61f70c,0,0,2011-01-01 04:00:00 +0f3b0096-08bf-4e4e-bc12-49f3aa8ef4d0,6a909b40-9c28-4e7a-9a86-f52bb0c9d7e9,0,0,2011-01-01 04:00:00 +98dead17-1472-4929-980c-b6f881cc8832,a364e957-2dcc-49c2-b213-2a68d9c3ee83,0,0,2011-01-01 04:00:00 +6001a07e-66a6-4a95-9c07-e42ef1e8dbd2,a50f12e1-33ed-4992-8579-da1800d5eff7,0,0,2011-01-01 04:00:00 +98bfe56c-b75b-4f15-b313-817de000752a,2560c371-f420-4c2a-b4e6-e04c11b64c03,0,0,2011-01-01 04:00:00 +908c2c1a-0d26-44a0-aa7b-0a48a5465f03,0c8bcc26-ce6e-4d2c-acdd-e304cfb3c02f,0,0,2011-01-01 04:00:00 +9c6406e5-062c-486f-bb2b-b00c4f54c6f1,53df57d0-c789-4393-b0a5-897a3bc821a2,0,0,2011-01-01 04:00:00 +8bebafdb-8247-430b-83e4-2bd0ecb77886,287285e2-c0ac-40dc-a15f-82a5de6ef37f,0,0,2011-01-01 04:00:00 +7f860083-6222-4996-a19a-17fc8b2a4ade,a1eb7fc1-3bee-4b65-a387-ef3046644bf0,0,0,2011-01-01 04:00:00 +53c0b4c5-7609-44ed-880f-1a48f6dbd44a,ef4764b4-27b9-44bd-8b7d-6903df8b4a72,0,0,2011-01-01 04:00:00 +09dd0bda-867e-450c-9f32-90ce7597250d,d350f4a1-c675-4f22-8fda-26ad0bd03edb,0,0,2011-01-01 04:00:00 +276730de-4931-43be-9c9a-c142521b4754,5a612315-ad74-4d98-b350-7e44630b8a6e,0,0,2011-01-01 04:00:00 +8a5373f9-9584-472e-a1a5-6b8be548aea5,4e655530-909f-4acf-8ed9-d19f849265df,0,0,2011-01-01 04:00:00 +528a2a82-b1c4-4b9b-8261-40f356988096,645b0617-e6ab-438b-a141-9c497d720e4b,0,0,2011-01-01 04:00:00 +6162bc79-1d8d-4dc4-8f5c-c927c32a633b,dcc2950b-23cc-407d-b53f-0056234f7ee1,0,0,2011-01-01 04:00:00 +47888254-63d7-4df7-a338-5a6c923af92b,90a5aeab-5a04-4580-bc1c-4d8ea399cc8c,0,0,2011-01-01 04:00:00 +81155a4d-a3b6-4338-af2f-87dfbe373f0c,26647b27-a278-4ddb-a68e-8437d24798ca,0,0,2011-01-01 04:00:00 +fd8d4b30-fa0f-4a56-8340-c55b9a73c7bf,83a0dcd8-d6ad-49bf-8cbc-5a5774ed18ac,0,0,2011-01-01 04:00:00 +5eb05bf4-ebfc-4eef-9285-bb68afe8757a,62b0cca9-b44c-4eda-999f-ae2832319848,0,0,2011-01-01 04:00:00 +e0925e3a-5327-410b-945b-afd8e3dbcd5c,b8209f35-1405-4f7f-b1ec-3c853954e2a8,0,0,2011-01-01 04:00:00 +046f3011-a2ff-460d-8518-7492ea836043,de40f0bd-3793-4b02-b663-31d282b33f61,0,0,2011-01-01 04:00:00 +f2e4967d-15d4-49f2-a5c6-52911910ccc6,6291eea2-689c-48f3-b7a9-5054bf567cab,0,0,2011-01-01 04:00:00 +79c42c82-5f37-4314-a243-6424930a7995,cb646f5c-890a-4317-81eb-c7aeffb86389,0,0,2011-01-01 04:00:00 +837793a1-3f32-4fe8-b3b5-58cc058c9a82,c023f6f8-c35c-46d4-9ab7-1d098994d65d,0,0,2011-01-01 04:00:00 +740bacd3-8f69-4e01-ab44-967cac9e4c4b,6cac0624-6336-4418-bcf0-990abcdb824b,0,0,2011-01-01 04:00:00 +218dad04-e639-42b5-8576-2f7301679b07,3d74e9fc-be60-41bf-9339-cd067c9378a2,0,0,2011-01-01 04:00:00 +3c29a32a-a973-4aae-a0e7-9bae913e7fe0,3776dfa9-f161-419e-9014-9cfb5a379025,0,0,2011-01-01 04:00:00 +39622cd8-e011-4ea3-92a3-13e6562aa32c,114efaa0-dd3f-47ce-bbbe-856cacb034d1,0,0,2011-01-01 04:00:00 +59f2f028-32a1-4162-b581-2c903fb126ed,fa6d5184-b205-4b1b-839f-7b21ac956c28,0,0,2011-01-01 04:00:00 +3848fabb-fdc5-472e-9e02-7e076b831cf6,9d7cd8e2-d859-4f4f-9c01-abba06ef2e2c,0,0,2011-01-01 04:00:00 +220bf1d7-a75e-4279-a8a6-e37c1bbdf7ab,23e79154-30f9-44c5-b9c7-ab80ab7a4b6a,0,0,2011-01-01 04:00:00 +a8bde719-b2a5-478c-af54-79112d7e2a80,1a738cc5-b8f0-41f0-9f60-85073dc80136,0,0,2011-01-01 04:00:00 +e4f17662-ff29-4613-996f-9a37c5de84d1,19d949f2-54ff-483c-928b-2438fc760385,0,0,2011-01-01 04:00:00 +2b0e1e3a-d653-4414-a181-fcd87d03a9ae,b938f0ab-e2c4-469e-9979-303d42224932,0,0,2011-01-01 04:00:00 +d77a6f7c-6855-4cc2-9737-7bf662cd97b7,5b38af42-1ee4-4a41-b666-ea141187df37,0,0,2011-01-01 04:00:00 +09f9317c-07c9-4795-8b51-3e9c72f64597,83f68d87-a893-4e7f-b21d-4874929f927d,0,0,2011-01-01 04:00:00 +35a7a944-fe84-437b-855f-3a12894fc45a,e87c9d51-cfec-4e04-9790-16cd6b238d51,0,0,2011-01-01 04:00:00 +06768482-5821-4bda-9ffb-56451d13b8f9,61788990-7681-42c0-9d0c-cfd22d4d3a83,0,0,2011-01-01 04:00:00 +bea63631-4c99-4c8f-a3b3-9d76da2e0aa9,95b1b117-1c7b-4a69-b10e-8963fbced23a,0,0,2011-01-01 04:00:00 +fcb04b95-eecd-4304-bea7-e94dabfb7cca,3c98b5a6-1d44-449e-83e4-d610a4846d8f,0,0,2011-01-01 04:00:00 +ec4ee8de-da30-4faf-8351-6a0f2c16d36e,41a126ec-6254-4b68-821b-ecebb98ad0fd,0,0,2011-01-01 04:00:00 +508dd0b8-1287-438d-b605-7bd66230591b,819018d3-4601-4c39-9d41-4a911572d406,0,0,2011-01-01 04:00:00 +3c34bffc-7d19-4eee-8288-c532d1701bc6,51ed457c-81ff-470f-b45b-30a94a965c36,0,0,2011-01-01 04:00:00 +a0310151-c69f-41e9-8f2a-ecf6080a7853,d3bacaf6-8558-4df5-8481-8d684ef3e14d,0,0,2011-01-01 04:00:00 +bd26c9db-288a-438b-9d68-79d77fdf958b,4fc73066-d9a2-4175-84e5-f3692e050492,0,0,2011-01-01 04:00:00 +71c16b81-f7b5-41f1-8669-da1825c22436,0a2cdd93-b055-4e0b-8fce-088968316df4,0,0,2011-01-01 04:00:00 +0d74b98c-6a45-4f13-a859-c868662d4d1d,2f99a367-0fc2-4ca2-ab58-cb5d7004a6bd,0,0,2011-01-01 04:00:00 +62168910-673e-4e0e-aa64-9aee8afe8670,e04c6258-0ee5-4928-96c1-8e04acbbcc8f,0,0,2011-01-01 04:00:00 +d70fc859-696e-48fd-909d-724739c7cfc3,d142aeef-1b06-4910-88b5-0bce6ef7c1e2,0,0,2011-01-01 04:00:00 +74795785-f088-44d3-aec4-d96846998cfa,4ff2235f-24d6-440c-bf09-76ef3eaa340d,0,0,2011-01-01 04:00:00 +8b828481-dadc-4086-83a8-bf7368178404,4fa4ce55-0944-463a-a91b-3a3806286e0b,0,0,2011-01-01 04:00:00 +670d6859-384d-410b-ae57-8939e4f31de0,fad9b8c1-9ded-4856-ab91-f41217259363,0,0,2011-01-01 04:00:00 +a300f8a8-ca21-4869-816d-e23f2e5bbe4e,5206abaa-3abc-4a15-a8f2-778139a3fc65,0,0,2011-01-01 04:00:00 +bf6d04fc-c74b-4e68-ba31-f9009c65ee04,75a4050d-bdfd-4ca4-a1fd-a5d729613ed5,0,0,2011-01-01 04:00:00 +9a3b8112-2fd0-4983-b1ee-135f369fffd5,0818deae-c7d9-4252-ac4c-f147004e5752,0,0,2011-01-01 04:00:00 +0ee31796-f8ed-4ab4-94cb-b195815a8e54,cbcfa285-fe3a-4a98-bb4a-05d28d466c79,0,0,2011-01-01 04:00:00 +125356ea-7674-4b46-8cdd-82e9e9ea6989,de8cfef5-7620-4b9e-9a10-1faebb5a80c0,0,0,2011-01-01 04:00:00 +1ce4151b-524d-4c24-bd29-9be4cd7188c1,71e4f6f1-2b50-41ce-adb7-80a4e309bd63,0,0,2011-01-01 04:00:00 +d972cc16-0be9-4f13-bc7d-ba3dda0cea88,033e5854-65d9-4a14-8b5c-6aa675ded4a2,0,0,2011-01-01 04:00:00 +a9408131-f6ab-4ed9-bbbc-bb4b917e2573,e447506e-3d43-4bce-8aab-a7ca8b7fbc45,0,0,2011-01-01 04:00:00 +766cf4ca-0411-4455-b550-a8ccb1bbde0a,241b5dad-aaac-4f7c-8152-a32839fcfa13,0,0,2011-01-01 04:00:00 +2c429cf4-a390-4d64-a743-87e934136007,0fbb53fd-cadb-4170-9f31-5af1cd05fd11,0,0,2011-01-01 04:00:00 +abbd5745-d760-4df1-83aa-3e9c411cd0c8,bb929fcc-a67e-423c-9569-73364746383d,0,0,2011-01-01 04:00:00 +32089ce7-75c6-4f34-90d0-bf1da9c376ba,4fa4ce55-0944-463a-a91b-3a3806286e0b,0,0,2011-01-01 05:00:00 +a9899fb9-7cef-4d02-b461-ec721ec53918,26647b27-a278-4ddb-a68e-8437d24798ca,0,0,2011-01-01 05:00:00 +f726729d-4cde-4448-b8e0-f1882c060512,0fbb53fd-cadb-4170-9f31-5af1cd05fd11,0,0,2011-01-01 05:00:00 +b7ac94d1-8617-41c7-9eab-c4682632d71c,6a909b40-9c28-4e7a-9a86-f52bb0c9d7e9,0,0,2011-01-01 05:00:00 +66c6a32c-2840-4b25-9d28-fd82db951e96,d142aeef-1b06-4910-88b5-0bce6ef7c1e2,0,0,2011-01-01 05:00:00 +13c21b23-5647-4eea-83be-f2f222e2d02b,19d949f2-54ff-483c-928b-2438fc760385,0,0,2011-01-01 05:00:00 +818e5c39-d847-41a9-b68b-55524facd0f9,d350f4a1-c675-4f22-8fda-26ad0bd03edb,0,0,2011-01-01 05:00:00 +e45bc7de-8273-49b2-b241-e0f3140a48fc,9b3ae847-e2ea-4598-b56e-35501f61f70c,0,0,2011-01-01 05:00:00 +b553a80a-dbf3-4e5b-a13a-6d4953f6f746,e04c6258-0ee5-4928-96c1-8e04acbbcc8f,0,0,2011-01-01 05:00:00 +f03b1619-f933-41b0-8f4e-18a15b55cfd6,83a0dcd8-d6ad-49bf-8cbc-5a5774ed18ac,0,0,2011-01-01 05:00:00 +7efac73b-23d0-4079-8113-d9fc9b98abde,75a4050d-bdfd-4ca4-a1fd-a5d729613ed5,0,0,2011-01-01 05:00:00 +59e25849-4832-4d7d-9416-418a9cc87da2,51ed457c-81ff-470f-b45b-30a94a965c36,0,0,2011-01-01 05:00:00 +5b24445c-f958-49f0-9e48-05425cf49945,b8209f35-1405-4f7f-b1ec-3c853954e2a8,0,0,2011-01-01 05:00:00 +e1f4faad-49e1-4ce5-8d23-eb7d28a77977,61788990-7681-42c0-9d0c-cfd22d4d3a83,0,0,2011-01-01 05:00:00 +819657a9-8316-45b1-9436-20e00106ac1f,b938f0ab-e2c4-469e-9979-303d42224932,0,0,2011-01-01 05:00:00 +628b970a-8fd9-4864-87d7-317488b78ed4,53df57d0-c789-4393-b0a5-897a3bc821a2,0,0,2011-01-01 05:00:00 +6ff8027b-a8bf-4219-b676-0e300a368637,de8cfef5-7620-4b9e-9a10-1faebb5a80c0,0,0,2011-01-01 05:00:00 +9a931fe4-f291-444b-85e9-93b6b66627c3,1a738cc5-b8f0-41f0-9f60-85073dc80136,0,0,2011-01-01 05:00:00 +dd4b0481-0722-4d5e-b54d-1e3502c0a7f7,a364e957-2dcc-49c2-b213-2a68d9c3ee83,0,0,2011-01-01 05:00:00 +e3d313dd-f02f-43e6-b603-b4f3bd30f703,033e5854-65d9-4a14-8b5c-6aa675ded4a2,0,0,2011-01-01 05:00:00 +54485483-c330-4252-850f-cac72880333d,dcc2950b-23cc-407d-b53f-0056234f7ee1,0,0,2011-01-01 05:00:00 +72d10c34-9b34-402f-9263-b6dadc3e58ee,0818deae-c7d9-4252-ac4c-f147004e5752,0,0,2011-01-01 05:00:00 +29a676d2-89b9-415d-8e46-ec3f39f19857,241b5dad-aaac-4f7c-8152-a32839fcfa13,0,0,2011-01-01 05:00:00 +cef769d8-9b7f-4ea9-b850-420e4239c84b,287285e2-c0ac-40dc-a15f-82a5de6ef37f,0,0,2011-01-01 05:00:00 +121cea72-07e5-4d36-af59-73924234a621,0a2cdd93-b055-4e0b-8fce-088968316df4,0,0,2011-01-01 05:00:00 +84173f4c-4fc8-4732-a9c5-086e9f967925,83f68d87-a893-4e7f-b21d-4874929f927d,0,0,2011-01-01 05:00:00 +a035e397-5497-43d4-8cf7-a89c0feedac0,a50f12e1-33ed-4992-8579-da1800d5eff7,0,0,2011-01-01 05:00:00 +7573a369-cede-4d76-8762-c09809df617e,6cac0624-6336-4418-bcf0-990abcdb824b,0,0,2011-01-01 05:00:00 +9b4360b5-d5ca-446b-b9e0-135e30ab249c,5b38af42-1ee4-4a41-b666-ea141187df37,0,0,2011-01-01 05:00:00 +7c2e2ecd-bd3e-438e-acbc-701dac36565f,2560c371-f420-4c2a-b4e6-e04c11b64c03,0,0,2011-01-01 05:00:00 +3eab094a-f8e0-480b-80fd-0ce01ed12c91,6291eea2-689c-48f3-b7a9-5054bf567cab,0,0,2011-01-01 05:00:00 +3348f3f2-d438-4e49-ae84-bb4f18bf123b,ef4764b4-27b9-44bd-8b7d-6903df8b4a72,0,0,2011-01-01 05:00:00 +5af3ed79-e08e-4a35-a24e-22fd44868148,0c8bcc26-ce6e-4d2c-acdd-e304cfb3c02f,0,0,2011-01-01 05:00:00 +bd79302c-5696-43eb-a782-bbb5bb351a4b,de40f0bd-3793-4b02-b663-31d282b33f61,0,0,2011-01-01 05:00:00 +68caa148-603e-46f4-bb58-de88332acde5,23e79154-30f9-44c5-b9c7-ab80ab7a4b6a,0,0,2011-01-01 05:00:00 +a0e412ba-95b4-4d93-a36b-6803f9e16a34,114efaa0-dd3f-47ce-bbbe-856cacb034d1,0,0,2011-01-01 05:00:00 +e2741764-d929-410d-b692-ee6fad8adf44,9d7cd8e2-d859-4f4f-9c01-abba06ef2e2c,0,0,2011-01-01 05:00:00 +75883d66-067f-42f4-9060-ff24c3146445,71e4f6f1-2b50-41ce-adb7-80a4e309bd63,0,0,2011-01-01 05:00:00 +5843dba3-c0be-4f25-b5f5-640ead46ae4f,e447506e-3d43-4bce-8aab-a7ca8b7fbc45,0,0,2011-01-01 05:00:00 +cc5577e8-c7f9-4c6d-8f31-a7dd994e4fe8,4e655530-909f-4acf-8ed9-d19f849265df,0,0,2011-01-01 05:00:00 +9ccb3218-3dcd-43bb-8225-9f948b35129e,cbcfa285-fe3a-4a98-bb4a-05d28d466c79,0,0,2011-01-01 05:00:00 +45b375e7-b81b-48b6-8789-d649e69966c1,bb929fcc-a67e-423c-9569-73364746383d,0,0,2011-01-01 05:00:00 +2a6c751c-ce6e-4c83-ae30-fe508b8ce267,d3bacaf6-8558-4df5-8481-8d684ef3e14d,0,0,2011-01-01 05:00:00 +543e78ea-9969-44d0-94b9-03fc1df590a8,3c98b5a6-1d44-449e-83e4-d610a4846d8f,0,0,2011-01-01 05:00:00 +a06621a0-6319-4756-a4ce-081c7cd8f3c4,41a126ec-6254-4b68-821b-ecebb98ad0fd,0,0,2011-01-01 05:00:00 +8ca9539f-d9b4-4e6a-8f2f-56e7a162fcc5,5a612315-ad74-4d98-b350-7e44630b8a6e,0,0,2011-01-01 05:00:00 +64caca41-9385-4607-a673-05de95ec0fb2,62b0cca9-b44c-4eda-999f-ae2832319848,0,0,2011-01-01 05:00:00 +10edd6f6-d8b5-4af8-a90b-f7d042f6b296,c023f6f8-c35c-46d4-9ab7-1d098994d65d,0,0,2011-01-01 05:00:00 +d693e346-72b0-4bea-8cb0-bebfe1a17eb7,4fc73066-d9a2-4175-84e5-f3692e050492,0,0,2011-01-01 05:00:00 +c3ac21a6-9cd4-4cd9-a4ef-8a130b70519a,a1eb7fc1-3bee-4b65-a387-ef3046644bf0,0,0,2011-01-01 05:00:00 +25d4b1d6-3294-4b96-9a95-ec9ee3212e70,fad9b8c1-9ded-4856-ab91-f41217259363,0,0,2011-01-01 05:00:00 +d03f017c-225f-4732-b721-e4d4b7962ea1,cb646f5c-890a-4317-81eb-c7aeffb86389,0,0,2011-01-01 05:00:00 +8d880a9f-984e-4dca-b38e-67c24479d2d7,3776dfa9-f161-419e-9014-9cfb5a379025,0,0,2011-01-01 05:00:00 +a5d9f2d9-6356-4da1-b270-b7bd8f6857b7,2f99a367-0fc2-4ca2-ab58-cb5d7004a6bd,0,0,2011-01-01 05:00:00 +a751c240-34aa-45e2-a2a4-065980ce7532,90a5aeab-5a04-4580-bc1c-4d8ea399cc8c,0,0,2011-01-01 05:00:00 +089f1725-c788-4c3e-8e60-29638637fa25,819018d3-4601-4c39-9d41-4a911572d406,0,0,2011-01-01 05:00:00 +71c988d4-6ba4-45eb-be0d-412da9cf7ebf,95b1b117-1c7b-4a69-b10e-8963fbced23a,0,0,2011-01-01 05:00:00 +9fe99b36-8562-43fb-93ca-769e3c7dc9a8,4ff2235f-24d6-440c-bf09-76ef3eaa340d,0,0,2011-01-01 05:00:00 +cfe3ce98-c8a3-4752-af70-5bf0e52218b7,fa6d5184-b205-4b1b-839f-7b21ac956c28,0,0,2011-01-01 05:00:00 +2bd5c0f7-825f-492c-b2d4-c5566d6ab5ee,5206abaa-3abc-4a15-a8f2-778139a3fc65,0,0,2011-01-01 05:00:00 +8728a37a-50de-4eea-ae34-e94892665455,645b0617-e6ab-438b-a141-9c497d720e4b,0,0,2011-01-01 05:00:00 +337c53b7-33ac-4ef9-abbc-38a9931d4a36,e87c9d51-cfec-4e04-9790-16cd6b238d51,0,0,2011-01-01 05:00:00 +cebe1845-ad35-41ad-b2bf-d1a495c582e8,3d74e9fc-be60-41bf-9339-cd067c9378a2,0,0,2011-01-01 05:00:00 +afdebae5-48eb-447e-a978-6094bea32701,61788990-7681-42c0-9d0c-cfd22d4d3a83,0,0,2011-01-01 06:00:00 +8bbbe46f-892a-42df-a825-b7ae1f589aaf,b938f0ab-e2c4-469e-9979-303d42224932,0,0,2011-01-01 06:00:00 +81bd8d01-cc11-4cb8-9fd6-29a48136e824,26647b27-a278-4ddb-a68e-8437d24798ca,0,0,2011-01-01 06:00:00 +8d09dc93-4722-4861-89e3-6b5aeb53dc4e,9b3ae847-e2ea-4598-b56e-35501f61f70c,0,0,2011-01-01 06:00:00 +6e14e3ce-8c8c-4408-bb3f-d65e51686991,0fbb53fd-cadb-4170-9f31-5af1cd05fd11,0,0,2011-01-01 06:00:00 +5ad04811-0747-4688-8869-840ecced07e2,cbcfa285-fe3a-4a98-bb4a-05d28d466c79,0,0,2011-01-01 06:00:00 +f13f56f4-8e10-4f9a-ab38-8a563f49e0e1,d350f4a1-c675-4f22-8fda-26ad0bd03edb,0,0,2011-01-01 06:00:00 +364be3f8-6cd8-4a0e-8a07-6479df19adf6,4fa4ce55-0944-463a-a91b-3a3806286e0b,0,0,2011-01-01 06:00:00 +8115ba2c-9dcd-41d6-bf06-3a89b4e3a524,0818deae-c7d9-4252-ac4c-f147004e5752,0,0,2011-01-01 06:00:00 +30f7598e-05ad-4ac3-abf9-5b5e99ea4f7f,819018d3-4601-4c39-9d41-4a911572d406,0,0,2011-01-01 06:00:00 +cb8bfe5f-4ba3-4672-9297-3a8ca7a8d2cb,b8209f35-1405-4f7f-b1ec-3c853954e2a8,0,0,2011-01-01 06:00:00 +0927a20a-e543-4cd2-a0ec-5bc881a29d1a,a364e957-2dcc-49c2-b213-2a68d9c3ee83,0,0,2011-01-01 06:00:00 +63867846-3a66-45a4-8db3-c87644aef191,95b1b117-1c7b-4a69-b10e-8963fbced23a,0,0,2011-01-01 06:00:00 +f09da194-2c5c-4d0d-8198-fd19528a7ecd,de8cfef5-7620-4b9e-9a10-1faebb5a80c0,0,0,2011-01-01 06:00:00 +ca9f4176-01f7-47d6-9ad4-bfea63c799ec,75a4050d-bdfd-4ca4-a1fd-a5d729613ed5,0,0,2011-01-01 06:00:00 +cc7573dd-ad4e-4934-840b-d7f14abcc031,53df57d0-c789-4393-b0a5-897a3bc821a2,0,0,2011-01-01 06:00:00 +9418f2ec-396b-4d87-b5d4-e7709327e019,645b0617-e6ab-438b-a141-9c497d720e4b,0,0,2011-01-01 06:00:00 +40ac858a-db87-42ed-ac6f-1c90ff4606d4,2560c371-f420-4c2a-b4e6-e04c11b64c03,0,0,2011-01-01 06:00:00 +1652affa-0df2-447e-af4c-f210c4847d5d,83f68d87-a893-4e7f-b21d-4874929f927d,0,0,2011-01-01 06:00:00 +a11a115a-741a-4be2-ac6c-c26953847891,83a0dcd8-d6ad-49bf-8cbc-5a5774ed18ac,0,0,2011-01-01 06:00:00 +38ce2aef-7420-445e-808e-4bfe988d01a6,6a909b40-9c28-4e7a-9a86-f52bb0c9d7e9,0,0,2011-01-01 06:00:00 +dbb96938-9b40-4845-a534-a87da40851e1,033e5854-65d9-4a14-8b5c-6aa675ded4a2,0,0,2011-01-01 06:00:00 +f13af177-ea95-49ac-8cec-de9094b19002,e04c6258-0ee5-4928-96c1-8e04acbbcc8f,0,0,2011-01-01 06:00:00 +d40d4c46-d5d7-454d-9338-e72b2b299b09,d142aeef-1b06-4910-88b5-0bce6ef7c1e2,0,0,2011-01-01 06:00:00 +2aa22bd8-2ea7-48c4-b108-60a1f40d224e,dcc2950b-23cc-407d-b53f-0056234f7ee1,0,0,2011-01-01 06:00:00 +ab2f25b6-10c5-459b-bbca-d1f81ab1209e,19d949f2-54ff-483c-928b-2438fc760385,0,0,2011-01-01 06:00:00 +25999361-1317-40ba-a091-bcc24cc0b3f6,3c98b5a6-1d44-449e-83e4-d610a4846d8f,0,0,2011-01-01 06:00:00 +009d7fcc-6326-48f1-b5f8-e49d8a7e2447,5b38af42-1ee4-4a41-b666-ea141187df37,0,0,2011-01-01 06:00:00 +049eedf6-fe62-46d7-a920-84d0832d39e8,51ed457c-81ff-470f-b45b-30a94a965c36,0,0,2011-01-01 06:00:00 +4fe90490-82c5-4a80-9e76-df40bdbcb116,1a738cc5-b8f0-41f0-9f60-85073dc80136,0,0,2011-01-01 06:00:00 +68e3a4cc-77ec-4a01-8707-52430e7cf9cb,a1eb7fc1-3bee-4b65-a387-ef3046644bf0,0,0,2011-01-01 06:00:00 +b68ce3e9-189f-4de5-aade-a5b460bd25ad,241b5dad-aaac-4f7c-8152-a32839fcfa13,0,0,2011-01-01 06:00:00 +98f4d11e-678e-4da1-b798-2d5329e33027,5206abaa-3abc-4a15-a8f2-778139a3fc65,0,0,2011-01-01 06:00:00 +57066b86-38d1-4f8a-8781-4925e9d59cb2,287285e2-c0ac-40dc-a15f-82a5de6ef37f,0,0,2011-01-01 06:00:00 +5fa995e8-25d4-4bcb-a2ee-68822870b733,0a2cdd93-b055-4e0b-8fce-088968316df4,0,0,2011-01-01 06:00:00 +b27b2229-22b2-408b-9f2b-d16a77c19788,4ff2235f-24d6-440c-bf09-76ef3eaa340d,0,0,2011-01-01 06:00:00 +1ffbbcf3-8d3a-4415-b68a-f8ade890b1c0,6291eea2-689c-48f3-b7a9-5054bf567cab,0,0,2011-01-01 06:00:00 +960be3e5-50d2-46b9-8c58-8b50f012eb05,6cac0624-6336-4418-bcf0-990abcdb824b,0,0,2011-01-01 06:00:00 +2cc5a3af-220f-4df7-b3c2-158253a02e30,a50f12e1-33ed-4992-8579-da1800d5eff7,0,0,2011-01-01 06:00:00 +7b147530-3016-4abb-ad79-ec708129569b,e87c9d51-cfec-4e04-9790-16cd6b238d51,0,0,2011-01-01 06:00:00 +081555f8-e367-471f-9b2c-d89acf66033b,e447506e-3d43-4bce-8aab-a7ca8b7fbc45,0,0,2011-01-01 06:00:00 +86a151de-dfe8-4520-9c38-b3fc52f52058,4e655530-909f-4acf-8ed9-d19f849265df,0,0,2011-01-01 06:00:00 +26963ead-4fe0-43fc-b3ba-16fe181be500,0c8bcc26-ce6e-4d2c-acdd-e304cfb3c02f,0,0,2011-01-01 06:00:00 +cca42155-baa3-48e2-b867-619c4f175e77,ef4764b4-27b9-44bd-8b7d-6903df8b4a72,0,0,2011-01-01 06:00:00 +f089ff4e-e0e2-43eb-b0dc-f3c205581f18,5a612315-ad74-4d98-b350-7e44630b8a6e,0,0,2011-01-01 06:00:00 +8d56bda0-1a22-4eef-b5dd-ace45ada00ac,3776dfa9-f161-419e-9014-9cfb5a379025,0,0,2011-01-01 06:00:00 +4e4cc614-900d-4621-b6fe-5c07c67cae34,d3bacaf6-8558-4df5-8481-8d684ef3e14d,0,0,2011-01-01 06:00:00 +5ac53f9b-2564-4eb7-bdd6-58019cdb5a61,41a126ec-6254-4b68-821b-ecebb98ad0fd,0,0,2011-01-01 06:00:00 +0f06f12a-f5d8-46ec-b265-9bee2f8c5846,c023f6f8-c35c-46d4-9ab7-1d098994d65d,0,0,2011-01-01 06:00:00 +b97b7e9e-429e-4a23-bebe-69ea31feca97,de40f0bd-3793-4b02-b663-31d282b33f61,0,0,2011-01-01 06:00:00 +aac2ff11-883a-40b4-ad77-88559164ce23,114efaa0-dd3f-47ce-bbbe-856cacb034d1,0,0,2011-01-01 06:00:00 +a790304b-9c5a-48bc-8e68-0916564fdd56,fad9b8c1-9ded-4856-ab91-f41217259363,0,0,2011-01-01 06:00:00 +3324ac08-463d-4e40-a8cc-dd7f45ec809b,bb929fcc-a67e-423c-9569-73364746383d,0,0,2011-01-01 06:00:00 +c470678f-612c-4452-bb7f-56cf093aad70,2f99a367-0fc2-4ca2-ab58-cb5d7004a6bd,0,0,2011-01-01 06:00:00 +d90a93d4-b671-443f-a699-db8f4db4f5d4,cb646f5c-890a-4317-81eb-c7aeffb86389,0,0,2011-01-01 06:00:00 +bcc18201-4d16-4912-9ff0-91caf2ebfb93,62b0cca9-b44c-4eda-999f-ae2832319848,0,0,2011-01-01 06:00:00 +fa4978ef-5293-4718-81af-2151f6b7678b,9d7cd8e2-d859-4f4f-9c01-abba06ef2e2c,0,0,2011-01-01 06:00:00 +17120434-cc9d-4c7d-af7d-1593392e28e6,4fc73066-d9a2-4175-84e5-f3692e050492,0,0,2011-01-01 06:00:00 +ca15e172-e7ff-49ca-8532-619aa60e167b,23e79154-30f9-44c5-b9c7-ab80ab7a4b6a,0,0,2011-01-01 06:00:00 +f1ed27ab-2f36-480d-8bc4-513a1021a37c,3d74e9fc-be60-41bf-9339-cd067c9378a2,0,0,2011-01-01 06:00:00 +554c2d33-4a26-42fa-b0a6-15d378269cc5,90a5aeab-5a04-4580-bc1c-4d8ea399cc8c,0,0,2011-01-01 06:00:00 +4ae9d3aa-280b-44a2-9840-6613c658c6eb,fa6d5184-b205-4b1b-839f-7b21ac956c28,0,0,2011-01-01 06:00:00 +6fb39e20-ff7a-42b4-9757-8a35ac16de10,71e4f6f1-2b50-41ce-adb7-80a4e309bd63,0,0,2011-01-01 06:00:00 +e81f3b99-0276-41c4-b6b8-b45d8b5a9e62,83f68d87-a893-4e7f-b21d-4874929f927d,-1.13961161158454E-05,-5.51939094420283E-06,2011-01-01 07:00:00 +94aa2a2f-8b0a-46ca-a998-c0b9dce70fd5,0818deae-c7d9-4252-ac4c-f147004e5752,-0.001192299056807,-0.000894224292605,2011-01-01 07:00:00 +7b66a1f7-44e4-47c4-a7c1-b06e95c952d6,d350f4a1-c675-4f22-8fda-26ad0bd03edb,-0.001111616370255,-0.000833712277691,2011-01-01 07:00:00 +7759edfd-44e2-4f4f-837a-6bdf281703eb,819018d3-4601-4c39-9d41-4a911572d406,-0.002040379129948,-0.001530284347461,2011-01-01 07:00:00 +bed18e4f-e57f-44e1-8147-963e41394613,bb929fcc-a67e-423c-9569-73364746383d,-1.29409779437493E-05,-6.26760167637688E-06,2011-01-01 07:00:00 +63548456-8a34-4dee-8c5d-63492d1534cb,95b1b117-1c7b-4a69-b10e-8963fbced23a,-0.001188235337621,-0.000891176503215,2011-01-01 07:00:00 +3dcbf5a0-0aa6-4215-a969-b739f77c873e,26647b27-a278-4ddb-a68e-8437d24798ca,-0.001175480914712,-0.000881610686034,2011-01-01 07:00:00 +630731f8-8ae8-4e98-9cbf-2de4ca36a41b,83a0dcd8-d6ad-49bf-8cbc-5a5774ed18ac,-3.77503469321901E-05,-1.82833274845575E-05,2011-01-01 07:00:00 +6b1f0fc6-1a7e-4468-aab1-1999963978c1,4fa4ce55-0944-463a-a91b-3a3806286e0b,-0.001073409772479,-0.00080505732936,2011-01-01 07:00:00 +3e6d959b-d70e-4860-84a3-ad0876f28ccc,b8209f35-1405-4f7f-b1ec-3c853954e2a8,-0.001051469816185,-0.000788602362139,2011-01-01 07:00:00 +51ad3950-8d9c-4930-b47e-8e58082f0cd4,5a612315-ad74-4d98-b350-7e44630b8a6e,-1.14745579165031E-05,-5.55738204220462E-06,2011-01-01 07:00:00 +11079d69-f1c9-4e6d-90ca-49bf4d85eb33,41a126ec-6254-4b68-821b-ecebb98ad0fd,-1.30147109611288E-05,-6.30331220655017E-06,2011-01-01 07:00:00 +b4ccc474-3bb6-4870-8170-1a1ccf689179,2560c371-f420-4c2a-b4e6-e04c11b64c03,-4.0103428748314E-05,-1.94229770225983E-05,2011-01-01 07:00:00 +52a11469-6825-47a7-912e-676dec341e4b,fad9b8c1-9ded-4856-ab91-f41217259363,-3.58974647982125E-05,-1.7385935709413E-05,2011-01-01 07:00:00 +8062991a-d0a4-4404-a2ff-541f36c1d625,033e5854-65d9-4a14-8b5c-6aa675ded4a2,-1.29971218482162E-05,-6.29479341036212E-06,2011-01-01 07:00:00 +18eb298b-e38b-4943-925e-7f172b8b3b0c,d142aeef-1b06-4910-88b5-0bce6ef7c1e2,-1.15417881283936E-05,-5.58994311993614E-06,2011-01-01 07:00:00 +dc01ddde-84b5-4f37-8996-8f703d883f6b,c023f6f8-c35c-46d4-9ab7-1d098994d65d,-1.16630588933296E-05,-5.64867723206523E-06,2011-01-01 07:00:00 +d22f9a0d-7f74-43d8-bdd3-2455dd718756,d3bacaf6-8558-4df5-8481-8d684ef3e14d,-1.21077163349292E-05,-5.86403466011256E-06,2011-01-01 07:00:00 +e1f10866-0bc1-4819-921f-f253ec05d747,4e655530-909f-4acf-8ed9-d19f849265df,-1.20197462305507E-05,-5.82142879399717E-06,2011-01-01 07:00:00 +5c7d333e-8f41-4bcc-ae8a-25e842d74990,2f99a367-0fc2-4ca2-ab58-cb5d7004a6bd,-1.16660679752592E-05,-5.650134596959E-06,2011-01-01 07:00:00 +62e202b6-bfbb-4740-a323-195a81f321d2,75a4050d-bdfd-4ca4-a1fd-a5d729613ed5,-0.002024486461092,-0.001518364845819,2011-01-01 07:00:00 +0a115748-bdf1-4827-bd9d-0b1a0824cec1,6a909b40-9c28-4e7a-9a86-f52bb0c9d7e9,-1.32035746257864E-05,-6.39478305414454E-06,2011-01-01 07:00:00 +f89f82a7-8e29-41a8-bc39-7690ff372b13,62b0cca9-b44c-4eda-999f-ae2832319848,-3.46212079918954E-05,-1.67678163266639E-05,2011-01-01 07:00:00 +1fc4b578-4341-4184-97dc-90ac7ea2c7b7,e447506e-3d43-4bce-8aab-a7ca8b7fbc45,-1.31993685820912E-05,-6.39274597420902E-06,2011-01-01 07:00:00 +725c7737-ac5d-44f1-a664-e502ccb7bef7,71e4f6f1-2b50-41ce-adb7-80a4e309bd63,-1.32139964336872E-05,-6.39983056608326E-06,2011-01-01 07:00:00 +bbc65de3-5187-4702-bb81-358ca81925fa,0c8bcc26-ce6e-4d2c-acdd-e304cfb3c02f,-1.24850489552447E-05,-6.04678518900774E-06,2011-01-01 07:00:00 +ec1a0d60-fbcb-4ed1-8537-f1d2e0abb98f,5b38af42-1ee4-4a41-b666-ea141187df37,-1.16009781538619E-05,-5.61861015765632E-06,2011-01-01 07:00:00 +8b2b99f2-7228-4d71-a9fd-1477505a9fa7,e87c9d51-cfec-4e04-9790-16cd6b238d51,-1.26966179943321E-05,-6.1492527513371E-06,2011-01-01 07:00:00 +0f90a655-0669-45c6-9bb9-8122de3bb841,3776dfa9-f161-419e-9014-9cfb5a379025,-4.01965986524184E-05,-1.94681012666617E-05,2011-01-01 07:00:00 +d2680129-995e-4850-9f45-26e96e6c835a,cb646f5c-890a-4317-81eb-c7aeffb86389,-1.28911942826587E-05,-6.24349034885093E-06,2011-01-01 07:00:00 +2ec68ae3-d14b-42e8-b0a1-efec5fcc2f44,ef4764b4-27b9-44bd-8b7d-6903df8b4a72,-1.32637304647568E-05,-6.42391785669296E-06,2011-01-01 07:00:00 +f72bee39-75a5-4c3f-bbb3-e9192b50cc7a,9d7cd8e2-d859-4f4f-9c01-abba06ef2e2c,-1.29538784353723E-05,-6.27384966963316E-06,2011-01-01 07:00:00 +8a22fa56-ca2f-4930-9db9-bbf36844a612,4fc73066-d9a2-4175-84e5-f3692e050492,-1.33990738845689E-05,-6.48946766665231E-06,2011-01-01 07:00:00 +10faaeae-2879-4c7f-9028-047cbfa70345,0fbb53fd-cadb-4170-9f31-5af1cd05fd11,-0.002344623232639,-0.001758467424479,2011-01-01 07:00:00 +6fbe0864-03cc-4507-8a33-cd14e4788df8,de40f0bd-3793-4b02-b663-31d282b33f61,-3.83898399559214E-05,-1.85930480918401E-05,2011-01-01 07:00:00 +aad3a7a1-250f-4eb6-ac32-943cdae62334,241b5dad-aaac-4f7c-8152-a32839fcfa13,-1.17096941079482E-05,-5.67126369736888E-06,2011-01-01 07:00:00 +5a12cb52-3111-47da-8c10-e30eb996ef67,90a5aeab-5a04-4580-bc1c-4d8ea399cc8c,-1.30976850294727E-05,-6.34349838197745E-06,2011-01-01 07:00:00 +eb88cb9a-7cb3-48e4-b69c-1d495dd63938,fa6d5184-b205-4b1b-839f-7b21ac956c28,-1.28652573636115E-05,-6.23092852562501E-06,2011-01-01 07:00:00 +02fb6a24-c1dc-472b-bb67-3cd75e22d322,19d949f2-54ff-483c-928b-2438fc760385,-3.48434939696665E-05,-1.68754743392939E-05,2011-01-01 07:00:00 +3ff3e120-66ec-40f4-88ea-f95c2add6073,3d74e9fc-be60-41bf-9339-cd067c9378a2,-1.31914450476373E-05,-6.38890843132456E-06,2011-01-01 07:00:00 +3abff4e3-a679-453e-aab2-062ebfc6d9ef,6291eea2-689c-48f3-b7a9-5054bf567cab,-1.15873288003833E-05,-5.61199947404991E-06,2011-01-01 07:00:00 +241a56cd-d10e-4ce1-8dd6-16b5bfe5eddc,5206abaa-3abc-4a15-a8f2-778139a3fc65,-3.96334443352561E-05,-1.91953531824251E-05,2011-01-01 07:00:00 +ed042282-1980-4302-9ebc-5ddec35bc4d2,114efaa0-dd3f-47ce-bbbe-856cacb034d1,-1.32954343931371E-05,-6.43927277001772E-06,2011-01-01 07:00:00 +ccb7c146-7640-474f-8cfe-fcc372382d66,6cac0624-6336-4418-bcf0-990abcdb824b,-3.91745237909085E-05,-1.89730878184333E-05,2011-01-01 07:00:00 +539b2f09-4043-40ad-a5be-922cfce7dafc,645b0617-e6ab-438b-a141-9c497d720e4b,-0.001037654051144,-0.000778240538358,2011-01-01 07:00:00 +ef742f75-e4b5-40e1-9c53-8ec19528fc55,a1eb7fc1-3bee-4b65-a387-ef3046644bf0,-1.16788431717816E-05,-5.65632190702845E-06,2011-01-01 07:00:00 +6a478b47-e3b8-4952-bffc-77665aac3972,a364e957-2dcc-49c2-b213-2a68d9c3ee83,-0.00209059856075,-0.001567948920562,2011-01-01 07:00:00 +b48095cc-d447-4203-a233-dc8b66ff5f07,cbcfa285-fe3a-4a98-bb4a-05d28d466c79,-0.001042597411006,-0.000781948058255,2011-01-01 07:00:00 +2b369a0e-9b8a-4151-b08f-a16a86af39b8,a50f12e1-33ed-4992-8579-da1800d5eff7,-1.1787461182686E-05,-5.70892801069296E-06,2011-01-01 07:00:00 +52074794-69ed-413a-90e8-8beefc2e7f9f,e04c6258-0ee5-4928-96c1-8e04acbbcc8f,-1.17638396813498E-05,-5.69748759544639E-06,2011-01-01 07:00:00 +4cb01f00-0b66-4cfb-b90e-958183c82b6a,51ed457c-81ff-470f-b45b-30a94a965c36,-1.18397222744479E-05,-5.7342392126562E-06,2011-01-01 07:00:00 +1d58e3a0-2ee5-4f97-9dfe-33204bf06d64,dcc2950b-23cc-407d-b53f-0056234f7ee1,-3.51117921950116E-05,-1.70054171005173E-05,2011-01-01 07:00:00 +c0c17b39-df94-4fa4-9f46-42fa287b7624,53df57d0-c789-4393-b0a5-897a3bc821a2,-3.39227776591289E-05,-1.64295510778158E-05,2011-01-01 07:00:00 +d54aad36-92e4-412c-922e-e62f88be8593,61788990-7681-42c0-9d0c-cfd22d4d3a83,-0.001056537191134,-0.000792402893351,2011-01-01 07:00:00 +bd1dbc0e-c018-434e-83f0-e03c043e3adc,1a738cc5-b8f0-41f0-9f60-85073dc80136,-1.16327508027723E-05,-5.63399835385289E-06,2011-01-01 07:00:00 +200da268-0de9-46aa-b4dd-983a37ff1911,3c98b5a6-1d44-449e-83e4-d610a4846d8f,-0.001158701587256,-0.000869026190442,2011-01-01 07:00:00 +f95a7282-88fb-4915-aa5e-db343f1fd656,9b3ae847-e2ea-4598-b56e-35501f61f70c,-0.001087424923455,-0.000815568692592,2011-01-01 07:00:00 +f4a99b32-c364-4a86-a80d-e168c455ae81,0a2cdd93-b055-4e0b-8fce-088968316df4,-1.16621882621038E-05,-5.64825556611743E-06,2011-01-01 07:00:00 +e7407b0a-076d-424c-85fa-022c8d1d70e4,23e79154-30f9-44c5-b9c7-ab80ab7a4b6a,-1.33495628954142E-05,-6.4654884001723E-06,2011-01-01 07:00:00 +307a923a-adec-4ec4-b094-da0084ae5f62,b938f0ab-e2c4-469e-9979-303d42224932,-3.57927016010435E-05,-1.73351965772506E-05,2011-01-01 07:00:00 +cbd0332e-230e-4509-b988-4d8105f0dc7e,4ff2235f-24d6-440c-bf09-76ef3eaa340d,-0.001043227521582,-0.000782420641187,2011-01-01 07:00:00 +53e0e1f9-4181-4716-971f-ffa2fce8ec97,de8cfef5-7620-4b9e-9a10-1faebb5a80c0,-3.45986104314562E-05,-1.67568718286277E-05,2011-01-01 07:00:00 +12ded54d-19a4-42a3-a8cc-8558a7c010ff,287285e2-c0ac-40dc-a15f-82a5de6ef37f,-1.16053786668377E-05,-5.62074142336316E-06,2011-01-01 07:00:00 +32a63847-9e88-4d17-a7f3-6cd50276b7c6,d350f4a1-c675-4f22-8fda-26ad0bd03edb,-0.009390141553974,-0.007042606165481,2011-01-01 08:00:00 +308a089b-dc99-480f-86c3-50f859b2630d,83f68d87-a893-4e7f-b21d-4874929f927d,-9.22979378435368E-05,-4.4701931528575E-05,2011-01-01 08:00:00 +0042f0cb-df68-4732-8af6-d48e93bede2e,241b5dad-aaac-4f7c-8152-a32839fcfa13,-9.66680247028404E-05,-4.68184611945972E-05,2011-01-01 08:00:00 +1023fe32-33cf-4a26-a809-c602278226aa,5b38af42-1ee4-4a41-b666-ea141187df37,-9.59463875680339E-05,-4.64689563785386E-05,2011-01-01 08:00:00 +204b4442-0e53-46ce-aeb1-0ef0a23486c3,033e5854-65d9-4a14-8b5c-6aa675ded4a2,-0.000107666434924,-5.21452343826586E-05,2011-01-01 08:00:00 +dc48dc0b-2458-4df4-8699-c2c43125c9e8,6a909b40-9c28-4e7a-9a86-f52bb0c9d7e9,-0.000111179660175,-5.3846767031321E-05,2011-01-01 08:00:00 +c678f321-103f-4411-a87b-555ea0652318,287285e2-c0ac-40dc-a15f-82a5de6ef37f,-9.55246521890249E-05,-4.62647006120923E-05,2011-01-01 08:00:00 +df1621e4-eae1-4e9d-ac7f-1a219d912000,a50f12e1-33ed-4992-8579-da1800d5eff7,-9.40828998402479E-05,-4.55664280798777E-05,2011-01-01 08:00:00 +8d0c9e5d-1cc4-4d8f-9652-cc2c9bf46324,a364e957-2dcc-49c2-b213-2a68d9c3ee83,-0.016357178729232,-0.012267884046924,2011-01-01 08:00:00 +9c8fc824-4755-493b-b222-5adce6ff8867,4ff2235f-24d6-440c-bf09-76ef3eaa340d,-0.008702057756099,-0.006526543317074,2011-01-01 08:00:00 +ceb8fe5b-3ce2-4114-a6de-f6aa84d60dc1,1a738cc5-b8f0-41f0-9f60-85073dc80136,-9.3941910708454E-05,-4.54981439268081E-05,2011-01-01 08:00:00 +ef2822ef-e2fa-4839-9f57-494895cfb4d5,d142aeef-1b06-4910-88b5-0bce6ef7c1e2,-9.38915455256376E-05,-4.54737509554559E-05,2011-01-01 08:00:00 +4effc580-d945-4203-8476-1d06b003f883,6cac0624-6336-4418-bcf0-990abcdb824b,-0.000331606831668,-0.000160604518692,2011-01-01 08:00:00 +f77741d6-dad5-463a-89da-345e1b1de596,e04c6258-0ee5-4928-96c1-8e04acbbcc8f,-9.48195692480561E-05,-4.59232133580371E-05,2011-01-01 08:00:00 +f0f1b790-943b-4fa6-bb35-70d0b34822c6,de40f0bd-3793-4b02-b663-31d282b33f61,-0.000321338605039,-0.000155631389558,2011-01-01 08:00:00 +c557ff7c-3424-42af-b8d1-e9ab78e5014f,5206abaa-3abc-4a15-a8f2-778139a3fc65,-0.000325025233863,-0.00015741690539,2011-01-01 08:00:00 +49153b48-51f3-463f-90c0-6a1b36348ded,e447506e-3d43-4bce-8aab-a7ca8b7fbc45,-0.000108521549399,-5.25593852250166E-05,2011-01-01 08:00:00 +35e396af-eb63-4361-b22f-c5e932f6af3b,e87c9d51-cfec-4e04-9790-16cd6b238d51,-0.000109561398589,-5.30630071734771E-05,2011-01-01 08:00:00 +aaaeb643-c3fc-4e7f-a73e-b8579a073102,51ed457c-81ff-470f-b45b-30a94a965c36,-9.72526441797225E-05,-4.71016053301699E-05,2011-01-01 08:00:00 +b5db4c5d-c53e-4edf-83d2-fa01d5f50251,a1eb7fc1-3bee-4b65-a387-ef3046644bf0,-9.71145782498004E-05,-4.70347369483837E-05,2011-01-01 08:00:00 +f13e0d28-87cf-448a-99f8-853474356a8d,cb646f5c-890a-4317-81eb-c7aeffb86389,-0.000107347191424,-5.19906176989716E-05,2011-01-01 08:00:00 +d6903f25-523e-473c-bd69-11cbeefbe3c2,71e4f6f1-2b50-41ce-adb7-80a4e309bd63,-0.000109879900539,-5.32172647086221E-05,2011-01-01 08:00:00 +a0604630-8b49-4468-a1c8-0c823bd882fc,6291eea2-689c-48f3-b7a9-5054bf567cab,-9.38761382953441E-05,-4.54662888932504E-05,2011-01-01 08:00:00 +5fcea371-5ee5-4a99-b8bc-8630e8689585,4e655530-909f-4acf-8ed9-d19f849265df,-9.47426632613144E-05,-4.58859660886637E-05,2011-01-01 08:00:00 +ef9f283b-ded2-40aa-b397-f89f48bda824,ef4764b4-27b9-44bd-8b7d-6903df8b4a72,-0.00011125524241,-5.38833731782138E-05,2011-01-01 08:00:00 +05325f46-1f41-4f81-89f5-391f2e36bddb,2f99a367-0fc2-4ca2-ab58-cb5d7004a6bd,-9.7285144327154E-05,-4.71173458699815E-05,2011-01-01 08:00:00 +1fc98799-74d6-4d6f-904f-06ce680244b3,3776dfa9-f161-419e-9014-9cfb5a379025,-0.000316935218059,-0.000153498731908,2011-01-01 08:00:00 +fce3a917-f46a-486d-89ac-0172d0df024d,d3bacaf6-8558-4df5-8481-8d684ef3e14d,-9.55271068166834E-05,-4.62658894425265E-05,2011-01-01 08:00:00 +adfb22eb-292c-441a-ae2c-1829cf749115,41a126ec-6254-4b68-821b-ecebb98ad0fd,-0.000105940997336,-5.13095668183705E-05,2011-01-01 08:00:00 +03847373-e397-45d5-98bd-3fb87def3c78,19d949f2-54ff-483c-928b-2438fc760385,-0.000286788617266,-0.000138898066758,2011-01-01 08:00:00 +e982e332-0dd7-4721-b2bb-95aa6bd26724,bb929fcc-a67e-423c-9569-73364746383d,-0.000106256036223,-5.14621471153644E-05,2011-01-01 08:00:00 +c1f8370e-51fd-4175-9211-8ebb9be75ce6,5a612315-ad74-4d98-b350-7e44630b8a6e,-9.03537655290006E-05,-4.37603259010314E-05,2011-01-01 08:00:00 +481a2351-9a45-4da1-9c83-17bbfceb67cf,114efaa0-dd3f-47ce-bbbe-856cacb034d1,-0.000106701379632,-5.16778367722629E-05,2011-01-01 08:00:00 +1aeaf92f-d09a-4019-baa0-fe5077f567d7,c023f6f8-c35c-46d4-9ab7-1d098994d65d,-9.49773397553117E-05,-4.59996251021924E-05,2011-01-01 08:00:00 +f091149a-ea8a-4163-afe5-c04d6cb3e189,fad9b8c1-9ded-4856-ab91-f41217259363,-0.000290902141017,-0.000140890337239,2011-01-01 08:00:00 +bf57e33e-d6c3-4914-b33c-8e176ae070f0,9d7cd8e2-d859-4f4f-9c01-abba06ef2e2c,-0.000110204316779,-5.33743866645535E-05,2011-01-01 08:00:00 +7d2d9622-b592-4936-abe6-c2fcba04caa2,3d74e9fc-be60-41bf-9339-cd067c9378a2,-0.000109636639179,-5.30994478546194E-05,2011-01-01 08:00:00 +d7729941-1315-475f-ba02-2cc9df6ca55e,9b3ae847-e2ea-4598-b56e-35501f61f70c,-0.008926124311573,-0.00669459323368,2011-01-01 08:00:00 +58ba0725-9022-4940-880b-1dccc1bf08b0,b938f0ab-e2c4-469e-9979-303d42224932,-0.000288274069528,-0.000139617504124,2011-01-01 08:00:00 +50e1ec34-b672-48e0-80a2-483a2a295d19,2560c371-f420-4c2a-b4e6-e04c11b64c03,-0.000330032765769,-0.000159842163783,2011-01-01 08:00:00 +9454d37c-e872-425d-b410-8ecf0efe8f46,4fa4ce55-0944-463a-a91b-3a3806286e0b,-0.00874787652988,-0.00656090739741,2011-01-01 08:00:00 +d09a8310-8f87-4967-95a8-c72ff0215706,dcc2950b-23cc-407d-b53f-0056234f7ee1,-0.000290204316785,-0.000140552365538,2011-01-01 08:00:00 +90bdede0-0bf4-471c-bafa-6d2f44882649,53df57d0-c789-4393-b0a5-897a3bc821a2,-0.000278685578065,-0.000134973585756,2011-01-01 08:00:00 +a1050b41-7075-4c3b-aa64-bbdb611475a1,0c8bcc26-ce6e-4d2c-acdd-e304cfb3c02f,-0.000104823312728,-5.0768247456519E-05,2011-01-01 08:00:00 +62ce632c-c015-4e62-b78e-88e8d621d1e3,23e79154-30f9-44c5-b9c7-ab80ab7a4b6a,-0.000113017468289,-5.47368581253651E-05,2011-01-01 08:00:00 +58928b10-3d41-4f8c-852c-46fd2240fe37,26647b27-a278-4ddb-a68e-8437d24798ca,-0.009608245205319,-0.007206183903989,2011-01-01 08:00:00 +83f0cc75-616e-4089-a61e-7d2153452029,61788990-7681-42c0-9d0c-cfd22d4d3a83,-0.008778527518291,-0.006583895638719,2011-01-01 08:00:00 +9108aacc-4292-4310-85f1-4458a819cabd,b8209f35-1405-4f7f-b1ec-3c853954e2a8,-0.008507022751705,-0.006380267063779,2011-01-01 08:00:00 +d9f946e8-1b40-4bcf-a6d9-d48549990f2c,0fbb53fd-cadb-4170-9f31-5af1cd05fd11,-0.019224998704494,-0.014418749028371,2011-01-01 08:00:00 +e62c5160-e382-4be5-9b4a-fd9cca9d19e9,0818deae-c7d9-4252-ac4c-f147004e5752,-0.009739402113916,-0.007304551585437,2011-01-01 08:00:00 +06bdece3-c116-41f7-9f75-361f36743f17,819018d3-4601-4c39-9d41-4a911572d406,-0.016356800226415,-0.012267600169811,2011-01-01 08:00:00 +3dde9912-2e9e-43f3-ad91-0d865c0abb25,645b0617-e6ab-438b-a141-9c497d720e4b,-0.008532523673988,-0.006399392755491,2011-01-01 08:00:00 +7913d486-da6e-4a7a-be20-1f42e2c9ffa3,cbcfa285-fe3a-4a98-bb4a-05d28d466c79,-0.008405594077929,-0.006304195558447,2011-01-01 08:00:00 +d848a79a-dee1-4e5d-bf0a-44bdd1b42094,83a0dcd8-d6ad-49bf-8cbc-5a5774ed18ac,-0.000310905321032,-0.000150578319487,2011-01-01 08:00:00 +7f3de65e-195f-48ef-b3e8-04d179fae3d0,95b1b117-1c7b-4a69-b10e-8963fbced23a,-0.009767163232361,-0.007325372424271,2011-01-01 08:00:00 +1b236c27-37db-4376-85c3-15f3b127826b,62b0cca9-b44c-4eda-999f-ae2832319848,-0.000288021748307,-0.000139495299379,2011-01-01 08:00:00 +c91a7bde-65dd-4af7-af00-03a0e217e072,90a5aeab-5a04-4580-bc1c-4d8ea399cc8c,-0.000109778151103,-5.31679852075999E-05,2011-01-01 08:00:00 +a2008121-6a03-43d4-9eae-ed6981417275,fa6d5184-b205-4b1b-839f-7b21ac956c28,-0.00010061486654,-4.87300039404289E-05,2011-01-01 08:00:00 +8d9414de-5632-4370-804a-212adcf45604,4fc73066-d9a2-4175-84e5-f3692e050492,-0.000108221793252,-5.24142066971629E-05,2011-01-01 08:00:00 +3ad1427c-fce4-4323-af9d-3bc9f2487f0d,0a2cdd93-b055-4e0b-8fce-088968316df4,-9.27572818986767E-05,-4.49244020082051E-05,2011-01-01 08:00:00 +61f4e26e-1d3b-487e-9829-d56c8301340d,75a4050d-bdfd-4ca4-a1fd-a5d729613ed5,-0.016772900071527,-0.012579675053645,2011-01-01 08:00:00 +6cac7d24-5f7b-4e2e-b911-1a33c05bbda9,de8cfef5-7620-4b9e-9a10-1faebb5a80c0,-0.000281536659104,-0.000136354427326,2011-01-01 08:00:00 +68a30e03-2814-4cb2-81b4-459cbf1f0bcb,3c98b5a6-1d44-449e-83e4-d610a4846d8f,-0.00973329459333,-0.007299970944998,2011-01-01 08:00:00 +90e67584-ab76-49fb-8a0d-a66bc17d5f81,4ff2235f-24d6-440c-bf09-76ef3eaa340d,-0.121104601120335,-0.090828450840252,2011-01-01 09:00:00 +1cc85cbf-90a4-498c-944e-b267b2ad056b,033e5854-65d9-4a14-8b5c-6aa675ded4a2,-0.00149441452545,-0.000723777988466,2011-01-01 09:00:00 +60383fa5-4fd9-478c-bfa8-adf722700aeb,d142aeef-1b06-4910-88b5-0bce6ef7c1e2,-0.001167642378228,-0.000565515014321,2011-01-01 09:00:00 +e989daef-559b-4e3f-aa16-c3dcec66fb7a,d350f4a1-c675-4f22-8fda-26ad0bd03edb,-0.144884033848004,-0.108663025386003,2011-01-01 09:00:00 +b821e377-cc5d-4c57-bbc7-180c397c645d,287285e2-c0ac-40dc-a15f-82a5de6ef37f,-0.001254324612922,-0.000607497136681,2011-01-01 09:00:00 +9639a6d8-6818-4ed1-9267-288d03ea284f,e447506e-3d43-4bce-8aab-a7ca8b7fbc45,-0.001459021747904,-0.000706636483949,2011-01-01 09:00:00 +43dea7e7-dd03-48fe-aedd-338708ba0c7f,a50f12e1-33ed-4992-8579-da1800d5eff7,-0.001029998112785,-0.000498850853963,2011-01-01 09:00:00 +c0c160e2-9360-45a3-a627-cb3b4620ba2a,1a738cc5-b8f0-41f0-9f60-85073dc80136,-0.001096082883804,-0.000530857169361,2011-01-01 09:00:00 +24ed91d8-ab8e-45b9-9bda-b6c3203d71ef,6a909b40-9c28-4e7a-9a86-f52bb0c9d7e9,-0.001645794941652,-0.000797094870272,2011-01-01 09:00:00 +220f4675-0db0-4a93-8532-4d80e35f14e0,83f68d87-a893-4e7f-b21d-4874929f927d,-0.001109501436459,-0.000537356071026,2011-01-01 09:00:00 +a64ddca9-f7d8-4224-88d7-40623d8172d2,51ed457c-81ff-470f-b45b-30a94a965c36,-0.001248101467447,-0.000604483129765,2011-01-01 09:00:00 +aebf981d-acc8-4f2a-a68e-a9771b120932,de40f0bd-3793-4b02-b663-31d282b33f61,-0.004731561173763,-0.002291599666846,2011-01-01 09:00:00 +a64c8442-4b28-4c3f-a238-de657ab88793,241b5dad-aaac-4f7c-8152-a32839fcfa13,-0.001289317921276,-0.000624445169438,2011-01-01 09:00:00 +9d2731c7-fcb7-460c-809d-3385603b73c5,d3bacaf6-8558-4df5-8481-8d684ef3e14d,-0.000901499950451,-0.000436616353514,2011-01-01 09:00:00 +06d553ee-6f75-43ac-8a76-54d135c27416,0a2cdd93-b055-4e0b-8fce-088968316df4,-0.000978468316913,-0.000473893834764,2011-01-01 09:00:00 +59cc5185-3402-4084-8458-7928bdb13106,41a126ec-6254-4b68-821b-ecebb98ad0fd,-0.001331583199835,-0.000644915178111,2011-01-01 09:00:00 +8370dc23-334a-4994-9006-a06dc7735740,a364e957-2dcc-49c2-b213-2a68d9c3ee83,-0.152730549330023,-0.114547911997517,2011-01-01 09:00:00 +4cc634bc-538a-4c57-8719-6f9d35bc2f55,b938f0ab-e2c4-469e-9979-303d42224932,-0.003287641099233,-0.001592277257132,2011-01-01 09:00:00 +c63524bc-8dd9-49f1-9f23-85b615cf3f7a,2f99a367-0fc2-4ca2-ab58-cb5d7004a6bd,-0.001318824014466,-0.000638735622597,2011-01-01 09:00:00 +547cf64d-d3f6-4e07-baf4-4a008fda27f7,5a612315-ad74-4d98-b350-7e44630b8a6e,-0.000904726787067,-0.000438179181815,2011-01-01 09:00:00 +ae66aa30-ab8e-46d9-823d-55c9c5d8ddec,0c8bcc26-ce6e-4d2c-acdd-e304cfb3c02f,-0.001579507453412,-0.000764990374444,2011-01-01 09:00:00 +7743e165-37b7-4646-bb68-740dc3c318b3,3776dfa9-f161-419e-9014-9cfb5a379025,-0.003253387697463,-0.001575687577489,2011-01-01 09:00:00 +cc8a7c43-4c87-43ba-81c2-80b33fe761b2,cb646f5c-890a-4317-81eb-c7aeffb86389,-0.001536386110346,-0.000744105754806,2011-01-01 09:00:00 +de7801fb-dd69-4bd8-9755-2f834af19998,c023f6f8-c35c-46d4-9ab7-1d098994d65d,-0.001173575240883,-0.00056838843085,2011-01-01 09:00:00 +ae608e3f-0fe4-4716-900a-d4ff832f4859,bb929fcc-a67e-423c-9569-73364746383d,-0.00142960202178,-0.000692387860269,2011-01-01 09:00:00 +aba4197e-9cb5-49d4-80d8-28703df93e2c,71e4f6f1-2b50-41ce-adb7-80a4e309bd63,-0.001525892014159,-0.000739023232053,2011-01-01 09:00:00 +aea5864a-84a1-4d13-95ff-2f2ed1196979,4e655530-909f-4acf-8ed9-d19f849265df,-0.000921471639228,-0.000446289083859,2011-01-01 09:00:00 +f4a91b8d-fc43-406a-808d-bd822dfcfcb2,fad9b8c1-9ded-4856-ab91-f41217259363,-0.00335729062734,-0.001626010063186,2011-01-01 09:00:00 +8def46a3-1e9b-4824-81c9-f5033be1a563,62b0cca9-b44c-4eda-999f-ae2832319848,-0.00399763992546,-0.001936145383083,2011-01-01 09:00:00 +b1d671d9-5f63-4ed9-a5fe-26d96f0789ea,23e79154-30f9-44c5-b9c7-ab80ab7a4b6a,-0.001682870680851,-0.00081505147032,2011-01-01 09:00:00 +90ccfed0-aacc-4add-81cd-b5b2b0b2a726,9d7cd8e2-d859-4f4f-9c01-abba06ef2e2c,-0.001709673566679,-0.0008280327004,2011-01-01 09:00:00 +cf003dc4-fac9-4064-97b2-39ca3a548249,114efaa0-dd3f-47ce-bbbe-856cacb034d1,-0.001233563221643,-0.000597441935957,2011-01-01 09:00:00 +c2b7ed25-e4ea-41c2-8018-d124cb756835,4fc73066-d9a2-4175-84e5-f3692e050492,-0.001303807371721,-0.000631462730575,2011-01-01 09:00:00 +24d54f66-c0e1-4c9b-b159-73e9a605d883,3d74e9fc-be60-41bf-9339-cd067c9378a2,-0.001538420405364,-0.000745091008851,2011-01-01 09:00:00 +688d38c1-bcec-4ccd-bb77-bd67900f953f,fa6d5184-b205-4b1b-839f-7b21ac956c28,-0.002010158639855,-0.000973564263513,2011-01-01 09:00:00 +8cc382f2-8d2d-4975-acb0-a811ae8b9af9,90a5aeab-5a04-4580-bc1c-4d8ea399cc8c,-0.00159158981835,-0.000770842130862,2011-01-01 09:00:00 +8d270e13-8c87-4ed9-9e2b-a533be3d5339,e04c6258-0ee5-4928-96c1-8e04acbbcc8f,-0.001092576644034,-0.000529159019935,2011-01-01 09:00:00 +61659085-3990-471a-a66d-2d1e0c2c77d4,a1eb7fc1-3bee-4b65-a387-ef3046644bf0,-0.001342531425234,-0.000650217645681,2011-01-01 09:00:00 +01d29211-1525-4209-adbc-19b605910dc2,5b38af42-1ee4-4a41-b666-ea141187df37,-0.001270630549896,-0.000615394462397,2011-01-01 09:00:00 +85d1f005-f562-494d-8c1a-5b7e0754a787,95b1b117-1c7b-4a69-b10e-8963fbced23a,-0.129714500322774,-0.097285875242081,2011-01-01 09:00:00 +a67d6508-64c9-446c-ba1b-cd8443747a80,83a0dcd8-d6ad-49bf-8cbc-5a5774ed18ac,-0.004350547270039,-0.002107066211022,2011-01-01 09:00:00 +d8738325-0491-4acb-9f2c-94ef7c3d3b3f,dcc2950b-23cc-407d-b53f-0056234f7ee1,-0.003773606714212,-0.001827641146658,2011-01-01 09:00:00 +be475029-5afc-452a-afe3-d24d723c4707,e87c9d51-cfec-4e04-9790-16cd6b238d51,-0.001815761469757,-0.000879413416916,2011-01-01 09:00:00 +3d1e579e-7eff-4901-a8e2-f7b77e5a80be,5206abaa-3abc-4a15-a8f2-778139a3fc65,-0.004310700315509,-0.002087767450133,2011-01-01 09:00:00 +132d980a-473d-4192-a219-9288c0c35d5c,ef4764b4-27b9-44bd-8b7d-6903df8b4a72,-0.00163116731717,-0.000790010388394,2011-01-01 09:00:00 +48640fbe-ff96-4507-9a07-67ac5681b861,645b0617-e6ab-438b-a141-9c497d720e4b,-0.110668663371339,-0.083001497528504,2011-01-01 09:00:00 +d11ec13e-e6ee-447e-8973-3019108b5731,61788990-7681-42c0-9d0c-cfd22d4d3a83,-0.11781291447014,-0.088359685852605,2011-01-01 09:00:00 +26f82259-46fe-49f5-978b-d8bbaf61e4dc,9b3ae847-e2ea-4598-b56e-35501f61f70c,-0.122649529972607,-0.091987147479455,2011-01-01 09:00:00 +af020ef2-08d9-4037-b452-0b25368b7ef9,53df57d0-c789-4393-b0a5-897a3bc821a2,-0.003647022290814,-0.001766333512278,2011-01-01 09:00:00 +f8fa69c9-70bb-4a1d-9a5f-292108410d8e,3c98b5a6-1d44-449e-83e4-d610a4846d8f,-0.141449922693442,-0.106087442020082,2011-01-01 09:00:00 +94fb426f-5e16-4ff1-9315-61e452fcbcdf,b8209f35-1405-4f7f-b1ec-3c853954e2a8,-0.099380184680636,-0.074535138510477,2011-01-01 09:00:00 +67709131-18ba-46d7-95d0-5607d7515578,4fa4ce55-0944-463a-a91b-3a3806286e0b,-0.104238760595291,-0.078179070446468,2011-01-01 09:00:00 +a85c8e23-1278-406d-8536-8bec13cebcbd,19d949f2-54ff-483c-928b-2438fc760385,-0.003708608527405,-0.001796161088012,2011-01-01 09:00:00 +24bafacd-1615-44d2-b625-53401df3b716,0818deae-c7d9-4252-ac4c-f147004e5752,-0.124847833781321,-0.093635875335991,2011-01-01 09:00:00 +8bc7799f-fe33-4dc9-bc4f-8f2c52bebd63,26647b27-a278-4ddb-a68e-8437d24798ca,-0.125174891791904,-0.093881168843928,2011-01-01 09:00:00 +962de57e-ffce-4410-bbfe-d81648d1591d,0fbb53fd-cadb-4170-9f31-5af1cd05fd11,-0.250395655271586,-0.187796741453689,2011-01-01 09:00:00 +c9435595-c897-467b-b712-aef590a6ed44,819018d3-4601-4c39-9d41-4a911572d406,-0.185564085833483,-0.139173064375112,2011-01-01 09:00:00 +b4d1d2d2-80e2-4582-ab58-567e5d9728cc,cbcfa285-fe3a-4a98-bb4a-05d28d466c79,-0.09590700306114,-0.071930252295855,2011-01-01 09:00:00 +0fc0c8e0-dcdf-4d7f-88de-e770a9b8c556,6cac0624-6336-4418-bcf0-990abcdb824b,-0.005110398054781,-0.002475078742451,2011-01-01 09:00:00 +cd9bcaa2-ffa7-4157-a53a-64bb5b2d899a,de8cfef5-7620-4b9e-9a10-1faebb5a80c0,-0.003509540519904,-0.001699748051613,2011-01-01 09:00:00 +867b4baa-bf1b-48a0-b049-6c912c423f71,75a4050d-bdfd-4ca4-a1fd-a5d729613ed5,-0.226474025261148,-0.169855518945861,2011-01-01 09:00:00 +b8e06efa-c159-4421-bfbe-94f5223f0184,6291eea2-689c-48f3-b7a9-5054bf567cab,-0.001136018851611,-0.000550199041348,2011-01-01 09:00:00 +a4c1896f-2e6c-4cdb-99f9-18424d1291f2,2560c371-f420-4c2a-b4e6-e04c11b64c03,-0.004408540372985,-0.002135153552707,2011-01-01 09:00:00 +bb9bcbef-010f-4690-92c3-14e622fafbf6,a1eb7fc1-3bee-4b65-a387-ef3046644bf0,-0.000827808522219,-0.000400925965884,2011-01-01 10:00:00 +fabf6743-b9c0-4e15-88e3-db894705a285,9b3ae847-e2ea-4598-b56e-35501f61f70c,-0.079556795616373,-0.05966759671228,2011-01-01 10:00:00 +d464b6ba-a750-417d-9fd5-9b363b9290bd,cb646f5c-890a-4317-81eb-c7aeffb86389,-0.000943351409117,-0.000456885940065,2011-01-01 10:00:00 +c28fa5b5-c3ae-4fac-b116-67e4f9eaa352,5206abaa-3abc-4a15-a8f2-778139a3fc65,-0.002804877219816,-0.001358464038913,2011-01-01 10:00:00 +18c03627-3fb5-49d6-a68d-04f1cd1132dc,2f99a367-0fc2-4ca2-ab58-cb5d7004a6bd,-0.000804398807542,-0.000389588123598,2011-01-01 10:00:00 +acb84627-79a8-49a0-ab45-d7be0c1f3c36,dcc2950b-23cc-407d-b53f-0056234f7ee1,-0.002381867890261,-0.001153591270057,2011-01-01 10:00:00 +ced7e19e-8361-4ee8-bff0-c21c20388ff7,4ff2235f-24d6-440c-bf09-76ef3eaa340d,-0.073808829206781,-0.055356621905086,2011-01-01 10:00:00 +c980a9d6-ddf1-4496-9600-5d0089025379,6cac0624-6336-4418-bcf0-990abcdb824b,-0.002968563639562,-0.001437740990258,2011-01-01 10:00:00 +f02e08bd-f0d2-4a77-ae0b-8d01ab141848,b8209f35-1405-4f7f-b1ec-3c853954e2a8,-0.068735570404284,-0.051551677803213,2011-01-01 10:00:00 +3c5fe379-87a0-48fb-a486-bdafc71da32e,95b1b117-1c7b-4a69-b10e-8963fbced23a,-0.083621470235429,-0.062716102676572,2011-01-01 10:00:00 +73927d54-05bb-4f66-8a4d-5aee0e3d892e,6a909b40-9c28-4e7a-9a86-f52bb0c9d7e9,-0.000971295809802,-0.000470420031023,2011-01-01 10:00:00 +e98df64e-a63b-45e1-9417-3048cb1fda8b,a364e957-2dcc-49c2-b213-2a68d9c3ee83,-0.126861748839704,-0.095146311629778,2011-01-01 10:00:00 +a3e4e3fc-1eb1-4646-bc01-4dc3d661c576,3c98b5a6-1d44-449e-83e4-d610a4846d8f,-0.084127980770985,-0.063095985578239,2011-01-01 10:00:00 +933c230b-a919-46d9-9fd9-746a9dee7409,de8cfef5-7620-4b9e-9a10-1faebb5a80c0,-0.002360129117056,-0.001143062701661,2011-01-01 10:00:00 +11bdbd8c-eefe-47c4-b490-d94ce05c4f64,75a4050d-bdfd-4ca4-a1fd-a5d729613ed5,-0.14157450860764,-0.10618088145573,2011-01-01 10:00:00 +58848904-d374-410e-b269-9a1f4dd3cd51,5b38af42-1ee4-4a41-b666-ea141187df37,-0.00079972878711,-0.000387326329473,2011-01-01 10:00:00 +15b2b2db-52b9-4990-a47b-98ee1213d321,41a126ec-6254-4b68-821b-ecebb98ad0fd,-0.00089387539585,-0.000432923613181,2011-01-01 10:00:00 +63306adb-eaf1-40bd-b447-35c51362b385,0fbb53fd-cadb-4170-9f31-5af1cd05fd11,-0.163045190703394,-0.122283893027545,2011-01-01 10:00:00 +563c47a8-34ff-42cc-82d1-1d9822f74aad,819018d3-4601-4c39-9d41-4a911572d406,-0.133821382350881,-0.100366036763161,2011-01-01 10:00:00 +2d947f9c-07e5-45fa-a071-32c620603ecd,2560c371-f420-4c2a-b4e6-e04c11b64c03,-0.002828813516827,-0.001370056916664,2011-01-01 10:00:00 +3ee93b33-219b-465a-8090-bcacd30501c5,a50f12e1-33ed-4992-8579-da1800d5eff7,-0.000760153333802,-0.000368159062626,2011-01-01 10:00:00 +742edd3b-f1db-4632-a7f6-f6bf2607b8dc,0818deae-c7d9-4252-ac4c-f147004e5752,-0.08257149250133,-0.061928619375997,2011-01-01 10:00:00 +926410e0-9f8d-4619-99db-51038a738417,83f68d87-a893-4e7f-b21d-4874929f927d,-0.000762320609509,-0.000369208722159,2011-01-01 10:00:00 +c5aabe2b-79ac-4a55-8274-b91f48c6469b,51ed457c-81ff-470f-b45b-30a94a965c36,-0.000807317295322,-0.000391001611742,2011-01-01 10:00:00 +9a0000d5-522e-47dd-8a1f-69d2157861c5,e87c9d51-cfec-4e04-9790-16cd6b238d51,-0.000994809341459,-0.000481808154168,2011-01-01 10:00:00 +5d9d4f7c-7a74-452a-9dd1-3558c1d65d71,26647b27-a278-4ddb-a68e-8437d24798ca,-0.082545612911516,-0.061909209683637,2011-01-01 10:00:00 +2aa4f3f3-97a3-44a5-bec0-561888829373,bb929fcc-a67e-423c-9569-73364746383d,-0.000925733275238,-0.000448353088382,2011-01-01 10:00:00 +f988571c-7a17-45a1-846d-518ca7ab7bc3,5a612315-ad74-4d98-b350-7e44630b8a6e,-0.000719338250394,-0.000348391415521,2011-01-01 10:00:00 +fc2af59b-e438-4171-a0f5-f43655c307d0,d3bacaf6-8558-4df5-8481-8d684ef3e14d,-0.000718694054838,-0.000348079417374,2011-01-01 10:00:00 +64246cff-f7c7-4819-8fd2-c7b2e3ed2a22,0c8bcc26-ce6e-4d2c-acdd-e304cfb3c02f,-0.000943529841796,-0.000456972358956,2011-01-01 10:00:00 +f15ec2e1-544c-4955-a0d2-378d3939de70,19d949f2-54ff-483c-928b-2438fc760385,-0.002379326002669,-0.001152360177708,2011-01-01 10:00:00 +13994e83-0b15-442c-ad4e-7dd1cdce25a7,4fa4ce55-0944-463a-a91b-3a3806286e0b,-0.069864721958699,-0.052398541469024,2011-01-01 10:00:00 +76f3d6e0-c93d-499e-9f5a-5ecfe2b735c6,c023f6f8-c35c-46d4-9ab7-1d098994d65d,-0.000787098862223,-0.000381209377667,2011-01-01 10:00:00 +3244ad0c-c1ad-4092-8c23-9f691f207a9b,1a738cc5-b8f0-41f0-9f60-85073dc80136,-0.000764062189513,-0.000370052207852,2011-01-01 10:00:00 +8427fd44-d82a-4b28-b68e-77296f2605aa,61788990-7681-42c0-9d0c-cfd22d4d3a83,-0.072850802498799,-0.054638101874099,2011-01-01 10:00:00 +dbb5bee5-9e97-4edf-949d-9571f2712dd2,71e4f6f1-2b50-41ce-adb7-80a4e309bd63,-0.000940958277528,-0.000455726893537,2011-01-01 10:00:00 +82025c0e-759b-40c8-ba7a-9c929d9e76db,033e5854-65d9-4a14-8b5c-6aa675ded4a2,-0.000935056339553,-0.000452868454514,2011-01-01 10:00:00 +2fd2c05d-07aa-49ac-9acd-a1b52a9b3eb3,287285e2-c0ac-40dc-a15f-82a5de6ef37f,-0.000804365935924,-0.000389572203147,2011-01-01 10:00:00 +70496057-d8f4-41a0-93a6-e8d671aa1c0b,e04c6258-0ee5-4928-96c1-8e04acbbcc8f,-0.000768641442911,-0.000372270041496,2011-01-01 10:00:00 +52d83006-d2d7-4357-8f7d-3289f890fd7d,3776dfa9-f161-419e-9014-9cfb5a379025,-0.002560247233254,-0.001239984328915,2011-01-01 10:00:00 +d3c1151a-0443-45db-9759-6728f0bfa3c0,d350f4a1-c675-4f22-8fda-26ad0bd03edb,-0.084809320919145,-0.063606990689358,2011-01-01 10:00:00 +f77ce588-7cd1-473a-b524-79f21f03a513,de40f0bd-3793-4b02-b663-31d282b33f61,-0.002853612717642,-0.0013820677178,2011-01-01 10:00:00 +dc16d173-52e6-4dcf-9f40-cf5bea92485f,83a0dcd8-d6ad-49bf-8cbc-5a5774ed18ac,-0.002786397099288,-0.001349513708041,2011-01-01 10:00:00 +1d553468-246f-41a8-a4c9-f7edde77de01,241b5dad-aaac-4f7c-8152-a32839fcfa13,-0.000817215526704,-0.000395795544,2011-01-01 10:00:00 +91b29d00-5450-438c-914e-36050e395b95,6291eea2-689c-48f3-b7a9-5054bf567cab,-0.000779173646812,-0.000377371020658,2011-01-01 10:00:00 +90085cc4-d5fd-47e9-9f5e-c772daec2808,b938f0ab-e2c4-469e-9979-303d42224932,-0.00232290004681,-0.001125031839999,2011-01-01 10:00:00 +5108877c-b210-46f2-a374-ed9215d0ed6f,645b0617-e6ab-438b-a141-9c497d720e4b,-0.07126292359844,-0.05344719269883,2011-01-01 10:00:00 +965c02b3-b43d-489c-b659-8eb708567332,fad9b8c1-9ded-4856-ab91-f41217259363,-0.002309185386622,-0.001118389526909,2011-01-01 10:00:00 +34bd790b-a518-4708-8e5e-2d5639d4330a,ef4764b4-27b9-44bd-8b7d-6903df8b4a72,-0.000975847164508,-0.000472624352715,2011-01-01 10:00:00 +a4dd2932-a6df-487b-aa95-1b4c3f1d5a80,0a2cdd93-b055-4e0b-8fce-088968316df4,-0.000737133177955,-0.000357009892293,2011-01-01 10:00:00 +973db954-75bd-4156-aff2-8670c7676ff4,d142aeef-1b06-4910-88b5-0bce6ef7c1e2,-0.000786224026774,-0.000380785675521,2011-01-01 10:00:00 +827dd10f-20ff-44b5-afcb-d2b82ace317e,114efaa0-dd3f-47ce-bbbe-856cacb034d1,-0.000883744651844,-0.00042801706992,2011-01-01 10:00:00 +d7225bd4-2a72-4325-8548-2e8b318af939,62b0cca9-b44c-4eda-999f-ae2832319848,-0.00246088484464,-0.00119186092772,2011-01-01 10:00:00 +07401d94-f3dd-4fc4-9393-7b7cee20cd8e,23e79154-30f9-44c5-b9c7-ab80ab7a4b6a,-0.000974414590828,-0.000471930525615,2011-01-01 10:00:00 +4b56676f-b629-42c8-8da9-600732d6377d,9d7cd8e2-d859-4f4f-9c01-abba06ef2e2c,-0.000976127683401,-0.000472760214215,2011-01-01 10:00:00 +962b3a70-413d-4598-aa0a-278071c3588a,e447506e-3d43-4bce-8aab-a7ca8b7fbc45,-0.000939771677083,-0.000455152196712,2011-01-01 10:00:00 +04a91256-18e4-44a6-93bc-73165dfe3938,3d74e9fc-be60-41bf-9339-cd067c9378a2,-0.00095078723127,-0.000460487273102,2011-01-01 10:00:00 +719a55d0-2b29-44d1-acf6-f257b5897c99,90a5aeab-5a04-4580-bc1c-4d8ea399cc8c,-0.000954283904166,-0.000462180789078,2011-01-01 10:00:00 +6c54de5e-7ceb-4b92-882b-2f8162770960,53df57d0-c789-4393-b0a5-897a3bc821a2,-0.00235660944651,-0.001141358047414,2011-01-01 10:00:00 +1355642a-923a-4a0a-b8f0-09878419c366,cbcfa285-fe3a-4a98-bb4a-05d28d466c79,-0.067470788551788,-0.050603091413841,2011-01-01 10:00:00 +2d0168a4-27b0-408a-a5e3-ae78be6a9342,fa6d5184-b205-4b1b-839f-7b21ac956c28,-0.001045138534561,-0.000506183694906,2011-01-01 10:00:00 +71ae7907-8a4d-4401-bb12-66f1d14bcd1a,4fc73066-d9a2-4175-84e5-f3692e050492,-0.000906079760604,-0.000438834456807,2011-01-01 10:00:00 +7a53725b-bf42-4667-ac1d-5b73cc999640,4e655530-909f-4acf-8ed9-d19f849265df,-0.000733257817404,-0.000355132969514,2011-01-01 10:00:00 +eff37c26-5287-462e-a691-61529d16c319,9b3ae847-e2ea-4598-b56e-35501f61f70c,-0.081358832714709,-0.061019124536031,2011-01-01 11:00:00 +ba6bc78a-e1f0-4955-a92f-da3d7c7b479c,4fa4ce55-0944-463a-a91b-3a3806286e0b,-0.07192803633038,-0.053946027247785,2011-01-01 11:00:00 +b7030fc6-2d6a-434e-94b7-ed9d811dd376,645b0617-e6ab-438b-a141-9c497d720e4b,-0.07256141114062,-0.054421058355465,2011-01-01 11:00:00 +683c4613-a188-4ce6-b89d-610e458c164f,b8209f35-1405-4f7f-b1ec-3c853954e2a8,-0.071431869359144,-0.053573902019358,2011-01-01 11:00:00 +91dc13ad-3720-48f7-89fa-7d5e39e15841,0fbb53fd-cadb-4170-9f31-5af1cd05fd11,-0.166659657628408,-0.124994743221306,2011-01-01 11:00:00 +839b29ae-46eb-492b-88c5-1feaf3d6b0e7,e04c6258-0ee5-4928-96c1-8e04acbbcc8f,-0.000802693627011,-0.000388762266974,2011-01-01 11:00:00 +faf9fcb3-0dd8-4bc4-9239-14fc0e75d56b,819018d3-4601-4c39-9d41-4a911572d406,-0.140740555351807,-0.105555416513855,2011-01-01 11:00:00 +c454e007-48fe-481a-80b3-20f8cfcb6ff8,3c98b5a6-1d44-449e-83e4-d610a4846d8f,-0.08353379779325,-0.062650348344937,2011-01-01 11:00:00 +50015638-a749-45ff-826f-0f3ab343502b,6a909b40-9c28-4e7a-9a86-f52bb0c9d7e9,-0.000962124328445,-0.000465978079868,2011-01-01 11:00:00 +8d8a4424-6696-4f30-8e9f-30f13ddefdc9,0818deae-c7d9-4252-ac4c-f147004e5752,-0.084803550224487,-0.063602662668365,2011-01-01 11:00:00 +d7437e87-0759-4416-96b3-0a04c7c573cd,83f68d87-a893-4e7f-b21d-4874929f927d,-0.000791186544203,-0.000383189132408,2011-01-01 11:00:00 +9ec38e75-6996-4e39-8e8a-086d5a2ba088,61788990-7681-42c0-9d0c-cfd22d4d3a83,-0.073214178366409,-0.054910633774807,2011-01-01 11:00:00 +3800d1ac-b18b-473f-8d66-95d81d1ae90c,2560c371-f420-4c2a-b4e6-e04c11b64c03,-0.002879245667811,-0.00139448232218,2011-01-01 11:00:00 +c3876b50-b4f9-46f5-847a-6ebddfc444fe,53df57d0-c789-4393-b0a5-897a3bc821a2,-0.002402943353606,-0.001163798582825,2011-01-01 11:00:00 +363dd2a4-5bde-43f6-b51c-f456fdd1a946,a364e957-2dcc-49c2-b213-2a68d9c3ee83,-0.137981801389053,-0.10348635104179,2011-01-01 11:00:00 +ba1d65e6-d583-43f1-b842-c3c731136df9,51ed457c-81ff-470f-b45b-30a94a965c36,-0.000823048757819,-0.000398620706771,2011-01-01 11:00:00 +19a63259-57ae-4748-a213-63cebe2e8577,241b5dad-aaac-4f7c-8152-a32839fcfa13,-0.000828243132104,-0.000401136457058,2011-01-01 11:00:00 +60613254-470a-4276-bbd2-3e30a9a6b96f,95b1b117-1c7b-4a69-b10e-8963fbced23a,-0.085233470940339,-0.063925103205254,2011-01-01 11:00:00 +a63c4f14-65a4-4e98-907c-883beffba5c0,b938f0ab-e2c4-469e-9979-303d42224932,-0.00242833963909,-0.001176098565265,2011-01-01 11:00:00 +f2f2d494-afb6-49b2-97d0-9156aed36135,4e655530-909f-4acf-8ed9-d19f849265df,-0.000789542929745,-0.000382393093594,2011-01-01 11:00:00 +61462b91-4c0d-4ce2-80b6-d75cc2c3eb73,1a738cc5-b8f0-41f0-9f60-85073dc80136,-0.000795931568102,-0.00038548725237,2011-01-01 11:00:00 +31921f0e-2d6b-4dba-a736-bc018444b2e9,83a0dcd8-d6ad-49bf-8cbc-5a5774ed18ac,-0.002838712103956,-0.001374851021217,2011-01-01 11:00:00 +19f91f7f-c852-4ca3-9591-71188be946bd,033e5854-65d9-4a14-8b5c-6aa675ded4a2,-0.000944468703262,-0.000457427070317,2011-01-01 11:00:00 +7a13607d-f259-498e-9305-50dd3bd00076,4fc73066-d9a2-4175-84e5-f3692e050492,-0.000943831437169,-0.000457118428262,2011-01-01 11:00:00 +235243cf-bbc1-451e-a564-2d6ae0422c24,0a2cdd93-b055-4e0b-8fce-088968316df4,-0.000783581210827,-0.000379505701339,2011-01-01 11:00:00 +2209e08b-5adf-4ac3-9fbe-c38835b2896f,a1eb7fc1-3bee-4b65-a387-ef3046644bf0,-0.000831711827243,-0.000402816422789,2011-01-01 11:00:00 +80fff301-ca55-47ab-a06e-2ab17eacb930,75a4050d-bdfd-4ca4-a1fd-a5d729613ed5,-0.142843966590602,-0.107132974942951,2011-01-01 11:00:00 +72dfcb8b-d7e7-44ba-aab4-b7496421aa32,6cac0624-6336-4418-bcf0-990abcdb824b,-0.002926164271883,-0.00141720603926,2011-01-01 11:00:00 +cba8cc47-6189-4147-b3a4-6a083b7f8da3,a50f12e1-33ed-4992-8579-da1800d5eff7,-0.000804116113854,-0.000389451208796,2011-01-01 11:00:00 +556d5917-3b89-485a-9c31-b91b68448385,dcc2950b-23cc-407d-b53f-0056234f7ee1,-0.002409040398714,-0.001166751516545,2011-01-01 11:00:00 +3acfe4c8-6db8-4e45-a0b1-5cf1ba16e1a2,19d949f2-54ff-483c-928b-2438fc760385,-0.002419496908659,-0.00117181583545,2011-01-01 11:00:00 +25e15287-7990-4701-a9f4-fbb918d84f6f,287285e2-c0ac-40dc-a15f-82a5de6ef37f,-0.000818141458064,-0.000396243993025,2011-01-01 11:00:00 +3d48805f-f3e4-47dc-914c-b5a0bbc6c22f,d142aeef-1b06-4910-88b5-0bce6ef7c1e2,-0.000811521644834,-0.000393037871148,2011-01-01 11:00:00 +ce53fa81-1125-4441-be32-679ee4e7ebcb,ef4764b4-27b9-44bd-8b7d-6903df8b4a72,-0.000971300575741,-0.000470422339273,2011-01-01 11:00:00 +e3ea4cf1-5673-4357-bcfc-20aa77b685e3,e87c9d51-cfec-4e04-9790-16cd6b238d51,-0.00095995830225,-0.000464929025502,2011-01-01 11:00:00 +188ea02d-ca98-471c-bbfd-b493cfc6382e,de40f0bd-3793-4b02-b663-31d282b33f61,-0.002849228304176,-0.001379944249442,2011-01-01 11:00:00 +37688b27-2021-429e-b655-be31dbde2657,6291eea2-689c-48f3-b7a9-5054bf567cab,-0.000808381406182,-0.000391516984154,2011-01-01 11:00:00 +441fde73-09ef-4efa-9ff8-8602db07d65f,71e4f6f1-2b50-41ce-adb7-80a4e309bd63,-0.000945540622834,-0.000457946224661,2011-01-01 11:00:00 +33e26cad-e227-4780-926e-2e0286625fc0,41a126ec-6254-4b68-821b-ecebb98ad0fd,-0.000922006897608,-0.000446548321325,2011-01-01 11:00:00 +5d5c992f-fba0-44d6-b48a-4ff840d62389,5206abaa-3abc-4a15-a8f2-778139a3fc65,-0.002867921366133,-0.001388997712555,2011-01-01 11:00:00 +5cc8af20-0195-4532-be67-c9869254b544,2f99a367-0fc2-4ca2-ab58-cb5d7004a6bd,-0.000804697181872,-0.000389732632881,2011-01-01 11:00:00 +96cef89e-ca84-420c-9dab-3b687bad628a,bb929fcc-a67e-423c-9569-73364746383d,-0.000945415780435,-0.000457885760727,2011-01-01 11:00:00 +0aea8aed-2c05-42bc-9310-72abc315503f,0c8bcc26-ce6e-4d2c-acdd-e304cfb3c02f,-0.000939399496843,-0.000454971941595,2011-01-01 11:00:00 +c0668262-4824-40f0-8272-37666097196b,3776dfa9-f161-419e-9014-9cfb5a379025,-0.002752791294924,-0.001333237674137,2011-01-01 11:00:00 +90c30382-448c-484d-b91f-890b58e7913e,9d7cd8e2-d859-4f4f-9c01-abba06ef2e2c,-0.000955925625036,-0.000462975910786,2011-01-01 11:00:00 +e265ab92-fdcb-4900-97fb-92ae88abacd8,c023f6f8-c35c-46d4-9ab7-1d098994d65d,-0.000811240606677,-0.000392901758156,2011-01-01 11:00:00 +ddda9d2a-f44f-4220-8aac-3c951398e73e,fad9b8c1-9ded-4856-ab91-f41217259363,-0.002394962315736,-0.001159933189765,2011-01-01 11:00:00 +e1a5d5cd-a048-42d7-84d8-a2f430317b77,e447506e-3d43-4bce-8aab-a7ca8b7fbc45,-0.000957968573993,-0.000463965356125,2011-01-01 11:00:00 +2a905144-59d1-42bd-8068-08f7acd81263,114efaa0-dd3f-47ce-bbbe-856cacb034d1,-0.000928110140244,-0.000449504256644,2011-01-01 11:00:00 +714e303e-4604-4ad0-929f-ff7a66ec33cc,90a5aeab-5a04-4580-bc1c-4d8ea399cc8c,-0.000950320752429,-0.000460261347087,2011-01-01 11:00:00 +efc84d75-932b-4b6f-973d-96078edf6892,62b0cca9-b44c-4eda-999f-ae2832319848,-0.002471294914327,-0.001196902754582,2011-01-01 11:00:00 +68c6cc0d-f1e9-4256-8afb-a22702725e25,5a612315-ad74-4d98-b350-7e44630b8a6e,-0.00077501491686,-0.000375356855814,2011-01-01 11:00:00 +9a622ada-76d3-451b-9bfe-91cc6c104b33,d350f4a1-c675-4f22-8fda-26ad0bd03edb,-0.083849590052647,-0.062887192539485,2011-01-01 11:00:00 +466d3de7-eabe-487e-8c6b-2e121fb3304b,cb646f5c-890a-4317-81eb-c7aeffb86389,-0.000947296146564,-0.000458796463609,2011-01-01 11:00:00 +5863b855-ae37-4635-ac63-0e8cae607cfe,26647b27-a278-4ddb-a68e-8437d24798ca,-0.084736215134699,-0.063552161351024,2011-01-01 11:00:00 +93adb442-44a6-476f-b731-2bb83b898357,de8cfef5-7620-4b9e-9a10-1faebb5a80c0,-0.002435233374789,-0.001179437353849,2011-01-01 11:00:00 +81d45208-0668-4b60-b1bf-9ddbb6fe717a,5b38af42-1ee4-4a41-b666-ea141187df37,-0.00080841327625,-0.000391532419532,2011-01-01 11:00:00 +0f636dd7-48e1-4d3a-8cf5-8611df9023e8,4ff2235f-24d6-440c-bf09-76ef3eaa340d,-0.07386175037782,-0.055396312783365,2011-01-01 11:00:00 +dcf0ef76-d24c-4506-9e13-84501cfcc69c,cbcfa285-fe3a-4a98-bb4a-05d28d466c79,-0.070441783342661,-0.052831337506996,2011-01-01 11:00:00 +8ec1f820-db74-422b-b354-1e0090d276ce,fa6d5184-b205-4b1b-839f-7b21ac956c28,-0.00095724405498,-0.000463614455552,2011-01-01 11:00:00 +8ec0af2c-2db0-4a14-9e70-fc5f303d4a62,3d74e9fc-be60-41bf-9339-cd067c9378a2,-0.000956450647815,-0.000463230190923,2011-01-01 11:00:00 +6784ad61-c35a-4edd-aeae-cca038a71ba3,23e79154-30f9-44c5-b9c7-ab80ab7a4b6a,-0.000958420790641,-0.000464184374643,2011-01-01 11:00:00 +c362267f-c09f-4812-8d4d-a6852e477387,d3bacaf6-8558-4df5-8481-8d684ef3e14d,-0.000773676893821,-0.00037470882168,2011-01-01 11:00:00 +cae86f60-8571-441c-9d4b-ac2081b9d43a,645b0617-e6ab-438b-a141-9c497d720e4b,-0.094136474695779,-0.070602356021834,2011-01-01 12:00:00 +babf73ac-dd39-4145-bd99-5dd01a2b3aa3,e04c6258-0ee5-4928-96c1-8e04acbbcc8f,-0.001050420004517,-0.000508741627552,2011-01-01 12:00:00 +ea9ea276-befd-4f0a-b2c2-00a2de5a7af0,61788990-7681-42c0-9d0c-cfd22d4d3a83,-0.093694000918619,-0.070270500688964,2011-01-01 12:00:00 +a73c7616-3132-41fe-bc91-8f9524ecd638,6a909b40-9c28-4e7a-9a86-f52bb0c9d7e9,-0.001242685344607,-0.000601859981751,2011-01-01 12:00:00 +46a234f6-459a-4309-8085-23b644dc41f3,d142aeef-1b06-4910-88b5-0bce6ef7c1e2,-0.001065985944982,-0.000516280556601,2011-01-01 12:00:00 +95624f7d-b39e-456d-ae96-aa1a8f181cb3,9b3ae847-e2ea-4598-b56e-35501f61f70c,-0.108789615218354,-0.081592211413765,2011-01-01 12:00:00 +e49e12ad-8cfd-4691-b9cd-c28b693af3f5,75a4050d-bdfd-4ca4-a1fd-a5d729613ed5,-0.184716083656226,-0.138537062742169,2011-01-01 12:00:00 +d0e59412-6878-41f6-a3fa-e038b5c583bc,0818deae-c7d9-4252-ac4c-f147004e5752,-0.111501279170322,-0.083625959377741,2011-01-01 12:00:00 +7de9cf0b-31eb-4f9f-9fa9-1f1297567e2c,5b38af42-1ee4-4a41-b666-ea141187df37,-0.001041547659413,-0.000504444554696,2011-01-01 12:00:00 +42475721-bc2e-4af5-bdb3-ede527cd6ab4,6cac0624-6336-4418-bcf0-990abcdb824b,-0.003801844851246,-0.001841317500623,2011-01-01 12:00:00 +b9d4f9f7-6beb-447c-8f41-400ca5ece74a,95b1b117-1c7b-4a69-b10e-8963fbced23a,-0.111812100923525,-0.083859075692644,2011-01-01 12:00:00 +c128bc03-7f74-4778-abe8-8c947c2e453e,19d949f2-54ff-483c-928b-2438fc760385,-0.003126730978754,-0.001514344928892,2011-01-01 12:00:00 +aa8da156-9288-4b6a-92ed-08db9513aa0b,287285e2-c0ac-40dc-a15f-82a5de6ef37f,-0.001064060616969,-0.000515348077686,2011-01-01 12:00:00 +90830673-4bdf-4e90-a9fa-60f6201c2db3,5206abaa-3abc-4a15-a8f2-778139a3fc65,-0.003784322758711,-0.001832831163885,2011-01-01 12:00:00 +1da415bf-b606-4776-9da0-1b1679ecd132,a1eb7fc1-3bee-4b65-a387-ef3046644bf0,-0.001076098265665,-0.000521178177039,2011-01-01 12:00:00 +5aeee5eb-94a4-4eaa-9091-64e2677145b8,de8cfef5-7620-4b9e-9a10-1faebb5a80c0,-0.003199387329208,-0.001549534005474,2011-01-01 12:00:00 +fff7b0fa-8713-443f-9d06-f133c6c0026d,0a2cdd93-b055-4e0b-8fce-088968316df4,-0.001032044270887,-0.000499841853562,2011-01-01 12:00:00 +ddf2f7b1-419c-48b5-acc2-5777508a00ab,26647b27-a278-4ddb-a68e-8437d24798ca,-0.111974930407886,-0.083981197805915,2011-01-01 12:00:00 +9d13b4d7-a2d6-44d1-9f1f-780f42d46ae0,dcc2950b-23cc-407d-b53f-0056234f7ee1,-0.003085097225474,-0.001494180781871,2011-01-01 12:00:00 +5f72b94a-c9fa-4bf9-ad52-ad8c71c08619,83a0dcd8-d6ad-49bf-8cbc-5a5774ed18ac,-0.003792390894624,-0.001836738740452,2011-01-01 12:00:00 +fb41e040-3d56-49c4-b8df-1efd2e07d553,bb929fcc-a67e-423c-9569-73364746383d,-0.001251133232972,-0.000605951480826,2011-01-01 12:00:00 +5cf683d0-64bf-46ba-b66f-8d17e72911b4,3c98b5a6-1d44-449e-83e4-d610a4846d8f,-0.107633521844787,-0.08072514138359,2011-01-01 12:00:00 +8c1f9340-fa00-4e7c-9715-5bf8c3274a3d,51ed457c-81ff-470f-b45b-30a94a965c36,-0.001066169997308,-0.000516369697211,2011-01-01 12:00:00 +7f3852a5-0f7c-42f5-9293-d518e50cc1f7,d350f4a1-c675-4f22-8fda-26ad0bd03edb,-0.1096104312065,-0.082207823404875,2011-01-01 12:00:00 +bd6d199b-a49e-4636-af0d-c636282ba078,2560c371-f420-4c2a-b4e6-e04c11b64c03,-0.003774401199079,-0.00182802593324,2011-01-01 12:00:00 +ad2e3d01-067d-4a4a-8a3f-2b0df2563212,ef4764b4-27b9-44bd-8b7d-6903df8b4a72,-0.001261674097107,-0.00061105665433,2011-01-01 12:00:00 +8a0c4b30-a1f6-47f2-a272-6506e240e1c3,a50f12e1-33ed-4992-8579-da1800d5eff7,-0.001062134704635,-0.00051441531577,2011-01-01 12:00:00 +17d7d684-f5f0-4cf1-abb1-1474cc1b5645,0fbb53fd-cadb-4170-9f31-5af1cd05fd11,-0.218294139930183,-0.163720604947637,2011-01-01 12:00:00 +52d2a115-5dc4-4a38-8520-16f325375260,de40f0bd-3793-4b02-b663-31d282b33f61,-0.003729497937545,-0.0018062782911,2011-01-01 12:00:00 +45278204-a6c8-4b8d-86a7-71b371eaaef7,e87c9d51-cfec-4e04-9790-16cd6b238d51,-0.001232333800603,-0.000596846500171,2011-01-01 12:00:00 +8b6997b8-0532-4118-bdee-80f699fd8fa5,d3bacaf6-8558-4df5-8481-8d684ef3e14d,-0.001006055762534,-0.000487255044495,2011-01-01 12:00:00 +cdd517e0-33fc-49b7-81a5-50fc715fb145,cb646f5c-890a-4317-81eb-c7aeffb86389,-0.001240556856506,-0.000600829107914,2011-01-01 12:00:00 +6f01ffa6-5cf1-44ad-aee7-3f8ff8e248ab,41a126ec-6254-4b68-821b-ecebb98ad0fd,-0.001214219117702,-0.00058807315882,2011-01-01 12:00:00 +64925113-87ca-45f0-b6d7-fc3ddc32caec,b8209f35-1405-4f7f-b1ec-3c853954e2a8,-0.092970051971514,-0.069727538978636,2011-01-01 12:00:00 +0027f9fa-6cec-4465-b193-25e25c8dfcc4,6291eea2-689c-48f3-b7a9-5054bf567cab,-0.001062504087388,-0.000514594216003,2011-01-01 12:00:00 +897b99b7-378c-4e71-826a-9f29b08af95d,4fa4ce55-0944-463a-a91b-3a3806286e0b,-0.092426353492166,-0.069319765119124,2011-01-01 12:00:00 +9fc4c69f-dbc0-44ad-a857-5da6daf1e01f,4e655530-909f-4acf-8ed9-d19f849265df,-0.001039407732563,-0.000503408140819,2011-01-01 12:00:00 +bcec4ed5-70cb-4854-88cf-ca969bb874d2,71e4f6f1-2b50-41ce-adb7-80a4e309bd63,-0.001225874361889,-0.000593718051217,2011-01-01 12:00:00 +5e9cd704-b25a-42a2-9563-a8097ab8db83,23e79154-30f9-44c5-b9c7-ab80ab7a4b6a,-0.001223864136738,-0.00059274445474,2011-01-01 12:00:00 +1f5dc3cc-7222-4574-874a-a9dc15f748c5,fa6d5184-b205-4b1b-839f-7b21ac956c28,-0.001209853618091,-0.00058595885086,2011-01-01 12:00:00 +887b1cdc-a8d5-4a0e-87ce-80f136e624ff,2f99a367-0fc2-4ca2-ab58-cb5d7004a6bd,-0.001024205681382,-0.000496045451394,2011-01-01 12:00:00 +eed269e2-a18d-4b47-b9b6-7a4bcdaf0d50,c023f6f8-c35c-46d4-9ab7-1d098994d65d,-0.001059753208187,-0.000513261904398,2011-01-01 12:00:00 +b68f8aef-ad3f-4939-a1e2-25d4f226508e,90a5aeab-5a04-4580-bc1c-4d8ea399cc8c,-0.00123039678171,-0.000595908359103,2011-01-01 12:00:00 +1ce26f4e-0f6a-4479-bfe7-a608861330eb,0c8bcc26-ce6e-4d2c-acdd-e304cfb3c02f,-0.001233472905791,-0.000597398193993,2011-01-01 12:00:00 +19b9b818-7c53-404f-a542-c34c80bcb092,819018d3-4601-4c39-9d41-4a911572d406,-0.185972032489923,-0.139479024367442,2011-01-01 12:00:00 +cb0e6670-2f3e-4102-8b60-4d7c4e0c550d,3776dfa9-f161-419e-9014-9cfb5a379025,-0.003685035574538,-0.001784744185863,2011-01-01 12:00:00 +430fda41-ea7f-45c8-b3f4-ca0c6fa58349,62b0cca9-b44c-4eda-999f-ae2832319848,-0.003199269928639,-0.001549477145783,2011-01-01 12:00:00 +a9d3645a-7105-40d7-9674-0a66eecc6561,3d74e9fc-be60-41bf-9339-cd067c9378a2,-0.00124760164199,-0.000604241053248,2011-01-01 12:00:00 +9b0b5651-6060-4f12-8b5a-86f86d467359,4fc73066-d9a2-4175-84e5-f3692e050492,-0.001249146833472,-0.000604989423638,2011-01-01 12:00:00 +a95c591f-cf60-40df-a367-1816cd7e5cd0,e447506e-3d43-4bce-8aab-a7ca8b7fbc45,-0.001262672870525,-0.000611540382374,2011-01-01 12:00:00 +f19e6d6d-f98d-43b0-89a2-13e3b117e36b,114efaa0-dd3f-47ce-bbbe-856cacb034d1,-0.001231167720349,-0.000596281741728,2011-01-01 12:00:00 +e97cf8b1-0502-497e-8ef5-c62b9c611143,9d7cd8e2-d859-4f4f-9c01-abba06ef2e2c,-0.001229859215377,-0.000595648003845,2011-01-01 12:00:00 +094805b1-21b5-4d21-997b-e1d457fd7079,fad9b8c1-9ded-4856-ab91-f41217259363,-0.003088621457947,-0.00149588764556,2011-01-01 12:00:00 +49d094f9-6207-410f-9d40-9634e14c2a9f,1a738cc5-b8f0-41f0-9f60-85073dc80136,-0.001040862673861,-0.000504112801052,2011-01-01 12:00:00 +06c02574-2537-4662-8ff5-37e24fa3ca0f,033e5854-65d9-4a14-8b5c-6aa675ded4a2,-0.001236897146954,-0.00059905662968,2011-01-01 12:00:00 +41fff152-adf8-442a-a3ca-b24b55770a14,cbcfa285-fe3a-4a98-bb4a-05d28d466c79,-0.091781386070549,-0.068836039552912,2011-01-01 12:00:00 +fcc64e53-544e-4b1c-995a-447620dfead0,b938f0ab-e2c4-469e-9979-303d42224932,-0.003172562786441,-0.001536542286459,2011-01-01 12:00:00 +b3369977-7b53-4512-9ffc-45c011cd1c52,a364e957-2dcc-49c2-b213-2a68d9c3ee83,-0.183332932943996,-0.137499699707997,2011-01-01 12:00:00 +5fffeb2e-2baa-4915-a0bd-9aa868a931aa,83f68d87-a893-4e7f-b21d-4874929f927d,-0.001038104420233,-0.000502776917849,2011-01-01 12:00:00 +94b4cea5-14ae-4577-ae71-0892ac63475b,53df57d0-c789-4393-b0a5-897a3bc821a2,-0.003137208420119,-0.001519419385347,2011-01-01 12:00:00 +9131664a-7db9-42d9-bc9b-0065be771b4f,5a612315-ad74-4d98-b350-7e44630b8a6e,-0.001032964595189,-0.000500287586965,2011-01-01 12:00:00 +f86c6dfb-a7c6-4978-9f2c-ac3d37ed932a,4ff2235f-24d6-440c-bf09-76ef3eaa340d,-0.095049188932006,-0.071286891699004,2011-01-01 12:00:00 +e466d0f6-b13f-406b-8b86-3704df9135fc,241b5dad-aaac-4f7c-8152-a32839fcfa13,-0.001075744534861,-0.000521006857392,2011-01-01 12:00:00 +904a33c1-ad84-4b47-b27d-18dbf017154b,83f68d87-a893-4e7f-b21d-4874929f927d,-0.000721795285914,-0.000349581412136,2011-01-01 13:00:00 +15ae83d6-de17-4ddc-a965-0a752dba0875,dcc2950b-23cc-407d-b53f-0056234f7ee1,-0.002126522041181,-0.001029921630969,2011-01-01 13:00:00 +4df085d9-40cc-404a-9362-f14630e0cc9c,51ed457c-81ff-470f-b45b-30a94a965c36,-0.000736135220185,-0.000356526559285,2011-01-01 13:00:00 +4124ca17-2f79-40eb-b988-c467464fcb0a,de40f0bd-3793-4b02-b663-31d282b33f61,-0.002537648901984,-0.001229039457549,2011-01-01 13:00:00 +7868dd42-9b9d-4208-870f-c2d7a9d599d3,e447506e-3d43-4bce-8aab-a7ca8b7fbc45,-0.00086814795778,-0.000420463246223,2011-01-01 13:00:00 +6c44d599-2b6a-4650-8208-e26360de2d24,2f99a367-0fc2-4ca2-ab58-cb5d7004a6bd,-0.00070249644211,-0.000340234555484,2011-01-01 13:00:00 +b1cdb99d-01be-417a-b0de-0a0f25a75771,26647b27-a278-4ddb-a68e-8437d24798ca,-0.077249605254206,-0.057937203940655,2011-01-01 13:00:00 +07f65e9c-50ff-44f7-812c-c089508fa860,0818deae-c7d9-4252-ac4c-f147004e5752,-0.077031800500083,-0.057773850375063,2011-01-01 13:00:00 +eba620b1-5b0d-46fa-915d-0c5fa7ea5316,cb646f5c-890a-4317-81eb-c7aeffb86389,-0.000846833723892,-0.000410140291603,2011-01-01 13:00:00 +7e8257a2-56e7-4477-a303-dfc29a93cb08,d350f4a1-c675-4f22-8fda-26ad0bd03edb,-0.074172406753651,-0.055629305065238,2011-01-01 13:00:00 +710a2a38-1667-4669-8b64-172c2976e968,de8cfef5-7620-4b9e-9a10-1faebb5a80c0,-0.00221655022874,-0.001073524272262,2011-01-01 13:00:00 +1338f8aa-6d74-4b4c-9677-d7a8d6d2ca1a,75a4050d-bdfd-4ca4-a1fd-a5d729613ed5,-0.126820629296404,-0.095115471972303,2011-01-01 13:00:00 +be86b310-4fa7-43bf-bad4-c06ef37932b9,2560c371-f420-4c2a-b4e6-e04c11b64c03,-0.002596054237049,-0.001257326452361,2011-01-01 13:00:00 +9a2cebc1-ae8a-4d67-9109-14ba23c5210b,bb929fcc-a67e-423c-9569-73364746383d,-0.000860368238675,-0.000416695356291,2011-01-01 13:00:00 +b388e9a7-04ea-4128-b0e7-c068b2161261,033e5854-65d9-4a14-8b5c-6aa675ded4a2,-0.000847193532971,-0.000410314555093,2011-01-01 13:00:00 +741ae5eb-4a35-4d71-b5cd-1764a50c64e9,d142aeef-1b06-4910-88b5-0bce6ef7c1e2,-0.00073869304396,-0.00035776536988,2011-01-01 13:00:00 +5398f0f0-836c-4f9f-98d1-5812e815825c,62b0cca9-b44c-4eda-999f-ae2832319848,-0.002189828070148,-0.001060582140167,2011-01-01 13:00:00 +c2075c95-020f-4696-a51c-d4934cb86e57,6a909b40-9c28-4e7a-9a86-f52bb0c9d7e9,-0.000844128676114,-0.00040883017717,2011-01-01 13:00:00 +53cc0f60-8405-4e48-a8f5-24924784580d,0fbb53fd-cadb-4170-9f31-5af1cd05fd11,-0.150538916990661,-0.112904187742996,2011-01-01 13:00:00 +8f9aa1c2-3eb7-4d0e-a0a4-ed4dd3d35ec5,e04c6258-0ee5-4928-96c1-8e04acbbcc8f,-0.000733376012779,-0.000355190214147,2011-01-01 13:00:00 +a8bbb5ba-45bf-46f9-9930-7b371d78357c,1a738cc5-b8f0-41f0-9f60-85073dc80136,-0.000725818207299,-0.000351529801889,2011-01-01 13:00:00 +de308d97-7865-4daf-a7b4-f97977f08645,a1eb7fc1-3bee-4b65-a387-ef3046644bf0,-0.000736878113319,-0.000356886358852,2011-01-01 13:00:00 +5b778f1b-8fd6-454d-b9ec-52ee88b01a6f,83a0dcd8-d6ad-49bf-8cbc-5a5774ed18ac,-0.002599422504749,-0.001258957778863,2011-01-01 13:00:00 +43f6489e-d249-4d6f-ad4c-e668581d94ba,5b38af42-1ee4-4a41-b666-ea141187df37,-0.000716556401676,-0.000347044104695,2011-01-01 13:00:00 +b5885f41-b335-4ece-8f1c-b413bb286d83,241b5dad-aaac-4f7c-8152-a32839fcfa13,-0.000739709997392,-0.000358257902907,2011-01-01 13:00:00 +b56967a2-aae5-4795-9caa-9115efb60d50,19d949f2-54ff-483c-928b-2438fc760385,-0.00215694545808,-0.001044656364278,2011-01-01 13:00:00 +6171a11d-1508-4791-99a1-bfbb7fd8788e,287285e2-c0ac-40dc-a15f-82a5de6ef37f,-0.000732956205581,-0.000354986892241,2011-01-01 13:00:00 +f5260809-6651-4837-9ed9-5a7d82e4e29d,0a2cdd93-b055-4e0b-8fce-088968316df4,-0.000726441041404,-0.000351831454213,2011-01-01 13:00:00 +50059635-4aed-452e-95a4-39f39ed80e9a,6cac0624-6336-4418-bcf0-990abcdb824b,-0.002571454176318,-0.001245412099168,2011-01-01 13:00:00 +1b464762-3b39-40b7-9de3-573464ef1bb2,0c8bcc26-ce6e-4d2c-acdd-e304cfb3c02f,-0.000837339718968,-0.000405542135155,2011-01-01 13:00:00 +fa098676-da6f-45b7-8772-480037f2b69f,71e4f6f1-2b50-41ce-adb7-80a4e309bd63,-0.000839098626214,-0.000406394012814,2011-01-01 13:00:00 +01b62bd5-fc74-444c-8ba7-0b70dbc52798,6291eea2-689c-48f3-b7a9-5054bf567cab,-0.000738297372173,-0.000357573737287,2011-01-01 13:00:00 +e838e910-9f99-4a19-8aee-899a31b32b39,e87c9d51-cfec-4e04-9790-16cd6b238d51,-0.000824962607379,-0.000399547626418,2011-01-01 13:00:00 +4a4fa4a0-5917-4d62-8fce-0e7ec10ba5e3,5206abaa-3abc-4a15-a8f2-778139a3fc65,-0.002605758817754,-0.001262026595314,2011-01-01 13:00:00 +c268c47a-3655-480b-b208-175ed1ff1c81,3776dfa9-f161-419e-9014-9cfb5a379025,-0.002599346222059,-0.00125892083347,2011-01-01 13:00:00 +a7bca90a-00d4-4d4a-b0eb-43622ed8c928,4e655530-909f-4acf-8ed9-d19f849265df,-0.000736809220406,-0.000356852992491,2011-01-01 13:00:00 +5b56ee4c-3c03-4ff5-b1e0-5d1b2f4a8b2f,d3bacaf6-8558-4df5-8481-8d684ef3e14d,-0.000715486225404,-0.00034652579467,2011-01-01 13:00:00 +dddbe8de-cf60-4120-9031-15fc505fa41a,41a126ec-6254-4b68-821b-ecebb98ad0fd,-0.000840582705952,-0.000407112785437,2011-01-01 13:00:00 +ae1f6a5b-f027-43fa-94ea-d418084fc223,114efaa0-dd3f-47ce-bbbe-856cacb034d1,-0.000859391382786,-0.00041622224339,2011-01-01 13:00:00 +271b5b1e-3a55-429a-8bad-8901a45849a0,9d7cd8e2-d859-4f4f-9c01-abba06ef2e2c,-0.000830410326259,-0.000402186077093,2011-01-01 13:00:00 +df2a3e7d-032f-4d55-b4cf-4adfbf47530b,ef4764b4-27b9-44bd-8b7d-6903df8b4a72,-0.000858361252852,-0.000415723328693,2011-01-01 13:00:00 +0b40b05c-1913-441b-b039-e2a7782b2d4b,fad9b8c1-9ded-4856-ab91-f41217259363,-0.002156330877704,-0.001044358709416,2011-01-01 13:00:00 +e21ea7ce-e59c-4f66-a375-60013672d31b,5a612315-ad74-4d98-b350-7e44630b8a6e,-0.00073017384689,-0.000353639334423,2011-01-01 13:00:00 +0382e6a7-d8c9-437c-b63b-260273bd69e4,23e79154-30f9-44c5-b9c7-ab80ab7a4b6a,-0.000830089406725,-0.000402030648668,2011-01-01 13:00:00 +8e4ecbb6-8a78-4eed-9323-d8d0819ec58f,4fc73066-d9a2-4175-84e5-f3692e050492,-0.000868508407648,-0.000420637820061,2011-01-01 13:00:00 +583dfcca-4ec7-40fb-a9d5-21a2267f2606,a50f12e1-33ed-4992-8579-da1800d5eff7,-0.00074509938057,-0.000360868100311,2011-01-01 13:00:00 +c0fd8f99-7169-486a-852e-9abb141049f0,c023f6f8-c35c-46d4-9ab7-1d098994d65d,-0.00073475424256,-0.000355857721295,2011-01-01 13:00:00 +0dde7f7c-f09f-4877-b207-71b5d4259c3e,3d74e9fc-be60-41bf-9339-cd067c9378a2,-0.000853281619565,-0.000413263150007,2011-01-01 13:00:00 +8a71aa84-819b-4b6d-96d6-a3cd1afb21df,fa6d5184-b205-4b1b-839f-7b21ac956c28,-0.000808674697246,-0.000391659031499,2011-01-01 13:00:00 +f441002a-fab6-4a60-9e50-4a57673bf2d9,90a5aeab-5a04-4580-bc1c-4d8ea399cc8c,-0.000837973862552,-0.00040584926491,2011-01-01 13:00:00 +3947019c-ad23-4462-8039-b7d7aaa4d46a,b938f0ab-e2c4-469e-9979-303d42224932,-0.002217225101922,-0.001073851128262,2011-01-01 13:00:00 +55085661-0846-40e6-8860-f02591020cfe,53df57d0-c789-4393-b0a5-897a3bc821a2,-0.002162097736346,-0.001047151726532,2011-01-01 13:00:00 +9ba8aa2c-b216-41ba-999c-72c802b9a90e,95b1b117-1c7b-4a69-b10e-8963fbced23a,-0.076954977360131,-0.057716233020098,2011-01-01 13:00:00 +6a503787-cf0f-4225-9b43-c44311d639e1,a364e957-2dcc-49c2-b213-2a68d9c3ee83,-0.130341995128021,-0.097756496346016,2011-01-01 13:00:00 +d537d6ea-69d7-46ad-9000-3b0f5dc4bc9c,4ff2235f-24d6-440c-bf09-76ef3eaa340d,-0.065019985092639,-0.048764988819479,2011-01-01 13:00:00 +ffc2809c-811c-4554-b400-e8ccc9c3702b,819018d3-4601-4c39-9d41-4a911572d406,-0.13003569753502,-0.097526773151265,2011-01-01 13:00:00 +3aae5bb6-46ba-47fe-a36e-210b7bb83217,3c98b5a6-1d44-449e-83e4-d610a4846d8f,-0.073261048449798,-0.054945786337348,2011-01-01 13:00:00 +a28e571a-2539-488f-ab10-1ee98977a944,4fa4ce55-0944-463a-a91b-3a3806286e0b,-0.064317778846563,-0.048238334134922,2011-01-01 13:00:00 +db088da1-ba10-47c0-84d8-38f9ab0a8c06,9b3ae847-e2ea-4598-b56e-35501f61f70c,-0.074711656857539,-0.056033742643154,2011-01-01 13:00:00 +1dbb4f2a-0eda-48f2-a9de-3b67ffa4b194,645b0617-e6ab-438b-a141-9c497d720e4b,-0.064924823827488,-0.048693617870616,2011-01-01 13:00:00 +ca5c6caf-d2a6-46fc-b909-e67cd26509ff,61788990-7681-42c0-9d0c-cfd22d4d3a83,-0.064349129272077,-0.048261846954058,2011-01-01 13:00:00 +fd639972-52d7-4d52-9e86-83acda2dff61,cbcfa285-fe3a-4a98-bb4a-05d28d466c79,-0.064142115700901,-0.048106586775676,2011-01-01 13:00:00 +1ccb39bc-0ddb-4180-a101-88268357a29d,b8209f35-1405-4f7f-b1ec-3c853954e2a8,-0.064822342526636,-0.048616756894977,2011-01-01 13:00:00 +4687a7c2-ea23-4650-a34f-67499d7d0000,0fbb53fd-cadb-4170-9f31-5af1cd05fd11,-0.115342923229515,-0.086507192422136,2011-01-01 14:00:00 +3d4423e1-71f1-45d8-84f2-86aef83f6318,75a4050d-bdfd-4ca4-a1fd-a5d729613ed5,-0.096097766032426,-0.072073324524319,2011-01-01 14:00:00 +03291732-bb04-4518-a3b0-00807d855768,0818deae-c7d9-4252-ac4c-f147004e5752,-0.059219874262946,-0.044414905697209,2011-01-01 14:00:00 +76ba18a6-86a2-4c6f-bd8e-0bdbca3dd541,033e5854-65d9-4a14-8b5c-6aa675ded4a2,-0.000648358049889,-0.000314014135411,2011-01-01 14:00:00 +e5b9f99f-51bf-4885-a9f7-b2cf5fc3c44a,d142aeef-1b06-4910-88b5-0bce6ef7c1e2,-0.000567720262314,-0.000274959472403,2011-01-01 14:00:00 +5fab1c42-9e2b-449a-84e1-38b07b3a0670,6a909b40-9c28-4e7a-9a86-f52bb0c9d7e9,-0.000637877222337,-0.000308938038951,2011-01-01 14:00:00 +ce42e5ed-407f-4d13-bc5f-6472640a3980,6291eea2-689c-48f3-b7a9-5054bf567cab,-0.000567936576338,-0.000275064238067,2011-01-01 14:00:00 +b88da0ef-4510-41ea-ab65-c14e8df9c95b,dcc2950b-23cc-407d-b53f-0056234f7ee1,-0.001599896438394,-0.000774865210565,2011-01-01 14:00:00 +071ec117-ff16-492f-8678-fa6ae72eba6b,5206abaa-3abc-4a15-a8f2-778139a3fc65,-0.002008039827648,-0.000972538075925,2011-01-01 14:00:00 +cbd93a17-087c-400b-879f-35d850738f42,de40f0bd-3793-4b02-b663-31d282b33f61,-0.001939346821366,-0.000939268534535,2011-01-01 14:00:00 +a50b09d9-48ab-4c12-a8bd-c029d70e8d70,83f68d87-a893-4e7f-b21d-4874929f927d,-0.000554532209058,-0.000268572206691,2011-01-01 14:00:00 +abe37a53-f88a-4165-9856-93d94c35d276,e04c6258-0ee5-4928-96c1-8e04acbbcc8f,-0.000562629326337,-0.000272493819575,2011-01-01 14:00:00 +32ecd132-0e68-4009-86f5-0c446678516f,26647b27-a278-4ddb-a68e-8437d24798ca,-0.059616401755432,-0.044712301316574,2011-01-01 14:00:00 +11aab591-4518-4d95-9d13-7b4b5dcdf332,51ed457c-81ff-470f-b45b-30a94a965c36,-0.000559129951001,-0.000270798994747,2011-01-01 14:00:00 +e1d1d95a-5a4b-44d5-9595-b9111833a071,1a738cc5-b8f0-41f0-9f60-85073dc80136,-0.000556417516048,-0.000269485302541,2011-01-01 14:00:00 +99dccf24-bd29-4e07-a191-b88bc9baa51c,d350f4a1-c675-4f22-8fda-26ad0bd03edb,-0.056578244030833,-0.042433683023125,2011-01-01 14:00:00 +17f322e0-e07a-4d5b-9e31-9fecfae33338,287285e2-c0ac-40dc-a15f-82a5de6ef37f,-0.00055828990976,-0.000270392144205,2011-01-01 14:00:00 +d95ceda4-788d-4337-928f-d4b520a2430b,6cac0624-6336-4418-bcf0-990abcdb824b,-0.001951378737658,-0.000945095857558,2011-01-01 14:00:00 +e5d926b3-b37c-4c39-a4aa-02059e54373b,19d949f2-54ff-483c-928b-2438fc760385,-0.001634915055878,-0.000791825501094,2011-01-01 14:00:00 +6573c9a6-4da8-4759-9a00-f897b7b125cd,ef4764b4-27b9-44bd-8b7d-6903df8b4a72,-0.000651835223307,-0.000315698207359,2011-01-01 14:00:00 +f0ce7fc1-66d1-4001-bb9c-b9553a6a3ded,2560c371-f420-4c2a-b4e6-e04c11b64c03,-0.001989608834405,-0.000963611538483,2011-01-01 14:00:00 +9f927ba6-1044-4f4f-94a4-f77fa373d09c,241b5dad-aaac-4f7c-8152-a32839fcfa13,-0.000562656118315,-0.000272506795522,2011-01-01 14:00:00 +0bea6d90-c5f5-4d05-8cb0-543fb5ab2975,0c8bcc26-ce6e-4d2c-acdd-e304cfb3c02f,-0.00064136841252,-0.000310628899528,2011-01-01 14:00:00 +143e5508-c861-4d96-9f18-3618bd75bee2,a50f12e1-33ed-4992-8579-da1800d5eff7,-0.000576289866936,-0.000279109921351,2011-01-01 14:00:00 +9f9f1c1a-d446-4cde-8124-11cb398f960b,5b38af42-1ee4-4a41-b666-ea141187df37,-0.000541546127278,-0.00026228276023,2011-01-01 14:00:00 +9dd235d8-7509-42cb-9c62-7cde0cb73d40,e447506e-3d43-4bce-8aab-a7ca8b7fbc45,-0.000668263034879,-0.000323654559638,2011-01-01 14:00:00 +08ea5ac2-f23c-411e-8afd-1da4abc0ab4c,a1eb7fc1-3bee-4b65-a387-ef3046644bf0,-0.00055836427861,-0.000270428162683,2011-01-01 14:00:00 +80d92a9e-df62-4f48-a2b3-ef075dbb4133,d3bacaf6-8558-4df5-8481-8d684ef3e14d,-0.000547978108934,-0.000265397911124,2011-01-01 14:00:00 +de0d380b-ea57-451c-970e-39b5b54a4396,71e4f6f1-2b50-41ce-adb7-80a4e309bd63,-0.000636836404012,-0.000308433947628,2011-01-01 14:00:00 +8f99eebb-b623-48c0-8ce0-5f7c75bd8d9e,2f99a367-0fc2-4ca2-ab58-cb5d7004a6bd,-0.000525420140181,-0.000254472588217,2011-01-01 14:00:00 +b6d9489a-9cf1-4155-95e8-2b0dd7060f67,4e655530-909f-4acf-8ed9-d19f849265df,-0.000569376351652,-0.000275761553077,2011-01-01 14:00:00 +529a1ff6-7c49-4993-8b01-e4105210283a,cb646f5c-890a-4317-81eb-c7aeffb86389,-0.000647736625085,-0.000313713165642,2011-01-01 14:00:00 +ff5082b0-27eb-430c-8fb9-42ca73937a29,3776dfa9-f161-419e-9014-9cfb5a379025,-0.002033323815063,-0.000984783669928,2011-01-01 14:00:00 +651132ca-ed93-4448-9610-8ad2ff6559e5,41a126ec-6254-4b68-821b-ecebb98ad0fd,-0.000647255023515,-0.000313479915356,2011-01-01 14:00:00 +7cc6772f-a311-498a-be8e-bc5ca5ddc4ef,c023f6f8-c35c-46d4-9ab7-1d098994d65d,-0.000562252360733,-0.0002723112468,2011-01-01 14:00:00 +aa3bf3df-d4ea-4a5a-8374-2f13815b22ab,62b0cca9-b44c-4eda-999f-ae2832319848,-0.001659978501549,-0.000803964281856,2011-01-01 14:00:00 +b6352ce4-2d9f-4fa3-adc5-4bcbc4b8bf3c,bb929fcc-a67e-423c-9569-73364746383d,-0.000664455226281,-0.000321810353763,2011-01-01 14:00:00 +7bac6e07-30c7-4776-9cf2-37a66c0d1b92,5a612315-ad74-4d98-b350-7e44630b8a6e,-0.000569419061791,-0.000275782238541,2011-01-01 14:00:00 +1bcee07f-5448-447e-a5e0-662740979f3c,0a2cdd93-b055-4e0b-8fce-088968316df4,-0.000560904079146,-0.000271658244224,2011-01-01 14:00:00 +9e75a740-a7dd-42a7-b8ff-39a782f13b5b,9d7cd8e2-d859-4f4f-9c01-abba06ef2e2c,-0.000624865689167,-0.000302636265818,2011-01-01 14:00:00 +d70dd36c-59da-43ad-878f-5bda56e4dbd1,114efaa0-dd3f-47ce-bbbe-856cacb034d1,-0.000666420743176,-0.000322762297043,2011-01-01 14:00:00 +a04db5f0-5d57-4063-b4dc-a27fe3bcdc86,fad9b8c1-9ded-4856-ab91-f41217259363,-0.001635268107964,-0.000791996492023,2011-01-01 14:00:00 +3fd8b438-dfa8-4c89-a24f-d8511ce75963,4fc73066-d9a2-4175-84e5-f3692e050492,-0.000671861239136,-0.000325397249497,2011-01-01 14:00:00 +d03db5e1-52df-45c2-ba31-4e7888194354,23e79154-30f9-44c5-b9c7-ab80ab7a4b6a,-0.000621233355059,-0.000300877046118,2011-01-01 14:00:00 +9e22f81d-45f2-4061-977f-d1985114786b,90a5aeab-5a04-4580-bc1c-4d8ea399cc8c,-0.000634752886995,-0.000307424854281,2011-01-01 14:00:00 +41b291cf-56ef-4669-9a51-338c5973b059,fa6d5184-b205-4b1b-839f-7b21ac956c28,-0.000594447992527,-0.000287904302957,2011-01-01 14:00:00 +b27f63db-53ce-41b1-a71d-576896f298ce,b938f0ab-e2c4-469e-9979-303d42224932,-0.001699088356639,-0.000822906049193,2011-01-01 14:00:00 +80c6d706-6d17-4d9e-8747-4d69d1ea2172,819018d3-4601-4c39-9d41-4a911572d406,-0.100553377923946,-0.07541503344296,2011-01-01 14:00:00 +713d73d8-828e-4603-8d9a-5937fd069e58,a364e957-2dcc-49c2-b213-2a68d9c3ee83,-0.101492878737974,-0.07611965905348,2011-01-01 14:00:00 +0d9331eb-d865-4c4c-ba93-fd53663e38a4,cbcfa285-fe3a-4a98-bb4a-05d28d466c79,-0.049047661073664,-0.036785745805248,2011-01-01 14:00:00 +aacad451-3280-412a-ba45-7d7aad3acde8,4fa4ce55-0944-463a-a91b-3a3806286e0b,-0.048607067963519,-0.036455300972639,2011-01-01 14:00:00 +0626a2b1-b03d-46da-9398-d391c8757259,3d74e9fc-be60-41bf-9339-cd067c9378a2,-0.000650746775986,-0.000315171048262,2011-01-01 14:00:00 +191dd561-ab86-4645-9e76-8e44a93ab696,53df57d0-c789-4393-b0a5-897a3bc821a2,-0.001652092832292,-0.000800145077923,2011-01-01 14:00:00 +d68761ba-e32f-4fc7-b018-2c6983363980,9b3ae847-e2ea-4598-b56e-35501f61f70c,-0.058180619975777,-0.043635464981833,2011-01-01 14:00:00 +1c942c9d-d9c8-420f-86fb-9ad4518d8f4d,3c98b5a6-1d44-449e-83e4-d610a4846d8f,-0.055269726958685,-0.041452295219014,2011-01-01 14:00:00 +12dd8501-7f9f-4e5a-b82d-0741e288221f,de8cfef5-7620-4b9e-9a10-1faebb5a80c0,-0.001703695297872,-0.000825137292668,2011-01-01 14:00:00 +a5bcd2db-63c6-43c3-a2a4-85ca01a6dcd4,83a0dcd8-d6ad-49bf-8cbc-5a5774ed18ac,-0.00202229558252,-0.00097944245313,2011-01-01 14:00:00 +71b27369-418a-4b00-8e00-45dfd940a2cb,4ff2235f-24d6-440c-bf09-76ef3eaa340d,-0.049043156009593,-0.036782367007195,2011-01-01 14:00:00 +2fa10e0a-fc32-4677-94e5-0d045e04a328,95b1b117-1c7b-4a69-b10e-8963fbced23a,-0.059018023404902,-0.044263517553676,2011-01-01 14:00:00 +9639f35b-c3ed-4133-b9cc-eb1961e7288a,e87c9d51-cfec-4e04-9790-16cd6b238d51,-0.000618768451356,-0.000299683238768,2011-01-01 14:00:00 +1543676c-beb4-4558-ab9b-84938ba67829,645b0617-e6ab-438b-a141-9c497d720e4b,-0.049363737045362,-0.037022802784021,2011-01-01 14:00:00 +1cfbaba4-6d1a-4f15-8a29-a2c185c0477a,b8209f35-1405-4f7f-b1ec-3c853954e2a8,-0.049505207042881,-0.037128905282161,2011-01-01 14:00:00 +9673caf4-1f4a-4d95-987c-1e508ab66569,61788990-7681-42c0-9d0c-cfd22d4d3a83,-0.048353276472648,-0.036264957354486,2011-01-01 14:00:00 +3cc1fe12-69a0-4e77-aadb-e1b912843eba,0fbb53fd-cadb-4170-9f31-5af1cd05fd11,0,0,2011-01-01 15:00:00 +58d9eae2-690a-4439-b39b-ecc36a33f290,d350f4a1-c675-4f22-8fda-26ad0bd03edb,0,0,2011-01-01 15:00:00 +e5c6a4e0-b5fc-48cb-b4c2-d5a1dff575e1,a364e957-2dcc-49c2-b213-2a68d9c3ee83,0,0,2011-01-01 15:00:00 +e184b12d-bd4a-431d-b26b-429586e20555,3c98b5a6-1d44-449e-83e4-d610a4846d8f,0,0,2011-01-01 15:00:00 +a83e0340-69fd-40f1-9ba8-ec960ad0dbc2,819018d3-4601-4c39-9d41-4a911572d406,0,0,2011-01-01 15:00:00 +6b0c3b30-2a73-4ad5-8e36-fe6a047a9b10,0818deae-c7d9-4252-ac4c-f147004e5752,0,0,2011-01-01 15:00:00 +5b5967ee-806e-4851-904a-a2f6262cdfc9,b938f0ab-e2c4-469e-9979-303d42224932,0,0,2011-01-01 15:00:00 +3c355900-f7ee-4f53-b0e2-4d873fba23a1,de8cfef5-7620-4b9e-9a10-1faebb5a80c0,0,0,2011-01-01 15:00:00 +5d32389c-a984-453b-ba06-1a4a0d7a41b0,cbcfa285-fe3a-4a98-bb4a-05d28d466c79,0,0,2011-01-01 15:00:00 +8fd22780-9164-4d4a-a676-c83d621ae17e,9b3ae847-e2ea-4598-b56e-35501f61f70c,0,0,2011-01-01 15:00:00 +4299aa0c-3c0d-4a5b-a0e3-9b218e30cc68,75a4050d-bdfd-4ca4-a1fd-a5d729613ed5,0,0,2011-01-01 15:00:00 +48bf0584-0165-457c-aa5a-79a85e146b74,2560c371-f420-4c2a-b4e6-e04c11b64c03,0,0,2011-01-01 15:00:00 +f63466cc-b869-4b7e-90fa-a7c9249ec65e,645b0617-e6ab-438b-a141-9c497d720e4b,0,0,2011-01-01 15:00:00 +9d3ee268-3288-4dfc-8996-679900f3f723,83a0dcd8-d6ad-49bf-8cbc-5a5774ed18ac,0,0,2011-01-01 15:00:00 +16c3bca9-3177-43fe-9396-2e4102d856f2,4fa4ce55-0944-463a-a91b-3a3806286e0b,0,0,2011-01-01 15:00:00 +c5f96164-8b97-4c1d-b925-732cea122abe,b8209f35-1405-4f7f-b1ec-3c853954e2a8,0,0,2011-01-01 15:00:00 +94ffc7e8-4bb3-4aa9-b810-ec05267ec8c8,d142aeef-1b06-4910-88b5-0bce6ef7c1e2,0,0,2011-01-01 15:00:00 +58625c6f-a135-474a-8ae7-ef28046495e4,4ff2235f-24d6-440c-bf09-76ef3eaa340d,0,0,2011-01-01 15:00:00 +af2b2fdf-5dfc-4f30-8a6a-d0b08cdcb849,53df57d0-c789-4393-b0a5-897a3bc821a2,0,0,2011-01-01 15:00:00 +9a44b75e-7330-43a8-9639-7a9034e493a9,61788990-7681-42c0-9d0c-cfd22d4d3a83,0,0,2011-01-01 15:00:00 +6e148594-336d-4e1a-ba10-c689626512e1,287285e2-c0ac-40dc-a15f-82a5de6ef37f,0,0,2011-01-01 15:00:00 +d74fe30c-1fa2-44ca-afa5-b34f46e13acf,e04c6258-0ee5-4928-96c1-8e04acbbcc8f,0,0,2011-01-01 15:00:00 +d7a43e16-57a2-4588-9879-ee21cc134c82,1a738cc5-b8f0-41f0-9f60-85073dc80136,0,0,2011-01-01 15:00:00 +a17d2f58-f8e1-4e53-864c-da75cb8251ce,95b1b117-1c7b-4a69-b10e-8963fbced23a,0,0,2011-01-01 15:00:00 +40cbb2fd-282d-4ab2-8825-6b256fb0bf3d,a1eb7fc1-3bee-4b65-a387-ef3046644bf0,0,0,2011-01-01 15:00:00 +fd595438-1729-4b62-9789-a82317dbeb32,0a2cdd93-b055-4e0b-8fce-088968316df4,0,0,2011-01-01 15:00:00 +4eca3917-6159-4e57-a50d-6cf3ef142895,19d949f2-54ff-483c-928b-2438fc760385,0,0,2011-01-01 15:00:00 +3d0fa3d9-6d9d-4e57-82a4-b2664d08a426,a50f12e1-33ed-4992-8579-da1800d5eff7,0,0,2011-01-01 15:00:00 +36d47b43-8177-4d71-937b-54b4fbc395b1,51ed457c-81ff-470f-b45b-30a94a965c36,0,0,2011-01-01 15:00:00 +62c7d788-6cd5-4edb-8773-ff56cfbc5d2e,de40f0bd-3793-4b02-b663-31d282b33f61,0,0,2011-01-01 15:00:00 +4578fd79-6f78-4fad-93f6-b571e6c3a42c,6cac0624-6336-4418-bcf0-990abcdb824b,0,0,2011-01-01 15:00:00 +4d3c3b4d-1224-4cdb-b735-bab9d7112056,dcc2950b-23cc-407d-b53f-0056234f7ee1,0,0,2011-01-01 15:00:00 +377cf18b-0718-47fd-857d-76597cd607f5,5206abaa-3abc-4a15-a8f2-778139a3fc65,0,0,2011-01-01 15:00:00 +e2611c01-30b2-48a6-b49b-4429e8fa3608,6291eea2-689c-48f3-b7a9-5054bf567cab,0,0,2011-01-01 15:00:00 +aa35f2c9-bc4f-4aa3-a348-764de138198f,71e4f6f1-2b50-41ce-adb7-80a4e309bd63,0,0,2011-01-01 15:00:00 +2a0ada09-50b0-4c52-afb3-4528c360f4ba,0c8bcc26-ce6e-4d2c-acdd-e304cfb3c02f,0,0,2011-01-01 15:00:00 +c05d2e35-0b7f-44d5-af41-1c43ac183036,241b5dad-aaac-4f7c-8152-a32839fcfa13,0,0,2011-01-01 15:00:00 +6281e556-32ef-4ad4-924f-b3ca9d50533e,cb646f5c-890a-4317-81eb-c7aeffb86389,0,0,2011-01-01 15:00:00 +f6dc1989-c9e5-4c1b-a0af-fd5bfef436c0,2f99a367-0fc2-4ca2-ab58-cb5d7004a6bd,0,0,2011-01-01 15:00:00 +6cfe99b9-8292-4a2b-a6ed-2c2f82666c93,e87c9d51-cfec-4e04-9790-16cd6b238d51,0,0,2011-01-01 15:00:00 +fa0cb6f7-1072-478c-a142-2434470ebe89,d3bacaf6-8558-4df5-8481-8d684ef3e14d,0,0,2011-01-01 15:00:00 +d7f6d06e-1f3c-418c-962b-154199d92503,41a126ec-6254-4b68-821b-ecebb98ad0fd,0,0,2011-01-01 15:00:00 +403134e8-9a80-475b-ab9d-adb774a96025,fad9b8c1-9ded-4856-ab91-f41217259363,0,0,2011-01-01 15:00:00 +0a2218f1-46b7-4222-8028-7f772ae5f01d,4e655530-909f-4acf-8ed9-d19f849265df,0,0,2011-01-01 15:00:00 +180e8a6b-6f68-4b92-b728-aa76ff18d25e,5a612315-ad74-4d98-b350-7e44630b8a6e,0,0,2011-01-01 15:00:00 +3603b754-d096-4f78-9c5d-c0e2bb314d74,9d7cd8e2-d859-4f4f-9c01-abba06ef2e2c,0,0,2011-01-01 15:00:00 +625537f9-c993-4433-9522-78873fc4b8ac,bb929fcc-a67e-423c-9569-73364746383d,0,0,2011-01-01 15:00:00 +13256470-2f90-43ac-80d1-2fa4501bec6c,e447506e-3d43-4bce-8aab-a7ca8b7fbc45,0,0,2011-01-01 15:00:00 +c0f7146b-e58a-447d-83d9-ac08778d6981,114efaa0-dd3f-47ce-bbbe-856cacb034d1,0,0,2011-01-01 15:00:00 +215c433c-3a37-40a4-9dc5-8e781a81420e,90a5aeab-5a04-4580-bc1c-4d8ea399cc8c,0,0,2011-01-01 15:00:00 +8c786d8c-3373-4d16-9ebd-5dc4cdbd3190,62b0cca9-b44c-4eda-999f-ae2832319848,0,0,2011-01-01 15:00:00 +2d94f048-f06c-433a-ac68-c8af4ef639cf,4fc73066-d9a2-4175-84e5-f3692e050492,0,0,2011-01-01 15:00:00 +53b4c5a0-f4e5-4a68-b5b2-1295a0cd8a33,c023f6f8-c35c-46d4-9ab7-1d098994d65d,0,0,2011-01-01 15:00:00 +d1baf1a7-97e0-4bff-bd21-f752a5cc2662,fa6d5184-b205-4b1b-839f-7b21ac956c28,0,0,2011-01-01 15:00:00 +f13045fe-8992-47a2-84dd-6f4452c03bc9,ef4764b4-27b9-44bd-8b7d-6903df8b4a72,0,0,2011-01-01 15:00:00 From 99d8efa1a3fcd7d0f5082d2cd33ddcda44ff816e Mon Sep 17 00:00:00 2001 From: vasilios Date: Wed, 23 Jun 2021 12:29:23 +0300 Subject: [PATCH 078/157] fix: resolved static code analysis issues + applied spotless --- .../io/connectors/CsvFileConnector.java | 6 ++-- .../timeseries/TimeSeriesProcessor.java | 6 ++-- .../io/source/csv/CsvDataSource.java | 8 ++--- .../io/source/csv/CsvIdCoordinateSource.java | 2 +- .../io/source/csv/CsvWeatherSource.java | 2 +- .../input/container/GraphicElements.java | 6 ++-- .../input/container/RawGridElements.java | 18 ++++------- .../input/container/SystemParticipants.java | 30 +++++++------------ .../chargingpoint/ChargingPointTypeUtils.java | 3 +- .../utils/ContainerNodeUpdateUtil.java | 4 +-- .../csv/CsvResultEntitySourceTest.groovy | 26 ++++++++-------- .../test/common/ResultEntityTestData.groovy | 16 +++++----- 12 files changed, 52 insertions(+), 75 deletions(-) diff --git a/src/main/java/edu/ie3/datamodel/io/connectors/CsvFileConnector.java b/src/main/java/edu/ie3/datamodel/io/connectors/CsvFileConnector.java index e4bd141ae..e35c376bd 100644 --- a/src/main/java/edu/ie3/datamodel/io/connectors/CsvFileConnector.java +++ b/src/main/java/edu/ie3/datamodel/io/connectors/CsvFileConnector.java @@ -204,8 +204,7 @@ public Optional getIndividualTimeSeriesMeta */ private Map buildIndividualTimeSeriesMetaInformation() { - return getIndividualTimeSeriesFilePaths() - .parallelStream() + return getIndividualTimeSeriesFilePaths().parallelStream() .map( filePath -> { /* Extract meta information from file path and enhance it with the file path itself */ @@ -230,8 +229,7 @@ public Optional getIndividualTimeSeriesMeta */ public Map> getCsvIndividualTimeSeriesMetaInformation(ColumnScheme... columnSchemes) { - return getIndividualTimeSeriesFilePaths() - .parallelStream() + return getIndividualTimeSeriesFilePaths().parallelStream() .map( pathString -> { String filePathWithoutEnding = removeFileEnding(pathString); diff --git a/src/main/java/edu/ie3/datamodel/io/processor/timeseries/TimeSeriesProcessor.java b/src/main/java/edu/ie3/datamodel/io/processor/timeseries/TimeSeriesProcessor.java index af29f3dca..0a2bf66b3 100644 --- a/src/main/java/edu/ie3/datamodel/io/processor/timeseries/TimeSeriesProcessor.java +++ b/src/main/java/edu/ie3/datamodel/io/processor/timeseries/TimeSeriesProcessor.java @@ -106,7 +106,8 @@ private SortedMap buildFieldToSource( Class timeSeriesClass, Class entryClass, Class valueClass) { /* Get the mapping from field name to getter method ignoring the getter for returning all entries */ Map timeSeriesMapping = - mapFieldNameToGetter(timeSeriesClass, Arrays.asList("entries", "uuid", "type")).entrySet() + mapFieldNameToGetter(timeSeriesClass, Arrays.asList("entries", "uuid", "type")) + .entrySet() .stream() .collect( Collectors.toMap( @@ -136,7 +137,8 @@ private SortedMap buildFieldToSource( mapFieldNameToGetter( valueClass, Arrays.asList("solarIrradiance", "temperature", "wind")) - .entrySet().stream() + .entrySet() + .stream() .map( entry -> new AbstractMap.SimpleEntry<>( diff --git a/src/main/java/edu/ie3/datamodel/io/source/csv/CsvDataSource.java b/src/main/java/edu/ie3/datamodel/io/source/csv/CsvDataSource.java index a55451c2d..5f92ac097 100644 --- a/src/main/java/edu/ie3/datamodel/io/source/csv/CsvDataSource.java +++ b/src/main/java/edu/ie3/datamodel/io/source/csv/CsvDataSource.java @@ -396,10 +396,7 @@ protected Stream> buildStreamWithFieldsToAttributesMap( Collection> allRows = csvRowFieldValueMapping(reader, headline); return distinctRowsWithLog( - allRows, - fieldToValues -> fieldToValues.get("uuid"), - entityClass.getSimpleName(), - "UUID") + allRows, fieldToValues -> fieldToValues.get("uuid"), entityClass.getSimpleName(), "UUID") .parallelStream(); } catch (IOException e) { log.warn( @@ -458,8 +455,7 @@ protected Set> distinctRowsWithLog( /* Check for rows with the same key based on the provided key extractor function */ Set> distinctIdSet = - allRowsSet - .parallelStream() + allRowsSet.parallelStream() .filter(ValidationUtils.distinctByKey(keyExtractor)) .collect(Collectors.toSet()); if (distinctIdSet.size() != allRowsSet.size()) { diff --git a/src/main/java/edu/ie3/datamodel/io/source/csv/CsvIdCoordinateSource.java b/src/main/java/edu/ie3/datamodel/io/source/csv/CsvIdCoordinateSource.java index a6b6dff9b..793ce7b43 100644 --- a/src/main/java/edu/ie3/datamodel/io/source/csv/CsvIdCoordinateSource.java +++ b/src/main/java/edu/ie3/datamodel/io/source/csv/CsvIdCoordinateSource.java @@ -123,7 +123,7 @@ protected Stream> buildStreamWithFieldsToAttributesMap() { .get(factory.getLatField()) .concat(fieldToValues.get(factory.getLonField())); return distinctRowsWithLog( - withDistinctCoordinateId, coordinateExtractor, "coordinate id mapping", "coordinate") + withDistinctCoordinateId, coordinateExtractor, "coordinate id mapping", "coordinate") .parallelStream(); } catch (IOException e) { log.error("Cannot read the file for coordinate id to coordinate mapping.", e); diff --git a/src/main/java/edu/ie3/datamodel/io/source/csv/CsvWeatherSource.java b/src/main/java/edu/ie3/datamodel/io/source/csv/CsvWeatherSource.java index 30b152fa4..95f543c16 100644 --- a/src/main/java/edu/ie3/datamodel/io/source/csv/CsvWeatherSource.java +++ b/src/main/java/edu/ie3/datamodel/io/source/csv/CsvWeatherSource.java @@ -256,7 +256,7 @@ protected Stream> buildStreamWithFieldsToAttributesMap( .get(weatherFactory.getTimeFieldString()) .concat(fieldToValues.get(weatherFactory.getCoordinateIdFieldString())); return distinctRowsWithLog( - allRows, timeCoordinateIdExtractor, entityClass.getSimpleName(), "UUID") + allRows, timeCoordinateIdExtractor, entityClass.getSimpleName(), "UUID") .parallelStream(); } catch (IOException e) { diff --git a/src/main/java/edu/ie3/datamodel/models/input/container/GraphicElements.java b/src/main/java/edu/ie3/datamodel/models/input/container/GraphicElements.java index af0d4d9fd..60434f9a8 100644 --- a/src/main/java/edu/ie3/datamodel/models/input/container/GraphicElements.java +++ b/src/main/java/edu/ie3/datamodel/models/input/container/GraphicElements.java @@ -48,14 +48,12 @@ public GraphicElements(List graphics) { /* init sets */ this.nodeGraphics = - graphics - .parallelStream() + graphics.parallelStream() .filter(graphic -> graphic instanceof NodeGraphicInput) .map(graphic -> (NodeGraphicInput) graphic) .collect(Collectors.toSet()); this.lineGraphics = - graphics - .parallelStream() + graphics.parallelStream() .filter(graphic -> graphic instanceof LineGraphicInput) .map(graphic -> (LineGraphicInput) graphic) .collect(Collectors.toSet()); diff --git a/src/main/java/edu/ie3/datamodel/models/input/container/RawGridElements.java b/src/main/java/edu/ie3/datamodel/models/input/container/RawGridElements.java index 4f0abc3e9..b8806a63d 100644 --- a/src/main/java/edu/ie3/datamodel/models/input/container/RawGridElements.java +++ b/src/main/java/edu/ie3/datamodel/models/input/container/RawGridElements.java @@ -84,38 +84,32 @@ public RawGridElements(List rawGridElements) { /* init sets */ this.nodes = - rawGridElements - .parallelStream() + rawGridElements.parallelStream() .filter(gridElement -> gridElement instanceof NodeInput) .map(nodeInput -> (NodeInput) nodeInput) .collect(Collectors.toSet()); this.lines = - rawGridElements - .parallelStream() + rawGridElements.parallelStream() .filter(gridElement -> gridElement instanceof LineInput) .map(lineInput -> (LineInput) lineInput) .collect(Collectors.toSet()); this.transformer2Ws = - rawGridElements - .parallelStream() + rawGridElements.parallelStream() .filter(gridElement -> gridElement instanceof Transformer2WInput) .map(trafo2wInput -> (Transformer2WInput) trafo2wInput) .collect(Collectors.toSet()); this.transformer3Ws = - rawGridElements - .parallelStream() + rawGridElements.parallelStream() .filter(gridElement -> gridElement instanceof Transformer3WInput) .map(trafo3wInput -> (Transformer3WInput) trafo3wInput) .collect(Collectors.toSet()); this.switches = - rawGridElements - .parallelStream() + rawGridElements.parallelStream() .filter(gridElement -> gridElement instanceof SwitchInput) .map(switchInput -> (SwitchInput) switchInput) .collect(Collectors.toSet()); this.measurementUnits = - rawGridElements - .parallelStream() + rawGridElements.parallelStream() .filter(gridElement -> gridElement instanceof MeasurementUnitInput) .map(measurementUnitInput -> (MeasurementUnitInput) measurementUnitInput) .collect(Collectors.toSet()); diff --git a/src/main/java/edu/ie3/datamodel/models/input/container/SystemParticipants.java b/src/main/java/edu/ie3/datamodel/models/input/container/SystemParticipants.java index 8a47b4995..28550d86a 100644 --- a/src/main/java/edu/ie3/datamodel/models/input/container/SystemParticipants.java +++ b/src/main/java/edu/ie3/datamodel/models/input/container/SystemParticipants.java @@ -106,62 +106,52 @@ public SystemParticipants(List systemParticipants) { /* init sets */ this.bmPlants = - systemParticipants - .parallelStream() + systemParticipants.parallelStream() .filter(gridElement -> gridElement instanceof BmInput) .map(bmInput -> (BmInput) bmInput) .collect(Collectors.toSet()); this.chpPlants = - systemParticipants - .parallelStream() + systemParticipants.parallelStream() .filter(gridElement -> gridElement instanceof ChpInput) .map(chpInput -> (ChpInput) chpInput) .collect(Collectors.toSet()); this.evCS = - systemParticipants - .parallelStream() + systemParticipants.parallelStream() .filter(gridElement -> gridElement instanceof EvcsInput) .map(evcsInput -> (EvcsInput) evcsInput) .collect(Collectors.toSet()); this.evs = - systemParticipants - .parallelStream() + systemParticipants.parallelStream() .filter(gridElement -> gridElement instanceof EvInput) .map(evInput -> (EvInput) evInput) .collect(Collectors.toSet()); this.fixedFeedIns = - systemParticipants - .parallelStream() + systemParticipants.parallelStream() .filter(gridElement -> gridElement instanceof FixedFeedInInput) .map(fixedFeedInInpu -> (FixedFeedInInput) fixedFeedInInpu) .collect(Collectors.toSet()); this.heatPumps = - systemParticipants - .parallelStream() + systemParticipants.parallelStream() .filter(gridElement -> gridElement instanceof HpInput) .map(hpInput -> (HpInput) hpInput) .collect(Collectors.toSet()); this.loads = - systemParticipants - .parallelStream() + systemParticipants.parallelStream() .filter(gridElement -> gridElement instanceof LoadInput) .map(loadInput -> (LoadInput) loadInput) .collect(Collectors.toSet()); this.pvPlants = - systemParticipants - .parallelStream() + systemParticipants.parallelStream() .filter(gridElement -> gridElement instanceof PvInput) .map(pvInput -> (PvInput) pvInput) .collect(Collectors.toSet()); this.storages = - systemParticipants - .parallelStream() + systemParticipants.parallelStream() .filter(gridElement -> gridElement instanceof StorageInput) .map(storageInput -> (StorageInput) storageInput) .collect(Collectors.toSet()); this.wecPlants = - systemParticipants - .parallelStream() + systemParticipants.parallelStream() .filter(gridElement -> gridElement instanceof WecInput) .map(wecInput -> (WecInput) wecInput) .collect(Collectors.toSet()); diff --git a/src/main/java/edu/ie3/datamodel/models/input/system/type/chargingpoint/ChargingPointTypeUtils.java b/src/main/java/edu/ie3/datamodel/models/input/system/type/chargingpoint/ChargingPointTypeUtils.java index 6825a3c0f..e72de1aba 100644 --- a/src/main/java/edu/ie3/datamodel/models/input/system/type/chargingpoint/ChargingPointTypeUtils.java +++ b/src/main/java/edu/ie3/datamodel/models/input/system/type/chargingpoint/ChargingPointTypeUtils.java @@ -142,7 +142,8 @@ private ChargingPointTypeUtils() { Stream.concat( Stream.of(type.getId().toLowerCase()), type.getSynonymousIds().stream().map(String::toLowerCase)) - .collect(Collectors.toMap(Function.identity(), v -> type)).entrySet() + .collect(Collectors.toMap(Function.identity(), v -> type)) + .entrySet() .stream()) .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue))); diff --git a/src/main/java/edu/ie3/datamodel/utils/ContainerNodeUpdateUtil.java b/src/main/java/edu/ie3/datamodel/utils/ContainerNodeUpdateUtil.java index 5286f78af..f641adccf 100644 --- a/src/main/java/edu/ie3/datamodel/utils/ContainerNodeUpdateUtil.java +++ b/src/main/java/edu/ie3/datamodel/utils/ContainerNodeUpdateUtil.java @@ -207,9 +207,7 @@ private static SystemParticipants updateSystemParticipantsWithNodes( SystemParticipants systemParticipants, Map oldToNewNodes) { List sysParts = - systemParticipants - .allEntitiesAsList() - .parallelStream() + systemParticipants.allEntitiesAsList().parallelStream() .map( sysPart -> { if (oldToNewNodes.containsKey(sysPart.getNode())) { diff --git a/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvResultEntitySourceTest.groovy b/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvResultEntitySourceTest.groovy index a5a9f195a..8354a5037 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvResultEntitySourceTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvResultEntitySourceTest.groovy @@ -17,21 +17,21 @@ class CsvResultEntitySourceTest extends Specification implements CsvTestDataMeta resultEntitiesFolderPath, entityPersistenceNamingStrategy) when: - def wecResults = csvResultEntitySource.getWecResults() // existent - def pvResults = csvResultEntitySource.getPvResults() // existent - def bmResults = csvResultEntitySource.getBmResults() // existent - def chpResults = csvResultEntitySource.getChpResults() // non-existent + def wecResults = csvResultEntitySource.wecResults // existent + def pvResults = csvResultEntitySource.pvResults // existent + def bmResults = csvResultEntitySource.bmResults // existent + def chpResults = csvResultEntitySource.chpResults // non-existent then: - wecResults.size() == retd.wecResultsSize - pvResults.size() == retd.pvResultsSize - bmResults.size() == retd.bmResultsSize - chpResults.isEmpty() + wecResults.size() == retd.WEC_RESULT_SIZE + pvResults.size() == retd.PV_RESULT_SIZE + bmResults.size() == retd.BM_RESULT_SIZE + chpResults.empty - bmResults.first().getUuid() == retd.bmResultUuid - bmResults.first().getInputModel() == retd.bmInputModelUuid - bmResults.first().getP() == retd.bmActivePower - bmResults.first().getQ() == retd.bmReactivePower - bmResults.first().getTime() == retd.bmZonedDateTime + bmResults.first().uuid == retd.BM_UUID + bmResults.first().inputModel == retd.BM_INPUT_MODEL + bmResults.first().p == retd.BM_ACTIVE_POWER + bmResults.first().q == retd.BM_REACTIVE_POWER + bmResults.first().time == retd.BM_TIME } } diff --git a/src/test/groovy/edu/ie3/test/common/ResultEntityTestData.groovy b/src/test/groovy/edu/ie3/test/common/ResultEntityTestData.groovy index f4214acc6..c282dca90 100644 --- a/src/test/groovy/edu/ie3/test/common/ResultEntityTestData.groovy +++ b/src/test/groovy/edu/ie3/test/common/ResultEntityTestData.groovy @@ -15,13 +15,13 @@ import java.time.ZonedDateTime class ResultEntityTestData { - public static final int wecResultsSize = 1000 - public static final int pvResultsSize = 1000 - public static final int bmResultsSize = 1 + public static final int WEC_RESULT_SIZE = 1000 + public static final int PV_RESULT_SIZE = 1000 + public static final int BM_RESULT_SIZE = 1 - public static final UUID bmResultUuid = UUID.fromString("44b9be7a-af97-4c2a-bb84-9d21abba442f") - public static final UUID bmInputModelUuid = UUID.fromString("66df67d0-c789-4393-b0a5-897a3bc821a2") - public static final ComparableQuantity bmActivePower = Quantities.getQuantity(-1, PowerSystemUnits.MEGAWATT) - public static final ComparableQuantity bmReactivePower = Quantities.getQuantity(-5, PowerSystemUnits.MEGAVAR) - public static final ZonedDateTime bmZonedDateTime = TimeUtil.withDefaults.toZonedDateTime("2011-01-01 00:00:00") + public static final UUID BM_UUID = UUID.fromString("44b9be7a-af97-4c2a-bb84-9d21abba442f") + public static final UUID BM_INPUT_MODEL = UUID.fromString("66df67d0-c789-4393-b0a5-897a3bc821a2") + public static final ComparableQuantity BM_ACTIVE_POWER = Quantities.getQuantity(-1, PowerSystemUnits.MEGAWATT) + public static final ComparableQuantity BM_REACTIVE_POWER = Quantities.getQuantity(-5, PowerSystemUnits.MEGAVAR) + public static final ZonedDateTime BM_TIME = TimeUtil.withDefaults.toZonedDateTime("2011-01-01 00:00:00") } From 485d126be6f1a08d639664f794f4851046b59142 Mon Sep 17 00:00:00 2001 From: Johannes Hiry Date: Wed, 23 Jun 2021 11:55:51 +0200 Subject: [PATCH 079/157] updated spotless version --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 9a22a5114..e83065f22 100644 --- a/build.gradle +++ b/build.gradle @@ -4,7 +4,7 @@ plugins { id 'maven-publish' id 'signing' id 'pmd' // code check, working on source code - id 'com.diffplug.spotless' version '5.12.5'//code format + id 'com.diffplug.spotless' version '5.14.0'//code format id 'com.github.spotbugs' version '4.7.1' // code check, working on byte code id 'com.github.onslip.gradle-one-jar' version '1.0.6' // pack a self contained jar id 'de.undercouch.download' version '4.1.1' From 39bc95470cf1c3ef88f9adf98a3c94ddfaf5ea49 Mon Sep 17 00:00:00 2001 From: Johannes Hiry Date: Wed, 23 Jun 2021 12:02:07 +0200 Subject: [PATCH 080/157] fmt --- .../io/extractor/ExtractorTest.groovy | 3 +- .../CosmoIdCoordinateFactoryTest.groovy | 3 +- .../IconIdCoordinateFactoryTest.groovy | 3 +- .../TimeBasedSimpleValueFactoryTest.groovy | 18 ++++++---- ...EntityPersistenceNamingStrategyTest.groovy | 6 ++-- .../HierarchicFileNamingStrategyTest.groovy | 6 ++-- .../io/processor/ProcessorProviderTest.groovy | 6 ++-- .../timeseries/TimeSeriesProcessorTest.groovy | 3 +- .../CouchbaseWeatherSourcePsdmIT.groovy | 15 +++++--- .../io/source/csv/CsvDataSourceTest.groovy | 9 +++-- .../io/source/csv/CsvGraphicSourceTest.groovy | 3 +- .../io/source/csv/CsvRawGridSourceTest.groovy | 3 +- .../csv/CsvSystemParticipantSourceTest.groovy | 21 +++++++---- .../csv/CsvWeatherSourceIconTest.groovy | 9 +++-- .../csv/CsvWeatherSourcePsdmTest.groovy | 15 +++++--- .../InfluxDbWeatherSourcePsdmIT.groovy | 18 ++++++---- .../source/sql/SqlWeatherSourceIconIT.groovy | 12 ++++--- .../source/sql/SqlWeatherSourcePsdmIT.groovy | 15 +++++--- .../datamodel/utils/ContainerUtilsTest.groovy | 36 ++++++++++++------- .../validation/ValidationUtilsTest.groovy | 12 ++++--- .../ie3/test/common/ComplexTopology.groovy | 12 ++++--- 21 files changed, 151 insertions(+), 77 deletions(-) diff --git a/src/test/groovy/edu/ie3/datamodel/io/extractor/ExtractorTest.groovy b/src/test/groovy/edu/ie3/datamodel/io/extractor/ExtractorTest.groovy index cefe51b54..08d46f48d 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/extractor/ExtractorTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/extractor/ExtractorTest.groovy @@ -156,7 +156,8 @@ class ExtractorTest extends Specification { expect: Extractor.extractElements(sampleFixedFeedInput) as Set == [ sptd.fixedFeedInInput.node, - sptd.fixedFeedInInput.node.operator] as Set + sptd.fixedFeedInInput.node.operator + ] as Set } def "An Extractor should not extract an operator that is marked as not assigned and not throw an exception if the resulting list empty"() { diff --git a/src/test/groovy/edu/ie3/datamodel/io/factory/timeseries/CosmoIdCoordinateFactoryTest.groovy b/src/test/groovy/edu/ie3/datamodel/io/factory/timeseries/CosmoIdCoordinateFactoryTest.groovy index 1f557b2c5..05519cbc5 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/factory/timeseries/CosmoIdCoordinateFactoryTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/factory/timeseries/CosmoIdCoordinateFactoryTest.groovy @@ -29,7 +29,8 @@ class CosmoIdCoordinateFactoryTest extends Specification { "latrot", "longrot", "latgeo", - "longgeo"] as Set + "longgeo" + ] as Set def validSimpleFactoryData = new SimpleFactoryData([ "tid": "1", "id": "106580", diff --git a/src/test/groovy/edu/ie3/datamodel/io/factory/timeseries/IconIdCoordinateFactoryTest.groovy b/src/test/groovy/edu/ie3/datamodel/io/factory/timeseries/IconIdCoordinateFactoryTest.groovy index 1db0d34e6..e234b1ff3 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/factory/timeseries/IconIdCoordinateFactoryTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/factory/timeseries/IconIdCoordinateFactoryTest.groovy @@ -27,7 +27,8 @@ class IconIdCoordinateFactoryTest extends Specification { "id", "latitude", "longitude", - "coordinatetype"] as Set + "coordinatetype" + ] as Set def validSimpleFactoryData = new SimpleFactoryData([ "id":"477295", "latitude":"52.312", diff --git a/src/test/groovy/edu/ie3/datamodel/io/factory/timeseries/TimeBasedSimpleValueFactoryTest.groovy b/src/test/groovy/edu/ie3/datamodel/io/factory/timeseries/TimeBasedSimpleValueFactoryTest.groovy index 8ad66dc44..b39267a74 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/factory/timeseries/TimeBasedSimpleValueFactoryTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/factory/timeseries/TimeBasedSimpleValueFactoryTest.groovy @@ -47,20 +47,23 @@ class TimeBasedSimpleValueFactoryTest extends Specification { [ TimeBasedSimpleValueFactory.UUID, TIME, - PRICE] as Set + PRICE + ] as Set ] SValue || [ [ TimeBasedSimpleValueFactory.UUID, TIME, ACTIVE_POWER, - REACTIVE_POWER] as Set + REACTIVE_POWER + ] as Set ] PValue || [ [ TimeBasedSimpleValueFactory.UUID, TIME, - ACTIVE_POWER] as Set + ACTIVE_POWER + ] as Set ] HeatAndSValue || [ [ @@ -68,20 +71,23 @@ class TimeBasedSimpleValueFactoryTest extends Specification { TIME, ACTIVE_POWER, REACTIVE_POWER, - HEAT_DEMAND] as Set + HEAT_DEMAND + ] as Set ] HeatAndPValue || [ [ TimeBasedSimpleValueFactory.UUID, TIME, ACTIVE_POWER, - HEAT_DEMAND] as Set + HEAT_DEMAND + ] as Set ] HeatDemandValue || [ [ TimeBasedSimpleValueFactory.UUID, TIME, - HEAT_DEMAND] as Set + HEAT_DEMAND + ] as Set ] } diff --git a/src/test/groovy/edu/ie3/datamodel/io/naming/EntityPersistenceNamingStrategyTest.groovy b/src/test/groovy/edu/ie3/datamodel/io/naming/EntityPersistenceNamingStrategyTest.groovy index f8c3d9672..fa8601955 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/naming/EntityPersistenceNamingStrategyTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/naming/EntityPersistenceNamingStrategyTest.groovy @@ -520,7 +520,8 @@ class EntityPersistenceNamingStrategyTest extends Specification { given: EntityPersistenceNamingStrategy strategy = new EntityPersistenceNamingStrategy() def entries = [ - new TimeBasedValue(ZonedDateTime.now(), new EnergyPriceValue(Quantities.getQuantity(500d, PowerSystemUnits.EURO_PER_MEGAWATTHOUR)))] as SortedSet + new TimeBasedValue(ZonedDateTime.now(), new EnergyPriceValue(Quantities.getQuantity(500d, PowerSystemUnits.EURO_PER_MEGAWATTHOUR))) + ] as SortedSet IndividualTimeSeries timeSeries = Mock(IndividualTimeSeries) timeSeries.uuid >> uuid timeSeries.entries >> entries @@ -955,7 +956,8 @@ class EntityPersistenceNamingStrategyTest extends Specification { given: "a naming strategy without pre- or suffixes" def strategy = new EntityPersistenceNamingStrategy() def entries = [ - new TimeBasedValue(ZonedDateTime.now(), new EnergyPriceValue(Quantities.getQuantity(500d, PowerSystemUnits.EURO_PER_MEGAWATTHOUR)))] as SortedSet + new TimeBasedValue(ZonedDateTime.now(), new EnergyPriceValue(Quantities.getQuantity(500d, PowerSystemUnits.EURO_PER_MEGAWATTHOUR))) + ] as SortedSet def timeSeries = Mock(IndividualTimeSeries) timeSeries.uuid >> uuid timeSeries.entries >> entries diff --git a/src/test/groovy/edu/ie3/datamodel/io/naming/HierarchicFileNamingStrategyTest.groovy b/src/test/groovy/edu/ie3/datamodel/io/naming/HierarchicFileNamingStrategyTest.groovy index 48d54dd45..90ad5e0e4 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/naming/HierarchicFileNamingStrategyTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/naming/HierarchicFileNamingStrategyTest.groovy @@ -313,7 +313,8 @@ class HierarchicFileNamingStrategyTest extends Specification { given: def strategy = new HierarchicFileNamingStrategy(defaultHierarchy) def entries = [ - new TimeBasedValue(ZonedDateTime.now(), new EnergyPriceValue(Quantities.getQuantity(500d, PowerSystemUnits.EURO_PER_MEGAWATTHOUR)))] as SortedSet + new TimeBasedValue(ZonedDateTime.now(), new EnergyPriceValue(Quantities.getQuantity(500d, PowerSystemUnits.EURO_PER_MEGAWATTHOUR))) + ] as SortedSet IndividualTimeSeries timeSeries = Mock(IndividualTimeSeries) timeSeries.uuid >> uuid timeSeries.entries >> entries @@ -334,7 +335,8 @@ class HierarchicFileNamingStrategyTest extends Specification { given: def strategy = new HierarchicFileNamingStrategy("aa", "zz", defaultHierarchy) def entries = [ - new TimeBasedValue(ZonedDateTime.now(), new EnergyPriceValue(Quantities.getQuantity(500d, PowerSystemUnits.EURO_PER_MEGAWATTHOUR)))] as SortedSet + new TimeBasedValue(ZonedDateTime.now(), new EnergyPriceValue(Quantities.getQuantity(500d, PowerSystemUnits.EURO_PER_MEGAWATTHOUR))) + ] as SortedSet IndividualTimeSeries timeSeries = Mock(IndividualTimeSeries) timeSeries.uuid >> uuid timeSeries.entries >> entries diff --git a/src/test/groovy/edu/ie3/datamodel/io/processor/ProcessorProviderTest.groovy b/src/test/groovy/edu/ie3/datamodel/io/processor/ProcessorProviderTest.groovy index 57be829de..79140754a 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/processor/ProcessorProviderTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/processor/ProcessorProviderTest.groovy @@ -164,7 +164,8 @@ class ProcessorProviderTest extends Specification implements TimeSeriesTestData "inputModel", "p", "q", - "time"] as String[] + "time" + ] as String[] when: provider.getHeaderElements(WecResult) @@ -188,7 +189,8 @@ class ProcessorProviderTest extends Specification implements TimeSeriesTestData headerResults == [ "uuid", "price", - "time"] as String[] + "time" + ] as String[] when: provider.getHeaderElements(new TimeSeriesProcessorKey(IndividualTimeSeries, TimeBasedValue, IntValue)) diff --git a/src/test/groovy/edu/ie3/datamodel/io/processor/timeseries/TimeSeriesProcessorTest.groovy b/src/test/groovy/edu/ie3/datamodel/io/processor/timeseries/TimeSeriesProcessorTest.groovy index 27cf657be..b38daf3ff 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/processor/timeseries/TimeSeriesProcessorTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/processor/timeseries/TimeSeriesProcessorTest.groovy @@ -42,7 +42,8 @@ class TimeSeriesProcessorTest extends Specification implements TimeSeriesTestDat assert processor.headerElements == [ "uuid", "price", - "time"] as String[] + "time" + ] as String[] } } diff --git a/src/test/groovy/edu/ie3/datamodel/io/source/couchbase/CouchbaseWeatherSourcePsdmIT.groovy b/src/test/groovy/edu/ie3/datamodel/io/source/couchbase/CouchbaseWeatherSourcePsdmIT.groovy index 6090a738a..643c28b0c 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/source/couchbase/CouchbaseWeatherSourcePsdmIT.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/source/couchbase/CouchbaseWeatherSourcePsdmIT.groovy @@ -95,11 +95,13 @@ class CouchbaseWeatherSourcePsdmIT extends Specification implements WeatherSourc def timeSeries193186 = new IndividualTimeSeries(null, [ new TimeBasedValue(PsdmWeatherTestData.TIME_16H, PsdmWeatherTestData.WEATHER_VALUE_193186_16H), - new TimeBasedValue(PsdmWeatherTestData.TIME_17H, PsdmWeatherTestData.WEATHER_VALUE_193186_17H)] + new TimeBasedValue(PsdmWeatherTestData.TIME_17H, PsdmWeatherTestData.WEATHER_VALUE_193186_17H) + ] as Set) def timeSeries193187 = new IndividualTimeSeries(null, [ - new TimeBasedValue(PsdmWeatherTestData.TIME_16H, PsdmWeatherTestData.WEATHER_VALUE_193187_16H)] as Set) + new TimeBasedValue(PsdmWeatherTestData.TIME_16H, PsdmWeatherTestData.WEATHER_VALUE_193187_16H) + ] as Set) when: Map> coordinateToTimeSeries = source.getWeather(timeInterval, coordinates) then: @@ -117,14 +119,17 @@ class CouchbaseWeatherSourcePsdmIT extends Specification implements WeatherSourc [ new TimeBasedValue(PsdmWeatherTestData.TIME_15H, PsdmWeatherTestData.WEATHER_VALUE_193186_15H), new TimeBasedValue(PsdmWeatherTestData.TIME_16H, PsdmWeatherTestData.WEATHER_VALUE_193186_16H), - new TimeBasedValue(PsdmWeatherTestData.TIME_17H, PsdmWeatherTestData.WEATHER_VALUE_193186_17H)] as Set) + new TimeBasedValue(PsdmWeatherTestData.TIME_17H, PsdmWeatherTestData.WEATHER_VALUE_193186_17H) + ] as Set) def timeSeries193187 = new IndividualTimeSeries(null, [ new TimeBasedValue(PsdmWeatherTestData.TIME_15H, PsdmWeatherTestData.WEATHER_VALUE_193187_15H), - new TimeBasedValue(PsdmWeatherTestData.TIME_16H, PsdmWeatherTestData.WEATHER_VALUE_193187_16H)] as Set) + new TimeBasedValue(PsdmWeatherTestData.TIME_16H, PsdmWeatherTestData.WEATHER_VALUE_193187_16H) + ] as Set) def timeSeries193188 = new IndividualTimeSeries(null, [ - new TimeBasedValue(PsdmWeatherTestData.TIME_15H, PsdmWeatherTestData.WEATHER_VALUE_193188_15H)] as Set) + new TimeBasedValue(PsdmWeatherTestData.TIME_15H, PsdmWeatherTestData.WEATHER_VALUE_193188_15H) + ] as Set) when: Map> coordinateToTimeSeries = source.getWeather(timeInterval) then: diff --git a/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvDataSourceTest.groovy b/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvDataSourceTest.groovy index afdf91a81..773cae69f 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvDataSourceTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvDataSourceTest.groovy @@ -107,7 +107,8 @@ class CsvDataSourceTest extends Specification { "opex", "s_rated", "olmcharacteristic", - "cosPhiFixed"] as String[] + "cosPhiFixed" + ] as String[] def validCsvRow = "5ebd8f7e-dedb-4017-bb86-6373c4b68eb8,25.0,100.0,0.95,98.0,test_bmTypeInput,50.0,25.0,olm:{(0.0,1.0)},cosPhiFixed:{(0.0,1.0)}" expect: @@ -337,7 +338,8 @@ class CsvDataSourceTest extends Specification { "opex", "s_rated", "olmcharacteristic", - "cosPhiFixed"] as String[] + "cosPhiFixed" + ] as String[] def validCsvRow = "5ebd8f7e-dedb-4017-bb86-6373c4b68eb8,25.0,100.0,0.95,98.0,test_bmTypeInput,50.0,25.0,\"olm:{(0.0,1.0)}\"," expect: @@ -366,7 +368,8 @@ class CsvDataSourceTest extends Specification { "eta_conv", "id", "opex", - "s_rated"] as String[] + "s_rated" + ] as String[] expect: dummyCsvSource.buildFieldsToAttributes(invalidCsvRow, validHeadline) == [:] diff --git a/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvGraphicSourceTest.groovy b/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvGraphicSourceTest.groovy index 43a81f910..84eeee658 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvGraphicSourceTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvGraphicSourceTest.groovy @@ -87,7 +87,8 @@ class CsvGraphicSourceTest extends Specification implements CsvTestDataMeta { nodeGraphics.size() == 2 nodeGraphics == [ expectedNodeGraphicC, - expectedNodeGraphicD] as Set + expectedNodeGraphicD + ] as Set } def "A CsvGraphicSource should read and handle a valid line graphics file as expected"() { diff --git a/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvRawGridSourceTest.groovy b/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvRawGridSourceTest.groovy index 07b235d10..c5904edf0 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvRawGridSourceTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvRawGridSourceTest.groovy @@ -714,8 +714,7 @@ class CsvRawGridSourceTest extends Specification implements CsvTestDataMeta { [ GridTestData.transformerAtoBtoC ] as Set, - [rgtd.switchAtoB - ] as Set, + [rgtd.switchAtoB] as Set, [ rgtd.measurementUnitInput ] as Set diff --git a/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvSystemParticipantSourceTest.groovy b/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvSystemParticipantSourceTest.groovy index 254f67b23..7466b94b7 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvSystemParticipantSourceTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvSystemParticipantSourceTest.groovy @@ -157,11 +157,14 @@ class CsvSystemParticipantSourceTest extends Specification implements CsvTestDat thermalStorages | thermalBuses | fieldsToAttributes || resultIsPresent | resultData [] as List | [] as List | ["thermalBus": "0d95d7f2-49fb-4d49-8636-383a5220384e", "thermalStorage": "8851813b-3a7d-4fee-874b-4df9d724e4b3"] || false | null [ - sptd.chpInput.thermalStorage] as List | [sptd.chpInput.thermalBus] as List | ["bla": "foo"] || false | null + sptd.chpInput.thermalStorage + ] as List | [sptd.chpInput.thermalBus] as List | ["bla": "foo"] || false | null [ - sptd.chpInput.thermalStorage] as List | [sptd.chpInput.thermalBus] as List | [:] || false | null + sptd.chpInput.thermalStorage + ] as List | [sptd.chpInput.thermalBus] as List | [:] || false | null [ - sptd.chpInput.thermalStorage] as List | [sptd.chpInput.thermalBus] as List | ["thermalBus": "0d95d7f2-49fb-4d49-8636-383a5220384e", "thermalStorage": "8851813b-3a7d-4fee-874b-4df9d724e4b3"] || true | new ChpInputEntityData([:], sptd.chpInput.operator, sptd.chpInput.node, sptd.chpTypeInput, sptd.chpInput.thermalBus, sptd.chpInput.thermalStorage) + sptd.chpInput.thermalStorage + ] as List | [sptd.chpInput.thermalBus] as List | ["thermalBus": "0d95d7f2-49fb-4d49-8636-383a5220384e", "thermalStorage": "8851813b-3a7d-4fee-874b-4df9d724e4b3"] || true | new ChpInputEntityData([:], sptd.chpInput.operator, sptd.chpInput.node, sptd.chpTypeInput, sptd.chpInput.thermalBus, sptd.chpInput.thermalStorage) } def "A CsvSystemParticipantSource should return data from a valid heat pump input file as expected"() { @@ -199,9 +202,11 @@ class CsvSystemParticipantSourceTest extends Specification implements CsvTestDat where: nodes | operators | types | thermalBuses | thermalStorages || resultingSize || resultingSet [sptd.chpInput.node]| [sptd.chpInput.operator]| [sptd.chpInput.type]| [sptd.chpInput.thermalBus]| [ - sptd.chpInput.thermalStorage] as List || 1 || [sptd.chpInput] + sptd.chpInput.thermalStorage + ] as List || 1 || [sptd.chpInput] [sptd.chpInput.node]| []| [sptd.chpInput.type]| [sptd.chpInput.thermalBus]| [ - sptd.chpInput.thermalStorage] as List || 1 || [ + sptd.chpInput.thermalStorage + ] as List || 1 || [ new ChpInput(sptd.chpInput.uuid, sptd.chpInput.id, OperatorInput.NO_OPERATOR_ASSIGNED, sptd.chpInput.operationTime, sptd.chpInput.node, sptd.chpInput.thermalBus, sptd.chpInput.qCharacteristics, sptd.chpInput.type, sptd.chpInput.thermalStorage, sptd.chpInput.marketReaction) ] []| []| []| []| [] as List || 0 || [] @@ -367,12 +372,14 @@ class CsvSystemParticipantSourceTest extends Specification implements CsvTestDat where: nodes | operators || resultingSize || resultingSet [sptd.fixedFeedInInput.node]| [ - sptd.fixedFeedInInput.operator] as List || 1 || [sptd.fixedFeedInInput] + sptd.fixedFeedInInput.operator + ] as List || 1 || [sptd.fixedFeedInInput] [sptd.fixedFeedInInput.node]| [] as List || 1 || [ new FixedFeedInInput(sptd.fixedFeedInInput.uuid, sptd.fixedFeedInInput.id, OperatorInput.NO_OPERATOR_ASSIGNED, sptd.fixedFeedInInput.operationTime, sptd.fixedFeedInInput.node, sptd.fixedFeedInInput.qCharacteristics, sptd.fixedFeedInInput.sRated, sptd.fixedFeedInInput.cosPhiRated) ] []| [ - sptd.fixedFeedInInput.operator] as List || 0 || [] + sptd.fixedFeedInInput.operator + ] as List || 0 || [] []| [] as List || 0 || [] } } diff --git a/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvWeatherSourceIconTest.groovy b/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvWeatherSourceIconTest.groovy index d72904c39..47e59898a 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvWeatherSourceIconTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvWeatherSourceIconTest.groovy @@ -61,7 +61,8 @@ class CsvWeatherSourceIconTest extends Specification implements CsvTestDataMeta, def timeSeries67775 = new IndividualTimeSeries(null, [ new TimeBasedValue(IconWeatherTestData.TIME_16H, IconWeatherTestData.WEATHER_VALUE_67775_16H), - new TimeBasedValue(IconWeatherTestData.TIME_17H, IconWeatherTestData.WEATHER_VALUE_67775_17H)] + new TimeBasedValue(IconWeatherTestData.TIME_17H, IconWeatherTestData.WEATHER_VALUE_67775_17H) + ] as Set) def timeSeries67776 = new IndividualTimeSeries(null, [ @@ -85,11 +86,13 @@ class CsvWeatherSourceIconTest extends Specification implements CsvTestDataMeta, [ new TimeBasedValue(IconWeatherTestData.TIME_15H, IconWeatherTestData.WEATHER_VALUE_67775_15H), new TimeBasedValue(IconWeatherTestData.TIME_16H, IconWeatherTestData.WEATHER_VALUE_67775_16H), - new TimeBasedValue(IconWeatherTestData.TIME_17H, IconWeatherTestData.WEATHER_VALUE_67775_17H)] as Set) + new TimeBasedValue(IconWeatherTestData.TIME_17H, IconWeatherTestData.WEATHER_VALUE_67775_17H) + ] as Set) def timeSeries67776 = new IndividualTimeSeries(null, [ new TimeBasedValue(IconWeatherTestData.TIME_15H, IconWeatherTestData.WEATHER_VALUE_67776_15H), - new TimeBasedValue(IconWeatherTestData.TIME_16H, IconWeatherTestData.WEATHER_VALUE_67776_16H)] as Set) + new TimeBasedValue(IconWeatherTestData.TIME_16H, IconWeatherTestData.WEATHER_VALUE_67776_16H) + ] as Set) when: Map> coordinateToTimeSeries = source.getWeather(timeInterval) diff --git a/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvWeatherSourcePsdmTest.groovy b/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvWeatherSourcePsdmTest.groovy index 07ceff508..6e05336c4 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvWeatherSourcePsdmTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvWeatherSourcePsdmTest.groovy @@ -65,11 +65,13 @@ class CsvWeatherSourcePsdmTest extends Specification implements CsvTestDataMeta, def timeSeries193186 = new IndividualTimeSeries(null, [ new TimeBasedValue(PsdmWeatherTestData.TIME_16H, PsdmWeatherTestData.WEATHER_VALUE_193186_16H), - new TimeBasedValue(PsdmWeatherTestData.TIME_17H, PsdmWeatherTestData.WEATHER_VALUE_193186_17H)] + new TimeBasedValue(PsdmWeatherTestData.TIME_17H, PsdmWeatherTestData.WEATHER_VALUE_193186_17H) + ] as Set) def timeSeries193187 = new IndividualTimeSeries(null, [ - new TimeBasedValue(PsdmWeatherTestData.TIME_16H, PsdmWeatherTestData.WEATHER_VALUE_193187_16H)] as Set) + new TimeBasedValue(PsdmWeatherTestData.TIME_16H, PsdmWeatherTestData.WEATHER_VALUE_193187_16H) + ] as Set) when: Map> coordinateToTimeSeries = source.getWeather(timeInterval, coordinates) then: @@ -86,14 +88,17 @@ class CsvWeatherSourcePsdmTest extends Specification implements CsvTestDataMeta, [ new TimeBasedValue(PsdmWeatherTestData.TIME_15H, PsdmWeatherTestData.WEATHER_VALUE_193186_15H), new TimeBasedValue(PsdmWeatherTestData.TIME_16H, PsdmWeatherTestData.WEATHER_VALUE_193186_16H), - new TimeBasedValue(PsdmWeatherTestData.TIME_17H, PsdmWeatherTestData.WEATHER_VALUE_193186_17H)] as Set) + new TimeBasedValue(PsdmWeatherTestData.TIME_17H, PsdmWeatherTestData.WEATHER_VALUE_193186_17H) + ] as Set) def timeSeries193187 = new IndividualTimeSeries(null, [ new TimeBasedValue(PsdmWeatherTestData.TIME_15H, PsdmWeatherTestData.WEATHER_VALUE_193187_15H), - new TimeBasedValue(PsdmWeatherTestData.TIME_16H, PsdmWeatherTestData.WEATHER_VALUE_193187_16H)] as Set) + new TimeBasedValue(PsdmWeatherTestData.TIME_16H, PsdmWeatherTestData.WEATHER_VALUE_193187_16H) + ] as Set) def timeSeries193188 = new IndividualTimeSeries(null, [ - new TimeBasedValue(PsdmWeatherTestData.TIME_15H, PsdmWeatherTestData.WEATHER_VALUE_193188_15H)] as Set) + new TimeBasedValue(PsdmWeatherTestData.TIME_15H, PsdmWeatherTestData.WEATHER_VALUE_193188_15H) + ] as Set) when: Map> coordinateToTimeSeries = source.getWeather(timeInterval) then: diff --git a/src/test/groovy/edu/ie3/datamodel/io/source/influxdb/InfluxDbWeatherSourcePsdmIT.groovy b/src/test/groovy/edu/ie3/datamodel/io/source/influxdb/InfluxDbWeatherSourcePsdmIT.groovy index 9f409d06a..a1fc8d216 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/source/influxdb/InfluxDbWeatherSourcePsdmIT.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/source/influxdb/InfluxDbWeatherSourcePsdmIT.groovy @@ -75,11 +75,13 @@ class InfluxDbWeatherSourcePsdmIT extends Specification implements WeatherSource def timeseries_193186 = new IndividualTimeSeries(null, [ new TimeBasedValue(PsdmWeatherTestData.TIME_16H , PsdmWeatherTestData.WEATHER_VALUE_193186_16H), - new TimeBasedValue(PsdmWeatherTestData.TIME_17H , PsdmWeatherTestData.WEATHER_VALUE_193186_17H)] + new TimeBasedValue(PsdmWeatherTestData.TIME_17H , PsdmWeatherTestData.WEATHER_VALUE_193186_17H) + ] as Set) def timeseries_193187 = new IndividualTimeSeries(null, [ - new TimeBasedValue(PsdmWeatherTestData.TIME_16H , PsdmWeatherTestData.WEATHER_VALUE_193187_16H)] as Set) + new TimeBasedValue(PsdmWeatherTestData.TIME_16H , PsdmWeatherTestData.WEATHER_VALUE_193187_16H) + ] as Set) when: Map> coordinateToTimeSeries = source.getWeather(timeInterval, coordinates) then: @@ -95,14 +97,17 @@ class InfluxDbWeatherSourcePsdmIT extends Specification implements WeatherSource [ new TimeBasedValue(PsdmWeatherTestData.TIME_15H ,PsdmWeatherTestData.WEATHER_VALUE_193186_15H), new TimeBasedValue(PsdmWeatherTestData.TIME_16H ,PsdmWeatherTestData.WEATHER_VALUE_193186_16H), - new TimeBasedValue(PsdmWeatherTestData.TIME_17H ,PsdmWeatherTestData.WEATHER_VALUE_193186_17H)] as Set) + new TimeBasedValue(PsdmWeatherTestData.TIME_17H ,PsdmWeatherTestData.WEATHER_VALUE_193186_17H) + ] as Set) def timeseries_193187 = new IndividualTimeSeries(null, [ new TimeBasedValue(PsdmWeatherTestData.TIME_15H ,PsdmWeatherTestData.WEATHER_VALUE_193187_15H), - new TimeBasedValue(PsdmWeatherTestData.TIME_16H ,PsdmWeatherTestData.WEATHER_VALUE_193187_16H)] as Set) + new TimeBasedValue(PsdmWeatherTestData.TIME_16H ,PsdmWeatherTestData.WEATHER_VALUE_193187_16H) + ] as Set) def timeseries_193188 = new IndividualTimeSeries(null, [ - new TimeBasedValue(PsdmWeatherTestData.TIME_15H ,PsdmWeatherTestData.WEATHER_VALUE_193188_15H)] as Set) + new TimeBasedValue(PsdmWeatherTestData.TIME_15H ,PsdmWeatherTestData.WEATHER_VALUE_193188_15H) + ] as Set) when: Map> coordinateToTimeSeries = source.getWeather(timeInterval) then: @@ -122,7 +127,8 @@ class InfluxDbWeatherSourcePsdmIT extends Specification implements WeatherSource [ new TimeBasedValue(PsdmWeatherTestData.TIME_15H ,PsdmWeatherTestData.WEATHER_VALUE_193186_15H), new TimeBasedValue(PsdmWeatherTestData.TIME_16H ,PsdmWeatherTestData.WEATHER_VALUE_193186_16H), - new TimeBasedValue(PsdmWeatherTestData.TIME_17H ,PsdmWeatherTestData.WEATHER_VALUE_193186_17H)] as Set) + new TimeBasedValue(PsdmWeatherTestData.TIME_17H ,PsdmWeatherTestData.WEATHER_VALUE_193186_17H) + ] as Set) when: def coordinateAtDate = source.getWeather(time, invalidCoordinate) def coordinateInInterval = source.getWeather(timeInterval, invalidCoordinate) diff --git a/src/test/groovy/edu/ie3/datamodel/io/source/sql/SqlWeatherSourceIconIT.groovy b/src/test/groovy/edu/ie3/datamodel/io/source/sql/SqlWeatherSourceIconIT.groovy index e91524313..55a3b87d4 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/source/sql/SqlWeatherSourceIconIT.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/source/sql/SqlWeatherSourceIconIT.groovy @@ -65,11 +65,13 @@ class SqlWeatherSourceIconIT extends Specification implements WeatherSourceTestH def timeSeries67775 = new IndividualTimeSeries(null, [ new TimeBasedValue(IconWeatherTestData.TIME_16H, IconWeatherTestData.WEATHER_VALUE_67775_16H), - new TimeBasedValue(IconWeatherTestData.TIME_17H, IconWeatherTestData.WEATHER_VALUE_67775_17H)] + new TimeBasedValue(IconWeatherTestData.TIME_17H, IconWeatherTestData.WEATHER_VALUE_67775_17H) + ] as Set) def timeSeries67776 = new IndividualTimeSeries(null, [ - new TimeBasedValue(IconWeatherTestData.TIME_16H, IconWeatherTestData.WEATHER_VALUE_67776_16H)] as Set) + new TimeBasedValue(IconWeatherTestData.TIME_16H, IconWeatherTestData.WEATHER_VALUE_67776_16H) + ] as Set) when: Map> coordinateToTimeSeries = source.getWeather(timeInterval, coordinates) @@ -87,11 +89,13 @@ class SqlWeatherSourceIconIT extends Specification implements WeatherSourceTestH [ new TimeBasedValue(IconWeatherTestData.TIME_15H, IconWeatherTestData.WEATHER_VALUE_67775_15H), new TimeBasedValue(IconWeatherTestData.TIME_16H, IconWeatherTestData.WEATHER_VALUE_67775_16H), - new TimeBasedValue(IconWeatherTestData.TIME_17H, IconWeatherTestData.WEATHER_VALUE_67775_17H)] as Set) + new TimeBasedValue(IconWeatherTestData.TIME_17H, IconWeatherTestData.WEATHER_VALUE_67775_17H) + ] as Set) def timeSeries67776 = new IndividualTimeSeries(null, [ new TimeBasedValue(IconWeatherTestData.TIME_15H, IconWeatherTestData.WEATHER_VALUE_67776_15H), - new TimeBasedValue(IconWeatherTestData.TIME_16H, IconWeatherTestData.WEATHER_VALUE_67776_16H)] as Set) + new TimeBasedValue(IconWeatherTestData.TIME_16H, IconWeatherTestData.WEATHER_VALUE_67776_16H) + ] as Set) when: Map> coordinateToTimeSeries = source.getWeather(timeInterval) diff --git a/src/test/groovy/edu/ie3/datamodel/io/source/sql/SqlWeatherSourcePsdmIT.groovy b/src/test/groovy/edu/ie3/datamodel/io/source/sql/SqlWeatherSourcePsdmIT.groovy index 11562eef7..0e003df50 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/source/sql/SqlWeatherSourcePsdmIT.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/source/sql/SqlWeatherSourcePsdmIT.groovy @@ -65,11 +65,13 @@ class SqlWeatherSourcePsdmIT extends Specification implements WeatherSourceTestH def timeSeries193186 = new IndividualTimeSeries(null, [ new TimeBasedValue(PsdmWeatherTestData.TIME_16H, PsdmWeatherTestData.WEATHER_VALUE_193186_16H), - new TimeBasedValue(PsdmWeatherTestData.TIME_17H, PsdmWeatherTestData.WEATHER_VALUE_193186_17H)] + new TimeBasedValue(PsdmWeatherTestData.TIME_17H, PsdmWeatherTestData.WEATHER_VALUE_193186_17H) + ] as Set) def timeSeries193187 = new IndividualTimeSeries(null, [ - new TimeBasedValue(PsdmWeatherTestData.TIME_16H, PsdmWeatherTestData.WEATHER_VALUE_193187_16H)] as Set) + new TimeBasedValue(PsdmWeatherTestData.TIME_16H, PsdmWeatherTestData.WEATHER_VALUE_193187_16H) + ] as Set) when: Map> coordinateToTimeSeries = source.getWeather(timeInterval, coordinates) then: @@ -87,14 +89,17 @@ class SqlWeatherSourcePsdmIT extends Specification implements WeatherSourceTestH [ new TimeBasedValue(PsdmWeatherTestData.TIME_15H, PsdmWeatherTestData.WEATHER_VALUE_193186_15H), new TimeBasedValue(PsdmWeatherTestData.TIME_16H, PsdmWeatherTestData.WEATHER_VALUE_193186_16H), - new TimeBasedValue(PsdmWeatherTestData.TIME_17H, PsdmWeatherTestData.WEATHER_VALUE_193186_17H)] as Set) + new TimeBasedValue(PsdmWeatherTestData.TIME_17H, PsdmWeatherTestData.WEATHER_VALUE_193186_17H) + ] as Set) def timeSeries193187 = new IndividualTimeSeries(null, [ new TimeBasedValue(PsdmWeatherTestData.TIME_15H, PsdmWeatherTestData.WEATHER_VALUE_193187_15H), - new TimeBasedValue(PsdmWeatherTestData.TIME_16H, PsdmWeatherTestData.WEATHER_VALUE_193187_16H)] as Set) + new TimeBasedValue(PsdmWeatherTestData.TIME_16H, PsdmWeatherTestData.WEATHER_VALUE_193187_16H) + ] as Set) def timeSeries193188 = new IndividualTimeSeries(null, [ - new TimeBasedValue(PsdmWeatherTestData.TIME_15H, PsdmWeatherTestData.WEATHER_VALUE_193188_15H)] as Set) + new TimeBasedValue(PsdmWeatherTestData.TIME_15H, PsdmWeatherTestData.WEATHER_VALUE_193188_15H) + ] as Set) when: Map> coordinateToTimeSeries = source.getWeather(timeInterval) then: diff --git a/src/test/groovy/edu/ie3/datamodel/utils/ContainerUtilsTest.groovy b/src/test/groovy/edu/ie3/datamodel/utils/ContainerUtilsTest.groovy index 48d10228a..6e2c63500 100644 --- a/src/test/groovy/edu/ie3/datamodel/utils/ContainerUtilsTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/utils/ContainerUtilsTest.groovy @@ -47,34 +47,46 @@ class ContainerUtilsTest extends Specification { 1 || [ ComplexTopology.nodeA, ComplexTopology.nodeB, - ComplexTopology.nodeC] as Set || [] as Set || [ - ComplexTopology.transformerAtoBtoC] as Set + ComplexTopology.nodeC + ] as Set || [] as Set || [ + ComplexTopology.transformerAtoBtoC + ] as Set 2 || [ ComplexTopology.nodeA, ComplexTopology.nodeB, - ComplexTopology.nodeC] as Set || [] as Set || [ - ComplexTopology.transformerAtoBtoC] as Set + ComplexTopology.nodeC + ] as Set || [] as Set || [ + ComplexTopology.transformerAtoBtoC + ] as Set 3 || [ ComplexTopology.nodeA, ComplexTopology.nodeB, - ComplexTopology.nodeC] as Set || [] as Set || [ - ComplexTopology.transformerAtoBtoC] as Set + ComplexTopology.nodeC + ] as Set || [] as Set || [ + ComplexTopology.transformerAtoBtoC + ] as Set 4 || [ ComplexTopology.nodeB, - ComplexTopology.nodeD] as Set || [ - ComplexTopology.transformerBtoD] as Set || [] as Set + ComplexTopology.nodeD + ] as Set || [ + ComplexTopology.transformerBtoD + ] as Set || [] as Set 5 || [ ComplexTopology.nodeB, ComplexTopology.nodeC, - ComplexTopology.nodeE] as Set || [ + ComplexTopology.nodeE + ] as Set || [ ComplexTopology.transformerBtoE, - ComplexTopology.transformerCtoE] as Set || [] as Set + ComplexTopology.transformerCtoE + ] as Set || [] as Set 6 || [ ComplexTopology.nodeC, ComplexTopology.nodeF, - ComplexTopology.nodeG] as Set || [ + ComplexTopology.nodeG + ] as Set || [ ComplexTopology.transformerCtoF, - ComplexTopology.transformerCtoG] as Set || [] as Set + ComplexTopology.transformerCtoG + ] as Set || [] as Set } def "The container utils are able to derive the predominant voltage level in a setup w/o switchgear"() { diff --git a/src/test/groovy/edu/ie3/datamodel/utils/validation/ValidationUtilsTest.groovy b/src/test/groovy/edu/ie3/datamodel/utils/validation/ValidationUtilsTest.groovy index 3c5e03a54..8e00609e0 100644 --- a/src/test/groovy/edu/ie3/datamodel/utils/validation/ValidationUtilsTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/utils/validation/ValidationUtilsTest.groovy @@ -58,10 +58,12 @@ class ValidationUtilsTest extends Specification { false, null, GermanVoltageLevelUtils.LV, - 6)] as Set || false + 6) + ] as Set || false [ GridTestData.nodeD, - GridTestData.nodeE] as Set || true + GridTestData.nodeE + ] as Set || true [] as Set || true } @@ -90,12 +92,14 @@ class ValidationUtilsTest extends Specification { false, null, GermanVoltageLevelUtils.LV, - 6)] as Set || Optional.of("9e37ce48-9650-44ec-b888-c2fd182aff01: 2\n" + + 6) + ] as Set || Optional.of("9e37ce48-9650-44ec-b888-c2fd182aff01: 2\n" + " - NodeInput{uuid=9e37ce48-9650-44ec-b888-c2fd182aff01, id='node_f', operator=f15105c4-a2de-4ab8-a621-4bc98e372d92, operationTime=OperationTime{startDate=null, endDate=null, isLimited=false}, vTarget=1 PU, slack=false, geoPosition=null, voltLvl=CommonVoltageLevel{id='Niederspannung', nominalVoltage=0.4 kV, synonymousIds=[Niederspannung, lv, ns], voltageRange=Interval [0 kV, 10 kV)}, subnet=6}\n" + " - NodeInput{uuid=9e37ce48-9650-44ec-b888-c2fd182aff01, id='node_g', operator=f15105c4-a2de-4ab8-a621-4bc98e372d92, operationTime=OperationTime{startDate=null, endDate=null, isLimited=false}, vTarget=1 PU, slack=false, geoPosition=null, voltLvl=CommonVoltageLevel{id='Niederspannung', nominalVoltage=0.4 kV, synonymousIds=[Niederspannung, lv, ns], voltageRange=Interval [0 kV, 10 kV)}, subnet=6}") [ GridTestData.nodeD, - GridTestData.nodeE] as Set || Optional.empty() + GridTestData.nodeE + ] as Set || Optional.empty() [] as Set || Optional.empty() } diff --git a/src/test/groovy/edu/ie3/test/common/ComplexTopology.groovy b/src/test/groovy/edu/ie3/test/common/ComplexTopology.groovy index 5c6ca4757..92e6c73e3 100644 --- a/src/test/groovy/edu/ie3/test/common/ComplexTopology.groovy +++ b/src/test/groovy/edu/ie3/test/common/ComplexTopology.groovy @@ -27,14 +27,16 @@ class ComplexTopology extends GridTestData { nodeD, nodeE, nodeF, - nodeG] as Set, + nodeG + ] as Set, [] as Set, [ transformerBtoD, transformerBtoE, transformerCtoE, transformerCtoF, - transformerCtoG] as Set, + transformerCtoG + ] as Set, [transformerAtoBtoC] as Set, [] as Set, [] as Set) @@ -174,7 +176,8 @@ class ComplexTopology extends GridTestData { [] as Set, [ transformerBtoE, - transformerCtoE] as Set, + transformerCtoE + ] as Set, [] as Set, [] as Set, [] as Set), @@ -202,7 +205,8 @@ class ComplexTopology extends GridTestData { [] as Set, [ transformerCtoF, - transformerCtoG] as Set, + transformerCtoG + ] as Set, [] as Set, [] as Set, [] as Set), From 8a9a6da9057ce759e9b490dfe34399bd5ea9efa7 Mon Sep 17 00:00:00 2001 From: Johannes Hiry Date: Wed, 23 Jun 2021 12:03:36 +0200 Subject: [PATCH 081/157] added new features to CHANGELOG.md --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 230757336..6bedc007c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased/Snapshot] +### Added +- added `ResultEntitySource` interface +- added `CsvResultEntitySource` implementation to read `ResultEntity` instances from .csv files + ### Fixed - `CsvSystemParticipantSource#getSystemParticipants()` now correctly returns electric vehicle charging station input models [PR#370](https://github.com/ie3-institute/PowerSystemDataModel/pull/370) From e086bb63408a456c67e0bc965556bce9455ce886 Mon Sep 17 00:00:00 2001 From: Johannes Hiry Date: Wed, 23 Jun 2021 12:13:01 +0200 Subject: [PATCH 082/157] fmt --- .../io/connectors/CsvFileConnector.java | 6 ++-- .../timeseries/TimeSeriesProcessor.java | 6 ++-- .../io/source/csv/CsvDataSource.java | 8 +++-- .../io/source/csv/CsvIdCoordinateSource.java | 2 +- .../io/source/csv/CsvWeatherSource.java | 2 +- .../input/container/GraphicElements.java | 6 ++-- .../input/container/RawGridElements.java | 18 +++++++---- .../input/container/SystemParticipants.java | 30 ++++++++++++------- .../chargingpoint/ChargingPointTypeUtils.java | 3 +- .../utils/ContainerNodeUpdateUtil.java | 4 ++- 10 files changed, 54 insertions(+), 31 deletions(-) diff --git a/src/main/java/edu/ie3/datamodel/io/connectors/CsvFileConnector.java b/src/main/java/edu/ie3/datamodel/io/connectors/CsvFileConnector.java index e35c376bd..e4bd141ae 100644 --- a/src/main/java/edu/ie3/datamodel/io/connectors/CsvFileConnector.java +++ b/src/main/java/edu/ie3/datamodel/io/connectors/CsvFileConnector.java @@ -204,7 +204,8 @@ public Optional getIndividualTimeSeriesMeta */ private Map buildIndividualTimeSeriesMetaInformation() { - return getIndividualTimeSeriesFilePaths().parallelStream() + return getIndividualTimeSeriesFilePaths() + .parallelStream() .map( filePath -> { /* Extract meta information from file path and enhance it with the file path itself */ @@ -229,7 +230,8 @@ public Optional getIndividualTimeSeriesMeta */ public Map> getCsvIndividualTimeSeriesMetaInformation(ColumnScheme... columnSchemes) { - return getIndividualTimeSeriesFilePaths().parallelStream() + return getIndividualTimeSeriesFilePaths() + .parallelStream() .map( pathString -> { String filePathWithoutEnding = removeFileEnding(pathString); diff --git a/src/main/java/edu/ie3/datamodel/io/processor/timeseries/TimeSeriesProcessor.java b/src/main/java/edu/ie3/datamodel/io/processor/timeseries/TimeSeriesProcessor.java index 0a2bf66b3..af29f3dca 100644 --- a/src/main/java/edu/ie3/datamodel/io/processor/timeseries/TimeSeriesProcessor.java +++ b/src/main/java/edu/ie3/datamodel/io/processor/timeseries/TimeSeriesProcessor.java @@ -106,8 +106,7 @@ private SortedMap buildFieldToSource( Class timeSeriesClass, Class entryClass, Class valueClass) { /* Get the mapping from field name to getter method ignoring the getter for returning all entries */ Map timeSeriesMapping = - mapFieldNameToGetter(timeSeriesClass, Arrays.asList("entries", "uuid", "type")) - .entrySet() + mapFieldNameToGetter(timeSeriesClass, Arrays.asList("entries", "uuid", "type")).entrySet() .stream() .collect( Collectors.toMap( @@ -137,8 +136,7 @@ private SortedMap buildFieldToSource( mapFieldNameToGetter( valueClass, Arrays.asList("solarIrradiance", "temperature", "wind")) - .entrySet() - .stream() + .entrySet().stream() .map( entry -> new AbstractMap.SimpleEntry<>( diff --git a/src/main/java/edu/ie3/datamodel/io/source/csv/CsvDataSource.java b/src/main/java/edu/ie3/datamodel/io/source/csv/CsvDataSource.java index 5f92ac097..a55451c2d 100644 --- a/src/main/java/edu/ie3/datamodel/io/source/csv/CsvDataSource.java +++ b/src/main/java/edu/ie3/datamodel/io/source/csv/CsvDataSource.java @@ -396,7 +396,10 @@ protected Stream> buildStreamWithFieldsToAttributesMap( Collection> allRows = csvRowFieldValueMapping(reader, headline); return distinctRowsWithLog( - allRows, fieldToValues -> fieldToValues.get("uuid"), entityClass.getSimpleName(), "UUID") + allRows, + fieldToValues -> fieldToValues.get("uuid"), + entityClass.getSimpleName(), + "UUID") .parallelStream(); } catch (IOException e) { log.warn( @@ -455,7 +458,8 @@ protected Set> distinctRowsWithLog( /* Check for rows with the same key based on the provided key extractor function */ Set> distinctIdSet = - allRowsSet.parallelStream() + allRowsSet + .parallelStream() .filter(ValidationUtils.distinctByKey(keyExtractor)) .collect(Collectors.toSet()); if (distinctIdSet.size() != allRowsSet.size()) { diff --git a/src/main/java/edu/ie3/datamodel/io/source/csv/CsvIdCoordinateSource.java b/src/main/java/edu/ie3/datamodel/io/source/csv/CsvIdCoordinateSource.java index 793ce7b43..a6b6dff9b 100644 --- a/src/main/java/edu/ie3/datamodel/io/source/csv/CsvIdCoordinateSource.java +++ b/src/main/java/edu/ie3/datamodel/io/source/csv/CsvIdCoordinateSource.java @@ -123,7 +123,7 @@ protected Stream> buildStreamWithFieldsToAttributesMap() { .get(factory.getLatField()) .concat(fieldToValues.get(factory.getLonField())); return distinctRowsWithLog( - withDistinctCoordinateId, coordinateExtractor, "coordinate id mapping", "coordinate") + withDistinctCoordinateId, coordinateExtractor, "coordinate id mapping", "coordinate") .parallelStream(); } catch (IOException e) { log.error("Cannot read the file for coordinate id to coordinate mapping.", e); diff --git a/src/main/java/edu/ie3/datamodel/io/source/csv/CsvWeatherSource.java b/src/main/java/edu/ie3/datamodel/io/source/csv/CsvWeatherSource.java index 95f543c16..30b152fa4 100644 --- a/src/main/java/edu/ie3/datamodel/io/source/csv/CsvWeatherSource.java +++ b/src/main/java/edu/ie3/datamodel/io/source/csv/CsvWeatherSource.java @@ -256,7 +256,7 @@ protected Stream> buildStreamWithFieldsToAttributesMap( .get(weatherFactory.getTimeFieldString()) .concat(fieldToValues.get(weatherFactory.getCoordinateIdFieldString())); return distinctRowsWithLog( - allRows, timeCoordinateIdExtractor, entityClass.getSimpleName(), "UUID") + allRows, timeCoordinateIdExtractor, entityClass.getSimpleName(), "UUID") .parallelStream(); } catch (IOException e) { diff --git a/src/main/java/edu/ie3/datamodel/models/input/container/GraphicElements.java b/src/main/java/edu/ie3/datamodel/models/input/container/GraphicElements.java index 60434f9a8..af0d4d9fd 100644 --- a/src/main/java/edu/ie3/datamodel/models/input/container/GraphicElements.java +++ b/src/main/java/edu/ie3/datamodel/models/input/container/GraphicElements.java @@ -48,12 +48,14 @@ public GraphicElements(List graphics) { /* init sets */ this.nodeGraphics = - graphics.parallelStream() + graphics + .parallelStream() .filter(graphic -> graphic instanceof NodeGraphicInput) .map(graphic -> (NodeGraphicInput) graphic) .collect(Collectors.toSet()); this.lineGraphics = - graphics.parallelStream() + graphics + .parallelStream() .filter(graphic -> graphic instanceof LineGraphicInput) .map(graphic -> (LineGraphicInput) graphic) .collect(Collectors.toSet()); diff --git a/src/main/java/edu/ie3/datamodel/models/input/container/RawGridElements.java b/src/main/java/edu/ie3/datamodel/models/input/container/RawGridElements.java index b8806a63d..4f0abc3e9 100644 --- a/src/main/java/edu/ie3/datamodel/models/input/container/RawGridElements.java +++ b/src/main/java/edu/ie3/datamodel/models/input/container/RawGridElements.java @@ -84,32 +84,38 @@ public RawGridElements(List rawGridElements) { /* init sets */ this.nodes = - rawGridElements.parallelStream() + rawGridElements + .parallelStream() .filter(gridElement -> gridElement instanceof NodeInput) .map(nodeInput -> (NodeInput) nodeInput) .collect(Collectors.toSet()); this.lines = - rawGridElements.parallelStream() + rawGridElements + .parallelStream() .filter(gridElement -> gridElement instanceof LineInput) .map(lineInput -> (LineInput) lineInput) .collect(Collectors.toSet()); this.transformer2Ws = - rawGridElements.parallelStream() + rawGridElements + .parallelStream() .filter(gridElement -> gridElement instanceof Transformer2WInput) .map(trafo2wInput -> (Transformer2WInput) trafo2wInput) .collect(Collectors.toSet()); this.transformer3Ws = - rawGridElements.parallelStream() + rawGridElements + .parallelStream() .filter(gridElement -> gridElement instanceof Transformer3WInput) .map(trafo3wInput -> (Transformer3WInput) trafo3wInput) .collect(Collectors.toSet()); this.switches = - rawGridElements.parallelStream() + rawGridElements + .parallelStream() .filter(gridElement -> gridElement instanceof SwitchInput) .map(switchInput -> (SwitchInput) switchInput) .collect(Collectors.toSet()); this.measurementUnits = - rawGridElements.parallelStream() + rawGridElements + .parallelStream() .filter(gridElement -> gridElement instanceof MeasurementUnitInput) .map(measurementUnitInput -> (MeasurementUnitInput) measurementUnitInput) .collect(Collectors.toSet()); diff --git a/src/main/java/edu/ie3/datamodel/models/input/container/SystemParticipants.java b/src/main/java/edu/ie3/datamodel/models/input/container/SystemParticipants.java index 28550d86a..8a47b4995 100644 --- a/src/main/java/edu/ie3/datamodel/models/input/container/SystemParticipants.java +++ b/src/main/java/edu/ie3/datamodel/models/input/container/SystemParticipants.java @@ -106,52 +106,62 @@ public SystemParticipants(List systemParticipants) { /* init sets */ this.bmPlants = - systemParticipants.parallelStream() + systemParticipants + .parallelStream() .filter(gridElement -> gridElement instanceof BmInput) .map(bmInput -> (BmInput) bmInput) .collect(Collectors.toSet()); this.chpPlants = - systemParticipants.parallelStream() + systemParticipants + .parallelStream() .filter(gridElement -> gridElement instanceof ChpInput) .map(chpInput -> (ChpInput) chpInput) .collect(Collectors.toSet()); this.evCS = - systemParticipants.parallelStream() + systemParticipants + .parallelStream() .filter(gridElement -> gridElement instanceof EvcsInput) .map(evcsInput -> (EvcsInput) evcsInput) .collect(Collectors.toSet()); this.evs = - systemParticipants.parallelStream() + systemParticipants + .parallelStream() .filter(gridElement -> gridElement instanceof EvInput) .map(evInput -> (EvInput) evInput) .collect(Collectors.toSet()); this.fixedFeedIns = - systemParticipants.parallelStream() + systemParticipants + .parallelStream() .filter(gridElement -> gridElement instanceof FixedFeedInInput) .map(fixedFeedInInpu -> (FixedFeedInInput) fixedFeedInInpu) .collect(Collectors.toSet()); this.heatPumps = - systemParticipants.parallelStream() + systemParticipants + .parallelStream() .filter(gridElement -> gridElement instanceof HpInput) .map(hpInput -> (HpInput) hpInput) .collect(Collectors.toSet()); this.loads = - systemParticipants.parallelStream() + systemParticipants + .parallelStream() .filter(gridElement -> gridElement instanceof LoadInput) .map(loadInput -> (LoadInput) loadInput) .collect(Collectors.toSet()); this.pvPlants = - systemParticipants.parallelStream() + systemParticipants + .parallelStream() .filter(gridElement -> gridElement instanceof PvInput) .map(pvInput -> (PvInput) pvInput) .collect(Collectors.toSet()); this.storages = - systemParticipants.parallelStream() + systemParticipants + .parallelStream() .filter(gridElement -> gridElement instanceof StorageInput) .map(storageInput -> (StorageInput) storageInput) .collect(Collectors.toSet()); this.wecPlants = - systemParticipants.parallelStream() + systemParticipants + .parallelStream() .filter(gridElement -> gridElement instanceof WecInput) .map(wecInput -> (WecInput) wecInput) .collect(Collectors.toSet()); diff --git a/src/main/java/edu/ie3/datamodel/models/input/system/type/chargingpoint/ChargingPointTypeUtils.java b/src/main/java/edu/ie3/datamodel/models/input/system/type/chargingpoint/ChargingPointTypeUtils.java index e72de1aba..6825a3c0f 100644 --- a/src/main/java/edu/ie3/datamodel/models/input/system/type/chargingpoint/ChargingPointTypeUtils.java +++ b/src/main/java/edu/ie3/datamodel/models/input/system/type/chargingpoint/ChargingPointTypeUtils.java @@ -142,8 +142,7 @@ private ChargingPointTypeUtils() { Stream.concat( Stream.of(type.getId().toLowerCase()), type.getSynonymousIds().stream().map(String::toLowerCase)) - .collect(Collectors.toMap(Function.identity(), v -> type)) - .entrySet() + .collect(Collectors.toMap(Function.identity(), v -> type)).entrySet() .stream()) .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue))); diff --git a/src/main/java/edu/ie3/datamodel/utils/ContainerNodeUpdateUtil.java b/src/main/java/edu/ie3/datamodel/utils/ContainerNodeUpdateUtil.java index f641adccf..5286f78af 100644 --- a/src/main/java/edu/ie3/datamodel/utils/ContainerNodeUpdateUtil.java +++ b/src/main/java/edu/ie3/datamodel/utils/ContainerNodeUpdateUtil.java @@ -207,7 +207,9 @@ private static SystemParticipants updateSystemParticipantsWithNodes( SystemParticipants systemParticipants, Map oldToNewNodes) { List sysParts = - systemParticipants.allEntitiesAsList().parallelStream() + systemParticipants + .allEntitiesAsList() + .parallelStream() .map( sysPart -> { if (oldToNewNodes.containsKey(sysPart.getNode())) { From fd9f8296f544c65de7035d8d460720e0878e2ae3 Mon Sep 17 00:00:00 2001 From: vasilios Date: Tue, 29 Jun 2021 13:07:44 +0300 Subject: [PATCH 083/157] fix: applied spotless with java 8 (instead of 11) --- .../io/connectors/CsvFileConnector.java | 6 ++-- .../timeseries/TimeSeriesProcessor.java | 6 ++-- .../io/source/csv/CsvDataSource.java | 8 +++-- .../io/source/csv/CsvIdCoordinateSource.java | 2 +- .../io/source/csv/CsvWeatherSource.java | 2 +- .../input/container/GraphicElements.java | 6 ++-- .../input/container/RawGridElements.java | 18 +++++++---- .../input/container/SystemParticipants.java | 30 ++++++++++++------- .../chargingpoint/ChargingPointTypeUtils.java | 3 +- .../utils/ContainerNodeUpdateUtil.java | 4 ++- 10 files changed, 54 insertions(+), 31 deletions(-) diff --git a/src/main/java/edu/ie3/datamodel/io/connectors/CsvFileConnector.java b/src/main/java/edu/ie3/datamodel/io/connectors/CsvFileConnector.java index e35c376bd..e4bd141ae 100644 --- a/src/main/java/edu/ie3/datamodel/io/connectors/CsvFileConnector.java +++ b/src/main/java/edu/ie3/datamodel/io/connectors/CsvFileConnector.java @@ -204,7 +204,8 @@ public Optional getIndividualTimeSeriesMeta */ private Map buildIndividualTimeSeriesMetaInformation() { - return getIndividualTimeSeriesFilePaths().parallelStream() + return getIndividualTimeSeriesFilePaths() + .parallelStream() .map( filePath -> { /* Extract meta information from file path and enhance it with the file path itself */ @@ -229,7 +230,8 @@ public Optional getIndividualTimeSeriesMeta */ public Map> getCsvIndividualTimeSeriesMetaInformation(ColumnScheme... columnSchemes) { - return getIndividualTimeSeriesFilePaths().parallelStream() + return getIndividualTimeSeriesFilePaths() + .parallelStream() .map( pathString -> { String filePathWithoutEnding = removeFileEnding(pathString); diff --git a/src/main/java/edu/ie3/datamodel/io/processor/timeseries/TimeSeriesProcessor.java b/src/main/java/edu/ie3/datamodel/io/processor/timeseries/TimeSeriesProcessor.java index 0a2bf66b3..af29f3dca 100644 --- a/src/main/java/edu/ie3/datamodel/io/processor/timeseries/TimeSeriesProcessor.java +++ b/src/main/java/edu/ie3/datamodel/io/processor/timeseries/TimeSeriesProcessor.java @@ -106,8 +106,7 @@ private SortedMap buildFieldToSource( Class timeSeriesClass, Class entryClass, Class valueClass) { /* Get the mapping from field name to getter method ignoring the getter for returning all entries */ Map timeSeriesMapping = - mapFieldNameToGetter(timeSeriesClass, Arrays.asList("entries", "uuid", "type")) - .entrySet() + mapFieldNameToGetter(timeSeriesClass, Arrays.asList("entries", "uuid", "type")).entrySet() .stream() .collect( Collectors.toMap( @@ -137,8 +136,7 @@ private SortedMap buildFieldToSource( mapFieldNameToGetter( valueClass, Arrays.asList("solarIrradiance", "temperature", "wind")) - .entrySet() - .stream() + .entrySet().stream() .map( entry -> new AbstractMap.SimpleEntry<>( diff --git a/src/main/java/edu/ie3/datamodel/io/source/csv/CsvDataSource.java b/src/main/java/edu/ie3/datamodel/io/source/csv/CsvDataSource.java index 5f92ac097..a55451c2d 100644 --- a/src/main/java/edu/ie3/datamodel/io/source/csv/CsvDataSource.java +++ b/src/main/java/edu/ie3/datamodel/io/source/csv/CsvDataSource.java @@ -396,7 +396,10 @@ protected Stream> buildStreamWithFieldsToAttributesMap( Collection> allRows = csvRowFieldValueMapping(reader, headline); return distinctRowsWithLog( - allRows, fieldToValues -> fieldToValues.get("uuid"), entityClass.getSimpleName(), "UUID") + allRows, + fieldToValues -> fieldToValues.get("uuid"), + entityClass.getSimpleName(), + "UUID") .parallelStream(); } catch (IOException e) { log.warn( @@ -455,7 +458,8 @@ protected Set> distinctRowsWithLog( /* Check for rows with the same key based on the provided key extractor function */ Set> distinctIdSet = - allRowsSet.parallelStream() + allRowsSet + .parallelStream() .filter(ValidationUtils.distinctByKey(keyExtractor)) .collect(Collectors.toSet()); if (distinctIdSet.size() != allRowsSet.size()) { diff --git a/src/main/java/edu/ie3/datamodel/io/source/csv/CsvIdCoordinateSource.java b/src/main/java/edu/ie3/datamodel/io/source/csv/CsvIdCoordinateSource.java index 793ce7b43..a6b6dff9b 100644 --- a/src/main/java/edu/ie3/datamodel/io/source/csv/CsvIdCoordinateSource.java +++ b/src/main/java/edu/ie3/datamodel/io/source/csv/CsvIdCoordinateSource.java @@ -123,7 +123,7 @@ protected Stream> buildStreamWithFieldsToAttributesMap() { .get(factory.getLatField()) .concat(fieldToValues.get(factory.getLonField())); return distinctRowsWithLog( - withDistinctCoordinateId, coordinateExtractor, "coordinate id mapping", "coordinate") + withDistinctCoordinateId, coordinateExtractor, "coordinate id mapping", "coordinate") .parallelStream(); } catch (IOException e) { log.error("Cannot read the file for coordinate id to coordinate mapping.", e); diff --git a/src/main/java/edu/ie3/datamodel/io/source/csv/CsvWeatherSource.java b/src/main/java/edu/ie3/datamodel/io/source/csv/CsvWeatherSource.java index 95f543c16..30b152fa4 100644 --- a/src/main/java/edu/ie3/datamodel/io/source/csv/CsvWeatherSource.java +++ b/src/main/java/edu/ie3/datamodel/io/source/csv/CsvWeatherSource.java @@ -256,7 +256,7 @@ protected Stream> buildStreamWithFieldsToAttributesMap( .get(weatherFactory.getTimeFieldString()) .concat(fieldToValues.get(weatherFactory.getCoordinateIdFieldString())); return distinctRowsWithLog( - allRows, timeCoordinateIdExtractor, entityClass.getSimpleName(), "UUID") + allRows, timeCoordinateIdExtractor, entityClass.getSimpleName(), "UUID") .parallelStream(); } catch (IOException e) { diff --git a/src/main/java/edu/ie3/datamodel/models/input/container/GraphicElements.java b/src/main/java/edu/ie3/datamodel/models/input/container/GraphicElements.java index 60434f9a8..af0d4d9fd 100644 --- a/src/main/java/edu/ie3/datamodel/models/input/container/GraphicElements.java +++ b/src/main/java/edu/ie3/datamodel/models/input/container/GraphicElements.java @@ -48,12 +48,14 @@ public GraphicElements(List graphics) { /* init sets */ this.nodeGraphics = - graphics.parallelStream() + graphics + .parallelStream() .filter(graphic -> graphic instanceof NodeGraphicInput) .map(graphic -> (NodeGraphicInput) graphic) .collect(Collectors.toSet()); this.lineGraphics = - graphics.parallelStream() + graphics + .parallelStream() .filter(graphic -> graphic instanceof LineGraphicInput) .map(graphic -> (LineGraphicInput) graphic) .collect(Collectors.toSet()); diff --git a/src/main/java/edu/ie3/datamodel/models/input/container/RawGridElements.java b/src/main/java/edu/ie3/datamodel/models/input/container/RawGridElements.java index b8806a63d..4f0abc3e9 100644 --- a/src/main/java/edu/ie3/datamodel/models/input/container/RawGridElements.java +++ b/src/main/java/edu/ie3/datamodel/models/input/container/RawGridElements.java @@ -84,32 +84,38 @@ public RawGridElements(List rawGridElements) { /* init sets */ this.nodes = - rawGridElements.parallelStream() + rawGridElements + .parallelStream() .filter(gridElement -> gridElement instanceof NodeInput) .map(nodeInput -> (NodeInput) nodeInput) .collect(Collectors.toSet()); this.lines = - rawGridElements.parallelStream() + rawGridElements + .parallelStream() .filter(gridElement -> gridElement instanceof LineInput) .map(lineInput -> (LineInput) lineInput) .collect(Collectors.toSet()); this.transformer2Ws = - rawGridElements.parallelStream() + rawGridElements + .parallelStream() .filter(gridElement -> gridElement instanceof Transformer2WInput) .map(trafo2wInput -> (Transformer2WInput) trafo2wInput) .collect(Collectors.toSet()); this.transformer3Ws = - rawGridElements.parallelStream() + rawGridElements + .parallelStream() .filter(gridElement -> gridElement instanceof Transformer3WInput) .map(trafo3wInput -> (Transformer3WInput) trafo3wInput) .collect(Collectors.toSet()); this.switches = - rawGridElements.parallelStream() + rawGridElements + .parallelStream() .filter(gridElement -> gridElement instanceof SwitchInput) .map(switchInput -> (SwitchInput) switchInput) .collect(Collectors.toSet()); this.measurementUnits = - rawGridElements.parallelStream() + rawGridElements + .parallelStream() .filter(gridElement -> gridElement instanceof MeasurementUnitInput) .map(measurementUnitInput -> (MeasurementUnitInput) measurementUnitInput) .collect(Collectors.toSet()); diff --git a/src/main/java/edu/ie3/datamodel/models/input/container/SystemParticipants.java b/src/main/java/edu/ie3/datamodel/models/input/container/SystemParticipants.java index 28550d86a..8a47b4995 100644 --- a/src/main/java/edu/ie3/datamodel/models/input/container/SystemParticipants.java +++ b/src/main/java/edu/ie3/datamodel/models/input/container/SystemParticipants.java @@ -106,52 +106,62 @@ public SystemParticipants(List systemParticipants) { /* init sets */ this.bmPlants = - systemParticipants.parallelStream() + systemParticipants + .parallelStream() .filter(gridElement -> gridElement instanceof BmInput) .map(bmInput -> (BmInput) bmInput) .collect(Collectors.toSet()); this.chpPlants = - systemParticipants.parallelStream() + systemParticipants + .parallelStream() .filter(gridElement -> gridElement instanceof ChpInput) .map(chpInput -> (ChpInput) chpInput) .collect(Collectors.toSet()); this.evCS = - systemParticipants.parallelStream() + systemParticipants + .parallelStream() .filter(gridElement -> gridElement instanceof EvcsInput) .map(evcsInput -> (EvcsInput) evcsInput) .collect(Collectors.toSet()); this.evs = - systemParticipants.parallelStream() + systemParticipants + .parallelStream() .filter(gridElement -> gridElement instanceof EvInput) .map(evInput -> (EvInput) evInput) .collect(Collectors.toSet()); this.fixedFeedIns = - systemParticipants.parallelStream() + systemParticipants + .parallelStream() .filter(gridElement -> gridElement instanceof FixedFeedInInput) .map(fixedFeedInInpu -> (FixedFeedInInput) fixedFeedInInpu) .collect(Collectors.toSet()); this.heatPumps = - systemParticipants.parallelStream() + systemParticipants + .parallelStream() .filter(gridElement -> gridElement instanceof HpInput) .map(hpInput -> (HpInput) hpInput) .collect(Collectors.toSet()); this.loads = - systemParticipants.parallelStream() + systemParticipants + .parallelStream() .filter(gridElement -> gridElement instanceof LoadInput) .map(loadInput -> (LoadInput) loadInput) .collect(Collectors.toSet()); this.pvPlants = - systemParticipants.parallelStream() + systemParticipants + .parallelStream() .filter(gridElement -> gridElement instanceof PvInput) .map(pvInput -> (PvInput) pvInput) .collect(Collectors.toSet()); this.storages = - systemParticipants.parallelStream() + systemParticipants + .parallelStream() .filter(gridElement -> gridElement instanceof StorageInput) .map(storageInput -> (StorageInput) storageInput) .collect(Collectors.toSet()); this.wecPlants = - systemParticipants.parallelStream() + systemParticipants + .parallelStream() .filter(gridElement -> gridElement instanceof WecInput) .map(wecInput -> (WecInput) wecInput) .collect(Collectors.toSet()); diff --git a/src/main/java/edu/ie3/datamodel/models/input/system/type/chargingpoint/ChargingPointTypeUtils.java b/src/main/java/edu/ie3/datamodel/models/input/system/type/chargingpoint/ChargingPointTypeUtils.java index e72de1aba..6825a3c0f 100644 --- a/src/main/java/edu/ie3/datamodel/models/input/system/type/chargingpoint/ChargingPointTypeUtils.java +++ b/src/main/java/edu/ie3/datamodel/models/input/system/type/chargingpoint/ChargingPointTypeUtils.java @@ -142,8 +142,7 @@ private ChargingPointTypeUtils() { Stream.concat( Stream.of(type.getId().toLowerCase()), type.getSynonymousIds().stream().map(String::toLowerCase)) - .collect(Collectors.toMap(Function.identity(), v -> type)) - .entrySet() + .collect(Collectors.toMap(Function.identity(), v -> type)).entrySet() .stream()) .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue))); diff --git a/src/main/java/edu/ie3/datamodel/utils/ContainerNodeUpdateUtil.java b/src/main/java/edu/ie3/datamodel/utils/ContainerNodeUpdateUtil.java index f641adccf..5286f78af 100644 --- a/src/main/java/edu/ie3/datamodel/utils/ContainerNodeUpdateUtil.java +++ b/src/main/java/edu/ie3/datamodel/utils/ContainerNodeUpdateUtil.java @@ -207,7 +207,9 @@ private static SystemParticipants updateSystemParticipantsWithNodes( SystemParticipants systemParticipants, Map oldToNewNodes) { List sysParts = - systemParticipants.allEntitiesAsList().parallelStream() + systemParticipants + .allEntitiesAsList() + .parallelStream() .map( sysPart -> { if (oldToNewNodes.containsKey(sysPart.getNode())) { From 06bc738cdeb2ce9a2b8d847fbcfe61d0238c7ea1 Mon Sep 17 00:00:00 2001 From: vasilios Date: Tue, 29 Jun 2021 13:19:44 +0300 Subject: [PATCH 084/157] fix: further formatting fixes (Codacy + Jenkins) --- .../io/source/csv/CsvDataSource.java | 6 ++-- .../InfluxDbWeatherSourcePsdmIT.groovy | 34 +++++++++---------- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/src/main/java/edu/ie3/datamodel/io/source/csv/CsvDataSource.java b/src/main/java/edu/ie3/datamodel/io/source/csv/CsvDataSource.java index a55451c2d..b9b520b84 100644 --- a/src/main/java/edu/ie3/datamodel/io/source/csv/CsvDataSource.java +++ b/src/main/java/edu/ie3/datamodel/io/source/csv/CsvDataSource.java @@ -626,9 +626,9 @@ protected Stream> nodeAssetEntityStream( /** * TODO JH * - * @param entityClass - * @param - * @return + * @param entityClass the entity class that should be build + * @param Type of the {@link ResultEntity} to expect + * @return stream of {@link SimpleEntityData} */ protected Stream simpleEntityDataStream( Class entityClass) { diff --git a/src/test/groovy/edu/ie3/datamodel/io/source/influxdb/InfluxDbWeatherSourcePsdmIT.groovy b/src/test/groovy/edu/ie3/datamodel/io/source/influxdb/InfluxDbWeatherSourcePsdmIT.groovy index a1fc8d216..ddf83fee4 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/source/influxdb/InfluxDbWeatherSourcePsdmIT.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/source/influxdb/InfluxDbWeatherSourcePsdmIT.groovy @@ -57,9 +57,9 @@ class InfluxDbWeatherSourcePsdmIT extends Specification implements WeatherSource def "An InfluxDbWeatherSource can read and correctly parse a single value for a specific date and coordinate"() { given: - def expectedTimeBasedValue = new TimeBasedValue(PsdmWeatherTestData.TIME_15H , PsdmWeatherTestData.WEATHER_VALUE_193186_15H) + def expectedTimeBasedValue = new TimeBasedValue(PsdmWeatherTestData.TIME_15H, PsdmWeatherTestData.WEATHER_VALUE_193186_15H) when: - def optTimeBasedValue = source.getWeather(PsdmWeatherTestData.TIME_15H , PsdmWeatherTestData.COORDINATE_193186) + def optTimeBasedValue = source.getWeather(PsdmWeatherTestData.TIME_15H, PsdmWeatherTestData.COORDINATE_193186) then: optTimeBasedValue.present equalsIgnoreUUID(optTimeBasedValue.get(), expectedTimeBasedValue) @@ -71,16 +71,16 @@ class InfluxDbWeatherSourcePsdmIT extends Specification implements WeatherSource PsdmWeatherTestData.COORDINATE_193186, PsdmWeatherTestData.COORDINATE_193187 ] - def timeInterval = new ClosedInterval(PsdmWeatherTestData.TIME_16H , PsdmWeatherTestData.TIME_17H) + def timeInterval = new ClosedInterval(PsdmWeatherTestData.TIME_16H, PsdmWeatherTestData.TIME_17H) def timeseries_193186 = new IndividualTimeSeries(null, [ - new TimeBasedValue(PsdmWeatherTestData.TIME_16H , PsdmWeatherTestData.WEATHER_VALUE_193186_16H), - new TimeBasedValue(PsdmWeatherTestData.TIME_17H , PsdmWeatherTestData.WEATHER_VALUE_193186_17H) + new TimeBasedValue(PsdmWeatherTestData.TIME_16H, PsdmWeatherTestData.WEATHER_VALUE_193186_16H), + new TimeBasedValue(PsdmWeatherTestData.TIME_17H, PsdmWeatherTestData.WEATHER_VALUE_193186_17H) ] as Set) def timeseries_193187 = new IndividualTimeSeries(null, [ - new TimeBasedValue(PsdmWeatherTestData.TIME_16H , PsdmWeatherTestData.WEATHER_VALUE_193187_16H) + new TimeBasedValue(PsdmWeatherTestData.TIME_16H, PsdmWeatherTestData.WEATHER_VALUE_193187_16H) ] as Set) when: Map> coordinateToTimeSeries = source.getWeather(timeInterval, coordinates) @@ -92,21 +92,21 @@ class InfluxDbWeatherSourcePsdmIT extends Specification implements WeatherSource def "An InfluxDbWeatherSource can read all weather data in a given time interval"() { given: - def timeInterval = new ClosedInterval(PsdmWeatherTestData.TIME_15H , PsdmWeatherTestData.TIME_17H) + def timeInterval = new ClosedInterval(PsdmWeatherTestData.TIME_15H, PsdmWeatherTestData.TIME_17H) def timeseries_193186 = new IndividualTimeSeries(null, [ - new TimeBasedValue(PsdmWeatherTestData.TIME_15H ,PsdmWeatherTestData.WEATHER_VALUE_193186_15H), - new TimeBasedValue(PsdmWeatherTestData.TIME_16H ,PsdmWeatherTestData.WEATHER_VALUE_193186_16H), - new TimeBasedValue(PsdmWeatherTestData.TIME_17H ,PsdmWeatherTestData.WEATHER_VALUE_193186_17H) + new TimeBasedValue(PsdmWeatherTestData.TIME_15H, PsdmWeatherTestData.WEATHER_VALUE_193186_15H), + new TimeBasedValue(PsdmWeatherTestData.TIME_16H, PsdmWeatherTestData.WEATHER_VALUE_193186_16H), + new TimeBasedValue(PsdmWeatherTestData.TIME_17H, PsdmWeatherTestData.WEATHER_VALUE_193186_17H) ] as Set) def timeseries_193187 = new IndividualTimeSeries(null, [ - new TimeBasedValue(PsdmWeatherTestData.TIME_15H ,PsdmWeatherTestData.WEATHER_VALUE_193187_15H), - new TimeBasedValue(PsdmWeatherTestData.TIME_16H ,PsdmWeatherTestData.WEATHER_VALUE_193187_16H) + new TimeBasedValue(PsdmWeatherTestData.TIME_15H, PsdmWeatherTestData.WEATHER_VALUE_193187_15H), + new TimeBasedValue(PsdmWeatherTestData.TIME_16H, PsdmWeatherTestData.WEATHER_VALUE_193187_16H) ] as Set) def timeseries_193188 = new IndividualTimeSeries(null, [ - new TimeBasedValue(PsdmWeatherTestData.TIME_15H ,PsdmWeatherTestData.WEATHER_VALUE_193188_15H) + new TimeBasedValue(PsdmWeatherTestData.TIME_15H, PsdmWeatherTestData.WEATHER_VALUE_193188_15H) ] as Set) when: Map> coordinateToTimeSeries = source.getWeather(timeInterval) @@ -121,13 +121,13 @@ class InfluxDbWeatherSourcePsdmIT extends Specification implements WeatherSource def validCoordinate = PsdmWeatherTestData.COORDINATE_193186 def invalidCoordinate = GeoUtils.xyToPoint(48d, 7d) def time = PsdmWeatherTestData.TIME_15H - def timeInterval = new ClosedInterval(PsdmWeatherTestData.TIME_15H , PsdmWeatherTestData.TIME_17H) + def timeInterval = new ClosedInterval(PsdmWeatherTestData.TIME_15H, PsdmWeatherTestData.TIME_17H) def emptyTimeSeries = new IndividualTimeSeries(UUID.randomUUID(), Collections.emptySet()) def timeseries_193186 = new IndividualTimeSeries(null, [ - new TimeBasedValue(PsdmWeatherTestData.TIME_15H ,PsdmWeatherTestData.WEATHER_VALUE_193186_15H), - new TimeBasedValue(PsdmWeatherTestData.TIME_16H ,PsdmWeatherTestData.WEATHER_VALUE_193186_16H), - new TimeBasedValue(PsdmWeatherTestData.TIME_17H ,PsdmWeatherTestData.WEATHER_VALUE_193186_17H) + new TimeBasedValue(PsdmWeatherTestData.TIME_15H, PsdmWeatherTestData.WEATHER_VALUE_193186_15H), + new TimeBasedValue(PsdmWeatherTestData.TIME_16H, PsdmWeatherTestData.WEATHER_VALUE_193186_16H), + new TimeBasedValue(PsdmWeatherTestData.TIME_17H, PsdmWeatherTestData.WEATHER_VALUE_193186_17H) ] as Set) when: def coordinateAtDate = source.getWeather(time, invalidCoordinate) From 42586608fcca1963c57918edd651499808eebd22 Mon Sep 17 00:00:00 2001 From: vasilios Date: Tue, 29 Jun 2021 16:14:58 +0300 Subject: [PATCH 085/157] docs: removed TODO and added java-doc --- .../java/edu/ie3/datamodel/io/source/csv/CsvDataSource.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/edu/ie3/datamodel/io/source/csv/CsvDataSource.java b/src/main/java/edu/ie3/datamodel/io/source/csv/CsvDataSource.java index b9b520b84..6ca1d8b3d 100644 --- a/src/main/java/edu/ie3/datamodel/io/source/csv/CsvDataSource.java +++ b/src/main/java/edu/ie3/datamodel/io/source/csv/CsvDataSource.java @@ -624,7 +624,9 @@ protected Stream> nodeAssetEntityStream( } /** - * TODO JH + * + * Returns a stream of {@link SimpleEntityData} for result entity classes, using + * a fields-to-attributes map. * * @param entityClass the entity class that should be build * @param Type of the {@link ResultEntity} to expect From 755c55ad4cdc1633d57e11a97c4b6d737f3183b9 Mon Sep 17 00:00:00 2001 From: vasilios Date: Tue, 29 Jun 2021 16:15:34 +0300 Subject: [PATCH 086/157] fmt --- .../java/edu/ie3/datamodel/io/source/csv/CsvDataSource.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/main/java/edu/ie3/datamodel/io/source/csv/CsvDataSource.java b/src/main/java/edu/ie3/datamodel/io/source/csv/CsvDataSource.java index 6ca1d8b3d..745f60fb5 100644 --- a/src/main/java/edu/ie3/datamodel/io/source/csv/CsvDataSource.java +++ b/src/main/java/edu/ie3/datamodel/io/source/csv/CsvDataSource.java @@ -624,9 +624,8 @@ protected Stream> nodeAssetEntityStream( } /** - * - * Returns a stream of {@link SimpleEntityData} for result entity classes, using - * a fields-to-attributes map. + * Returns a stream of {@link SimpleEntityData} for result entity classes, using a + * fields-to-attributes map. * * @param entityClass the entity class that should be build * @param Type of the {@link ResultEntity} to expect From 2b8ca4eeb6bcfe300868c0a0770254f9da56f4d8 Mon Sep 17 00:00:00 2001 From: vasilios Date: Tue, 29 Jun 2021 16:45:00 +0300 Subject: [PATCH 087/157] test: added more .csv files to test methods for greater coverage --- .../csv/CsvResultEntitySourceTest.groovy | 21 ++++++++++++++----- .../test/common/ResultEntityTestData.groovy | 1 + .../testGridFiles/results/chp_res.csv | 1 + .../testGridFiles/results/ev_res.csv | 1 + .../testGridFiles/results/evcs_res.csv | 1 + .../results/fixed_feed_in_res.csv | 2 ++ .../testGridFiles/results/hp_res.csv | 1 + .../testGridFiles/results/load_res.csv | 1 + .../testGridFiles/results/storage_res.csv | 1 + .../results/thermal_house_res.csv | 1 + 10 files changed, 26 insertions(+), 5 deletions(-) create mode 100644 src/test/resources/testGridFiles/results/chp_res.csv create mode 100644 src/test/resources/testGridFiles/results/ev_res.csv create mode 100644 src/test/resources/testGridFiles/results/evcs_res.csv create mode 100644 src/test/resources/testGridFiles/results/fixed_feed_in_res.csv create mode 100644 src/test/resources/testGridFiles/results/hp_res.csv create mode 100644 src/test/resources/testGridFiles/results/load_res.csv create mode 100644 src/test/resources/testGridFiles/results/storage_res.csv create mode 100644 src/test/resources/testGridFiles/results/thermal_house_res.csv diff --git a/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvResultEntitySourceTest.groovy b/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvResultEntitySourceTest.groovy index 8354a5037..650f2f235 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvResultEntitySourceTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvResultEntitySourceTest.groovy @@ -17,16 +17,27 @@ class CsvResultEntitySourceTest extends Specification implements CsvTestDataMeta resultEntitiesFolderPath, entityPersistenceNamingStrategy) when: - def wecResults = csvResultEntitySource.wecResults // existent - def pvResults = csvResultEntitySource.pvResults // existent - def bmResults = csvResultEntitySource.bmResults // existent - def chpResults = csvResultEntitySource.chpResults // non-existent + // existent + def wecResults = csvResultEntitySource.wecResults + def pvResults = csvResultEntitySource.pvResults + def bmResults = csvResultEntitySource.bmResults + def fixedFeedInResults = csvResultEntitySource.fixedFeedInResults + // non-existent (empty) + def chpResults = csvResultEntitySource.chpResults + def hpResults = csvResultEntitySource.hpResults + def evResults = csvResultEntitySource.evResults + def evcsResults = csvResultEntitySource.evcsResults + def loadResults = csvResultEntitySource.loadResults + def storageResults = csvResultEntitySource.storageResults + def thermalHouseResults = csvResultEntitySource.thermalHouseResults then: wecResults.size() == retd.WEC_RESULT_SIZE pvResults.size() == retd.PV_RESULT_SIZE bmResults.size() == retd.BM_RESULT_SIZE - chpResults.empty + fixedFeedInResults.size() == retd.FIXED_FEED_IN_SIZE + chpResults.empty && hpResults.empty && evResults.empty && evcsResults.empty && + loadResults.empty && storageResults.empty && thermalHouseResults.empty bmResults.first().uuid == retd.BM_UUID bmResults.first().inputModel == retd.BM_INPUT_MODEL diff --git a/src/test/groovy/edu/ie3/test/common/ResultEntityTestData.groovy b/src/test/groovy/edu/ie3/test/common/ResultEntityTestData.groovy index c282dca90..552418dea 100644 --- a/src/test/groovy/edu/ie3/test/common/ResultEntityTestData.groovy +++ b/src/test/groovy/edu/ie3/test/common/ResultEntityTestData.groovy @@ -18,6 +18,7 @@ class ResultEntityTestData { public static final int WEC_RESULT_SIZE = 1000 public static final int PV_RESULT_SIZE = 1000 public static final int BM_RESULT_SIZE = 1 + public static final int FIXED_FEED_IN_SIZE = 1 public static final UUID BM_UUID = UUID.fromString("44b9be7a-af97-4c2a-bb84-9d21abba442f") public static final UUID BM_INPUT_MODEL = UUID.fromString("66df67d0-c789-4393-b0a5-897a3bc821a2") diff --git a/src/test/resources/testGridFiles/results/chp_res.csv b/src/test/resources/testGridFiles/results/chp_res.csv new file mode 100644 index 000000000..6ca248260 --- /dev/null +++ b/src/test/resources/testGridFiles/results/chp_res.csv @@ -0,0 +1 @@ +uuid,inputModel,p,q,qDot,time \ No newline at end of file diff --git a/src/test/resources/testGridFiles/results/ev_res.csv b/src/test/resources/testGridFiles/results/ev_res.csv new file mode 100644 index 000000000..b0fd2afb1 --- /dev/null +++ b/src/test/resources/testGridFiles/results/ev_res.csv @@ -0,0 +1 @@ +uuid,inputModel,p,q,soc,time \ No newline at end of file diff --git a/src/test/resources/testGridFiles/results/evcs_res.csv b/src/test/resources/testGridFiles/results/evcs_res.csv new file mode 100644 index 000000000..f7875f4b5 --- /dev/null +++ b/src/test/resources/testGridFiles/results/evcs_res.csv @@ -0,0 +1 @@ +uuid,inputModel,p,q,time \ No newline at end of file diff --git a/src/test/resources/testGridFiles/results/fixed_feed_in_res.csv b/src/test/resources/testGridFiles/results/fixed_feed_in_res.csv new file mode 100644 index 000000000..a4259a477 --- /dev/null +++ b/src/test/resources/testGridFiles/results/fixed_feed_in_res.csv @@ -0,0 +1,2 @@ +uuid,inputModel,p,q,time +378069cf-3e8d-496f-b4ed-920023b4f99a,9abe950d-362e-4efe-b686-500f84d8f368,-0.18,-0.059163138932195374,2011-01-01 00:00:00 \ No newline at end of file diff --git a/src/test/resources/testGridFiles/results/hp_res.csv b/src/test/resources/testGridFiles/results/hp_res.csv new file mode 100644 index 000000000..6ca248260 --- /dev/null +++ b/src/test/resources/testGridFiles/results/hp_res.csv @@ -0,0 +1 @@ +uuid,inputModel,p,q,qDot,time \ No newline at end of file diff --git a/src/test/resources/testGridFiles/results/load_res.csv b/src/test/resources/testGridFiles/results/load_res.csv new file mode 100644 index 000000000..f7875f4b5 --- /dev/null +++ b/src/test/resources/testGridFiles/results/load_res.csv @@ -0,0 +1 @@ +uuid,inputModel,p,q,time \ No newline at end of file diff --git a/src/test/resources/testGridFiles/results/storage_res.csv b/src/test/resources/testGridFiles/results/storage_res.csv new file mode 100644 index 000000000..1d148dbd7 --- /dev/null +++ b/src/test/resources/testGridFiles/results/storage_res.csv @@ -0,0 +1 @@ +uid,inputModel,p,q,soc,time \ No newline at end of file diff --git a/src/test/resources/testGridFiles/results/thermal_house_res.csv b/src/test/resources/testGridFiles/results/thermal_house_res.csv new file mode 100644 index 000000000..19d5398ac --- /dev/null +++ b/src/test/resources/testGridFiles/results/thermal_house_res.csv @@ -0,0 +1 @@ +uuid,inputModel,qDot,indoorTemperature \ No newline at end of file From ed13ac7bbba67b95455bc4a1ecfa3ab2a141524b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 5 Jul 2021 04:18:02 +0000 Subject: [PATCH 088/157] Bump de.undercouch.download from 4.1.1 to 4.1.2 Bumps de.undercouch.download from 4.1.1 to 4.1.2. --- updated-dependencies: - dependency-name: de.undercouch.download dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index e83065f22..4963dd727 100644 --- a/build.gradle +++ b/build.gradle @@ -7,7 +7,7 @@ plugins { id 'com.diffplug.spotless' version '5.14.0'//code format id 'com.github.spotbugs' version '4.7.1' // code check, working on byte code id 'com.github.onslip.gradle-one-jar' version '1.0.6' // pack a self contained jar - id 'de.undercouch.download' version '4.1.1' + id 'de.undercouch.download' version '4.1.2' id 'kr.motd.sphinx' version '2.10.1' // documentation generation id 'jacoco' // java code coverage plugin id "org.sonarqube" version "3.3" // sonarqube From b49fc134982c562f60343d58ecc6251c87195c44 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 7 Jul 2021 04:15:24 +0000 Subject: [PATCH 089/157] Bump postgresql from 42.2.22 to 42.2.23 Bumps [postgresql](https://github.com/pgjdbc/pgjdbc) from 42.2.22 to 42.2.23. - [Release notes](https://github.com/pgjdbc/pgjdbc/releases) - [Changelog](https://github.com/pgjdbc/pgjdbc/blob/REL42.2.23/CHANGELOG.md) - [Commits](https://github.com/pgjdbc/pgjdbc/compare/REL42.2.22...REL42.2.23) --- updated-dependencies: - dependency-name: org.postgresql:postgresql dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 4963dd727..752191295 100644 --- a/build.gradle +++ b/build.gradle @@ -83,7 +83,7 @@ dependencies { // Databases compile 'org.influxdb:influxdb-java:2.21' compile 'com.couchbase.client:java-client:3.1.6' - runtimeOnly 'org.postgresql:postgresql:42.2.22' // postgresql jdbc driver required during runtime + runtimeOnly 'org.postgresql:postgresql:42.2.23' // postgresql jdbc driver required during runtime compile 'commons-io:commons-io:2.10.0' // I/O functionalities From a8aff203cd79071d51d969bb2d7e98d38fb69b51 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 9 Jul 2021 04:13:54 +0000 Subject: [PATCH 090/157] Bump com.github.spotbugs from 4.7.1 to 4.7.2 Bumps com.github.spotbugs from 4.7.1 to 4.7.2. --- updated-dependencies: - dependency-name: com.github.spotbugs dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 4963dd727..85b984c59 100644 --- a/build.gradle +++ b/build.gradle @@ -5,7 +5,7 @@ plugins { id 'signing' id 'pmd' // code check, working on source code id 'com.diffplug.spotless' version '5.14.0'//code format - id 'com.github.spotbugs' version '4.7.1' // code check, working on byte code + id 'com.github.spotbugs' version '4.7.2' // code check, working on byte code id 'com.github.onslip.gradle-one-jar' version '1.0.6' // pack a self contained jar id 'de.undercouch.download' version '4.1.2' id 'kr.motd.sphinx' version '2.10.1' // documentation generation From a1d3d1368c934f894d49c7de1a41a8c7011059a0 Mon Sep 17 00:00:00 2001 From: "Kittl, Chris" Date: Fri, 9 Jul 2021 12:49:46 +0200 Subject: [PATCH 091/157] Allowing customized date time formatting patterns when reading results --- .../result/ConnectorResultFactory.java | 12 +++++++++- .../io/factory/result/NodeResultFactory.java | 12 +++++++++- .../factory/result/ResultEntityFactory.java | 10 +++++++- .../factory/result/SwitchResultFactory.java | 12 +++++++++- .../SystemParticipantResultFactory.java | 23 ++++++++++++++++++- .../factory/result/ThermalResultFactory.java | 12 +++++++++- 6 files changed, 75 insertions(+), 6 deletions(-) diff --git a/src/main/java/edu/ie3/datamodel/io/factory/result/ConnectorResultFactory.java b/src/main/java/edu/ie3/datamodel/io/factory/result/ConnectorResultFactory.java index b3f516379..9444350ab 100644 --- a/src/main/java/edu/ie3/datamodel/io/factory/result/ConnectorResultFactory.java +++ b/src/main/java/edu/ie3/datamodel/io/factory/result/ConnectorResultFactory.java @@ -33,6 +33,16 @@ public ConnectorResultFactory() { super(LineResult.class, Transformer2WResult.class, Transformer3WResult.class); } + /** + * Create a new factory to build {@link ConnectorResult}s and utilize the given date time + * formatter pattern to parse date time strings + * + * @param dtfPattern Pattern to parse date time strings + */ + public ConnectorResultFactory(String dtfPattern) { + super(dtfPattern, LineResult.class, Transformer2WResult.class, Transformer3WResult.class); + } + @Override protected List> getFields(SimpleEntityData simpleEntityData) { /// all result models have the same constructor except StorageResult @@ -55,7 +65,7 @@ protected List> getFields(SimpleEntityData simpleEntityData) { @Override protected ConnectorResult buildModel(SimpleEntityData data) { final Class entityClass = data.getTargetClass(); - ZonedDateTime time = TIME_UTIL.toZonedDateTime(data.getField(TIME)); + ZonedDateTime time = timeUtil.toZonedDateTime(data.getField(TIME)); UUID inputModel = data.getUUID(INPUT_MODEL); ComparableQuantity iAMag = diff --git a/src/main/java/edu/ie3/datamodel/io/factory/result/NodeResultFactory.java b/src/main/java/edu/ie3/datamodel/io/factory/result/NodeResultFactory.java index 809874cc9..9f4a9b016 100644 --- a/src/main/java/edu/ie3/datamodel/io/factory/result/NodeResultFactory.java +++ b/src/main/java/edu/ie3/datamodel/io/factory/result/NodeResultFactory.java @@ -22,6 +22,16 @@ public NodeResultFactory() { super(NodeResult.class); } + /** + * Create a new factory to build {@link NodeResult}s and utilize the given date time formatter + * pattern to parse date time strings + * + * @param dtfPattern Pattern to parse date time strings + */ + public NodeResultFactory(String dtfPattern) { + super(dtfPattern, NodeResult.class); + } + @Override protected List> getFields(SimpleEntityData entityData) { Set minConstructorParams = newSet(TIME, INPUT_MODEL, VMAG, VANG); @@ -32,7 +42,7 @@ protected List> getFields(SimpleEntityData entityData) { @Override protected NodeResult buildModel(SimpleEntityData data) { - ZonedDateTime zdtTime = TIME_UTIL.toZonedDateTime(data.getField(TIME)); + ZonedDateTime zdtTime = timeUtil.toZonedDateTime(data.getField(TIME)); UUID inputModelUuid = data.getUUID(INPUT_MODEL); ComparableQuantity vMagValue = data.getQuantity(VMAG, StandardUnits.VOLTAGE_MAGNITUDE); diff --git a/src/main/java/edu/ie3/datamodel/io/factory/result/ResultEntityFactory.java b/src/main/java/edu/ie3/datamodel/io/factory/result/ResultEntityFactory.java index fb3a9e9a1..9af9e2501 100644 --- a/src/main/java/edu/ie3/datamodel/io/factory/result/ResultEntityFactory.java +++ b/src/main/java/edu/ie3/datamodel/io/factory/result/ResultEntityFactory.java @@ -8,6 +8,8 @@ import edu.ie3.datamodel.io.factory.SimpleEntityFactory; import edu.ie3.datamodel.models.result.ResultEntity; import edu.ie3.util.TimeUtil; +import java.time.ZoneId; +import java.util.Locale; /** * Internal API for building {@link ResultEntity}s. This additional abstraction layer is necessary @@ -22,9 +24,15 @@ abstract class ResultEntityFactory extends SimpleEntityF protected static final String TIME = "time"; protected static final String INPUT_MODEL = "inputModel"; - protected static final TimeUtil TIME_UTIL = TimeUtil.withDefaults; + protected final TimeUtil timeUtil; public ResultEntityFactory(Class... allowedClasses) { super(allowedClasses); + timeUtil = TimeUtil.withDefaults; + } + + public ResultEntityFactory(String dtfPattern, Class... allowedClasses) { + super(allowedClasses); + timeUtil = new TimeUtil(ZoneId.of("UTC"), Locale.GERMANY, dtfPattern); } } diff --git a/src/main/java/edu/ie3/datamodel/io/factory/result/SwitchResultFactory.java b/src/main/java/edu/ie3/datamodel/io/factory/result/SwitchResultFactory.java index 262fc1f40..df24fe8ab 100644 --- a/src/main/java/edu/ie3/datamodel/io/factory/result/SwitchResultFactory.java +++ b/src/main/java/edu/ie3/datamodel/io/factory/result/SwitchResultFactory.java @@ -18,6 +18,16 @@ public SwitchResultFactory() { super(SwitchResult.class); } + /** + * Create a new factory to build {@link SwitchResult}s and utilize the given date time formatter + * pattern to parse date time strings + * + * @param dtfPattern Pattern to parse date time strings + */ + public SwitchResultFactory(String dtfPattern) { + super(dtfPattern, SwitchResult.class); + } + @Override protected List> getFields(SimpleEntityData data) { @@ -31,7 +41,7 @@ protected List> getFields(SimpleEntityData data) { protected SwitchResult buildModel(SimpleEntityData data) { Optional uuidOpt = data.containsKey(ENTITY_UUID) ? Optional.of(data.getUUID(ENTITY_UUID)) : Optional.empty(); - ZonedDateTime time = TIME_UTIL.toZonedDateTime(data.getField(TIME)); + ZonedDateTime time = timeUtil.toZonedDateTime(data.getField(TIME)); UUID inputModel = data.getUUID(INPUT_MODEL); final boolean closed = data.getBoolean(CLOSED); diff --git a/src/main/java/edu/ie3/datamodel/io/factory/result/SystemParticipantResultFactory.java b/src/main/java/edu/ie3/datamodel/io/factory/result/SystemParticipantResultFactory.java index 842476ea6..9f04ae217 100644 --- a/src/main/java/edu/ie3/datamodel/io/factory/result/SystemParticipantResultFactory.java +++ b/src/main/java/edu/ie3/datamodel/io/factory/result/SystemParticipantResultFactory.java @@ -43,6 +43,27 @@ public SystemParticipantResultFactory() { HpResult.class); } + /** + * Create a new factory to build {@link SystemParticipantResult}s and utilize the given date time + * formatter pattern to parse date time strings + * + * @param dtfPattern Pattern to parse date time strings + */ + public SystemParticipantResultFactory(String dtfPattern) { + super( + dtfPattern, + LoadResult.class, + FixedFeedInResult.class, + BmResult.class, + PvResult.class, + ChpResult.class, + WecResult.class, + StorageResult.class, + EvcsResult.class, + EvResult.class, + HpResult.class); + } + @Override protected List> getFields(SimpleEntityData data) { /// all result models have the same constructor except StorageResult @@ -67,7 +88,7 @@ protected List> getFields(SimpleEntityData data) { protected SystemParticipantResult buildModel(SimpleEntityData data) { Class entityClass = data.getTargetClass(); - ZonedDateTime zdtTime = TIME_UTIL.toZonedDateTime(data.getField(TIME)); + ZonedDateTime zdtTime = timeUtil.toZonedDateTime(data.getField(TIME)); UUID inputModelUuid = data.getUUID(INPUT_MODEL); ComparableQuantity p = data.getQuantity(POWER, StandardUnits.ACTIVE_POWER_RESULT); ComparableQuantity q = diff --git a/src/main/java/edu/ie3/datamodel/io/factory/result/ThermalResultFactory.java b/src/main/java/edu/ie3/datamodel/io/factory/result/ThermalResultFactory.java index 72d9436f2..2d3e2c77c 100644 --- a/src/main/java/edu/ie3/datamodel/io/factory/result/ThermalResultFactory.java +++ b/src/main/java/edu/ie3/datamodel/io/factory/result/ThermalResultFactory.java @@ -30,6 +30,16 @@ public ThermalResultFactory() { super(ThermalHouseResult.class, CylindricalStorageResult.class); } + /** + * Create a new factory to build {@link ThermalResultFactory}s and utilize the given date time + * formatter pattern to parse date time strings + * + * @param dtfPattern Pattern to parse date time strings + */ + public ThermalResultFactory(String dtfPattern) { + super(dtfPattern, ThermalHouseResult.class, CylindricalStorageResult.class); + } + @Override protected List> getFields(SimpleEntityData simpleEntityData) { Set minConstructorParams = newSet(TIME, INPUT_MODEL, Q_DOT); @@ -48,7 +58,7 @@ protected List> getFields(SimpleEntityData simpleEntityData) { protected ThermalUnitResult buildModel(SimpleEntityData data) { Class clazz = data.getTargetClass(); - ZonedDateTime zdtTime = TIME_UTIL.toZonedDateTime(data.getField(TIME)); + ZonedDateTime zdtTime = timeUtil.toZonedDateTime(data.getField(TIME)); UUID inputModelUuid = data.getUUID(INPUT_MODEL); ComparableQuantity qDotQuantity = data.getQuantity(Q_DOT, StandardUnits.HEAT_DEMAND); Optional uuidOpt = From b880d9d1a3c58947203655da7e91a49c378e4bb0 Mon Sep 17 00:00:00 2001 From: "Kittl, Chris" Date: Fri, 9 Jul 2021 13:13:32 +0200 Subject: [PATCH 092/157] Formatting --- .../ie3/datamodel/io/naming/EntityPersistenceNamingStrategy.java | 1 - 1 file changed, 1 deletion(-) diff --git a/src/main/java/edu/ie3/datamodel/io/naming/EntityPersistenceNamingStrategy.java b/src/main/java/edu/ie3/datamodel/io/naming/EntityPersistenceNamingStrategy.java index ac227de55..785164352 100644 --- a/src/main/java/edu/ie3/datamodel/io/naming/EntityPersistenceNamingStrategy.java +++ b/src/main/java/edu/ie3/datamodel/io/naming/EntityPersistenceNamingStrategy.java @@ -20,7 +20,6 @@ import edu.ie3.util.StringUtils; import java.util.Optional; import java.util.regex.Pattern; -import org.apache.commons.io.FilenameUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; From a651bd1254f7f5e5d04a934b6fc17f4f7ba5ebd1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 9 Jul 2021 11:48:22 +0000 Subject: [PATCH 093/157] Bump com.diffplug.spotless from 5.14.0 to 5.14.1 Bumps com.diffplug.spotless from 5.14.0 to 5.14.1. --- updated-dependencies: - dependency-name: com.diffplug.spotless dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 85b984c59..9b631a8f6 100644 --- a/build.gradle +++ b/build.gradle @@ -4,7 +4,7 @@ plugins { id 'maven-publish' id 'signing' id 'pmd' // code check, working on source code - id 'com.diffplug.spotless' version '5.14.0'//code format + id 'com.diffplug.spotless' version '5.14.1'//code format id 'com.github.spotbugs' version '4.7.2' // code check, working on byte code id 'com.github.onslip.gradle-one-jar' version '1.0.6' // pack a self contained jar id 'de.undercouch.download' version '4.1.2' From 3ca7269b61bb7dd00b4fe203601b851d84477c6c Mon Sep 17 00:00:00 2001 From: Johannes Hiry Date: Fri, 9 Jul 2021 14:06:35 +0200 Subject: [PATCH 094/157] added dtf aware constructor in CsvResultEntitySource --- .../io/source/csv/CsvResultEntitySource.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/main/java/edu/ie3/datamodel/io/source/csv/CsvResultEntitySource.java b/src/main/java/edu/ie3/datamodel/io/source/csv/CsvResultEntitySource.java index be11e8fac..444634888 100644 --- a/src/main/java/edu/ie3/datamodel/io/source/csv/CsvResultEntitySource.java +++ b/src/main/java/edu/ie3/datamodel/io/source/csv/CsvResultEntitySource.java @@ -54,6 +54,18 @@ public CsvResultEntitySource( this.connectorResultFactory = new ConnectorResultFactory(); } + public CsvResultEntitySource( + String csvSep, String folderPath, FileNamingStrategy fileNamingStrategy, String dtfPattern) { + super(csvSep, folderPath, fileNamingStrategy); + + // init factories + this.systemParticipantResultFactory = new SystemParticipantResultFactory(dtfPattern); + this.thermalResultFactory = new ThermalResultFactory(dtfPattern); + this.switchResultFactory = new SwitchResultFactory(dtfPattern); + this.nodeResultFactory = new NodeResultFactory(dtfPattern); + this.connectorResultFactory = new ConnectorResultFactory(dtfPattern); + } + // Grid @Override public Set getNodeResults() { From fe027c782b13de2e9b8f1ab282687c926db8be1a Mon Sep 17 00:00:00 2001 From: Johannes Hiry Date: Fri, 9 Jul 2021 14:21:55 +0200 Subject: [PATCH 095/157] fix OperationTimeTest --- src/test/java/edu/ie3/datamodel/models/OperationTimeTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/java/edu/ie3/datamodel/models/OperationTimeTest.java b/src/test/java/edu/ie3/datamodel/models/OperationTimeTest.java index 53c0fe49a..bc0f20056 100644 --- a/src/test/java/edu/ie3/datamodel/models/OperationTimeTest.java +++ b/src/test/java/edu/ie3/datamodel/models/OperationTimeTest.java @@ -89,7 +89,7 @@ protected void getEndDate() { } @Test - private void getOperationLimit() { + protected void getOperationLimit() { Optional> optOperationLimit = LIMITED_OPERATION_TIME.getOperationLimit(); assertTrue(optOperationLimit.isPresent()); From 7518c4724985931ecc1db484096f373077bfe7ed Mon Sep 17 00:00:00 2001 From: Johannes Hiry Date: Fri, 9 Jul 2021 14:32:23 +0200 Subject: [PATCH 096/157] housekeeping in FileNamingStrategy --- .../edu/ie3/datamodel/io/naming/FileNamingStrategy.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/main/java/edu/ie3/datamodel/io/naming/FileNamingStrategy.java b/src/main/java/edu/ie3/datamodel/io/naming/FileNamingStrategy.java index 91cc114d0..d57344958 100644 --- a/src/main/java/edu/ie3/datamodel/io/naming/FileNamingStrategy.java +++ b/src/main/java/edu/ie3/datamodel/io/naming/FileNamingStrategy.java @@ -56,8 +56,7 @@ public FileNamingStrategy( * @param entityPersistenceNamingStrategy entity naming strategy */ public FileNamingStrategy(EntityPersistenceNamingStrategy entityPersistenceNamingStrategy) { - this.entityPersistenceNamingStrategy = entityPersistenceNamingStrategy; - this.fileHierarchy = new FlatDirectoryHierarchy(); + this(entityPersistenceNamingStrategy, new FlatDirectoryHierarchy()); } /** @@ -66,8 +65,7 @@ public FileNamingStrategy(EntityPersistenceNamingStrategy entityPersistenceNamin * hierarchy is used. */ public FileNamingStrategy() { - this.entityPersistenceNamingStrategy = new EntityPersistenceNamingStrategy(); - this.fileHierarchy = new FlatDirectoryHierarchy(); + this(new EntityPersistenceNamingStrategy(), new FlatDirectoryHierarchy()); } /** From dda69440bb6bdbf93a4c74fb486727fa2142143b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 13 Jul 2021 04:12:14 +0000 Subject: [PATCH 097/157] Bump commons-compress from 1.20 to 1.21 Bumps commons-compress from 1.20 to 1.21. --- updated-dependencies: - dependency-name: org.apache.commons:commons-compress dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index ceab89da4..219767fe1 100644 --- a/build.gradle +++ b/build.gradle @@ -87,7 +87,7 @@ dependencies { compile 'commons-io:commons-io:2.10.0' // I/O functionalities - compile 'org.apache.commons:commons-compress:1.20' // I/O functionalities + compile 'org.apache.commons:commons-compress:1.21' // I/O functionalities } wrapper { From 94ce267ef6c6bbae89cb0c13889b45cf6c1eadb4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 14 Jul 2021 04:16:14 +0000 Subject: [PATCH 098/157] Bump commons-io from 2.10.0 to 2.11.0 Bumps commons-io from 2.10.0 to 2.11.0. --- updated-dependencies: - dependency-name: commons-io:commons-io dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index ceab89da4..fda5cca64 100644 --- a/build.gradle +++ b/build.gradle @@ -86,7 +86,7 @@ dependencies { runtimeOnly 'org.postgresql:postgresql:42.2.23' // postgresql jdbc driver required during runtime - compile 'commons-io:commons-io:2.10.0' // I/O functionalities + compile 'commons-io:commons-io:2.11.0' // I/O functionalities compile 'org.apache.commons:commons-compress:1.20' // I/O functionalities } From ea0766d08412cc0529c51722e36d42bb07b60646 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 21 Jul 2021 04:14:45 +0000 Subject: [PATCH 099/157] Bump java-client from 3.1.6 to 3.2.0 Bumps [java-client](https://github.com/couchbase/couchbase-jvm-clients) from 3.1.6 to 3.2.0. - [Release notes](https://github.com/couchbase/couchbase-jvm-clients/releases) - [Commits](https://github.com/couchbase/couchbase-jvm-clients/compare/java-client-3.1.6...java-client-3.2.0) --- updated-dependencies: - dependency-name: com.couchbase.client:java-client dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 0d4eff695..aae3a622a 100644 --- a/build.gradle +++ b/build.gradle @@ -82,7 +82,7 @@ dependencies { // Databases compile 'org.influxdb:influxdb-java:2.21' - compile 'com.couchbase.client:java-client:3.1.6' + compile 'com.couchbase.client:java-client:3.2.0' runtimeOnly 'org.postgresql:postgresql:42.2.23' // postgresql jdbc driver required during runtime compile 'commons-io:commons-io:2.11.0' // I/O functionalities From d2c24f243fab0371b80658a6a4109dc6e1685faf Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 21 Jul 2021 04:14:57 +0000 Subject: [PATCH 100/157] Bump com.diffplug.spotless from 5.14.1 to 5.14.2 Bumps com.diffplug.spotless from 5.14.1 to 5.14.2. --- updated-dependencies: - dependency-name: com.diffplug.spotless dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 0d4eff695..1d669aad8 100644 --- a/build.gradle +++ b/build.gradle @@ -4,7 +4,7 @@ plugins { id 'maven-publish' id 'signing' id 'pmd' // code check, working on source code - id 'com.diffplug.spotless' version '5.14.1'//code format + id 'com.diffplug.spotless' version '5.14.2'//code format id 'com.github.spotbugs' version '4.7.2' // code check, working on byte code id 'com.github.onslip.gradle-one-jar' version '1.0.6' // pack a self contained jar id 'de.undercouch.download' version '4.1.2' From 5acc6f612e3217df31dcd76cada72d73ea3d20c4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 21 Jul 2021 06:29:16 +0000 Subject: [PATCH 101/157] Bump testcontainersVersion from 1.15.3 to 1.16.0 Bumps `testcontainersVersion` from 1.15.3 to 1.16.0. Updates `testcontainers` from 1.15.3 to 1.16.0 - [Release notes](https://github.com/testcontainers/testcontainers-java/releases) - [Changelog](https://github.com/testcontainers/testcontainers-java/blob/master/CHANGELOG.md) - [Commits](https://github.com/testcontainers/testcontainers-java/compare/1.15.3...1.16.0) Updates `spock` from 1.15.3 to 1.16.0 - [Release notes](https://github.com/testcontainers/testcontainers-java/releases) - [Changelog](https://github.com/testcontainers/testcontainers-java/blob/master/CHANGELOG.md) - [Commits](https://github.com/testcontainers/testcontainers-java/compare/1.15.3...1.16.0) Updates `influxdb` from 1.15.3 to 1.16.0 - [Release notes](https://github.com/testcontainers/testcontainers-java/releases) - [Changelog](https://github.com/testcontainers/testcontainers-java/blob/master/CHANGELOG.md) - [Commits](https://github.com/testcontainers/testcontainers-java/compare/1.15.3...1.16.0) Updates `postgresql` from 1.15.3 to 1.16.0 - [Release notes](https://github.com/testcontainers/testcontainers-java/releases) - [Changelog](https://github.com/testcontainers/testcontainers-java/blob/master/CHANGELOG.md) - [Commits](https://github.com/testcontainers/testcontainers-java/compare/1.15.3...1.16.0) Updates `couchbase` from 1.15.3 to 1.16.0 - [Release notes](https://github.com/testcontainers/testcontainers-java/releases) - [Changelog](https://github.com/testcontainers/testcontainers-java/blob/master/CHANGELOG.md) - [Commits](https://github.com/testcontainers/testcontainers-java/compare/1.15.3...1.16.0) --- updated-dependencies: - dependency-name: org.testcontainers:testcontainers dependency-type: direct:production update-type: version-update:semver-minor - dependency-name: org.testcontainers:spock dependency-type: direct:production update-type: version-update:semver-minor - dependency-name: org.testcontainers:influxdb dependency-type: direct:production update-type: version-update:semver-minor - dependency-name: org.testcontainers:postgresql dependency-type: direct:production update-type: version-update:semver-minor - dependency-name: org.testcontainers:couchbase dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 1d669aad8..7cd9d81fb 100644 --- a/build.gradle +++ b/build.gradle @@ -18,7 +18,7 @@ ext { //version (changing these should be considered thoroughly!) javaVersion = JavaVersion.VERSION_1_8 tscfgVersion = '0.9.9' - testcontainersVersion = '1.15.3' + testcontainersVersion = '1.16.0' scriptsLocation = 'gradle' + File.separator + 'scripts' + File.separator //location of script plugins } From dcc200d7a0bb2aaf8ff832a6f4ec0389e5df7dee Mon Sep 17 00:00:00 2001 From: Johannes Hiry Date: Fri, 23 Jul 2021 16:42:51 +0200 Subject: [PATCH 102/157] kill the last LogManager ... --- .../edu/ie3/datamodel/io/naming/FileNamingStrategy.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/edu/ie3/datamodel/io/naming/FileNamingStrategy.java b/src/main/java/edu/ie3/datamodel/io/naming/FileNamingStrategy.java index d57344958..98335b9c1 100644 --- a/src/main/java/edu/ie3/datamodel/io/naming/FileNamingStrategy.java +++ b/src/main/java/edu/ie3/datamodel/io/naming/FileNamingStrategy.java @@ -22,8 +22,8 @@ import java.util.regex.Matcher; import java.util.regex.Pattern; import org.apache.commons.io.FilenameUtils; -import org.apache.logging.log4j.LogManager; -import org.apache.logging.log4j.Logger; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * A naming strategy, that combines an {@link EntityPersistenceNamingStrategy} for naming entities @@ -31,7 +31,7 @@ */ public class FileNamingStrategy { - private static final Logger logger = LogManager.getLogger(FileNamingStrategy.class); + private static final Logger logger = LoggerFactory.getLogger(FileNamingStrategy.class); private final EntityPersistenceNamingStrategy entityPersistenceNamingStrategy; private final FileHierarchy fileHierarchy; From 92165329bfc8d250e655cb8aa27a0ecc56c99801 Mon Sep 17 00:00:00 2001 From: Sebastian <14994800+sebastian-peter@users.noreply.github.com> Date: Mon, 16 Aug 2021 17:36:29 +0200 Subject: [PATCH 103/157] Adding EvcsLocationType to EcsInput, adapting factories and tests --- .../input/participant/EvcsInputFactory.java | 28 ++++++++- .../ie3/datamodel/io/processor/Processor.java | 1 + .../models/input/system/EvcsInput.java | 57 ++++++++++++++++--- .../type/evcslocation/EvcsLocationType.java | 15 +++++ .../evcslocation/EvcsLocationTypeUtils.java | 30 ++++++++++ .../participant/EvcsInputFactoryTest.groovy | 31 ++++++++++ .../input/InputEntityProcessorTest.groovy | 4 +- .../csv/CsvSystemParticipantSourceTest.groovy | 6 +- .../models/input/system/EvcsInputTest.groovy | 6 +- .../common/SystemParticipantTestData.groovy | 5 +- .../testGridFiles/participants/evcs_input.csv | 4 +- 11 files changed, 166 insertions(+), 21 deletions(-) create mode 100644 src/main/java/edu/ie3/datamodel/models/input/system/type/evcslocation/EvcsLocationType.java create mode 100644 src/main/java/edu/ie3/datamodel/models/input/system/type/evcslocation/EvcsLocationTypeUtils.java diff --git a/src/main/java/edu/ie3/datamodel/io/factory/input/participant/EvcsInputFactory.java b/src/main/java/edu/ie3/datamodel/io/factory/input/participant/EvcsInputFactory.java index 380aabeec..0457b8eb3 100644 --- a/src/main/java/edu/ie3/datamodel/io/factory/input/participant/EvcsInputFactory.java +++ b/src/main/java/edu/ie3/datamodel/io/factory/input/participant/EvcsInputFactory.java @@ -7,6 +7,7 @@ import edu.ie3.datamodel.exceptions.ChargingPointTypeException; import edu.ie3.datamodel.exceptions.FactoryException; +import edu.ie3.datamodel.exceptions.ParsingException; import edu.ie3.datamodel.io.factory.input.NodeAssetInputEntityData; import edu.ie3.datamodel.models.OperationTime; import edu.ie3.datamodel.models.input.NodeInput; @@ -15,6 +16,8 @@ import edu.ie3.datamodel.models.input.system.characteristic.ReactivePowerCharacteristic; import edu.ie3.datamodel.models.input.system.type.chargingpoint.ChargingPointType; import edu.ie3.datamodel.models.input.system.type.chargingpoint.ChargingPointTypeUtils; +import edu.ie3.datamodel.models.input.system.type.evcslocation.EvcsLocationType; +import edu.ie3.datamodel.models.input.system.type.evcslocation.EvcsLocationTypeUtils; /** * Factory to create instances of {@link EvcsInput}s based on {@link NodeAssetInputEntityData} and @@ -29,6 +32,7 @@ public class EvcsInputFactory private static final String TYPE = "type"; private static final String CHARGING_POINTS = "chargingpoints"; private static final String COS_PHI_RATED = "cosphirated"; + private static final String LOCATION_TYPE = "locationtype"; public EvcsInputFactory() { super(EvcsInput.class); @@ -36,7 +40,7 @@ public EvcsInputFactory() { @Override protected String[] getAdditionalFields() { - return new String[] {TYPE, CHARGING_POINTS, COS_PHI_RATED}; + return new String[] {TYPE, CHARGING_POINTS, COS_PHI_RATED, LOCATION_TYPE}; } @Override @@ -62,7 +66,27 @@ protected EvcsInput buildModel( final int chargingPoints = data.getInt(CHARGING_POINTS); final double cosPhi = data.getDouble(COS_PHI_RATED); + final EvcsLocationType locationType; + try { + locationType = EvcsLocationTypeUtils.parse(data.getField(LOCATION_TYPE)); + } catch (ParsingException e) { + throw new FactoryException( + String.format( + "Exception while trying to parse field \"%s\" with supposed int value \"%s\"", + LOCATION_TYPE, data.getField(LOCATION_TYPE)), + e); + } + return new EvcsInput( - uuid, id, operator, operationTime, node, qCharacteristics, type, chargingPoints, cosPhi); + uuid, + id, + operator, + operationTime, + node, + qCharacteristics, + type, + chargingPoints, + cosPhi, + locationType); } } diff --git a/src/main/java/edu/ie3/datamodel/io/processor/Processor.java b/src/main/java/edu/ie3/datamodel/io/processor/Processor.java index 746b17d6a..018bb9410 100644 --- a/src/main/java/edu/ie3/datamodel/io/processor/Processor.java +++ b/src/main/java/edu/ie3/datamodel/io/processor/Processor.java @@ -212,6 +212,7 @@ protected String processMethodResult(Object methodReturnObject, Method method, S case "String": case "DayOfWeek": case "ChargingPointType": + case "EvcsLocationType": resultStringBuilder.append(methodReturnObject.toString()); break; case "Quantity": diff --git a/src/main/java/edu/ie3/datamodel/models/input/system/EvcsInput.java b/src/main/java/edu/ie3/datamodel/models/input/system/EvcsInput.java index 85a3ce5c3..55b9c6b03 100644 --- a/src/main/java/edu/ie3/datamodel/models/input/system/EvcsInput.java +++ b/src/main/java/edu/ie3/datamodel/models/input/system/EvcsInput.java @@ -10,6 +10,7 @@ import edu.ie3.datamodel.models.input.OperatorInput; import edu.ie3.datamodel.models.input.system.characteristic.ReactivePowerCharacteristic; import edu.ie3.datamodel.models.input.system.type.chargingpoint.ChargingPointType; +import edu.ie3.datamodel.models.input.system.type.evcslocation.EvcsLocationType; import java.util.Objects; import java.util.UUID; @@ -24,6 +25,9 @@ public class EvcsInput extends SystemParticipantInput { /** Rated power factor */ private final double cosPhiRated; + /** Evcs location type */ + private final EvcsLocationType locationType; + /** * @param uuid Unique identifier * @param id Human readable identifier @@ -34,6 +38,7 @@ public class EvcsInput extends SystemParticipantInput { * @param type type of the charging points available to this charging station * @param chargingPoints number of charging points available at this charging station * @param cosPhiRated rated cos phi + * @param locationType the location type */ public EvcsInput( UUID uuid, @@ -44,11 +49,13 @@ public EvcsInput( ReactivePowerCharacteristic qCharacteristics, ChargingPointType type, int chargingPoints, - double cosPhiRated) { + double cosPhiRated, + EvcsLocationType locationType) { super(uuid, id, operator, operationTime, node, qCharacteristics); this.type = type; this.chargingPoints = chargingPoints; this.cosPhiRated = cosPhiRated; + this.locationType = locationType; } /** @@ -60,6 +67,7 @@ public EvcsInput( * @param qCharacteristics Description of a reactive power characteristic * @param type type of the charging points available to this charging station * @param cosPhiRated rated cos phi + * @param locationType the location type */ public EvcsInput( UUID uuid, @@ -69,8 +77,19 @@ public EvcsInput( NodeInput node, ReactivePowerCharacteristic qCharacteristics, ChargingPointType type, - double cosPhiRated) { - this(uuid, id, operator, operationTime, node, qCharacteristics, type, 1, cosPhiRated); + double cosPhiRated, + EvcsLocationType locationType) { + this( + uuid, + id, + operator, + operationTime, + node, + qCharacteristics, + type, + 1, + cosPhiRated, + locationType); } /** * @param uuid Unique identifier @@ -80,6 +99,7 @@ public EvcsInput( * @param type type of the charging points available to this charging station * @param chargingPoints number of charging points available at this charging station * @param cosPhiRated rated cos phi + * @param locationType the location type */ public EvcsInput( UUID uuid, @@ -88,11 +108,13 @@ public EvcsInput( ReactivePowerCharacteristic qCharacteristics, ChargingPointType type, int chargingPoints, - double cosPhiRated) { + double cosPhiRated, + EvcsLocationType locationType) { super(uuid, id, node, qCharacteristics); this.type = type; this.chargingPoints = chargingPoints; this.cosPhiRated = cosPhiRated; + this.locationType = locationType; } /** @@ -102,6 +124,7 @@ public EvcsInput( * @param qCharacteristics Description of a reactive power characteristic * @param type type of the charging points available to this charging station * @param cosPhiRated rated cos phi + * @param locationType the location type */ public EvcsInput( UUID uuid, @@ -109,8 +132,9 @@ public EvcsInput( NodeInput node, ReactivePowerCharacteristic qCharacteristics, ChargingPointType type, - double cosPhiRated) { - this(uuid, id, node, qCharacteristics, type, 1, cosPhiRated); + double cosPhiRated, + EvcsLocationType locationType) { + this(uuid, id, node, qCharacteristics, type, 1, cosPhiRated, locationType); } public ChargingPointType getType() { @@ -125,6 +149,10 @@ public double getCosPhiRated() { return cosPhiRated; } + public EvcsLocationType getLocationType() { + return locationType; + } + @Override public EvcsInputCopyBuilder copy() { return new EvcsInputCopyBuilder(this); @@ -138,12 +166,13 @@ public boolean equals(Object o) { EvcsInput evcsInput = (EvcsInput) o; return chargingPoints == evcsInput.chargingPoints && Double.compare(evcsInput.cosPhiRated, cosPhiRated) == 0 - && type.equals(evcsInput.type); + && type.equals(evcsInput.type) + && locationType.equals(evcsInput.locationType); } @Override public int hashCode() { - return Objects.hash(super.hashCode(), type, chargingPoints, cosPhiRated); + return Objects.hash(super.hashCode(), type, chargingPoints, cosPhiRated, locationType); } @Override @@ -160,6 +189,8 @@ public String toString() { + chargingPoints + ", cosPhiRated=" + cosPhiRated + + ", locationType=" + + locationType + ", node=" + getNode() + "} " @@ -179,12 +210,14 @@ public static class EvcsInputCopyBuilder private ChargingPointType type; private int chargingPoints; private double cosPhiRated; + private EvcsLocationType locationType; public EvcsInputCopyBuilder(EvcsInput entity) { super(entity); this.type = entity.type; this.chargingPoints = entity.chargingPoints; this.cosPhiRated = entity.cosPhiRated; + this.locationType = entity.locationType; } public EvcsInputCopyBuilder type(ChargingPointType type) { @@ -202,6 +235,11 @@ public EvcsInputCopyBuilder cosPhiRated(double cosPhiRated) { return this; } + public EvcsInputCopyBuilder locationType(EvcsLocationType locationType) { + this.locationType = locationType; + return this; + } + @Override public EvcsInput build() { return new EvcsInput( @@ -213,7 +251,8 @@ public EvcsInput build() { getqCharacteristics(), type, chargingPoints, - cosPhiRated); + cosPhiRated, + locationType); } @Override diff --git a/src/main/java/edu/ie3/datamodel/models/input/system/type/evcslocation/EvcsLocationType.java b/src/main/java/edu/ie3/datamodel/models/input/system/type/evcslocation/EvcsLocationType.java new file mode 100644 index 000000000..60d43bcd8 --- /dev/null +++ b/src/main/java/edu/ie3/datamodel/models/input/system/type/evcslocation/EvcsLocationType.java @@ -0,0 +1,15 @@ +/* + * © 2021. TU Dortmund University, + * Institute of Energy Systems, Energy Efficiency and Energy Economics, + * Research group Distribution grid planning and operation +*/ +package edu.ie3.datamodel.models.input.system.type.evcslocation; + +public enum EvcsLocationType { + HOME, + WORK, + CUSTOMER_PARKING, + STREET, + CHARGING_HUB_TOWN, + CHARGING_HUB_HIGHWAY +} diff --git a/src/main/java/edu/ie3/datamodel/models/input/system/type/evcslocation/EvcsLocationTypeUtils.java b/src/main/java/edu/ie3/datamodel/models/input/system/type/evcslocation/EvcsLocationTypeUtils.java new file mode 100644 index 000000000..e2225a39b --- /dev/null +++ b/src/main/java/edu/ie3/datamodel/models/input/system/type/evcslocation/EvcsLocationTypeUtils.java @@ -0,0 +1,30 @@ +/* + * © 2021. TU Dortmund University, + * Institute of Energy Systems, Energy Efficiency and Energy Economics, + * Research group Distribution grid planning and operation +*/ +package edu.ie3.datamodel.models.input.system.type.evcslocation; + +import edu.ie3.datamodel.exceptions.ParsingException; +import java.util.HashMap; + +public class EvcsLocationTypeUtils { + + private static final HashMap nameToType = initMap(); + + private static HashMap initMap() { + final HashMap map = new HashMap<>(EvcsLocationType.values().length); + for (EvcsLocationType type : EvcsLocationType.values()) map.put(type.name(), type); + + return map; + } + + private EvcsLocationTypeUtils() { + throw new IllegalStateException("This is a factory class. Don't try to instantiate it."); + } + + public static EvcsLocationType parse(String parsableString) throws ParsingException { + if (nameToType.containsKey(parsableString)) return nameToType.get(parsableString); + else throw new ParsingException("EvcsLocationType '" + parsableString + "' does not exist."); + } +} diff --git a/src/test/groovy/edu/ie3/datamodel/io/factory/input/participant/EvcsInputFactoryTest.groovy b/src/test/groovy/edu/ie3/datamodel/io/factory/input/participant/EvcsInputFactoryTest.groovy index af571d917..c3c2a308d 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/factory/input/participant/EvcsInputFactoryTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/factory/input/participant/EvcsInputFactoryTest.groovy @@ -11,6 +11,7 @@ import edu.ie3.datamodel.models.input.OperatorInput import edu.ie3.datamodel.models.input.system.EvcsInput import edu.ie3.datamodel.models.input.system.characteristic.CharacteristicPoint import edu.ie3.datamodel.models.input.system.type.chargingpoint.ChargingPointTypeUtils +import edu.ie3.datamodel.models.input.system.type.evcslocation.EvcsLocationType import edu.ie3.test.helper.FactoryTestHelper import edu.ie3.util.quantities.PowerSystemUnits import spock.lang.Specification @@ -46,6 +47,7 @@ class EvcsInputFactoryTest extends Specification implements FactoryTestHelper { "type" : "Household", "chargingpoints" : "4", "cosphirated" : "0.95", + "locationtype" : "CHARGING_HUB_TOWN" ] def inputClass = EvcsInput def nodeInput = Mock(NodeInput) @@ -76,6 +78,7 @@ class EvcsInputFactoryTest extends Specification implements FactoryTestHelper { assert type == ChargingPointTypeUtils.HouseholdSocket assert chargingPoints == Integer.parseInt(parameter["chargingpoints"]) assert cosPhiRated == Double.parseDouble(parameter["cosphirated"]) + assert locationType == EvcsLocationType.CHARGING_HUB_TOWN } } @@ -91,6 +94,34 @@ class EvcsInputFactoryTest extends Specification implements FactoryTestHelper { "type" : "-- invalid --", "chargingpoints" : "4", "cosphirated" : "0.95", + "locationtype" : "CHARGING_HUB_TOWN" + ] + def inputClass = EvcsInput + def nodeInput = Mock(NodeInput) + def operatorInput = Mock(OperatorInput) + + when: + Optional input = inputFactory.get( + new NodeAssetInputEntityData(parameter, inputClass, operatorInput, nodeInput)) + + then: + // FactoryException is caught in Factory.java. We get an empty Option back + !input.present + } + + def "A EvcsInputFactory should fail when passing an invalid EvcsLocationType"() { + given: "a system participant input type factory and model data" + def inputFactory = new EvcsInputFactory() + Map parameter = [ + "uuid" : "91ec3bcf-1777-4d38-af67-0bf7c9fa73c7", + "operatesfrom" : "2019-01-01T00:00:00+01:00[Europe/Berlin]", + "operatesuntil" : "2019-12-31T23:59:00+01:00[Europe/Berlin]", + "id" : "TestID", + "qcharacteristics": "cosPhiFixed:{(0.0,1.0)}", + "type" : "Household", + "chargingpoints" : "4", + "cosphirated" : "0.95", + "locationType" : "-- invalid --" ] def inputClass = EvcsInput def nodeInput = Mock(NodeInput) diff --git a/src/test/groovy/edu/ie3/datamodel/io/processor/input/InputEntityProcessorTest.groovy b/src/test/groovy/edu/ie3/datamodel/io/processor/input/InputEntityProcessorTest.groovy index 1ba20ff99..b553f6477 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/processor/input/InputEntityProcessorTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/processor/input/InputEntityProcessorTest.groovy @@ -28,7 +28,6 @@ import edu.ie3.test.common.TypeTestData import spock.lang.Specification import tech.units.indriya.quantity.Quantities -import java.time.ZoneId import java.time.ZonedDateTime import static edu.ie3.util.quantities.PowerSystemUnits.PU @@ -279,7 +278,8 @@ class InputEntityProcessorTest extends Specification { "qCharacteristics": SystemParticipantTestData.cosPhiFixedDeSerialized, "type" : SystemParticipantTestData.evcsInput.type.toString(), "cosPhiRated" : SystemParticipantTestData.evcsInput.cosPhiRated.toString(), - "chargingPoints" : SystemParticipantTestData.evcsInput.chargingPoints.toString() + "chargingPoints" : SystemParticipantTestData.evcsInput.chargingPoints.toString(), + "locationType" : SystemParticipantTestData.evcsInput.locationType.name() ] } diff --git a/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvSystemParticipantSourceTest.groovy b/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvSystemParticipantSourceTest.groovy index c540ec59e..79c279595 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvSystemParticipantSourceTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvSystemParticipantSourceTest.groovy @@ -311,9 +311,9 @@ class CsvSystemParticipantSourceTest extends Specification implements CsvTestDat where: nodes | operators || resultingSize || resultingSet - [sptd.evcsInput.node]| [sptd.evcsInput.operator]|| 1 || [sptd.evcsInput] - [sptd.evcsInput.node]| []|| 1 || [ - new EvcsInput(sptd.evcsInput.uuid, sptd.evcsInput.id, OperatorInput.NO_OPERATOR_ASSIGNED, sptd.evcsInput.operationTime, sptd.evcsInput.node, sptd.evcsInput.qCharacteristics, sptd.evcsInput.type, sptd.evcsInput.chargingPoints, sptd.evcsInput.cosPhiRated) + [sptd.evcsInput.node] | [sptd.evcsInput.operator] || 1 || [sptd.evcsInput] + [sptd.evcsInput.node] | [] || 1 || [ + new EvcsInput(sptd.evcsInput.uuid, sptd.evcsInput.id, OperatorInput.NO_OPERATOR_ASSIGNED, sptd.evcsInput.operationTime, sptd.evcsInput.node, sptd.evcsInput.qCharacteristics, sptd.evcsInput.type, sptd.evcsInput.chargingPoints, sptd.evcsInput.cosPhiRated, sptd.evcsInput.locationType) ] []| [sptd.evcsInput.operator]|| 0 || [] []| []|| 0 || [] diff --git a/src/test/groovy/edu/ie3/datamodel/models/input/system/EvcsInputTest.groovy b/src/test/groovy/edu/ie3/datamodel/models/input/system/EvcsInputTest.groovy index be8eaa9a2..c523f0903 100644 --- a/src/test/groovy/edu/ie3/datamodel/models/input/system/EvcsInputTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/models/input/system/EvcsInputTest.groovy @@ -6,6 +6,7 @@ package edu.ie3.datamodel.models.input.system import edu.ie3.datamodel.models.input.system.type.chargingpoint.ChargingPointTypeUtils +import edu.ie3.datamodel.models.input.system.type.evcslocation.EvcsLocationType import edu.ie3.test.common.SystemParticipantTestData import spock.lang.Specification @@ -18,7 +19,9 @@ class EvcsInputTest extends Specification { when: def alteredEntity = evcsInput.copy() .type(ChargingPointTypeUtils.TeslaSuperChargerV3) - .cosPhiRated(0.7d).chargingPoints(1).build() + .cosPhiRated(0.7d).chargingPoints(1) + .locationType(EvcsLocationType.CHARGING_HUB_HIGHWAY) + .build() then: alteredEntity.with { @@ -30,6 +33,7 @@ class EvcsInputTest extends Specification { assert type == ChargingPointTypeUtils.TeslaSuperChargerV3 assert cosPhiRated == 0.7d assert chargingPoints == 1 + assert locationType == EvcsLocationType.CHARGING_HUB_HIGHWAY } } } diff --git a/src/test/groovy/edu/ie3/test/common/SystemParticipantTestData.groovy b/src/test/groovy/edu/ie3/test/common/SystemParticipantTestData.groovy index 2c31b69dc..f604042fd 100644 --- a/src/test/groovy/edu/ie3/test/common/SystemParticipantTestData.groovy +++ b/src/test/groovy/edu/ie3/test/common/SystemParticipantTestData.groovy @@ -17,6 +17,7 @@ import edu.ie3.datamodel.models.input.system.characteristic.QV import edu.ie3.datamodel.models.input.system.characteristic.WecCharacteristicInput import edu.ie3.datamodel.models.input.system.type.* import edu.ie3.datamodel.models.input.system.type.chargingpoint.ChargingPointTypeUtils +import edu.ie3.datamodel.models.input.system.type.evcslocation.EvcsLocationType import edu.ie3.datamodel.models.input.thermal.CylindricalStorageInput import edu.ie3.datamodel.models.input.thermal.ThermalBusInput import edu.ie3.datamodel.models.input.thermal.ThermalStorageInput @@ -305,10 +306,10 @@ class SystemParticipantTestData { cosPhiFixed, ChargingPointTypeUtils.HouseholdSocket, 4, - cosPhiRated + cosPhiRated, + EvcsLocationType.HOME ) - public static allParticipants = [ fixedFeedInInput, pvInput, diff --git a/src/test/resources/testGridFiles/participants/evcs_input.csv b/src/test/resources/testGridFiles/participants/evcs_input.csv index da6167ca7..26be325b4 100644 --- a/src/test/resources/testGridFiles/participants/evcs_input.csv +++ b/src/test/resources/testGridFiles/participants/evcs_input.csv @@ -1,2 +1,2 @@ -uuid,id,operator,operates_from,operates_until,node,q_characteristics,cos_phi_rated,type,charging_points -798028b5-caff-4da7-bcd9-1750fdd8742c,test_csInput,8f9682df-0744-4b58-a122-f0dc730f6510,2020-03-24T15:11:31Z[UTC],2020-03-25T15:11:31Z[UTC],4ca90220-74c2-4369-9afa-a18bf068840d,cosPhiFixed:{(0.0,0.95)},0.95,hhs,4 \ No newline at end of file +uuid,id,operator,operates_from,operates_until,node,q_characteristics,cos_phi_rated,type,charging_points,locationtype +798028b5-caff-4da7-bcd9-1750fdd8742c,test_csInput,8f9682df-0744-4b58-a122-f0dc730f6510,2020-03-24T15:11:31Z[UTC],2020-03-25T15:11:31Z[UTC],4ca90220-74c2-4369-9afa-a18bf068840d,cosPhiFixed:{(0.0,0.95)},0.95,hhs,4,HOME \ No newline at end of file From 1a389bdb7374957923f22e09207441ab9c3c00ed Mon Sep 17 00:00:00 2001 From: Sebastian <14994800+sebastian-peter@users.noreply.github.com> Date: Tue, 17 Aug 2021 14:30:13 +0200 Subject: [PATCH 104/157] Adding EvcsLocationTypeUtilsTest --- .../ChargingPointTypeUtilsTest.groovy | 1 - .../EvcsLocationTypeUtilsTest.groovy | 56 +++++++++++++++++++ 2 files changed, 56 insertions(+), 1 deletion(-) create mode 100644 src/test/groovy/edu/ie3/datamodel/models/input/system/type/evcslocation/EvcsLocationTypeUtilsTest.groovy diff --git a/src/test/groovy/edu/ie3/datamodel/models/input/system/type/chargingpoint/ChargingPointTypeUtilsTest.groovy b/src/test/groovy/edu/ie3/datamodel/models/input/system/type/chargingpoint/ChargingPointTypeUtilsTest.groovy index f9d31e0f7..8743655e3 100644 --- a/src/test/groovy/edu/ie3/datamodel/models/input/system/type/chargingpoint/ChargingPointTypeUtilsTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/models/input/system/type/chargingpoint/ChargingPointTypeUtilsTest.groovy @@ -37,7 +37,6 @@ class ChargingPointTypeUtilsTest extends Specification { ChargingPointType actual = parse(parsableString) expect: - new ChargingPointType("FastCharger", Quantities.getQuantity(50, KILOVOLTAMPERE), ElectricCurrentType.DC).toString() actual == expectedObj actual.toString() == expectedString diff --git a/src/test/groovy/edu/ie3/datamodel/models/input/system/type/evcslocation/EvcsLocationTypeUtilsTest.groovy b/src/test/groovy/edu/ie3/datamodel/models/input/system/type/evcslocation/EvcsLocationTypeUtilsTest.groovy new file mode 100644 index 000000000..c4510ae93 --- /dev/null +++ b/src/test/groovy/edu/ie3/datamodel/models/input/system/type/evcslocation/EvcsLocationTypeUtilsTest.groovy @@ -0,0 +1,56 @@ +/* + * © 2021. TU Dortmund University, + * Institute of Energy Systems, Energy Efficiency and Energy Economics, + * Research group Distribution grid planning and operation + */ +package edu.ie3.datamodel.models.input.system.type.evcslocation + +import edu.ie3.datamodel.exceptions.ParsingException +import spock.lang.Specification + +import static edu.ie3.datamodel.models.input.system.type.evcslocation.EvcsLocationType.* +import static edu.ie3.datamodel.models.input.system.type.evcslocation.EvcsLocationTypeUtils.* + +class EvcsLocationTypeUtilsTest extends Specification { + + def "The EvcsLocationTypeUtils should throw an exception on instantiation"() { + when: + new EvcsLocationTypeUtils() + + then: + IllegalStateException ex = thrown() + ex.message == "This is a factory class. Don't try to instantiate it." + } + + def "The EvcsLocationTypeUtils should parse valid evcs location type strings as expected"() { + given: + EvcsLocationType parsed = parse(parsableString) + + expect: + parsed == expectedObj + parsed.name() == parsableString + + where: + parsableString || expectedObj + "HOME" || HOME + "WORK" || WORK + "CUSTOMER_PARKING" || CUSTOMER_PARKING + "STREET" || STREET + "CHARGING_HUB_TOWN" || CHARGING_HUB_TOWN + "CHARGING_HUB_HIGHWAY" || CHARGING_HUB_HIGHWAY + } + + def "The EvcsLocationTypeUtils should throw exceptions as expected when invalid evcs location type string is provided"() { + when: + parse(invalidString) + + then: + ParsingException ex = thrown() + ex.message == expectedExceptionMsg + + where: + + invalidString || expectedExceptionMsg + "-- invalid --" || "EvcsLocationType '-- invalid --' does not exist." + } +} From d4255b2ec5c1cd3c24bf349d2474e2895afeeeee Mon Sep 17 00:00:00 2001 From: Sebastian <14994800+sebastian-peter@users.noreply.github.com> Date: Tue, 17 Aug 2021 14:39:27 +0200 Subject: [PATCH 105/157] Addressing codacy issues --- .../type/chargingpoint/ChargingPointTypeUtilsTest.groovy | 6 ++---- .../type/evcslocation/EvcsLocationTypeUtilsTest.groovy | 6 +++--- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/test/groovy/edu/ie3/datamodel/models/input/system/type/chargingpoint/ChargingPointTypeUtilsTest.groovy b/src/test/groovy/edu/ie3/datamodel/models/input/system/type/chargingpoint/ChargingPointTypeUtilsTest.groovy index 8743655e3..db415c4dd 100644 --- a/src/test/groovy/edu/ie3/datamodel/models/input/system/type/chargingpoint/ChargingPointTypeUtilsTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/models/input/system/type/chargingpoint/ChargingPointTypeUtilsTest.groovy @@ -5,17 +5,15 @@ */ package edu.ie3.datamodel.models.input.system.type.chargingpoint -import tech.units.indriya.quantity.Quantities - import static edu.ie3.datamodel.models.input.system.type.chargingpoint.ChargingPointTypeUtils.* +import static edu.ie3.util.quantities.PowerSystemUnits.* import edu.ie3.datamodel.exceptions.ChargingPointTypeException import edu.ie3.datamodel.models.ElectricCurrentType +import tech.units.indriya.quantity.Quantities import spock.lang.Specification -import static edu.ie3.util.quantities.PowerSystemUnits.* - /** * //ToDo: Class Description * diff --git a/src/test/groovy/edu/ie3/datamodel/models/input/system/type/evcslocation/EvcsLocationTypeUtilsTest.groovy b/src/test/groovy/edu/ie3/datamodel/models/input/system/type/evcslocation/EvcsLocationTypeUtilsTest.groovy index c4510ae93..8aeaf8dcf 100644 --- a/src/test/groovy/edu/ie3/datamodel/models/input/system/type/evcslocation/EvcsLocationTypeUtilsTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/models/input/system/type/evcslocation/EvcsLocationTypeUtilsTest.groovy @@ -5,12 +5,12 @@ */ package edu.ie3.datamodel.models.input.system.type.evcslocation -import edu.ie3.datamodel.exceptions.ParsingException -import spock.lang.Specification - import static edu.ie3.datamodel.models.input.system.type.evcslocation.EvcsLocationType.* import static edu.ie3.datamodel.models.input.system.type.evcslocation.EvcsLocationTypeUtils.* +import edu.ie3.datamodel.exceptions.ParsingException +import spock.lang.Specification + class EvcsLocationTypeUtilsTest extends Specification { def "The EvcsLocationTypeUtils should throw an exception on instantiation"() { From 9f7d21b98e32ea45eaa2e33cb11df2ab81485b24 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 18 Aug 2021 04:12:42 +0000 Subject: [PATCH 106/157] Bump com.github.spotbugs from 4.7.2 to 4.7.3 Bumps com.github.spotbugs from 4.7.2 to 4.7.3. --- updated-dependencies: - dependency-name: com.github.spotbugs dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 70c6e0c1c..7793c4193 100644 --- a/build.gradle +++ b/build.gradle @@ -5,7 +5,7 @@ plugins { id 'signing' id 'pmd' // code check, working on source code id 'com.diffplug.spotless' version '5.14.2'//code format - id 'com.github.spotbugs' version '4.7.2' // code check, working on byte code + id 'com.github.spotbugs' version '4.7.3' // code check, working on byte code id 'com.github.onslip.gradle-one-jar' version '1.0.6' // pack a self contained jar id 'de.undercouch.download' version '4.1.2' id 'kr.motd.sphinx' version '2.10.1' // documentation generation From db455ad3590ffc27ba89249804ee74152226b2b2 Mon Sep 17 00:00:00 2001 From: "Kittl, Chris" Date: Wed, 18 Aug 2021 12:26:34 +0200 Subject: [PATCH 107/157] Formatting --- .../ChargingPointTypeUtilsTest.groovy | 41 +++++++++---------- 1 file changed, 20 insertions(+), 21 deletions(-) diff --git a/src/test/groovy/edu/ie3/datamodel/models/input/system/type/chargingpoint/ChargingPointTypeUtilsTest.groovy b/src/test/groovy/edu/ie3/datamodel/models/input/system/type/chargingpoint/ChargingPointTypeUtilsTest.groovy index db415c4dd..02b9cedf1 100644 --- a/src/test/groovy/edu/ie3/datamodel/models/input/system/type/chargingpoint/ChargingPointTypeUtilsTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/models/input/system/type/chargingpoint/ChargingPointTypeUtilsTest.groovy @@ -5,14 +5,13 @@ */ package edu.ie3.datamodel.models.input.system.type.chargingpoint -import static edu.ie3.datamodel.models.input.system.type.chargingpoint.ChargingPointTypeUtils.* -import static edu.ie3.util.quantities.PowerSystemUnits.* - import edu.ie3.datamodel.exceptions.ChargingPointTypeException import edu.ie3.datamodel.models.ElectricCurrentType +import spock.lang.Specification import tech.units.indriya.quantity.Quantities -import spock.lang.Specification +import static edu.ie3.datamodel.models.input.system.type.chargingpoint.ChargingPointTypeUtils.* +import static edu.ie3.util.quantities.PowerSystemUnits.KILOVOLTAMPERE /** * //ToDo: Class Description @@ -39,24 +38,24 @@ class ChargingPointTypeUtilsTest extends Specification { actual.toString() == expectedString where: - parsableString || expectedObj || expectedString - "household" || HouseholdSocket || "HouseholdSocket" - "HouseholdSocket" || HouseholdSocket || "HouseholdSocket" - "BlueHouseholdSocket" || BlueHouseholdSocket || "BlueHouseholdSocket" - "Cee16ASocket" || Cee16ASocket || "Cee16ASocket" - "cee32" || Cee32ASocket || "Cee32ASocket" - "CEE63" || Cee63ASocket || "Cee63ASocket" - "csT1" || ChargingStationType1 || "ChargingStationType1" - "stationtype2" || ChargingStationType2 || "ChargingStationType2" - "ChargingStationCcsComboType1" || ChargingStationCcsComboType1 || "ChargingStationCcsComboType1" - "csccs2" || ChargingStationCcsComboType2 || "ChargingStationCcsComboType2" - "TeslaSuperChargerV1" || TeslaSuperChargerV1 || "TeslaSuperChargerV1" - "tesla2" || TeslaSuperChargerV2 || "TeslaSuperChargerV2" - "supercharger3" || TeslaSuperChargerV3 || "TeslaSuperChargerV3" + parsableString || expectedObj || expectedString + "household" || HouseholdSocket || "HouseholdSocket" + "HouseholdSocket" || HouseholdSocket || "HouseholdSocket" + "BlueHouseholdSocket" || BlueHouseholdSocket || "BlueHouseholdSocket" + "Cee16ASocket" || Cee16ASocket || "Cee16ASocket" + "cee32" || Cee32ASocket || "Cee32ASocket" + "CEE63" || Cee63ASocket || "Cee63ASocket" + "csT1" || ChargingStationType1 || "ChargingStationType1" + "stationtype2" || ChargingStationType2 || "ChargingStationType2" + "ChargingStationCcsComboType1" || ChargingStationCcsComboType1 || "ChargingStationCcsComboType1" + "csccs2" || ChargingStationCcsComboType2 || "ChargingStationCcsComboType2" + "TeslaSuperChargerV1" || TeslaSuperChargerV1 || "TeslaSuperChargerV1" + "tesla2" || TeslaSuperChargerV2 || "TeslaSuperChargerV2" + "supercharger3" || TeslaSuperChargerV3 || "TeslaSuperChargerV3" "FastCharger(50|DC)" || new ChargingPointType("FastCharger", Quantities.getQuantity(50d, KILOVOLTAMPERE), ElectricCurrentType.DC) || "FastCharger(50.0|DC)" - "household(1.8|DC)" || new ChargingPointType("household", Quantities.getQuantity(1.8d, KILOVOLTAMPERE), ElectricCurrentType.DC) || "household(1.8|DC)" - "Household(2.3|AC)" || HouseholdSocket || "HouseholdSocket" - "household(2.3|AC)" || HouseholdSocket || "HouseholdSocket" + "household(1.8|DC)" || new ChargingPointType("household", Quantities.getQuantity(1.8d, KILOVOLTAMPERE), ElectricCurrentType.DC) || "household(1.8|DC)" + "Household(2.3|AC)" || HouseholdSocket || "HouseholdSocket" + "household(2.3|AC)" || HouseholdSocket || "HouseholdSocket" } def "The ChargingPointTypeUtils should throw exceptions as expected when invalid charging point type strings are provided"() { From b096e8a3d1854302a25f2132ccfa12e65a535998 Mon Sep 17 00:00:00 2001 From: Sebastian <14994800+sebastian-peter@users.noreply.github.com> Date: Wed, 18 Aug 2021 13:52:47 +0200 Subject: [PATCH 108/157] Addressing reviewer's comments --- .../type/evcslocation/EvcsLocationTypeUtils.java | 11 ++++++++--- .../evcslocation/EvcsLocationTypeUtilsTest.groovy | 13 +++++-------- .../testGridFiles/participants/evcs_input.csv | 2 +- 3 files changed, 14 insertions(+), 12 deletions(-) diff --git a/src/main/java/edu/ie3/datamodel/models/input/system/type/evcslocation/EvcsLocationTypeUtils.java b/src/main/java/edu/ie3/datamodel/models/input/system/type/evcslocation/EvcsLocationTypeUtils.java index e2225a39b..1ee4db007 100644 --- a/src/main/java/edu/ie3/datamodel/models/input/system/type/evcslocation/EvcsLocationTypeUtils.java +++ b/src/main/java/edu/ie3/datamodel/models/input/system/type/evcslocation/EvcsLocationTypeUtils.java @@ -14,7 +14,7 @@ public class EvcsLocationTypeUtils { private static HashMap initMap() { final HashMap map = new HashMap<>(EvcsLocationType.values().length); - for (EvcsLocationType type : EvcsLocationType.values()) map.put(type.name(), type); + for (EvcsLocationType type : EvcsLocationType.values()) map.put(toKey(type.name()), type); return map; } @@ -24,7 +24,12 @@ private EvcsLocationTypeUtils() { } public static EvcsLocationType parse(String parsableString) throws ParsingException { - if (nameToType.containsKey(parsableString)) return nameToType.get(parsableString); - else throw new ParsingException("EvcsLocationType '" + parsableString + "' does not exist."); + final String key = toKey(parsableString); + if (nameToType.containsKey(key)) return nameToType.get(key); + else throw new ParsingException("EvcsLocationType '" + key + "' does not exist."); + } + + private static String toKey(String name) { + return name.toLowerCase().replaceAll("[-_]*", ""); } } diff --git a/src/test/groovy/edu/ie3/datamodel/models/input/system/type/evcslocation/EvcsLocationTypeUtilsTest.groovy b/src/test/groovy/edu/ie3/datamodel/models/input/system/type/evcslocation/EvcsLocationTypeUtilsTest.groovy index 8aeaf8dcf..e64461187 100644 --- a/src/test/groovy/edu/ie3/datamodel/models/input/system/type/evcslocation/EvcsLocationTypeUtilsTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/models/input/system/type/evcslocation/EvcsLocationTypeUtilsTest.groovy @@ -28,7 +28,7 @@ class EvcsLocationTypeUtilsTest extends Specification { expect: parsed == expectedObj - parsed.name() == parsableString + parsed.name().toLowerCase().replaceAll("[-_]*", "") == parsableString.toLowerCase().replaceAll("[-_]*", "") where: parsableString || expectedObj @@ -38,19 +38,16 @@ class EvcsLocationTypeUtilsTest extends Specification { "STREET" || STREET "CHARGING_HUB_TOWN" || CHARGING_HUB_TOWN "CHARGING_HUB_HIGHWAY" || CHARGING_HUB_HIGHWAY + "charging_hub_highway" || CHARGING_HUB_HIGHWAY // lower case + "charginghubhighway" || CHARGING_HUB_HIGHWAY // lower case without underscores } def "The EvcsLocationTypeUtils should throw exceptions as expected when invalid evcs location type string is provided"() { when: - parse(invalidString) + parse("--invalid--") then: ParsingException ex = thrown() - ex.message == expectedExceptionMsg - - where: - - invalidString || expectedExceptionMsg - "-- invalid --" || "EvcsLocationType '-- invalid --' does not exist." + ex.message == "EvcsLocationType 'invalid' does not exist." } } diff --git a/src/test/resources/testGridFiles/participants/evcs_input.csv b/src/test/resources/testGridFiles/participants/evcs_input.csv index 26be325b4..2b544063d 100644 --- a/src/test/resources/testGridFiles/participants/evcs_input.csv +++ b/src/test/resources/testGridFiles/participants/evcs_input.csv @@ -1,2 +1,2 @@ -uuid,id,operator,operates_from,operates_until,node,q_characteristics,cos_phi_rated,type,charging_points,locationtype +uuid,id,operator,operates_from,operates_until,node,q_characteristics,cos_phi_rated,type,charging_points,location_type 798028b5-caff-4da7-bcd9-1750fdd8742c,test_csInput,8f9682df-0744-4b58-a122-f0dc730f6510,2020-03-24T15:11:31Z[UTC],2020-03-25T15:11:31Z[UTC],4ca90220-74c2-4369-9afa-a18bf068840d,cosPhiFixed:{(0.0,0.95)},0.95,hhs,4,HOME \ No newline at end of file From df5b05092f0cb5279b5e9b2abd56b8eed12a9ce9 Mon Sep 17 00:00:00 2001 From: Sebastian <14994800+sebastian-peter@users.noreply.github.com> Date: Wed, 18 Aug 2021 16:48:15 +0200 Subject: [PATCH 109/157] Added JavaDocs and readthedocs for EvcsLocationType --- .../models/input/participant/evcs.rst | 32 +++++++++++++++++-- .../type/evcslocation/EvcsLocationType.java | 10 ++++++ .../evcslocation/EvcsLocationTypeUtils.java | 20 ++++++++++++ 3 files changed, 59 insertions(+), 3 deletions(-) diff --git a/docs/readthedocs/models/input/participant/evcs.rst b/docs/readthedocs/models/input/participant/evcs.rst index f46b1ea95..251003c20 100644 --- a/docs/readthedocs/models/input/participant/evcs.rst +++ b/docs/readthedocs/models/input/participant/evcs.rst @@ -32,6 +32,8 @@ Entity Model +------------------+---------+--------------------------------------------------------------------------------------+ | cosPhiRated | -- | Rated power factor | +------------------+---------+--------------------------------------------------------------------------------------+ +| locationType | -- | :ref:`Charging station location types` | ++------------------+---------+--------------------------------------------------------------------------------------+ Type Model """""""""""" @@ -48,11 +50,11 @@ The actual model definition for charging point types looks as follows: | Attribute | Unit | Remarks | +========================+=========+================================================================================+ | id | -- | Human readable identifier | -+------------------------+---+-----+--------------------------------------------------------------------------------+ ++------------------------+---------+--------------------------------------------------------------------------------+ | sRated | kVA | Rated apparent power | -+------------------------+---+-----+--------------------------------------------------------------------------------+ ++------------------------+---------+--------------------------------------------------------------------------------+ | electricCurrentType | -- | Electric current type | -+------------------------+---+-----+--------------------------------------------------------------------------------+ ++------------------------+---------+--------------------------------------------------------------------------------+ |synonymousIds | -- | Set of alternative human readable identifiers | +------------------------+---------+--------------------------------------------------------------------------------+ @@ -117,6 +119,30 @@ Limitations all attributes (e.g. :code:`sRated` or :code:`connectionType`) are considered to be equal for all connection points +.. _location_types: + +Location types +^^^^^^^^^^^^^^ + +Evcs location types describe the type of charging location of a charging station. Parsing of these types is case-insensitive +and underscores and minuses are ignored, that means "charginghubtown" is parsed as type :code:`CHARGING_HUB_TOWN`. + ++-------------------------------+-------------------+----------------------------------+ +| type name | public/private | description | ++===============================+===================+==================================+ +| HOME | private | Charging at home | ++-------------------------------+-------------------+----------------------------------+ +| WORK | private | Charging at work | ++-------------------------------+-------------------+----------------------------------+ +| CUSTOMER_PARKING | public | Charging at store parking lots | ++-------------------------------+-------------------+----------------------------------+ +| STREET | public | Charging at street side | ++-------------------------------+-------------------+----------------------------------+ +| CHARGING_HUB_TOWN | public | Charging at hub in town | ++-------------------------------+-------------------+----------------------------------+ +| CHARGING_HUB_HIGHWAY | public | Charging at hub out of town | ++-------------------------------+-------------------+----------------------------------+ + Caveats ^^^^^^^ Nothing - at least not known. diff --git a/src/main/java/edu/ie3/datamodel/models/input/system/type/evcslocation/EvcsLocationType.java b/src/main/java/edu/ie3/datamodel/models/input/system/type/evcslocation/EvcsLocationType.java index 60d43bcd8..fc9648944 100644 --- a/src/main/java/edu/ie3/datamodel/models/input/system/type/evcslocation/EvcsLocationType.java +++ b/src/main/java/edu/ie3/datamodel/models/input/system/type/evcslocation/EvcsLocationType.java @@ -5,11 +5,21 @@ */ package edu.ie3.datamodel.models.input.system.type.evcslocation; +/** + * Describes type of location of an {@link edu.ie3.datamodel.models.input.system.EvcsInput}. Parsing + * strings into one of these types is done in {@link EvcsLocationTypeUtils}. + */ public enum EvcsLocationType { + /** Charging at home (private home or apartment building, type: private location) */ HOME, + /** Charging at work (type: private location) */ WORK, + /** Charging at store parking lots (type: public location) */ CUSTOMER_PARKING, + /** Charging at street side (type: public location) */ STREET, + /** Charging at hub in town (type: public location) */ CHARGING_HUB_TOWN, + /** Charging at hub out of town, highway (type: public location) */ CHARGING_HUB_HIGHWAY } diff --git a/src/main/java/edu/ie3/datamodel/models/input/system/type/evcslocation/EvcsLocationTypeUtils.java b/src/main/java/edu/ie3/datamodel/models/input/system/type/evcslocation/EvcsLocationTypeUtils.java index 1ee4db007..afaaec49a 100644 --- a/src/main/java/edu/ie3/datamodel/models/input/system/type/evcslocation/EvcsLocationTypeUtils.java +++ b/src/main/java/edu/ie3/datamodel/models/input/system/type/evcslocation/EvcsLocationTypeUtils.java @@ -8,6 +8,9 @@ import edu.ie3.datamodel.exceptions.ParsingException; import java.util.HashMap; +/** + * Utility class providing tools to retrieve {@link EvcsLocationType}s from string representation + */ public class EvcsLocationTypeUtils { private static final HashMap nameToType = initMap(); @@ -19,16 +22,33 @@ private static HashMap initMap() { return map; } + /** + * This is a static utility class. Do not instantiate! + */ private EvcsLocationTypeUtils() { throw new IllegalStateException("This is a factory class. Don't try to instantiate it."); } + /** + * Parsing a location type string into one {@link EvcsLocationType}. + * Matching the string is case-insensitive and all - and _ are removed. + * Throws exception, if type does not exist. + * + * @param parsableString string to parse + * @return corresponding EvcsLocationType + * @throws ParsingException if string does not represent a location type + */ public static EvcsLocationType parse(String parsableString) throws ParsingException { final String key = toKey(parsableString); if (nameToType.containsKey(key)) return nameToType.get(key); else throw new ParsingException("EvcsLocationType '" + key + "' does not exist."); } + /** + * Turns string to lower case and removes underscores and minuses. + * @param name name to turn into key + * @return key + */ private static String toKey(String name) { return name.toLowerCase().replaceAll("[-_]*", ""); } From 9f7f2f5649a5fab1b31441f8ffde32cf67cdadf1 Mon Sep 17 00:00:00 2001 From: Sebastian <14994800+sebastian-peter@users.noreply.github.com> Date: Wed, 18 Aug 2021 16:51:28 +0200 Subject: [PATCH 110/157] fmt --- .../type/evcslocation/EvcsLocationTypeUtils.java | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/main/java/edu/ie3/datamodel/models/input/system/type/evcslocation/EvcsLocationTypeUtils.java b/src/main/java/edu/ie3/datamodel/models/input/system/type/evcslocation/EvcsLocationTypeUtils.java index afaaec49a..ffb31c076 100644 --- a/src/main/java/edu/ie3/datamodel/models/input/system/type/evcslocation/EvcsLocationTypeUtils.java +++ b/src/main/java/edu/ie3/datamodel/models/input/system/type/evcslocation/EvcsLocationTypeUtils.java @@ -22,17 +22,14 @@ private static HashMap initMap() { return map; } - /** - * This is a static utility class. Do not instantiate! - */ + /** This is a static utility class. Do not instantiate! */ private EvcsLocationTypeUtils() { throw new IllegalStateException("This is a factory class. Don't try to instantiate it."); } /** - * Parsing a location type string into one {@link EvcsLocationType}. - * Matching the string is case-insensitive and all - and _ are removed. - * Throws exception, if type does not exist. + * Parsing a location type string into one {@link EvcsLocationType}. Matching the string is + * case-insensitive and all - and _ are removed. Throws exception, if type does not exist. * * @param parsableString string to parse * @return corresponding EvcsLocationType @@ -46,6 +43,7 @@ public static EvcsLocationType parse(String parsableString) throws ParsingExcept /** * Turns string to lower case and removes underscores and minuses. + * * @param name name to turn into key * @return key */ From 98fc18b70d556233612a9dd4e7faec77d37c432b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 23 Aug 2021 04:15:50 +0000 Subject: [PATCH 111/157] Bump com.diffplug.spotless from 5.14.2 to 5.14.3 Bumps com.diffplug.spotless from 5.14.2 to 5.14.3. --- updated-dependencies: - dependency-name: com.diffplug.spotless dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 7793c4193..7b532dbd2 100644 --- a/build.gradle +++ b/build.gradle @@ -4,7 +4,7 @@ plugins { id 'maven-publish' id 'signing' id 'pmd' // code check, working on source code - id 'com.diffplug.spotless' version '5.14.2'//code format + id 'com.diffplug.spotless' version '5.14.3'//code format id 'com.github.spotbugs' version '4.7.3' // code check, working on byte code id 'com.github.onslip.gradle-one-jar' version '1.0.6' // pack a self contained jar id 'de.undercouch.download' version '4.1.2' From cb7d09f7b5548b7e4115b4d396e31207d137cb8d Mon Sep 17 00:00:00 2001 From: t-ober <63147366+t-ober@users.noreply.github.com> Date: Wed, 25 Aug 2021 10:21:22 +0200 Subject: [PATCH 112/157] convert line length to Standardunits.LINE_LENGTH --- .../edu/ie3/datamodel/models/input/connector/LineInput.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/edu/ie3/datamodel/models/input/connector/LineInput.java b/src/main/java/edu/ie3/datamodel/models/input/connector/LineInput.java index a4b231e9e..6c794d2fc 100644 --- a/src/main/java/edu/ie3/datamodel/models/input/connector/LineInput.java +++ b/src/main/java/edu/ie3/datamodel/models/input/connector/LineInput.java @@ -95,7 +95,7 @@ public LineInput( OlmCharacteristicInput olmCharacteristic) { super(uuid, id, nodeA, nodeB, parallelDevices); this.type = type; - this.length = length; + this.length = length.to(StandardUnits.LINE_LENGTH); this.geoPosition = GeoUtils.buildSafeLineString(geoPosition); this.olmCharacteristic = olmCharacteristic; } From f922492516797c2d68d46238af188df061e08f1c Mon Sep 17 00:00:00 2001 From: t-ober <63147366+t-ober@users.noreply.github.com> Date: Wed, 25 Aug 2021 14:18:21 +0200 Subject: [PATCH 113/157] Update CHANGELOG.md --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 09f46d145..ca6a8e115 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased/Snapshot] +### Fixed +- adapted `LineInput` constructor to convert line length to `StandardUnits.LINE_LENGTH` + ## [2.0.1] - 2021-07-08 ### Fixed From 16782866ab82c9829b8174bf3d21e75e0a5a292e Mon Sep 17 00:00:00 2001 From: Johannes Hiry Date: Thu, 26 Aug 2021 14:46:49 +0200 Subject: [PATCH 114/157] Update CHANGELOG.md --- CHANGELOG.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ca6a8e115..38acc8d4a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,8 +6,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased/Snapshot] +### Added +- added `EvcsLocationType` support in `EvcsInput` and `EvcsInputFactory` [#406](https://github.com/ie3-institute/PowerSystemDataModel/issues/406) + ### Fixed -- adapted `LineInput` constructor to convert line length to `StandardUnits.LINE_LENGTH` +- adapted `LineInput` constructor to convert line length to `StandardUnits.LINE_LENGTH` [#412](https://github.com/ie3-institute/PowerSystemDataModel/issues/412) ## [2.0.1] - 2021-07-08 From 7f79901125f976b2fb53fdaff4a6170a0b04f418 Mon Sep 17 00:00:00 2001 From: Johannes Hiry Date: Fri, 27 Aug 2021 12:39:11 +0200 Subject: [PATCH 115/157] fmt --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 38acc8d4a..fbed9025f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,7 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased/Snapshot] ### Added -- added `EvcsLocationType` support in `EvcsInput` and `EvcsInputFactory` [#406](https://github.com/ie3-institute/PowerSystemDataModel/issues/406) +- added `EvcsLocationType` support in `EvcsInput` and `EvcsInputFactory` [#406](https://github.com/ie3-institute/PowerSystemDataModel/issues/406) ### Fixed - adapted `LineInput` constructor to convert line length to `StandardUnits.LINE_LENGTH` [#412](https://github.com/ie3-institute/PowerSystemDataModel/issues/412) From 8f12dd72fc8451c83b3427d78fdffd808b7e95b8 Mon Sep 17 00:00:00 2001 From: "Kittl, Chris" Date: Sun, 29 Aug 2021 15:26:27 +0200 Subject: [PATCH 116/157] Offer means to access the time series writer directly --- .../ie3/datamodel/io/sink/CsvFileSink.java | 38 +++++++++++++++---- 1 file changed, 30 insertions(+), 8 deletions(-) diff --git a/src/main/java/edu/ie3/datamodel/io/sink/CsvFileSink.java b/src/main/java/edu/ie3/datamodel/io/sink/CsvFileSink.java index 9fcca0a22..62404acb1 100644 --- a/src/main/java/edu/ie3/datamodel/io/sink/CsvFileSink.java +++ b/src/main/java/edu/ie3/datamodel/io/sink/CsvFileSink.java @@ -265,6 +265,36 @@ public void shutdown() { @Override public , V extends Value> void persistTimeSeries( TimeSeries timeSeries) { + try { + BufferedCsvWriter writer = getWriterForTimeSeries(timeSeries); + persistTimeSeries(timeSeries, writer); + } catch (ProcessorProviderException e) { + log.error( + "Exception occurred during receiving of header elements. Cannot write this element.", e); + } catch (ConnectorException e) { + log.error("Exception occurred during acquisition of writer.", e); + } + } + + /** + * Provide a suitable {@link BufferedCsvWriter} for the targeted time series + * + * @param timeSeries The time series to persist + * @param Type of Entry within the time series + * @param Actually carried value + * @return A suitable {@link BufferedCsvWriter} + * @throws ProcessorProviderException If there is no handling known for the given time series + * @throws ConnectorException If there is no suitable writer known for this time series + */ + public , V extends Value> BufferedCsvWriter getWriterForTimeSeries( + TimeSeries timeSeries) throws ProcessorProviderException, ConnectorException { + TimeSeriesProcessorKey key = new TimeSeriesProcessorKey(timeSeries); + String[] headerElements = csvHeaderElements(processorProvider.getHeaderElements(key)); + return connector.getOrInitWriter(timeSeries, headerElements, csvSep); + } + + public , V extends Value> void persistTimeSeries( + TimeSeries timeSeries, BufferedCsvWriter writer) { TimeSeriesProcessorKey key = new TimeSeriesProcessorKey(timeSeries); try { @@ -281,9 +311,6 @@ public , V extends Value> void persistTimeSeries( .map(TimeSeriesProcessorKey::toString) .collect(Collectors.joining(",")) + "]")); - - String[] headerElements = csvHeaderElements(processorProvider.getHeaderElements(key)); - BufferedCsvWriter writer = connector.getOrInitWriter(timeSeries, headerElements, csvSep); entityFieldData.forEach( data -> { try { @@ -294,11 +321,6 @@ public , V extends Value> void persistTimeSeries( log.error("Exception occurred during processing the provided data fields: ", e); } }); - } catch (ProcessorProviderException e) { - log.error( - "Exception occurred during receiving of header elements. Cannot write this element.", e); - } catch (ConnectorException e) { - log.error("Exception occurred during acquisition of writer.", e); } catch (SinkException e) { log.error("Exception occurred during processor request: ", e); } From 78ded1366b9927b082832ee2e1183e79042b3d38 Mon Sep 17 00:00:00 2001 From: "Kittl, Chris" Date: Mon, 30 Aug 2021 10:18:30 +0200 Subject: [PATCH 117/157] Close time series writers after writing the time series --- .../io/connectors/CsvFileConnector.java | 36 +++++++++++++++++++ .../ie3/datamodel/io/sink/CsvFileSink.java | 3 ++ 2 files changed, 39 insertions(+) diff --git a/src/main/java/edu/ie3/datamodel/io/connectors/CsvFileConnector.java b/src/main/java/edu/ie3/datamodel/io/connectors/CsvFileConnector.java index 3d472283a..793a1c478 100644 --- a/src/main/java/edu/ie3/datamodel/io/connectors/CsvFileConnector.java +++ b/src/main/java/edu/ie3/datamodel/io/connectors/CsvFileConnector.java @@ -132,6 +132,42 @@ private BufferedCsvWriter initWriter(String baseDirectory, CsvFileDefinition fil return writer; } + /** + * Closes a time series writer for the time series with given {@link UUID} + * + * @param uuid identifier of time series, whose writer is meant to be closed + * @throws IOException If closing of writer fails. + */ + public synchronized void closeTimeSeriesWriter(UUID uuid) throws IOException { + Optional maybeWriter = Optional.ofNullable(timeSeriesWriters.get(uuid)); + if (maybeWriter.isPresent()) { + log.debug("Remove reference to time series writer for UUID '{}'.", uuid); + timeSeriesWriters.remove(uuid); + maybeWriter.get().close(); + } else { + log.warn("No writer found for time series '{}'.", uuid); + } + } + + /** + * Close an entity writer for the given class + * + * @param clz Class, that the writer is able to persist + * @param Type of class + * @throws IOException If closing of writer fails. + */ + public synchronized > void closeEntityWriter(C clz) + throws IOException { + Optional maybeWriter = Optional.ofNullable(entityWriters.get(clz)); + if (maybeWriter.isPresent()) { + log.debug("Remove reference to entity writer for class '{}'.", clz); + entityWriters.remove(clz); + maybeWriter.get().close(); + } else { + log.warn("No writer found for class '{}'.", clz); + } + } + /** * Initializes a file reader for the given class that should be read in. The expected file name is * determined based on {@link FileNamingStrategy} of the this {@link CsvFileConnector} instance diff --git a/src/main/java/edu/ie3/datamodel/io/sink/CsvFileSink.java b/src/main/java/edu/ie3/datamodel/io/sink/CsvFileSink.java index 62404acb1..6c32c9732 100644 --- a/src/main/java/edu/ie3/datamodel/io/sink/CsvFileSink.java +++ b/src/main/java/edu/ie3/datamodel/io/sink/CsvFileSink.java @@ -268,11 +268,14 @@ public , V extends Value> void persistTimeSeries( try { BufferedCsvWriter writer = getWriterForTimeSeries(timeSeries); persistTimeSeries(timeSeries, writer); + connector.closeTimeSeriesWriter(timeSeries.getUuid()); } catch (ProcessorProviderException e) { log.error( "Exception occurred during receiving of header elements. Cannot write this element.", e); } catch (ConnectorException e) { log.error("Exception occurred during acquisition of writer.", e); + } catch (IOException e) { + log.error("Exception occurred during closing of writer.", e); } } From 47bc608e55dd0d4c5a03b95a09f897aa0a8fb60a Mon Sep 17 00:00:00 2001 From: Johannes Hiry Date: Mon, 30 Aug 2021 12:26:12 +0200 Subject: [PATCH 118/157] debug jenkinsfile --- Jenkinsfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Jenkinsfile b/Jenkinsfile index 9795189bb..2a241f7ab 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -104,6 +104,8 @@ node { // test the project stage('run tests') { + sh 'java -version' + gradle('--refresh-dependencies clean spotlessCheck pmdMain pmdTest spotbugsMain ' + 'spotbugsTest test jacocoTestReport jacocoTestCoverageVerification', projectName) From dbb49d2cedb7f420436754771f2da535467dac2b Mon Sep 17 00:00:00 2001 From: Johannes Hiry Date: Mon, 30 Aug 2021 13:23:02 +0200 Subject: [PATCH 119/157] - update gradle 6.0.1 -> 2.7 - kill one-jar gradle plugin - update pmd from 6.24.0 -> 6.38.0 --- build.gradle | 42 +++++++++---------- gradle/scripts/pmd.gradle | 4 +- gradle/scripts/selfContainedJar.gradle | 6 --- gradle/wrapper/gradle-wrapper.properties | 2 +- .../io/connectors/CsvFileConnector.java | 6 +-- .../timeseries/TimeSeriesProcessor.java | 6 ++- .../io/source/csv/CsvDataSource.java | 8 +--- .../io/source/csv/CsvIdCoordinateSource.java | 2 +- .../io/source/csv/CsvWeatherSource.java | 2 +- .../input/container/GraphicElements.java | 6 +-- .../input/container/RawGridElements.java | 18 +++----- .../input/container/SystemParticipants.java | 30 +++++-------- .../chargingpoint/ChargingPointTypeUtils.java | 3 +- .../utils/ContainerNodeUpdateUtil.java | 4 +- 14 files changed, 54 insertions(+), 85 deletions(-) delete mode 100644 gradle/scripts/selfContainedJar.gradle diff --git a/build.gradle b/build.gradle index 7b532dbd2..211837936 100644 --- a/build.gradle +++ b/build.gradle @@ -6,7 +6,6 @@ plugins { id 'pmd' // code check, working on source code id 'com.diffplug.spotless' version '5.14.3'//code format id 'com.github.spotbugs' version '4.7.3' // code check, working on byte code - id 'com.github.onslip.gradle-one-jar' version '1.0.6' // pack a self contained jar id 'de.undercouch.download' version '4.1.2' id 'kr.motd.sphinx' version '2.10.1' // documentation generation id 'jacoco' // java code coverage plugin @@ -33,7 +32,6 @@ apply from: scriptsLocation + 'pmd.gradle' apply from: scriptsLocation + 'spotbugs.gradle' apply from: scriptsLocation + 'spotless.gradle' apply from: scriptsLocation + 'checkJavaVersion.gradle' -apply from: scriptsLocation + 'selfContainedJar.gradle' apply from: scriptsLocation + 'documentation.gradle' apply from: scriptsLocation + 'jacoco.gradle' // jacoco java code coverage apply from: scriptsLocation + 'mavenCentralPublish.gradle' @@ -46,47 +44,47 @@ repositories { maven { url 'https://www.jitpack.io' } // allows github repos as dependencies // sonatype snapshot repo - maven { url 'http://oss.sonatype.org/content/repositories/snapshots' } + maven { url 'https://oss.sonatype.org/content/repositories/snapshots' } } dependencies { // ie³ power system utils - compile 'com.github.ie3-institute:PowerSystemUtils:1.5.3' + implementation 'com.github.ie3-institute:PowerSystemUtils:1.5.3' implementation 'tech.units:indriya:2.1.2' // JTS Topology Suite for GeoPositions, License: EPL 1.0 / EDL 1.0 - compile 'org.locationtech.jts:jts-core:1.18.1' - compile 'org.locationtech.jts.io:jts-io-common:1.18.1' + implementation 'org.locationtech.jts:jts-core:1.18.1' + implementation 'org.locationtech.jts.io:jts-io-common:1.18.1' // Graphs - compile 'org.jgrapht:jgrapht-core:1.4.0' + implementation 'org.jgrapht:jgrapht-core:1.4.0' // testing - testCompile 'org.junit.jupiter:junit-jupiter:5.7.2' - testCompile 'org.spockframework:spock-core:2.0-groovy-3.0' - testCompile 'org.objenesis:objenesis:3.2' // Mock creation with constructor parameters + testImplementation 'org.junit.jupiter:junit-jupiter:5.7.2' + testImplementation 'org.spockframework:spock-core:2.0-groovy-3.0' + testImplementation 'org.objenesis:objenesis:3.2' // Mock creation with constructor parameters // testcontainers (docker framework for testing) - testCompile "org.testcontainers:testcontainers:$testcontainersVersion" - testCompile "org.testcontainers:spock:$testcontainersVersion" - testCompile "org.testcontainers:influxdb:$testcontainersVersion" - testCompile "org.testcontainers:postgresql:$testcontainersVersion" - testCompile "org.testcontainers:couchbase:$testcontainersVersion" + testImplementation "org.testcontainers:testcontainers:$testcontainersVersion" + testImplementation "org.testcontainers:spock:$testcontainersVersion" + testImplementation "org.testcontainers:influxdb:$testcontainersVersion" + testImplementation "org.testcontainers:postgresql:$testcontainersVersion" + testImplementation "org.testcontainers:couchbase:$testcontainersVersion" // logging - compile 'org.apache.logging.log4j:log4j-api:2.14.1' // log4j - compile 'org.apache.logging.log4j:log4j-core:2.14.1' // log4j - compile 'org.apache.logging.log4j:log4j-slf4j-impl:2.14.1' // log4j -> slf4j + implementation 'org.apache.logging.log4j:log4j-api:2.14.1' // log4j + implementation 'org.apache.logging.log4j:log4j-core:2.14.1' // log4j + implementation 'org.apache.logging.log4j:log4j-slf4j-impl:2.14.1' // log4j -> slf4j // Databases - compile 'org.influxdb:influxdb-java:2.21' - compile 'com.couchbase.client:java-client:3.2.0' + implementation 'org.influxdb:influxdb-java:2.21' + implementation 'com.couchbase.client:java-client:3.2.0' runtimeOnly 'org.postgresql:postgresql:42.2.23' // postgresql jdbc driver required during runtime - compile 'commons-io:commons-io:2.11.0' // I/O functionalities - compile 'org.apache.commons:commons-compress:1.21' // I/O functionalities + implementation 'commons-io:commons-io:2.11.0' // I/O functionalities + implementation 'org.apache.commons:commons-compress:1.21' // I/O functionalities } wrapper { diff --git a/gradle/scripts/pmd.gradle b/gradle/scripts/pmd.gradle index 8242fe1f9..e6a8ca494 100644 --- a/gradle/scripts/pmd.gradle +++ b/gradle/scripts/pmd.gradle @@ -3,9 +3,9 @@ pmd { ignoreFailures true // dont let the build fail on rule violations - toolVersion = "6.24.0" + toolVersion = "6.38.0" // pmd rule priority is a range from 1 to 5, with 1 being the highest priority // the default rule priority is 5 - rulePriority 2 + rulesMinimumPriority = 2 } diff --git a/gradle/scripts/selfContainedJar.gradle b/gradle/scripts/selfContainedJar.gradle deleted file mode 100644 index 52a874684..000000000 --- a/gradle/scripts/selfContainedJar.gradle +++ /dev/null @@ -1,6 +0,0 @@ -// OneJar is plugin for building self contained JARs (JARs with all needed dependencies) - -tasks.register('selfContainedJar', OneJar){ - mainClass = mainClass - archiveName = 'powersystemdatamodel_selfcontained.jar' -} diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 427f77b9e..a029b784d 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ #Mon Dec 02 10:39:11 CET 2019 -distributionUrl=https\://services.gradle.org/distributions/gradle-6.0.1-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-all.zip distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStorePath=wrapper/dists diff --git a/src/main/java/edu/ie3/datamodel/io/connectors/CsvFileConnector.java b/src/main/java/edu/ie3/datamodel/io/connectors/CsvFileConnector.java index 793a1c478..7dfe48f07 100644 --- a/src/main/java/edu/ie3/datamodel/io/connectors/CsvFileConnector.java +++ b/src/main/java/edu/ie3/datamodel/io/connectors/CsvFileConnector.java @@ -235,8 +235,7 @@ public Optional getIndividualTimeSeriesMeta */ private Map buildIndividualTimeSeriesMetaInformation() { - return getIndividualTimeSeriesFilePaths() - .parallelStream() + return getIndividualTimeSeriesFilePaths().parallelStream() .map( filePath -> { /* Extract meta information from file path and enhance it with the file path itself */ @@ -260,8 +259,7 @@ public Optional getIndividualTimeSeriesMeta */ public Map> getCsvIndividualTimeSeriesMetaInformation(ColumnScheme... columnSchemes) { - return getIndividualTimeSeriesFilePaths() - .parallelStream() + return getIndividualTimeSeriesFilePaths().parallelStream() .map( pathString -> { String filePathWithoutEnding = removeFileEnding(pathString); diff --git a/src/main/java/edu/ie3/datamodel/io/processor/timeseries/TimeSeriesProcessor.java b/src/main/java/edu/ie3/datamodel/io/processor/timeseries/TimeSeriesProcessor.java index af29f3dca..0a2bf66b3 100644 --- a/src/main/java/edu/ie3/datamodel/io/processor/timeseries/TimeSeriesProcessor.java +++ b/src/main/java/edu/ie3/datamodel/io/processor/timeseries/TimeSeriesProcessor.java @@ -106,7 +106,8 @@ private SortedMap buildFieldToSource( Class timeSeriesClass, Class entryClass, Class valueClass) { /* Get the mapping from field name to getter method ignoring the getter for returning all entries */ Map timeSeriesMapping = - mapFieldNameToGetter(timeSeriesClass, Arrays.asList("entries", "uuid", "type")).entrySet() + mapFieldNameToGetter(timeSeriesClass, Arrays.asList("entries", "uuid", "type")) + .entrySet() .stream() .collect( Collectors.toMap( @@ -136,7 +137,8 @@ private SortedMap buildFieldToSource( mapFieldNameToGetter( valueClass, Arrays.asList("solarIrradiance", "temperature", "wind")) - .entrySet().stream() + .entrySet() + .stream() .map( entry -> new AbstractMap.SimpleEntry<>( diff --git a/src/main/java/edu/ie3/datamodel/io/source/csv/CsvDataSource.java b/src/main/java/edu/ie3/datamodel/io/source/csv/CsvDataSource.java index 9f02b4b79..6a3869c44 100644 --- a/src/main/java/edu/ie3/datamodel/io/source/csv/CsvDataSource.java +++ b/src/main/java/edu/ie3/datamodel/io/source/csv/CsvDataSource.java @@ -393,10 +393,7 @@ protected Stream> buildStreamWithFieldsToAttributesMap( Collection> allRows = csvRowFieldValueMapping(reader, headline); return distinctRowsWithLog( - allRows, - fieldToValues -> fieldToValues.get("uuid"), - entityClass.getSimpleName(), - "UUID") + allRows, fieldToValues -> fieldToValues.get("uuid"), entityClass.getSimpleName(), "UUID") .parallelStream(); } catch (IOException e) { log.warn( @@ -455,8 +452,7 @@ protected Set> distinctRowsWithLog( /* Check for rows with the same key based on the provided key extractor function */ Set> distinctIdSet = - allRowsSet - .parallelStream() + allRowsSet.parallelStream() .filter(ValidationUtils.distinctByKey(keyExtractor)) .collect(Collectors.toSet()); if (distinctIdSet.size() != allRowsSet.size()) { diff --git a/src/main/java/edu/ie3/datamodel/io/source/csv/CsvIdCoordinateSource.java b/src/main/java/edu/ie3/datamodel/io/source/csv/CsvIdCoordinateSource.java index 6a9abf4cc..822dae3bb 100644 --- a/src/main/java/edu/ie3/datamodel/io/source/csv/CsvIdCoordinateSource.java +++ b/src/main/java/edu/ie3/datamodel/io/source/csv/CsvIdCoordinateSource.java @@ -123,7 +123,7 @@ protected Stream> buildStreamWithFieldsToAttributesMap() { .get(factory.getLatField()) .concat(fieldToValues.get(factory.getLonField())); return distinctRowsWithLog( - withDistinctCoordinateId, coordinateExtractor, "coordinate id mapping", "coordinate") + withDistinctCoordinateId, coordinateExtractor, "coordinate id mapping", "coordinate") .parallelStream(); } catch (IOException e) { log.error("Cannot read the file for coordinate id to coordinate mapping.", e); diff --git a/src/main/java/edu/ie3/datamodel/io/source/csv/CsvWeatherSource.java b/src/main/java/edu/ie3/datamodel/io/source/csv/CsvWeatherSource.java index 69d322f6c..6a3e2bdda 100644 --- a/src/main/java/edu/ie3/datamodel/io/source/csv/CsvWeatherSource.java +++ b/src/main/java/edu/ie3/datamodel/io/source/csv/CsvWeatherSource.java @@ -253,7 +253,7 @@ protected Stream> buildStreamWithFieldsToAttributesMap( .get(weatherFactory.getTimeFieldString()) .concat(fieldToValues.get(weatherFactory.getCoordinateIdFieldString())); return distinctRowsWithLog( - allRows, timeCoordinateIdExtractor, entityClass.getSimpleName(), "UUID") + allRows, timeCoordinateIdExtractor, entityClass.getSimpleName(), "UUID") .parallelStream(); } catch (IOException e) { diff --git a/src/main/java/edu/ie3/datamodel/models/input/container/GraphicElements.java b/src/main/java/edu/ie3/datamodel/models/input/container/GraphicElements.java index af0d4d9fd..60434f9a8 100644 --- a/src/main/java/edu/ie3/datamodel/models/input/container/GraphicElements.java +++ b/src/main/java/edu/ie3/datamodel/models/input/container/GraphicElements.java @@ -48,14 +48,12 @@ public GraphicElements(List graphics) { /* init sets */ this.nodeGraphics = - graphics - .parallelStream() + graphics.parallelStream() .filter(graphic -> graphic instanceof NodeGraphicInput) .map(graphic -> (NodeGraphicInput) graphic) .collect(Collectors.toSet()); this.lineGraphics = - graphics - .parallelStream() + graphics.parallelStream() .filter(graphic -> graphic instanceof LineGraphicInput) .map(graphic -> (LineGraphicInput) graphic) .collect(Collectors.toSet()); diff --git a/src/main/java/edu/ie3/datamodel/models/input/container/RawGridElements.java b/src/main/java/edu/ie3/datamodel/models/input/container/RawGridElements.java index 4f0abc3e9..b8806a63d 100644 --- a/src/main/java/edu/ie3/datamodel/models/input/container/RawGridElements.java +++ b/src/main/java/edu/ie3/datamodel/models/input/container/RawGridElements.java @@ -84,38 +84,32 @@ public RawGridElements(List rawGridElements) { /* init sets */ this.nodes = - rawGridElements - .parallelStream() + rawGridElements.parallelStream() .filter(gridElement -> gridElement instanceof NodeInput) .map(nodeInput -> (NodeInput) nodeInput) .collect(Collectors.toSet()); this.lines = - rawGridElements - .parallelStream() + rawGridElements.parallelStream() .filter(gridElement -> gridElement instanceof LineInput) .map(lineInput -> (LineInput) lineInput) .collect(Collectors.toSet()); this.transformer2Ws = - rawGridElements - .parallelStream() + rawGridElements.parallelStream() .filter(gridElement -> gridElement instanceof Transformer2WInput) .map(trafo2wInput -> (Transformer2WInput) trafo2wInput) .collect(Collectors.toSet()); this.transformer3Ws = - rawGridElements - .parallelStream() + rawGridElements.parallelStream() .filter(gridElement -> gridElement instanceof Transformer3WInput) .map(trafo3wInput -> (Transformer3WInput) trafo3wInput) .collect(Collectors.toSet()); this.switches = - rawGridElements - .parallelStream() + rawGridElements.parallelStream() .filter(gridElement -> gridElement instanceof SwitchInput) .map(switchInput -> (SwitchInput) switchInput) .collect(Collectors.toSet()); this.measurementUnits = - rawGridElements - .parallelStream() + rawGridElements.parallelStream() .filter(gridElement -> gridElement instanceof MeasurementUnitInput) .map(measurementUnitInput -> (MeasurementUnitInput) measurementUnitInput) .collect(Collectors.toSet()); diff --git a/src/main/java/edu/ie3/datamodel/models/input/container/SystemParticipants.java b/src/main/java/edu/ie3/datamodel/models/input/container/SystemParticipants.java index 8a47b4995..28550d86a 100644 --- a/src/main/java/edu/ie3/datamodel/models/input/container/SystemParticipants.java +++ b/src/main/java/edu/ie3/datamodel/models/input/container/SystemParticipants.java @@ -106,62 +106,52 @@ public SystemParticipants(List systemParticipants) { /* init sets */ this.bmPlants = - systemParticipants - .parallelStream() + systemParticipants.parallelStream() .filter(gridElement -> gridElement instanceof BmInput) .map(bmInput -> (BmInput) bmInput) .collect(Collectors.toSet()); this.chpPlants = - systemParticipants - .parallelStream() + systemParticipants.parallelStream() .filter(gridElement -> gridElement instanceof ChpInput) .map(chpInput -> (ChpInput) chpInput) .collect(Collectors.toSet()); this.evCS = - systemParticipants - .parallelStream() + systemParticipants.parallelStream() .filter(gridElement -> gridElement instanceof EvcsInput) .map(evcsInput -> (EvcsInput) evcsInput) .collect(Collectors.toSet()); this.evs = - systemParticipants - .parallelStream() + systemParticipants.parallelStream() .filter(gridElement -> gridElement instanceof EvInput) .map(evInput -> (EvInput) evInput) .collect(Collectors.toSet()); this.fixedFeedIns = - systemParticipants - .parallelStream() + systemParticipants.parallelStream() .filter(gridElement -> gridElement instanceof FixedFeedInInput) .map(fixedFeedInInpu -> (FixedFeedInInput) fixedFeedInInpu) .collect(Collectors.toSet()); this.heatPumps = - systemParticipants - .parallelStream() + systemParticipants.parallelStream() .filter(gridElement -> gridElement instanceof HpInput) .map(hpInput -> (HpInput) hpInput) .collect(Collectors.toSet()); this.loads = - systemParticipants - .parallelStream() + systemParticipants.parallelStream() .filter(gridElement -> gridElement instanceof LoadInput) .map(loadInput -> (LoadInput) loadInput) .collect(Collectors.toSet()); this.pvPlants = - systemParticipants - .parallelStream() + systemParticipants.parallelStream() .filter(gridElement -> gridElement instanceof PvInput) .map(pvInput -> (PvInput) pvInput) .collect(Collectors.toSet()); this.storages = - systemParticipants - .parallelStream() + systemParticipants.parallelStream() .filter(gridElement -> gridElement instanceof StorageInput) .map(storageInput -> (StorageInput) storageInput) .collect(Collectors.toSet()); this.wecPlants = - systemParticipants - .parallelStream() + systemParticipants.parallelStream() .filter(gridElement -> gridElement instanceof WecInput) .map(wecInput -> (WecInput) wecInput) .collect(Collectors.toSet()); diff --git a/src/main/java/edu/ie3/datamodel/models/input/system/type/chargingpoint/ChargingPointTypeUtils.java b/src/main/java/edu/ie3/datamodel/models/input/system/type/chargingpoint/ChargingPointTypeUtils.java index 6825a3c0f..e72de1aba 100644 --- a/src/main/java/edu/ie3/datamodel/models/input/system/type/chargingpoint/ChargingPointTypeUtils.java +++ b/src/main/java/edu/ie3/datamodel/models/input/system/type/chargingpoint/ChargingPointTypeUtils.java @@ -142,7 +142,8 @@ private ChargingPointTypeUtils() { Stream.concat( Stream.of(type.getId().toLowerCase()), type.getSynonymousIds().stream().map(String::toLowerCase)) - .collect(Collectors.toMap(Function.identity(), v -> type)).entrySet() + .collect(Collectors.toMap(Function.identity(), v -> type)) + .entrySet() .stream()) .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue))); diff --git a/src/main/java/edu/ie3/datamodel/utils/ContainerNodeUpdateUtil.java b/src/main/java/edu/ie3/datamodel/utils/ContainerNodeUpdateUtil.java index 5286f78af..f641adccf 100644 --- a/src/main/java/edu/ie3/datamodel/utils/ContainerNodeUpdateUtil.java +++ b/src/main/java/edu/ie3/datamodel/utils/ContainerNodeUpdateUtil.java @@ -207,9 +207,7 @@ private static SystemParticipants updateSystemParticipantsWithNodes( SystemParticipants systemParticipants, Map oldToNewNodes) { List sysParts = - systemParticipants - .allEntitiesAsList() - .parallelStream() + systemParticipants.allEntitiesAsList().parallelStream() .map( sysPart -> { if (oldToNewNodes.containsKey(sysPart.getNode())) { From 8da25c941ba9fdce3480fdd676cb0d260519dd9e Mon Sep 17 00:00:00 2001 From: Johannes Hiry Date: Mon, 30 Aug 2021 13:28:06 +0200 Subject: [PATCH 120/157] set javadoc encoding explicitly in build.gradle --- build.gradle | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/build.gradle b/build.gradle index 211837936..124c70ead 100644 --- a/build.gradle +++ b/build.gradle @@ -95,6 +95,10 @@ tasks.withType(JavaCompile) { options.encoding = 'UTF-8' } +tasks.withType(Javadoc){ + options.encoding = 'UTF-8' +} + task printVersion { doLast { println project.version From c44739859e050932f06cf9779f9a55a8e0fa98ad Mon Sep 17 00:00:00 2001 From: Johannes Hiry Date: Mon, 30 Aug 2021 13:30:21 +0200 Subject: [PATCH 121/157] fmt w j8 --- .../io/connectors/CsvFileConnector.java | 6 ++-- .../timeseries/TimeSeriesProcessor.java | 6 ++-- .../io/source/csv/CsvDataSource.java | 8 +++-- .../io/source/csv/CsvIdCoordinateSource.java | 2 +- .../io/source/csv/CsvWeatherSource.java | 2 +- .../input/container/GraphicElements.java | 6 ++-- .../input/container/RawGridElements.java | 18 +++++++---- .../input/container/SystemParticipants.java | 30 ++++++++++++------- .../chargingpoint/ChargingPointTypeUtils.java | 3 +- .../utils/ContainerNodeUpdateUtil.java | 4 ++- 10 files changed, 54 insertions(+), 31 deletions(-) diff --git a/src/main/java/edu/ie3/datamodel/io/connectors/CsvFileConnector.java b/src/main/java/edu/ie3/datamodel/io/connectors/CsvFileConnector.java index 7dfe48f07..793a1c478 100644 --- a/src/main/java/edu/ie3/datamodel/io/connectors/CsvFileConnector.java +++ b/src/main/java/edu/ie3/datamodel/io/connectors/CsvFileConnector.java @@ -235,7 +235,8 @@ public Optional getIndividualTimeSeriesMeta */ private Map buildIndividualTimeSeriesMetaInformation() { - return getIndividualTimeSeriesFilePaths().parallelStream() + return getIndividualTimeSeriesFilePaths() + .parallelStream() .map( filePath -> { /* Extract meta information from file path and enhance it with the file path itself */ @@ -259,7 +260,8 @@ public Optional getIndividualTimeSeriesMeta */ public Map> getCsvIndividualTimeSeriesMetaInformation(ColumnScheme... columnSchemes) { - return getIndividualTimeSeriesFilePaths().parallelStream() + return getIndividualTimeSeriesFilePaths() + .parallelStream() .map( pathString -> { String filePathWithoutEnding = removeFileEnding(pathString); diff --git a/src/main/java/edu/ie3/datamodel/io/processor/timeseries/TimeSeriesProcessor.java b/src/main/java/edu/ie3/datamodel/io/processor/timeseries/TimeSeriesProcessor.java index 0a2bf66b3..af29f3dca 100644 --- a/src/main/java/edu/ie3/datamodel/io/processor/timeseries/TimeSeriesProcessor.java +++ b/src/main/java/edu/ie3/datamodel/io/processor/timeseries/TimeSeriesProcessor.java @@ -106,8 +106,7 @@ private SortedMap buildFieldToSource( Class timeSeriesClass, Class entryClass, Class valueClass) { /* Get the mapping from field name to getter method ignoring the getter for returning all entries */ Map timeSeriesMapping = - mapFieldNameToGetter(timeSeriesClass, Arrays.asList("entries", "uuid", "type")) - .entrySet() + mapFieldNameToGetter(timeSeriesClass, Arrays.asList("entries", "uuid", "type")).entrySet() .stream() .collect( Collectors.toMap( @@ -137,8 +136,7 @@ private SortedMap buildFieldToSource( mapFieldNameToGetter( valueClass, Arrays.asList("solarIrradiance", "temperature", "wind")) - .entrySet() - .stream() + .entrySet().stream() .map( entry -> new AbstractMap.SimpleEntry<>( diff --git a/src/main/java/edu/ie3/datamodel/io/source/csv/CsvDataSource.java b/src/main/java/edu/ie3/datamodel/io/source/csv/CsvDataSource.java index 6a3869c44..9f02b4b79 100644 --- a/src/main/java/edu/ie3/datamodel/io/source/csv/CsvDataSource.java +++ b/src/main/java/edu/ie3/datamodel/io/source/csv/CsvDataSource.java @@ -393,7 +393,10 @@ protected Stream> buildStreamWithFieldsToAttributesMap( Collection> allRows = csvRowFieldValueMapping(reader, headline); return distinctRowsWithLog( - allRows, fieldToValues -> fieldToValues.get("uuid"), entityClass.getSimpleName(), "UUID") + allRows, + fieldToValues -> fieldToValues.get("uuid"), + entityClass.getSimpleName(), + "UUID") .parallelStream(); } catch (IOException e) { log.warn( @@ -452,7 +455,8 @@ protected Set> distinctRowsWithLog( /* Check for rows with the same key based on the provided key extractor function */ Set> distinctIdSet = - allRowsSet.parallelStream() + allRowsSet + .parallelStream() .filter(ValidationUtils.distinctByKey(keyExtractor)) .collect(Collectors.toSet()); if (distinctIdSet.size() != allRowsSet.size()) { diff --git a/src/main/java/edu/ie3/datamodel/io/source/csv/CsvIdCoordinateSource.java b/src/main/java/edu/ie3/datamodel/io/source/csv/CsvIdCoordinateSource.java index 822dae3bb..6a9abf4cc 100644 --- a/src/main/java/edu/ie3/datamodel/io/source/csv/CsvIdCoordinateSource.java +++ b/src/main/java/edu/ie3/datamodel/io/source/csv/CsvIdCoordinateSource.java @@ -123,7 +123,7 @@ protected Stream> buildStreamWithFieldsToAttributesMap() { .get(factory.getLatField()) .concat(fieldToValues.get(factory.getLonField())); return distinctRowsWithLog( - withDistinctCoordinateId, coordinateExtractor, "coordinate id mapping", "coordinate") + withDistinctCoordinateId, coordinateExtractor, "coordinate id mapping", "coordinate") .parallelStream(); } catch (IOException e) { log.error("Cannot read the file for coordinate id to coordinate mapping.", e); diff --git a/src/main/java/edu/ie3/datamodel/io/source/csv/CsvWeatherSource.java b/src/main/java/edu/ie3/datamodel/io/source/csv/CsvWeatherSource.java index 6a3e2bdda..69d322f6c 100644 --- a/src/main/java/edu/ie3/datamodel/io/source/csv/CsvWeatherSource.java +++ b/src/main/java/edu/ie3/datamodel/io/source/csv/CsvWeatherSource.java @@ -253,7 +253,7 @@ protected Stream> buildStreamWithFieldsToAttributesMap( .get(weatherFactory.getTimeFieldString()) .concat(fieldToValues.get(weatherFactory.getCoordinateIdFieldString())); return distinctRowsWithLog( - allRows, timeCoordinateIdExtractor, entityClass.getSimpleName(), "UUID") + allRows, timeCoordinateIdExtractor, entityClass.getSimpleName(), "UUID") .parallelStream(); } catch (IOException e) { diff --git a/src/main/java/edu/ie3/datamodel/models/input/container/GraphicElements.java b/src/main/java/edu/ie3/datamodel/models/input/container/GraphicElements.java index 60434f9a8..af0d4d9fd 100644 --- a/src/main/java/edu/ie3/datamodel/models/input/container/GraphicElements.java +++ b/src/main/java/edu/ie3/datamodel/models/input/container/GraphicElements.java @@ -48,12 +48,14 @@ public GraphicElements(List graphics) { /* init sets */ this.nodeGraphics = - graphics.parallelStream() + graphics + .parallelStream() .filter(graphic -> graphic instanceof NodeGraphicInput) .map(graphic -> (NodeGraphicInput) graphic) .collect(Collectors.toSet()); this.lineGraphics = - graphics.parallelStream() + graphics + .parallelStream() .filter(graphic -> graphic instanceof LineGraphicInput) .map(graphic -> (LineGraphicInput) graphic) .collect(Collectors.toSet()); diff --git a/src/main/java/edu/ie3/datamodel/models/input/container/RawGridElements.java b/src/main/java/edu/ie3/datamodel/models/input/container/RawGridElements.java index b8806a63d..4f0abc3e9 100644 --- a/src/main/java/edu/ie3/datamodel/models/input/container/RawGridElements.java +++ b/src/main/java/edu/ie3/datamodel/models/input/container/RawGridElements.java @@ -84,32 +84,38 @@ public RawGridElements(List rawGridElements) { /* init sets */ this.nodes = - rawGridElements.parallelStream() + rawGridElements + .parallelStream() .filter(gridElement -> gridElement instanceof NodeInput) .map(nodeInput -> (NodeInput) nodeInput) .collect(Collectors.toSet()); this.lines = - rawGridElements.parallelStream() + rawGridElements + .parallelStream() .filter(gridElement -> gridElement instanceof LineInput) .map(lineInput -> (LineInput) lineInput) .collect(Collectors.toSet()); this.transformer2Ws = - rawGridElements.parallelStream() + rawGridElements + .parallelStream() .filter(gridElement -> gridElement instanceof Transformer2WInput) .map(trafo2wInput -> (Transformer2WInput) trafo2wInput) .collect(Collectors.toSet()); this.transformer3Ws = - rawGridElements.parallelStream() + rawGridElements + .parallelStream() .filter(gridElement -> gridElement instanceof Transformer3WInput) .map(trafo3wInput -> (Transformer3WInput) trafo3wInput) .collect(Collectors.toSet()); this.switches = - rawGridElements.parallelStream() + rawGridElements + .parallelStream() .filter(gridElement -> gridElement instanceof SwitchInput) .map(switchInput -> (SwitchInput) switchInput) .collect(Collectors.toSet()); this.measurementUnits = - rawGridElements.parallelStream() + rawGridElements + .parallelStream() .filter(gridElement -> gridElement instanceof MeasurementUnitInput) .map(measurementUnitInput -> (MeasurementUnitInput) measurementUnitInput) .collect(Collectors.toSet()); diff --git a/src/main/java/edu/ie3/datamodel/models/input/container/SystemParticipants.java b/src/main/java/edu/ie3/datamodel/models/input/container/SystemParticipants.java index 28550d86a..8a47b4995 100644 --- a/src/main/java/edu/ie3/datamodel/models/input/container/SystemParticipants.java +++ b/src/main/java/edu/ie3/datamodel/models/input/container/SystemParticipants.java @@ -106,52 +106,62 @@ public SystemParticipants(List systemParticipants) { /* init sets */ this.bmPlants = - systemParticipants.parallelStream() + systemParticipants + .parallelStream() .filter(gridElement -> gridElement instanceof BmInput) .map(bmInput -> (BmInput) bmInput) .collect(Collectors.toSet()); this.chpPlants = - systemParticipants.parallelStream() + systemParticipants + .parallelStream() .filter(gridElement -> gridElement instanceof ChpInput) .map(chpInput -> (ChpInput) chpInput) .collect(Collectors.toSet()); this.evCS = - systemParticipants.parallelStream() + systemParticipants + .parallelStream() .filter(gridElement -> gridElement instanceof EvcsInput) .map(evcsInput -> (EvcsInput) evcsInput) .collect(Collectors.toSet()); this.evs = - systemParticipants.parallelStream() + systemParticipants + .parallelStream() .filter(gridElement -> gridElement instanceof EvInput) .map(evInput -> (EvInput) evInput) .collect(Collectors.toSet()); this.fixedFeedIns = - systemParticipants.parallelStream() + systemParticipants + .parallelStream() .filter(gridElement -> gridElement instanceof FixedFeedInInput) .map(fixedFeedInInpu -> (FixedFeedInInput) fixedFeedInInpu) .collect(Collectors.toSet()); this.heatPumps = - systemParticipants.parallelStream() + systemParticipants + .parallelStream() .filter(gridElement -> gridElement instanceof HpInput) .map(hpInput -> (HpInput) hpInput) .collect(Collectors.toSet()); this.loads = - systemParticipants.parallelStream() + systemParticipants + .parallelStream() .filter(gridElement -> gridElement instanceof LoadInput) .map(loadInput -> (LoadInput) loadInput) .collect(Collectors.toSet()); this.pvPlants = - systemParticipants.parallelStream() + systemParticipants + .parallelStream() .filter(gridElement -> gridElement instanceof PvInput) .map(pvInput -> (PvInput) pvInput) .collect(Collectors.toSet()); this.storages = - systemParticipants.parallelStream() + systemParticipants + .parallelStream() .filter(gridElement -> gridElement instanceof StorageInput) .map(storageInput -> (StorageInput) storageInput) .collect(Collectors.toSet()); this.wecPlants = - systemParticipants.parallelStream() + systemParticipants + .parallelStream() .filter(gridElement -> gridElement instanceof WecInput) .map(wecInput -> (WecInput) wecInput) .collect(Collectors.toSet()); diff --git a/src/main/java/edu/ie3/datamodel/models/input/system/type/chargingpoint/ChargingPointTypeUtils.java b/src/main/java/edu/ie3/datamodel/models/input/system/type/chargingpoint/ChargingPointTypeUtils.java index e72de1aba..6825a3c0f 100644 --- a/src/main/java/edu/ie3/datamodel/models/input/system/type/chargingpoint/ChargingPointTypeUtils.java +++ b/src/main/java/edu/ie3/datamodel/models/input/system/type/chargingpoint/ChargingPointTypeUtils.java @@ -142,8 +142,7 @@ private ChargingPointTypeUtils() { Stream.concat( Stream.of(type.getId().toLowerCase()), type.getSynonymousIds().stream().map(String::toLowerCase)) - .collect(Collectors.toMap(Function.identity(), v -> type)) - .entrySet() + .collect(Collectors.toMap(Function.identity(), v -> type)).entrySet() .stream()) .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue))); diff --git a/src/main/java/edu/ie3/datamodel/utils/ContainerNodeUpdateUtil.java b/src/main/java/edu/ie3/datamodel/utils/ContainerNodeUpdateUtil.java index f641adccf..5286f78af 100644 --- a/src/main/java/edu/ie3/datamodel/utils/ContainerNodeUpdateUtil.java +++ b/src/main/java/edu/ie3/datamodel/utils/ContainerNodeUpdateUtil.java @@ -207,7 +207,9 @@ private static SystemParticipants updateSystemParticipantsWithNodes( SystemParticipants systemParticipants, Map oldToNewNodes) { List sysParts = - systemParticipants.allEntitiesAsList().parallelStream() + systemParticipants + .allEntitiesAsList() + .parallelStream() .map( sysPart -> { if (oldToNewNodes.containsKey(sysPart.getNode())) { From 274a267ed4b9d6e69070aec493b05dde0c2ba2dc Mon Sep 17 00:00:00 2001 From: "Kittl, Chris" Date: Mon, 30 Aug 2021 14:29:36 +0200 Subject: [PATCH 122/157] Do not hand writer to the outside (reviewers comment) --- .../ie3/datamodel/io/sink/CsvFileSink.java | 23 ++++--------------- 1 file changed, 4 insertions(+), 19 deletions(-) diff --git a/src/main/java/edu/ie3/datamodel/io/sink/CsvFileSink.java b/src/main/java/edu/ie3/datamodel/io/sink/CsvFileSink.java index 6c32c9732..289ffec95 100644 --- a/src/main/java/edu/ie3/datamodel/io/sink/CsvFileSink.java +++ b/src/main/java/edu/ie3/datamodel/io/sink/CsvFileSink.java @@ -266,7 +266,9 @@ public void shutdown() { public , V extends Value> void persistTimeSeries( TimeSeries timeSeries) { try { - BufferedCsvWriter writer = getWriterForTimeSeries(timeSeries); + TimeSeriesProcessorKey key = new TimeSeriesProcessorKey(timeSeries); + String[] headerElements = csvHeaderElements(processorProvider.getHeaderElements(key)); + BufferedCsvWriter writer = connector.getOrInitWriter(timeSeries, headerElements, csvSep); persistTimeSeries(timeSeries, writer); connector.closeTimeSeriesWriter(timeSeries.getUuid()); } catch (ProcessorProviderException e) { @@ -279,24 +281,7 @@ public , V extends Value> void persistTimeSeries( } } - /** - * Provide a suitable {@link BufferedCsvWriter} for the targeted time series - * - * @param timeSeries The time series to persist - * @param Type of Entry within the time series - * @param Actually carried value - * @return A suitable {@link BufferedCsvWriter} - * @throws ProcessorProviderException If there is no handling known for the given time series - * @throws ConnectorException If there is no suitable writer known for this time series - */ - public , V extends Value> BufferedCsvWriter getWriterForTimeSeries( - TimeSeries timeSeries) throws ProcessorProviderException, ConnectorException { - TimeSeriesProcessorKey key = new TimeSeriesProcessorKey(timeSeries); - String[] headerElements = csvHeaderElements(processorProvider.getHeaderElements(key)); - return connector.getOrInitWriter(timeSeries, headerElements, csvSep); - } - - public , V extends Value> void persistTimeSeries( + private , V extends Value> void persistTimeSeries( TimeSeries timeSeries, BufferedCsvWriter writer) { TimeSeriesProcessorKey key = new TimeSeriesProcessorKey(timeSeries); From e53f898709b6d3daf598b62a4cd77652ad7212d1 Mon Sep 17 00:00:00 2001 From: "Kittl, Chris" Date: Mon, 30 Aug 2021 15:35:09 +0200 Subject: [PATCH 123/157] Adding to CHANGELOG --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ca6a8e115..9ba2403ef 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,9 +6,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased/Snapshot] +### Added +- Opportunity to close writer in `CsvFileSink` + ### Fixed - adapted `LineInput` constructor to convert line length to `StandardUnits.LINE_LENGTH` +### Changed +- Writers used to write time series are closed right away + ## [2.0.1] - 2021-07-08 ### Fixed From e0697ddef1d4a03f0806ef373cb7a3a0bf933fe5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 12 Oct 2021 11:33:23 +0000 Subject: [PATCH 124/157] Bump jts-core from 1.18.1 to 1.18.2 Bumps jts-core from 1.18.1 to 1.18.2. --- updated-dependencies: - dependency-name: org.locationtech.jts:jts-core dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 124c70ead..c80489064 100644 --- a/build.gradle +++ b/build.gradle @@ -55,7 +55,7 @@ dependencies { implementation 'tech.units:indriya:2.1.2' // JTS Topology Suite for GeoPositions, License: EPL 1.0 / EDL 1.0 - implementation 'org.locationtech.jts:jts-core:1.18.1' + implementation 'org.locationtech.jts:jts-core:1.18.2' implementation 'org.locationtech.jts.io:jts-io-common:1.18.1' // Graphs From 75abcf2745d39e9535939b18ea2e4a2ec8afbebd Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 12 Oct 2021 11:43:22 +0000 Subject: [PATCH 125/157] Bump jts-io-common from 1.18.1 to 1.18.2 Bumps jts-io-common from 1.18.1 to 1.18.2. --- updated-dependencies: - dependency-name: org.locationtech.jts.io:jts-io-common dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index c80489064..e85ccbaf5 100644 --- a/build.gradle +++ b/build.gradle @@ -56,7 +56,7 @@ dependencies { // JTS Topology Suite for GeoPositions, License: EPL 1.0 / EDL 1.0 implementation 'org.locationtech.jts:jts-core:1.18.2' - implementation 'org.locationtech.jts.io:jts-io-common:1.18.1' + implementation 'org.locationtech.jts.io:jts-io-common:1.18.2' // Graphs implementation 'org.jgrapht:jgrapht-core:1.4.0' From 80140f221b773172da287cc7b409b07e3568b29d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 12 Oct 2021 11:59:22 +0000 Subject: [PATCH 126/157] Bump influxdb-java from 2.21 to 2.22 Bumps [influxdb-java](https://github.com/influxdata/influxdb-java) from 2.21 to 2.22. - [Release notes](https://github.com/influxdata/influxdb-java/releases) - [Changelog](https://github.com/influxdata/influxdb-java/blob/master/CHANGELOG.md) - [Commits](https://github.com/influxdata/influxdb-java/compare/influxdb-java-2.21...influxdb-java-2.22) --- updated-dependencies: - dependency-name: org.influxdb:influxdb-java dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index e85ccbaf5..1623c8a3d 100644 --- a/build.gradle +++ b/build.gradle @@ -79,7 +79,7 @@ dependencies { implementation 'org.apache.logging.log4j:log4j-slf4j-impl:2.14.1' // log4j -> slf4j // Databases - implementation 'org.influxdb:influxdb-java:2.21' + implementation 'org.influxdb:influxdb-java:2.22' implementation 'com.couchbase.client:java-client:3.2.0' runtimeOnly 'org.postgresql:postgresql:42.2.23' // postgresql jdbc driver required during runtime From 5800c8740e896198ebfe103b61f6d0b92b95a320 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 12 Oct 2021 15:47:07 +0000 Subject: [PATCH 127/157] Bump postgresql from 42.2.23 to 42.2.24 Bumps [postgresql](https://github.com/pgjdbc/pgjdbc) from 42.2.23 to 42.2.24. - [Release notes](https://github.com/pgjdbc/pgjdbc/releases) - [Changelog](https://github.com/pgjdbc/pgjdbc/blob/REL42.2.24/CHANGELOG.md) - [Commits](https://github.com/pgjdbc/pgjdbc/compare/REL42.2.23...REL42.2.24) --- updated-dependencies: - dependency-name: org.postgresql:postgresql dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 1623c8a3d..a6428a7eb 100644 --- a/build.gradle +++ b/build.gradle @@ -81,7 +81,7 @@ dependencies { // Databases implementation 'org.influxdb:influxdb-java:2.22' implementation 'com.couchbase.client:java-client:3.2.0' - runtimeOnly 'org.postgresql:postgresql:42.2.23' // postgresql jdbc driver required during runtime + runtimeOnly 'org.postgresql:postgresql:42.2.24' // postgresql jdbc driver required during runtime implementation 'commons-io:commons-io:2.11.0' // I/O functionalities implementation 'org.apache.commons:commons-compress:1.21' // I/O functionalities From b697275d8bbdea6a2321ada30df2d705ad86e3f9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 13 Oct 2021 09:54:55 +0000 Subject: [PATCH 128/157] Bump junit-jupiter from 5.7.2 to 5.8.1 Bumps [junit-jupiter](https://github.com/junit-team/junit5) from 5.7.2 to 5.8.1. - [Release notes](https://github.com/junit-team/junit5/releases) - [Commits](https://github.com/junit-team/junit5/compare/r5.7.2...r5.8.1) --- updated-dependencies: - dependency-name: org.junit.jupiter:junit-jupiter dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index a6428a7eb..3ac3e5e37 100644 --- a/build.gradle +++ b/build.gradle @@ -62,7 +62,7 @@ dependencies { implementation 'org.jgrapht:jgrapht-core:1.4.0' // testing - testImplementation 'org.junit.jupiter:junit-jupiter:5.7.2' + testImplementation 'org.junit.jupiter:junit-jupiter:5.8.1' testImplementation 'org.spockframework:spock-core:2.0-groovy-3.0' testImplementation 'org.objenesis:objenesis:3.2' // Mock creation with constructor parameters From dcedc20eb82bc40d8563f58f4e50c97b72df2b3d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 13 Oct 2021 12:18:40 +0000 Subject: [PATCH 129/157] Bump com.github.spotbugs from 4.7.3 to 4.7.8 Bumps com.github.spotbugs from 4.7.3 to 4.7.8. --- updated-dependencies: - dependency-name: com.github.spotbugs dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 3ac3e5e37..5272c4e67 100644 --- a/build.gradle +++ b/build.gradle @@ -5,7 +5,7 @@ plugins { id 'signing' id 'pmd' // code check, working on source code id 'com.diffplug.spotless' version '5.14.3'//code format - id 'com.github.spotbugs' version '4.7.3' // code check, working on byte code + id 'com.github.spotbugs' version '4.7.8' // code check, working on byte code id 'de.undercouch.download' version '4.1.2' id 'kr.motd.sphinx' version '2.10.1' // documentation generation id 'jacoco' // java code coverage plugin From 8eef03f82b5cdb85775d32121b2f7f684e06a927 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 13 Oct 2021 12:32:19 +0000 Subject: [PATCH 130/157] Bump com.diffplug.spotless from 5.14.3 to 5.17.0 Bumps com.diffplug.spotless from 5.14.3 to 5.17.0. --- updated-dependencies: - dependency-name: com.diffplug.spotless dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 5272c4e67..1dd327b01 100644 --- a/build.gradle +++ b/build.gradle @@ -4,7 +4,7 @@ plugins { id 'maven-publish' id 'signing' id 'pmd' // code check, working on source code - id 'com.diffplug.spotless' version '5.14.3'//code format + id 'com.diffplug.spotless' version '5.17.0'//code format id 'com.github.spotbugs' version '4.7.8' // code check, working on byte code id 'de.undercouch.download' version '4.1.2' id 'kr.motd.sphinx' version '2.10.1' // documentation generation From f9fa3ab06d894c2f6792b81c07a1bd2116bd5181 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 13 Oct 2021 12:47:45 +0000 Subject: [PATCH 131/157] Bump java-client from 3.2.0 to 3.2.2 Bumps [java-client](https://github.com/couchbase/couchbase-jvm-clients) from 3.2.0 to 3.2.2. - [Release notes](https://github.com/couchbase/couchbase-jvm-clients/releases) - [Commits](https://github.com/couchbase/couchbase-jvm-clients/compare/java-client-3.2.0...java-client-3.2.2) --- updated-dependencies: - dependency-name: com.couchbase.client:java-client dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 1dd327b01..5f9269c5e 100644 --- a/build.gradle +++ b/build.gradle @@ -80,7 +80,7 @@ dependencies { // Databases implementation 'org.influxdb:influxdb-java:2.22' - implementation 'com.couchbase.client:java-client:3.2.0' + implementation 'com.couchbase.client:java-client:3.2.2' runtimeOnly 'org.postgresql:postgresql:42.2.24' // postgresql jdbc driver required during runtime implementation 'commons-io:commons-io:2.11.0' // I/O functionalities From 4688030da28f963f529a819c816803e2db377d2a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 19 Oct 2021 04:13:04 +0000 Subject: [PATCH 132/157] Bump postgresql from 42.2.24 to 42.3.0 Bumps [postgresql](https://github.com/pgjdbc/pgjdbc) from 42.2.24 to 42.3.0. - [Release notes](https://github.com/pgjdbc/pgjdbc/releases) - [Changelog](https://github.com/pgjdbc/pgjdbc/blob/master/CHANGELOG.md) - [Commits](https://github.com/pgjdbc/pgjdbc/compare/REL42.2.24...REL42.3.0) --- updated-dependencies: - dependency-name: org.postgresql:postgresql dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 5f9269c5e..f11f536e8 100644 --- a/build.gradle +++ b/build.gradle @@ -81,7 +81,7 @@ dependencies { // Databases implementation 'org.influxdb:influxdb-java:2.22' implementation 'com.couchbase.client:java-client:3.2.2' - runtimeOnly 'org.postgresql:postgresql:42.2.24' // postgresql jdbc driver required during runtime + runtimeOnly 'org.postgresql:postgresql:42.3.0' // postgresql jdbc driver required during runtime implementation 'commons-io:commons-io:2.11.0' // I/O functionalities implementation 'org.apache.commons:commons-compress:1.21' // I/O functionalities From 0e001d3e15377e02bf8d3910251c79b5643706b7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 20 Oct 2021 04:12:12 +0000 Subject: [PATCH 133/157] Bump testcontainersVersion from 1.16.0 to 1.16.1 Bumps `testcontainersVersion` from 1.16.0 to 1.16.1. Updates `testcontainers` from 1.16.0 to 1.16.1 - [Release notes](https://github.com/testcontainers/testcontainers-java/releases) - [Changelog](https://github.com/testcontainers/testcontainers-java/blob/master/CHANGELOG.md) - [Commits](https://github.com/testcontainers/testcontainers-java/compare/1.16.0...1.16.1) Updates `spock` from 1.16.0 to 1.16.1 - [Release notes](https://github.com/testcontainers/testcontainers-java/releases) - [Changelog](https://github.com/testcontainers/testcontainers-java/blob/master/CHANGELOG.md) - [Commits](https://github.com/testcontainers/testcontainers-java/compare/1.16.0...1.16.1) Updates `influxdb` from 1.16.0 to 1.16.1 - [Release notes](https://github.com/testcontainers/testcontainers-java/releases) - [Changelog](https://github.com/testcontainers/testcontainers-java/blob/master/CHANGELOG.md) - [Commits](https://github.com/testcontainers/testcontainers-java/compare/1.16.0...1.16.1) Updates `postgresql` from 1.16.0 to 1.16.1 - [Release notes](https://github.com/testcontainers/testcontainers-java/releases) - [Changelog](https://github.com/testcontainers/testcontainers-java/blob/master/CHANGELOG.md) - [Commits](https://github.com/testcontainers/testcontainers-java/compare/1.16.0...1.16.1) Updates `couchbase` from 1.16.0 to 1.16.1 - [Release notes](https://github.com/testcontainers/testcontainers-java/releases) - [Changelog](https://github.com/testcontainers/testcontainers-java/blob/master/CHANGELOG.md) - [Commits](https://github.com/testcontainers/testcontainers-java/compare/1.16.0...1.16.1) --- updated-dependencies: - dependency-name: org.testcontainers:testcontainers dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: org.testcontainers:spock dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: org.testcontainers:influxdb dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: org.testcontainers:postgresql dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: org.testcontainers:couchbase dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index f11f536e8..5d442d654 100644 --- a/build.gradle +++ b/build.gradle @@ -17,7 +17,7 @@ ext { //version (changing these should be considered thoroughly!) javaVersion = JavaVersion.VERSION_1_8 tscfgVersion = '0.9.9' - testcontainersVersion = '1.16.0' + testcontainersVersion = '1.16.1' scriptsLocation = 'gradle' + File.separator + 'scripts' + File.separator //location of script plugins } From 97d0324a8011b726d64bd2160656b1ef5861c9a7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 21 Oct 2021 04:10:55 +0000 Subject: [PATCH 134/157] Bump com.github.spotbugs from 4.7.8 to 4.7.9 Bumps com.github.spotbugs from 4.7.8 to 4.7.9. --- updated-dependencies: - dependency-name: com.github.spotbugs dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 5d442d654..ea698b5b0 100644 --- a/build.gradle +++ b/build.gradle @@ -5,7 +5,7 @@ plugins { id 'signing' id 'pmd' // code check, working on source code id 'com.diffplug.spotless' version '5.17.0'//code format - id 'com.github.spotbugs' version '4.7.8' // code check, working on byte code + id 'com.github.spotbugs' version '4.7.9' // code check, working on byte code id 'de.undercouch.download' version '4.1.2' id 'kr.motd.sphinx' version '2.10.1' // documentation generation id 'jacoco' // java code coverage plugin From 85b046d38da8d72d6fc2139d7d0445a677515eb3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 25 Oct 2021 04:18:03 +0000 Subject: [PATCH 135/157] Bump testcontainersVersion from 1.16.1 to 1.16.2 Bumps `testcontainersVersion` from 1.16.1 to 1.16.2. Updates `testcontainers` from 1.16.1 to 1.16.2 - [Release notes](https://github.com/testcontainers/testcontainers-java/releases) - [Changelog](https://github.com/testcontainers/testcontainers-java/blob/master/CHANGELOG.md) - [Commits](https://github.com/testcontainers/testcontainers-java/compare/1.16.1...1.16.2) Updates `spock` from 1.16.1 to 1.16.2 - [Release notes](https://github.com/testcontainers/testcontainers-java/releases) - [Changelog](https://github.com/testcontainers/testcontainers-java/blob/master/CHANGELOG.md) - [Commits](https://github.com/testcontainers/testcontainers-java/compare/1.16.1...1.16.2) Updates `influxdb` from 1.16.1 to 1.16.2 - [Release notes](https://github.com/testcontainers/testcontainers-java/releases) - [Changelog](https://github.com/testcontainers/testcontainers-java/blob/master/CHANGELOG.md) - [Commits](https://github.com/testcontainers/testcontainers-java/compare/1.16.1...1.16.2) Updates `postgresql` from 1.16.1 to 1.16.2 - [Release notes](https://github.com/testcontainers/testcontainers-java/releases) - [Changelog](https://github.com/testcontainers/testcontainers-java/blob/master/CHANGELOG.md) - [Commits](https://github.com/testcontainers/testcontainers-java/compare/1.16.1...1.16.2) Updates `couchbase` from 1.16.1 to 1.16.2 - [Release notes](https://github.com/testcontainers/testcontainers-java/releases) - [Changelog](https://github.com/testcontainers/testcontainers-java/blob/master/CHANGELOG.md) - [Commits](https://github.com/testcontainers/testcontainers-java/compare/1.16.1...1.16.2) --- updated-dependencies: - dependency-name: org.testcontainers:testcontainers dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: org.testcontainers:spock dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: org.testcontainers:influxdb dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: org.testcontainers:postgresql dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: org.testcontainers:couchbase dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index ea698b5b0..40c55738a 100644 --- a/build.gradle +++ b/build.gradle @@ -17,7 +17,7 @@ ext { //version (changing these should be considered thoroughly!) javaVersion = JavaVersion.VERSION_1_8 tscfgVersion = '0.9.9' - testcontainersVersion = '1.16.1' + testcontainersVersion = '1.16.2' scriptsLocation = 'gradle' + File.separator + 'scripts' + File.separator //location of script plugins } From 601e3fc84b8f1d291c4e208a52bb7620b98b4f7c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 27 Oct 2021 13:36:00 +0000 Subject: [PATCH 136/157] Bump com.diffplug.spotless from 5.17.0 to 5.17.1 Bumps com.diffplug.spotless from 5.17.0 to 5.17.1. --- updated-dependencies: - dependency-name: com.diffplug.spotless dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 40c55738a..78bc1d0ef 100644 --- a/build.gradle +++ b/build.gradle @@ -4,7 +4,7 @@ plugins { id 'maven-publish' id 'signing' id 'pmd' // code check, working on source code - id 'com.diffplug.spotless' version '5.17.0'//code format + id 'com.diffplug.spotless' version '5.17.1'//code format id 'com.github.spotbugs' version '4.7.9' // code check, working on byte code id 'de.undercouch.download' version '4.1.2' id 'kr.motd.sphinx' version '2.10.1' // documentation generation From f32fb27274e489940ae5a3c8f6f3ac3c3eae8d57 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 Nov 2021 04:22:14 +0000 Subject: [PATCH 137/157] Bump postgresql from 42.3.0 to 42.3.1 Bumps [postgresql](https://github.com/pgjdbc/pgjdbc) from 42.3.0 to 42.3.1. - [Release notes](https://github.com/pgjdbc/pgjdbc/releases) - [Changelog](https://github.com/pgjdbc/pgjdbc/blob/master/CHANGELOG.md) - [Commits](https://github.com/pgjdbc/pgjdbc/compare/REL42.3.0...REL42.3.1) --- updated-dependencies: - dependency-name: org.postgresql:postgresql dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 78bc1d0ef..997cace11 100644 --- a/build.gradle +++ b/build.gradle @@ -81,7 +81,7 @@ dependencies { // Databases implementation 'org.influxdb:influxdb-java:2.22' implementation 'com.couchbase.client:java-client:3.2.2' - runtimeOnly 'org.postgresql:postgresql:42.3.0' // postgresql jdbc driver required during runtime + runtimeOnly 'org.postgresql:postgresql:42.3.1' // postgresql jdbc driver required during runtime implementation 'commons-io:commons-io:2.11.0' // I/O functionalities implementation 'org.apache.commons:commons-compress:1.21' // I/O functionalities From 54fea7db27927e5f192d633a2a457db936df6238 Mon Sep 17 00:00:00 2001 From: "Kittl, Chris" Date: Fri, 12 Nov 2021 12:31:50 +0100 Subject: [PATCH 138/157] Fix read the docs Adding requirements.txt Trying another python version Adding sphinx to dependencies Trying a bit more with requirements --- .readthedocs.yaml | 21 +++++++++++++++++++++ docs/readthedocs/requirements.txt | 4 ++++ 2 files changed, 25 insertions(+) create mode 100644 .readthedocs.yaml create mode 100644 docs/readthedocs/requirements.txt diff --git a/.readthedocs.yaml b/.readthedocs.yaml new file mode 100644 index 000000000..90e935b33 --- /dev/null +++ b/.readthedocs.yaml @@ -0,0 +1,21 @@ +# .readthedocs.yaml +# Read the Docs configuration file +# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details + +# Required +version: 2 + +# Set the version of Python and other tools you might need +build: + os: ubuntu-20.04 + tools: + python: "3.9" + +# Configure python +python: + install: + - requirements: docs/readthedocs/requirements.txt + +# Build documentation in the docs/ directory with Sphinx +sphinx: + configuration: docs/readthedocs/conf.py \ No newline at end of file diff --git a/docs/readthedocs/requirements.txt b/docs/readthedocs/requirements.txt new file mode 100644 index 000000000..bc20d8217 --- /dev/null +++ b/docs/readthedocs/requirements.txt @@ -0,0 +1,4 @@ +commonmark==0.9.1 +recommonmark==0.7.1 +Sphinx==4.2.0 +sphinx-rtd-theme==1.0.0 \ No newline at end of file From ec5674a625a1652f99563bc174299dd76ecf4ade Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 12 Nov 2021 13:04:58 +0000 Subject: [PATCH 139/157] Bump java-client from 3.2.2 to 3.2.3 Bumps [java-client](https://github.com/couchbase/couchbase-jvm-clients) from 3.2.2 to 3.2.3. - [Release notes](https://github.com/couchbase/couchbase-jvm-clients/releases) - [Commits](https://github.com/couchbase/couchbase-jvm-clients/compare/java-client-3.2.2...java-client-3.2.3) --- updated-dependencies: - dependency-name: com.couchbase.client:java-client dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 997cace11..fd09f65e6 100644 --- a/build.gradle +++ b/build.gradle @@ -80,7 +80,7 @@ dependencies { // Databases implementation 'org.influxdb:influxdb-java:2.22' - implementation 'com.couchbase.client:java-client:3.2.2' + implementation 'com.couchbase.client:java-client:3.2.3' runtimeOnly 'org.postgresql:postgresql:42.3.1' // postgresql jdbc driver required during runtime implementation 'commons-io:commons-io:2.11.0' // I/O functionalities From 45a3ec66d974d7da604b4f72171965f87b3425ab Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 12 Nov 2021 13:14:14 +0000 Subject: [PATCH 140/157] Bump com.diffplug.spotless from 5.17.1 to 6.0.0 Bumps com.diffplug.spotless from 5.17.1 to 6.0.0. --- updated-dependencies: - dependency-name: com.diffplug.spotless dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index fd09f65e6..3eb7304d9 100644 --- a/build.gradle +++ b/build.gradle @@ -4,7 +4,7 @@ plugins { id 'maven-publish' id 'signing' id 'pmd' // code check, working on source code - id 'com.diffplug.spotless' version '5.17.1'//code format + id 'com.diffplug.spotless' version '6.0.0'//code format id 'com.github.spotbugs' version '4.7.9' // code check, working on byte code id 'de.undercouch.download' version '4.1.2' id 'kr.motd.sphinx' version '2.10.1' // documentation generation From be5300e62ec039f81687eb7b2fb9f4dcf78558f9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 15 Nov 2021 04:11:15 +0000 Subject: [PATCH 141/157] Bump com.github.spotbugs from 4.7.9 to 4.7.10 Bumps com.github.spotbugs from 4.7.9 to 4.7.10. --- updated-dependencies: - dependency-name: com.github.spotbugs dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 3eb7304d9..75eba7cf6 100644 --- a/build.gradle +++ b/build.gradle @@ -5,7 +5,7 @@ plugins { id 'signing' id 'pmd' // code check, working on source code id 'com.diffplug.spotless' version '6.0.0'//code format - id 'com.github.spotbugs' version '4.7.9' // code check, working on byte code + id 'com.github.spotbugs' version '4.7.10' // code check, working on byte code id 'de.undercouch.download' version '4.1.2' id 'kr.motd.sphinx' version '2.10.1' // documentation generation id 'jacoco' // java code coverage plugin From 648a6d1ce58f5147aa22a43465ad41a7f016b8a9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 25 Nov 2021 04:09:34 +0000 Subject: [PATCH 142/157] Bump com.github.spotbugs from 4.7.10 to 4.8.0 Bumps com.github.spotbugs from 4.7.10 to 4.8.0. --- updated-dependencies: - dependency-name: com.github.spotbugs dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 75eba7cf6..0ee094ee6 100644 --- a/build.gradle +++ b/build.gradle @@ -5,7 +5,7 @@ plugins { id 'signing' id 'pmd' // code check, working on source code id 'com.diffplug.spotless' version '6.0.0'//code format - id 'com.github.spotbugs' version '4.7.10' // code check, working on byte code + id 'com.github.spotbugs' version '4.8.0' // code check, working on byte code id 'de.undercouch.download' version '4.1.2' id 'kr.motd.sphinx' version '2.10.1' // documentation generation id 'jacoco' // java code coverage plugin From 73b66024ce79771de3d84b520801451f51b3fb0e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 2 Dec 2021 04:10:07 +0000 Subject: [PATCH 143/157] Bump com.diffplug.spotless from 6.0.0 to 6.0.1 Bumps com.diffplug.spotless from 6.0.0 to 6.0.1. --- updated-dependencies: - dependency-name: com.diffplug.spotless dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 0ee094ee6..19a39ace6 100644 --- a/build.gradle +++ b/build.gradle @@ -4,7 +4,7 @@ plugins { id 'maven-publish' id 'signing' id 'pmd' // code check, working on source code - id 'com.diffplug.spotless' version '6.0.0'//code format + id 'com.diffplug.spotless' version '6.0.1'//code format id 'com.github.spotbugs' version '4.8.0' // code check, working on byte code id 'de.undercouch.download' version '4.1.2' id 'kr.motd.sphinx' version '2.10.1' // documentation generation From a7ccf3394ef8966b29b0baa50371a2468fa4b2b1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 2 Dec 2021 07:30:02 +0000 Subject: [PATCH 144/157] Bump junit-jupiter from 5.8.1 to 5.8.2 Bumps [junit-jupiter](https://github.com/junit-team/junit5) from 5.8.1 to 5.8.2. - [Release notes](https://github.com/junit-team/junit5/releases) - [Commits](https://github.com/junit-team/junit5/compare/r5.8.1...r5.8.2) --- updated-dependencies: - dependency-name: org.junit.jupiter:junit-jupiter dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 19a39ace6..1a6602095 100644 --- a/build.gradle +++ b/build.gradle @@ -62,7 +62,7 @@ dependencies { implementation 'org.jgrapht:jgrapht-core:1.4.0' // testing - testImplementation 'org.junit.jupiter:junit-jupiter:5.8.1' + testImplementation 'org.junit.jupiter:junit-jupiter:5.8.2' testImplementation 'org.spockframework:spock-core:2.0-groovy-3.0' testImplementation 'org.objenesis:objenesis:3.2' // Mock creation with constructor parameters From 0072d81cfa175069572a125f46507fdd22903d43 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 7 Dec 2021 04:11:51 +0000 Subject: [PATCH 145/157] Bump com.diffplug.spotless from 6.0.1 to 6.0.4 Bumps com.diffplug.spotless from 6.0.1 to 6.0.4. --- updated-dependencies: - dependency-name: com.diffplug.spotless dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 1a6602095..352573d58 100644 --- a/build.gradle +++ b/build.gradle @@ -4,7 +4,7 @@ plugins { id 'maven-publish' id 'signing' id 'pmd' // code check, working on source code - id 'com.diffplug.spotless' version '6.0.1'//code format + id 'com.diffplug.spotless' version '6.0.4'//code format id 'com.github.spotbugs' version '4.8.0' // code check, working on byte code id 'de.undercouch.download' version '4.1.2' id 'kr.motd.sphinx' version '2.10.1' // documentation generation From 3033a7ec6a58b227a08c7a30f903f3f4cf29e182 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 8 Dec 2021 07:13:54 +0000 Subject: [PATCH 146/157] Bump com.github.spotbugs from 4.8.0 to 5.0.1 Bumps com.github.spotbugs from 4.8.0 to 5.0.1. --- updated-dependencies: - dependency-name: com.github.spotbugs dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 352573d58..3f4f49b96 100644 --- a/build.gradle +++ b/build.gradle @@ -5,7 +5,7 @@ plugins { id 'signing' id 'pmd' // code check, working on source code id 'com.diffplug.spotless' version '6.0.4'//code format - id 'com.github.spotbugs' version '4.8.0' // code check, working on byte code + id 'com.github.spotbugs' version '5.0.1' // code check, working on byte code id 'de.undercouch.download' version '4.1.2' id 'kr.motd.sphinx' version '2.10.1' // documentation generation id 'jacoco' // java code coverage plugin From 06754823e38a5b42c0aa97ca58b6667c0f35187d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 14 Dec 2021 04:11:31 +0000 Subject: [PATCH 147/157] Bump log4j-slf4j-impl from 2.14.1 to 2.16.0 Bumps log4j-slf4j-impl from 2.14.1 to 2.16.0. --- updated-dependencies: - dependency-name: org.apache.logging.log4j:log4j-slf4j-impl dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 3f4f49b96..083537f72 100644 --- a/build.gradle +++ b/build.gradle @@ -76,7 +76,7 @@ dependencies { // logging implementation 'org.apache.logging.log4j:log4j-api:2.14.1' // log4j implementation 'org.apache.logging.log4j:log4j-core:2.14.1' // log4j - implementation 'org.apache.logging.log4j:log4j-slf4j-impl:2.14.1' // log4j -> slf4j + implementation 'org.apache.logging.log4j:log4j-slf4j-impl:2.16.0' // log4j -> slf4j // Databases implementation 'org.influxdb:influxdb-java:2.22' From dfd52376d79facea02f8c5d5e13741ebdaaab1e8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 14 Dec 2021 17:20:10 +0000 Subject: [PATCH 148/157] Bump java-client from 3.2.3 to 3.2.4 Bumps [java-client](https://github.com/couchbase/couchbase-jvm-clients) from 3.2.3 to 3.2.4. - [Release notes](https://github.com/couchbase/couchbase-jvm-clients/releases) - [Commits](https://github.com/couchbase/couchbase-jvm-clients/compare/java-client-3.2.3...java-client-3.2.4) --- updated-dependencies: - dependency-name: com.couchbase.client:java-client dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 083537f72..d709e1433 100644 --- a/build.gradle +++ b/build.gradle @@ -80,7 +80,7 @@ dependencies { // Databases implementation 'org.influxdb:influxdb-java:2.22' - implementation 'com.couchbase.client:java-client:3.2.3' + implementation 'com.couchbase.client:java-client:3.2.4' runtimeOnly 'org.postgresql:postgresql:42.3.1' // postgresql jdbc driver required during runtime implementation 'commons-io:commons-io:2.11.0' // I/O functionalities From 76a0cc45152cbef41aa3fe1c13d9f7894ec3213a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 21 Dec 2021 08:01:49 +0000 Subject: [PATCH 149/157] Bump log4j-core from 2.14.1 to 2.17.0 Bumps log4j-core from 2.14.1 to 2.17.0. --- updated-dependencies: - dependency-name: org.apache.logging.log4j:log4j-core dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index d709e1433..cb2819740 100644 --- a/build.gradle +++ b/build.gradle @@ -75,7 +75,7 @@ dependencies { // logging implementation 'org.apache.logging.log4j:log4j-api:2.14.1' // log4j - implementation 'org.apache.logging.log4j:log4j-core:2.14.1' // log4j + implementation 'org.apache.logging.log4j:log4j-core:2.17.0' // log4j implementation 'org.apache.logging.log4j:log4j-slf4j-impl:2.16.0' // log4j -> slf4j // Databases From e65bfe6c80b3934097131b80451d4a5a8e12647c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 21 Dec 2021 11:56:58 +0000 Subject: [PATCH 150/157] Bump log4j-slf4j-impl from 2.16.0 to 2.17.0 Bumps log4j-slf4j-impl from 2.16.0 to 2.17.0. --- updated-dependencies: - dependency-name: org.apache.logging.log4j:log4j-slf4j-impl dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index cb2819740..3f39039af 100644 --- a/build.gradle +++ b/build.gradle @@ -76,7 +76,7 @@ dependencies { // logging implementation 'org.apache.logging.log4j:log4j-api:2.14.1' // log4j implementation 'org.apache.logging.log4j:log4j-core:2.17.0' // log4j - implementation 'org.apache.logging.log4j:log4j-slf4j-impl:2.16.0' // log4j -> slf4j + implementation 'org.apache.logging.log4j:log4j-slf4j-impl:2.17.0' // log4j -> slf4j // Databases implementation 'org.influxdb:influxdb-java:2.22' From df3b12cf802f1b33c900573f2a04f429fed76870 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 21 Dec 2021 11:56:59 +0000 Subject: [PATCH 151/157] Bump log4j-api from 2.14.1 to 2.17.0 Bumps log4j-api from 2.14.1 to 2.17.0. --- updated-dependencies: - dependency-name: org.apache.logging.log4j:log4j-api dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index cb2819740..7291b2b7a 100644 --- a/build.gradle +++ b/build.gradle @@ -74,7 +74,7 @@ dependencies { testImplementation "org.testcontainers:couchbase:$testcontainersVersion" // logging - implementation 'org.apache.logging.log4j:log4j-api:2.14.1' // log4j + implementation 'org.apache.logging.log4j:log4j-api:2.17.0' // log4j implementation 'org.apache.logging.log4j:log4j-core:2.17.0' // log4j implementation 'org.apache.logging.log4j:log4j-slf4j-impl:2.16.0' // log4j -> slf4j From b2dd2d40a3d1147d455855271fb2b7f5ce88a0aa Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 22 Dec 2021 09:28:18 +0000 Subject: [PATCH 152/157] Bump com.github.spotbugs from 5.0.1 to 5.0.3 Bumps com.github.spotbugs from 5.0.1 to 5.0.3. --- updated-dependencies: - dependency-name: com.github.spotbugs dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 24fad6673..434237ad5 100644 --- a/build.gradle +++ b/build.gradle @@ -5,7 +5,7 @@ plugins { id 'signing' id 'pmd' // code check, working on source code id 'com.diffplug.spotless' version '6.0.4'//code format - id 'com.github.spotbugs' version '5.0.1' // code check, working on byte code + id 'com.github.spotbugs' version '5.0.3' // code check, working on byte code id 'de.undercouch.download' version '4.1.2' id 'kr.motd.sphinx' version '2.10.1' // documentation generation id 'jacoco' // java code coverage plugin From d06c2deee85cba1f34218961b3ad3857e156ee3b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 27 Dec 2021 06:53:03 +0000 Subject: [PATCH 153/157] Bump com.diffplug.spotless from 6.0.4 to 6.1.0 Bumps com.diffplug.spotless from 6.0.4 to 6.1.0. --- updated-dependencies: - dependency-name: com.diffplug.spotless dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 434237ad5..c8293c1e8 100644 --- a/build.gradle +++ b/build.gradle @@ -4,7 +4,7 @@ plugins { id 'maven-publish' id 'signing' id 'pmd' // code check, working on source code - id 'com.diffplug.spotless' version '6.0.4'//code format + id 'com.diffplug.spotless' version '6.1.0'//code format id 'com.github.spotbugs' version '5.0.3' // code check, working on byte code id 'de.undercouch.download' version '4.1.2' id 'kr.motd.sphinx' version '2.10.1' // documentation generation From 3ca487cd5fbac16bd53f0ce16a6e9ede580b147a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 29 Dec 2021 04:10:56 +0000 Subject: [PATCH 154/157] Bump log4j-api from 2.17.0 to 2.17.1 Bumps log4j-api from 2.17.0 to 2.17.1. --- updated-dependencies: - dependency-name: org.apache.logging.log4j:log4j-api dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 434237ad5..255f4b65f 100644 --- a/build.gradle +++ b/build.gradle @@ -74,7 +74,7 @@ dependencies { testImplementation "org.testcontainers:couchbase:$testcontainersVersion" // logging - implementation 'org.apache.logging.log4j:log4j-api:2.17.0' // log4j + implementation 'org.apache.logging.log4j:log4j-api:2.17.1' // log4j implementation 'org.apache.logging.log4j:log4j-core:2.17.0' // log4j implementation 'org.apache.logging.log4j:log4j-slf4j-impl:2.17.0' // log4j -> slf4j From c03709c2b4ffe919149875729840ade6fa8b0fea Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 29 Dec 2021 14:47:12 +0000 Subject: [PATCH 155/157] Bump log4j-core from 2.17.0 to 2.17.1 Bumps log4j-core from 2.17.0 to 2.17.1. --- updated-dependencies: - dependency-name: org.apache.logging.log4j:log4j-core dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 255f4b65f..e404a6e40 100644 --- a/build.gradle +++ b/build.gradle @@ -75,7 +75,7 @@ dependencies { // logging implementation 'org.apache.logging.log4j:log4j-api:2.17.1' // log4j - implementation 'org.apache.logging.log4j:log4j-core:2.17.0' // log4j + implementation 'org.apache.logging.log4j:log4j-core:2.17.1' // log4j implementation 'org.apache.logging.log4j:log4j-slf4j-impl:2.17.0' // log4j -> slf4j // Databases From 9776def5490cbeafed1f8a10bc5af1f6bc577426 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 3 Jan 2022 08:03:14 +0000 Subject: [PATCH 156/157] Bump log4j-slf4j-impl from 2.17.0 to 2.17.1 Bumps log4j-slf4j-impl from 2.17.0 to 2.17.1. --- updated-dependencies: - dependency-name: org.apache.logging.log4j:log4j-slf4j-impl dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 2f4e95094..3c5e9b2a7 100644 --- a/build.gradle +++ b/build.gradle @@ -76,7 +76,7 @@ dependencies { // logging implementation 'org.apache.logging.log4j:log4j-api:2.17.1' // log4j implementation 'org.apache.logging.log4j:log4j-core:2.17.1' // log4j - implementation 'org.apache.logging.log4j:log4j-slf4j-impl:2.17.0' // log4j -> slf4j + implementation 'org.apache.logging.log4j:log4j-slf4j-impl:2.17.1' // log4j -> slf4j // Databases implementation 'org.influxdb:influxdb-java:2.22' From 25a62540266cd743b12b047ded2bd6be48403b8d Mon Sep 17 00:00:00 2001 From: Johannes Hiry Date: Wed, 5 Jan 2022 10:03:26 +0100 Subject: [PATCH 157/157] adapted CHANGELOG.md for release --- CHANGELOG.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5978576ae..892c80821 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased/Snapshot] +## [2.1.0] - 2022-01-05 + ### Added - added `EvcsLocationType` support in `EvcsInput` and `EvcsInputFactory` [#406](https://github.com/ie3-institute/PowerSystemDataModel/issues/406) - Opportunity to close writer in `CsvFileSink` @@ -117,7 +119,8 @@ coordinates or multiple exactly equal coordinates possible - CsvDataSource now stops trying to get an operator for empty operator uuid field in entities - CsvDataSource now parsing multiple geoJson strings correctly -[Unreleased/Snapshot]: https://github.com/ie3-institute/powersystemdatamodel/compare/2.0.1...HEAD +[Unreleased/Snapshot]: https://github.com/ie3-institute/powersystemdatamodel/compare/2.1.0...HEAD +[2.1.0]: https://github.com/ie3-institute/powersystemdatamodel/compare/2.0.1...2.1.0 [2.0.1]: https://github.com/ie3-institute/powersystemdatamodel/compare/2.0.0...2.0.1 [2.0.0]: https://github.com/ie3-institute/powersystemdatamodel/compare/1.1.0...2.0.0 [1.1.0]: https://github.com/ie3-institute/powersystemdatamodel/compare/6a49bc514be8859ebd29a3595cd58cd000498f1e...1.1.0