Skip to content

Removing deprecated classes and methods #790

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0


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


## [3.0.0] - 2023-02-16
Expand Down
17 changes: 0 additions & 17 deletions src/main/java/edu/ie3/datamodel/graph/ImpedanceWeightedGraph.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,21 +39,4 @@ public void setEdgeWeightQuantity(
weight.to(ImpedanceWeightedEdge.DEFAULT_IMPEDANCE_UNIT).getValue().doubleValue();
super.setEdgeWeight(edge, weightDouble);
}

/**
* The only purpose for overriding this method is to provide a better indication of the unit that
* is expected to be passed in. It is highly advised to use the {@link
* ImpedanceWeightedGraph#setEdgeWeightQuantity(ImpedanceWeightedEdge, ComparableQuantity)} for
* safety purposes that the provided edge weight is correct.
*
* @param edge the edge whose weight should be altered
* @param impedanceInOhm the weight of the {@link ImpedanceWeightedEdge} in ohm
* @deprecated Use {@link ImpedanceWeightedGraph#setEdgeWeightQuantity(ImpedanceWeightedEdge,
* ComparableQuantity)} instead, as it provides means for proper unit handling
*/
@Override
@Deprecated(since = "Deprecated since 2.1.0. See Javadocs for more information.")
public void setEdgeWeight(ImpedanceWeightedEdge edge, double impedanceInOhm) {
super.setEdgeWeight(edge, impedanceInOhm);
}
}
18 changes: 0 additions & 18 deletions src/main/java/edu/ie3/datamodel/graph/SubGridGate.java
Original file line number Diff line number Diff line change
Expand Up @@ -53,24 +53,6 @@ public static SubGridGate fromTransformer3W(
};
}

/** @deprecated since 3.0. Use {@link #link()} instead */
@Deprecated(since = "3.0")
public TransformerInput getLink() {
return link;
}

/** @deprecated since 3.0. Use {@link #superiorNode()} instead */
@Deprecated(since = "3.0")
public NodeInput getSuperiorNode() {
return superiorNode;
}

/** @deprecated since 3.0. Use {@link #inferiorNode()} instead */
@Deprecated(since = "3.0")
public NodeInput getInferiorNode() {
return inferiorNode;
}

public int getSuperiorSubGrid() {
return superiorNode.getSubnet();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,6 @@ public class CsvFileConnector implements DataConnector {
private final Map<Class<? extends UniqueEntity>, BufferedCsvWriter> entityWriters =
new HashMap<>();
private final Map<UUID, BufferedCsvWriter> timeSeriesWriters = new HashMap<>();
// ATTENTION: Do not finalize. It's meant for lazy evaluation.
@Deprecated(since = "3.0", forRemoval = true)
private Map<UUID, edu.ie3.datamodel.io.csv.CsvIndividualTimeSeriesMetaInformation>
individualTimeSeriesMetaInformation;

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

/**
* Get time series meta information for a given uuid.
*
* <p>This method lazily evaluates the mapping from <i>all</i> time series files to their meta
* information.
*
* @param timeSeriesUuid The time series in question
* @return An option on the queried information
* @deprecated since 3.0. Use {@link #getCsvIndividualTimeSeriesMetaInformation(ColumnScheme...)}
* instead
*/
@Deprecated(since = "3.0", forRemoval = true)
public Optional<edu.ie3.datamodel.io.csv.timeseries.IndividualTimeSeriesMetaInformation>
getIndividualTimeSeriesMetaInformation(UUID timeSeriesUuid) {
if (Objects.isNull(individualTimeSeriesMetaInformation))
individualTimeSeriesMetaInformation = getCsvIndividualTimeSeriesMetaInformation();

return Optional.ofNullable(individualTimeSeriesMetaInformation.get(timeSeriesUuid))
.map(edu.ie3.datamodel.io.csv.timeseries.IndividualTimeSeriesMetaInformation::new);
}

/**
* Receive the information for specific time series. They are given back filtered by the column
* scheme in order to allow for accounting the different content types.
Expand Down Expand Up @@ -366,60 +341,4 @@ public void shutdown() {
}
});
}

/**
* Enhancing the {@link IndividualTimeSeriesMetaInformation} with the full path to csv file
*
* @deprecated since 3.0. Use {@link
* edu.ie3.datamodel.io.csv.CsvIndividualTimeSeriesMetaInformation} instead
*/
@Deprecated(since = "3.0", forRemoval = true)
public static class CsvIndividualTimeSeriesMetaInformation
extends edu.ie3.datamodel.io.csv.timeseries.IndividualTimeSeriesMetaInformation {
private final String fullFilePath;

public CsvIndividualTimeSeriesMetaInformation(
UUID uuid,
edu.ie3.datamodel.io.csv.timeseries.ColumnScheme columnScheme,
String fullFilePath) {
super(uuid, columnScheme);
this.fullFilePath = fullFilePath;
}

public CsvIndividualTimeSeriesMetaInformation(
edu.ie3.datamodel.io.csv.timeseries.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
+ '\''
+ '}';
}
}
}
27 changes: 0 additions & 27 deletions src/main/java/edu/ie3/datamodel/io/csv/CsvFileDefinition.java
Original file line number Diff line number Diff line change
Expand Up @@ -56,21 +56,6 @@ public CsvFileDefinition(
this.csvSep = csvSep;
}

/** @deprecated since 3.0. Use {@link #directoryPath()} instead */
@Deprecated(since = "3.0")
public String getDirectoryPath() {
return directoryPath;
}

/**
* @return The file name including extension
* @deprecated since 3.0. Use {@link #fileName()} instead
*/
@Deprecated(since = "3.0")
public String getFileName() {
return fileName;
}

/**
* @return The path to the file relative to a not explicitly defined base directory, including the
* file extension
Expand All @@ -79,18 +64,6 @@ public String getFilePath() {
return !directoryPath.isEmpty() ? FilenameUtils.concat(directoryPath, fileName) : fileName;
}

/** @deprecated since 3.0. Use {@link #headLineElements()} instead */
@Deprecated(since = "3.0")
public String[] getHeadLineElements() {
return headLineElements;
}

/** @deprecated since 3.0. Use {@link #csvSep()} instead */
@Deprecated(since = "3.0")
public String getCsvSep() {
return csvSep;
}

@Override
public boolean equals(Object o) {
// equals implementation is required here because
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

Loading