Skip to content

Commit 18e9ae6

Browse files
Merge pull request #790 from ie3-institute/ms/#540-remove-deprecated-classes-and-methods
Removing deprecated classes and methods
2 parents d2f7721 + fa3ea8b commit 18e9ae6

20 files changed

+2
-663
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1313

1414

1515
### Changed
16+
- Removing deprecated classes and methods [#540](https://github.com/ie3-institute/PowerSystemDataModel/issues/540)
1617

1718

1819
## [3.0.0] - 2023-02-16

src/main/java/edu/ie3/datamodel/graph/ImpedanceWeightedGraph.java

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -39,21 +39,4 @@ public void setEdgeWeightQuantity(
3939
weight.to(ImpedanceWeightedEdge.DEFAULT_IMPEDANCE_UNIT).getValue().doubleValue();
4040
super.setEdgeWeight(edge, weightDouble);
4141
}
42-
43-
/**
44-
* The only purpose for overriding this method is to provide a better indication of the unit that
45-
* is expected to be passed in. It is highly advised to use the {@link
46-
* ImpedanceWeightedGraph#setEdgeWeightQuantity(ImpedanceWeightedEdge, ComparableQuantity)} for
47-
* safety purposes that the provided edge weight is correct.
48-
*
49-
* @param edge the edge whose weight should be altered
50-
* @param impedanceInOhm the weight of the {@link ImpedanceWeightedEdge} in ohm
51-
* @deprecated Use {@link ImpedanceWeightedGraph#setEdgeWeightQuantity(ImpedanceWeightedEdge,
52-
* ComparableQuantity)} instead, as it provides means for proper unit handling
53-
*/
54-
@Override
55-
@Deprecated(since = "Deprecated since 2.1.0. See Javadocs for more information.")
56-
public void setEdgeWeight(ImpedanceWeightedEdge edge, double impedanceInOhm) {
57-
super.setEdgeWeight(edge, impedanceInOhm);
58-
}
5942
}

src/main/java/edu/ie3/datamodel/graph/SubGridGate.java

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -53,24 +53,6 @@ public static SubGridGate fromTransformer3W(
5353
};
5454
}
5555

56-
/** @deprecated since 3.0. Use {@link #link()} instead */
57-
@Deprecated(since = "3.0")
58-
public TransformerInput getLink() {
59-
return link;
60-
}
61-
62-
/** @deprecated since 3.0. Use {@link #superiorNode()} instead */
63-
@Deprecated(since = "3.0")
64-
public NodeInput getSuperiorNode() {
65-
return superiorNode;
66-
}
67-
68-
/** @deprecated since 3.0. Use {@link #inferiorNode()} instead */
69-
@Deprecated(since = "3.0")
70-
public NodeInput getInferiorNode() {
71-
return inferiorNode;
72-
}
73-
7456
public int getSuperiorSubGrid() {
7557
return superiorNode.getSubnet();
7658
}

src/main/java/edu/ie3/datamodel/io/connectors/CsvFileConnector.java

Lines changed: 0 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,6 @@ public class CsvFileConnector implements DataConnector {
4242
private final Map<Class<? extends UniqueEntity>, BufferedCsvWriter> entityWriters =
4343
new HashMap<>();
4444
private final Map<UUID, BufferedCsvWriter> timeSeriesWriters = new HashMap<>();
45-
// ATTENTION: Do not finalize. It's meant for lazy evaluation.
46-
@Deprecated(since = "3.0", forRemoval = true)
47-
private Map<UUID, edu.ie3.datamodel.io.csv.CsvIndividualTimeSeriesMetaInformation>
48-
individualTimeSeriesMetaInformation;
4945

5046
private final FileNamingStrategy fileNamingStrategy;
5147
private final String baseDirectoryName;
@@ -216,27 +212,6 @@ public BufferedReader initReader(String filePath) throws FileNotFoundException {
216212
new InputStreamReader(new FileInputStream(fullPath), StandardCharsets.UTF_8), 16384);
217213
}
218214

