-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introducing SqlIndividualTimeSeriesMetaInformation & refactorings 2.0 (…
…#524) * proper refactoring for #513 w/o breaking external interfaces (no tests yet!) * More deprecations, adapting tests, adding to changelog * Fixing test * Specified arguments of deprecation tags * Small improvement * SqlIndividualTimeSeriesMetaInformation * Addressing reviewers comments, providing richer deprecation messages Co-authored-by: Johannes Hiry <johannes.hiry@tu-dortmund.de> Co-authored-by: t-ober <63147366+t-ober@users.noreply.github.com>
- Loading branch information
1 parent
a21d301
commit f3b42ee
Showing
29 changed files
with
765 additions
and
124 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
57 changes: 57 additions & 0 deletions
57
src/main/java/edu/ie3/datamodel/io/csv/CsvIndividualTimeSeriesMetaInformation.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
/* | ||
* © 2022. 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.naming.timeseries.ColumnScheme; | ||
import edu.ie3.datamodel.io.naming.timeseries.IndividualTimeSeriesMetaInformation; | ||
import java.util.Objects; | ||
import java.util.UUID; | ||
|
||
/** Enhancing the {@link IndividualTimeSeriesMetaInformation} with the full path to csv file */ | ||
public class CsvIndividualTimeSeriesMetaInformation extends IndividualTimeSeriesMetaInformation { | ||
private final String fullFilePath; | ||
|
||
public CsvIndividualTimeSeriesMetaInformation( | ||
UUID uuid, ColumnScheme columnScheme, String fullFilePath) { | ||
super(uuid, columnScheme); | ||
this.fullFilePath = fullFilePath; | ||
} | ||
|
||
public CsvIndividualTimeSeriesMetaInformation( | ||
IndividualTimeSeriesMetaInformation metaInformation, String fullFilePath) { | ||
this(metaInformation.getUuid(), metaInformation.getColumnScheme(), fullFilePath); | ||
} | ||
|
||
public String getFullFilePath() { | ||
return fullFilePath; | ||
} | ||
|
||
@Override | ||
public boolean equals(Object o) { | ||
if (this == o) return true; | ||
if (!(o instanceof CsvIndividualTimeSeriesMetaInformation that)) return false; | ||
if (!super.equals(o)) return false; | ||
return fullFilePath.equals(that.fullFilePath); | ||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
return Objects.hash(super.hashCode(), fullFilePath); | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return "CsvIndividualTimeSeriesMetaInformation{" | ||
+ "uuid=" | ||
+ getUuid() | ||
+ ", columnScheme=" | ||
+ getColumnScheme() | ||
+ ", fullFilePath='" | ||
+ fullFilePath | ||
+ '\'' | ||
+ '}'; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.