219-
/**
220-
* Get time series meta information for a given uuid.
221-
*
222-
* <p>This method lazily evaluates the mapping from <i>all</i> time series files to their meta
223-
* information.
224-
*
225-
* @param timeSeriesUuid The time series in question
226-
* @return An option on the queried information
227-
* @deprecated since 3.0. Use {@link #getCsvIndividualTimeSeriesMetaInformation(ColumnScheme...)}
228-
* instead
229-
*/
230-
@Deprecated(since = "3.0", forRemoval = true)
231-
public Optional<edu.ie3.datamodel.io.csv.timeseries.IndividualTimeSeriesMetaInformation>
232-
getIndividualTimeSeriesMetaInformation(UUID timeSeriesUuid) {
233-
if (Objects.isNull(individualTimeSeriesMetaInformation))
234-
individualTimeSeriesMetaInformation = getCsvIndividualTimeSeriesMetaInformation();
235-
236-
return Optional.ofNullable(individualTimeSeriesMetaInformation.get(timeSeriesUuid))
237-
.map(edu.ie3.datamodel.io.csv.timeseries.IndividualTimeSeriesMetaInformation::new);
238-
}
239-
240215
/**
241216
* Receive the information for specific time series. They are given back filtered by the column
242217
* scheme in order to allow for accounting the different content types.
@@ -366,60 +341,4 @@ public void shutdown() {
366341
}
367342
});
368343
}
369-
370-
/**
371-
* Enhancing the {@link IndividualTimeSeriesMetaInformation} with the full path to csv file
372-
*
373-
* @deprecated since 3.0. Use {@link
374-
* edu.ie3.datamodel.io.csv.CsvIndividualTimeSeriesMetaInformation} instead
375-
*/
376-
@Deprecated(since = "3.0", forRemoval = true)
377-
public static class CsvIndividualTimeSeriesMetaInformation
378-
extends edu.ie3.datamodel.io.csv.timeseries.IndividualTimeSeriesMetaInformation {
379-
private final String fullFilePath;
380-
381-
public CsvIndividualTimeSeriesMetaInformation(
382-
UUID uuid,
383-
edu.ie3.datamodel.io.csv.timeseries.ColumnScheme columnScheme,
384-
String fullFilePath) {
385-
super(uuid, columnScheme);
386-
this.fullFilePath = fullFilePath;
387-
}
388-
389-
public CsvIndividualTimeSeriesMetaInformation(
390-
edu.ie3.datamodel.io.csv.timeseries.IndividualTimeSeriesMetaInformation metaInformation,
391-
String fullFilePath) {
392-
this(metaInformation.getUuid(), metaInformation.getColumnScheme(), fullFilePath);
393-
}
394-
395-
public String getFullFilePath() {
396-
return fullFilePath;
397-
}
398-
399-
@Override
400-
public boolean equals(Object o) {
401-
if (this == o) return true;
402-
if (!(o instanceof CsvIndividualTimeSeriesMetaInformation that)) return false;
403-
if (!super.equals(o)) return false;
404-
return fullFilePath.equals(that.fullFilePath);
405-
}
406-
407-
@Override
408-
public int hashCode() {
409-
return Objects.hash(super.hashCode(), fullFilePath);
410-
}
411-
412-
@Override
413-
public String toString() {
414-
return "CsvIndividualTimeSeriesMetaInformation{"
415-
+ "uuid="
416-
+ getUuid()
417-
+ ", columnScheme="
418-
+ getColumnScheme()
419-
+ ", fullFilePath='"
420-
+ fullFilePath
421-
+ '\''
422-
+ '}';
423-
}
424-
}
425344
}

src/main/java/edu/ie3/datamodel/io/csv/CsvFileDefinition.java

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -56,21 +56,6 @@ public CsvFileDefinition(
5656
this.csvSep = csvSep;
5757
}
5858

59-
/** @deprecated since 3.0. Use {@link #directoryPath()} instead */
60-
@Deprecated(since = "3.0")
61-
public String getDirectoryPath() {
62-
return directoryPath;
63-
}
64-
65-
/**
66-
* @return The file name including extension
67-
* @deprecated since 3.0. Use {@link #fileName()} instead
68-
*/
69-
@Deprecated(since = "3.0")
70-
public String getFileName() {
71-
return fileName;
72-
}
73-
7459
/**
7560
* @return The path to the file relative to a not explicitly defined base directory, including the
7661
* file extension
@@ -79,18 +64,6 @@ public String getFilePath() {
7964
return !directoryPath.isEmpty() ? FilenameUtils.concat(directoryPath, fileName) : fileName;
8065
}
8166

82-
/** @deprecated since 3.0. Use {@link #headLineElements()} instead */
83-
@Deprecated(since = "3.0")
84-
public String[] getHeadLineElements() {
85-
return headLineElements;
86-
}
87-
88-
/** @deprecated since 3.0. Use {@link #csvSep()} instead */
89-
@Deprecated(since = "3.0")
90-
public String getCsvSep() {
91-
return csvSep;
92-
}
93-
9467
@Override
9568
public boolean equals(Object o) {
9669
// equals implementation is required here because

src/main/java/edu/ie3/datamodel/io/csv/FileNameMetaInformation.java

Lines changed: 0 additions & 44 deletions
This file was deleted.

src/main/java/edu/ie3/datamodel/io/csv/timeseries/ColumnScheme.java

Lines changed: 0 additions & 68 deletions
This file was deleted.

src/main/java/edu/ie3/datamodel/io/csv/timeseries/IndividualTimeSeriesMetaInformation.java

Lines changed: 0 additions & 67 deletions
This file was deleted.

0 commit comments

Comments
 (0)