diff --git a/CHANGELOG.md b/CHANGELOG.md index 13be3698e..e860639c6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,7 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed - Fixed small issues in tests [#1400](https://github.com/ie3-institute/PowerSystemDataModel/issues/1400) - Fix transformer susceptance in readTheDocs to negative values [#1078](https://github.com/ie3-institute/PowerSystemDataModel/issues/1078) - +- Fixed `JavaDoc` warnings [#494](https://github.com/ie3-institute/PowerSystemDataModel/issues/494) ### Changed - Updated CI-Pipeline to run task `Deploy` and `Staging` only for `Main` [#1403](https://github.com/ie3-institute/PowerSystemDataModel/issues/1403) diff --git a/build.gradle b/build.gradle index b4785f541..932f092b1 100644 --- a/build.gradle +++ b/build.gradle @@ -113,7 +113,7 @@ tasks.withType(JavaCompile) { tasks.withType(Javadoc){ options.encoding = 'UTF-8' - failOnError = false // TODO: Temp until JavaDoc issues are resolved + failOnError = true } tasks.register('printVersion') { diff --git a/src/main/java/edu/ie3/datamodel/exceptions/ChargingPointTypeException.java b/src/main/java/edu/ie3/datamodel/exceptions/ChargingPointTypeException.java index 929fa8fce..7a00dfa8a 100644 --- a/src/main/java/edu/ie3/datamodel/exceptions/ChargingPointTypeException.java +++ b/src/main/java/edu/ie3/datamodel/exceptions/ChargingPointTypeException.java @@ -7,10 +7,21 @@ /** Is thrown in case, there is some problem when building VoltageLevelInformation */ public class ChargingPointTypeException extends Exception { + /** + * Instantiates a new Charging point type exception. + * + * @param message the message + */ public ChargingPointTypeException(String message) { super(message); } + /** + * Instantiates a new Charging point type exception. + * + * @param message the message + * @param cause the cause + */ public ChargingPointTypeException(String message, Throwable cause) { super(message, cause); } diff --git a/src/main/java/edu/ie3/datamodel/exceptions/ConnectorException.java b/src/main/java/edu/ie3/datamodel/exceptions/ConnectorException.java index 135eb6ad6..303f97904 100644 --- a/src/main/java/edu/ie3/datamodel/exceptions/ConnectorException.java +++ b/src/main/java/edu/ie3/datamodel/exceptions/ConnectorException.java @@ -7,21 +7,37 @@ /** * Exception that should be used whenever something invalid happens in a implementation of a {@link - * edu.ie3.datamodel.io.connectors.DataConnector} + * edu.ie3.datamodel.io.connectors.DataConnector}* * * @version 0.1 * @since 20.03.20 */ public class ConnectorException extends Exception { + /** + * Instantiates a new Connector exception. + * + * @param message the message + * @param cause the cause + */ public ConnectorException(final String message, final Throwable cause) { super(message, cause); } + /** + * Instantiates a new Connector exception. + * + * @param cause the cause + */ public ConnectorException(final Throwable cause) { super(cause); } + /** + * Instantiates a new Connector exception. + * + * @param message the message + */ public ConnectorException(final String message) { super(message); } diff --git a/src/main/java/edu/ie3/datamodel/exceptions/DuplicateEntitiesException.java b/src/main/java/edu/ie3/datamodel/exceptions/DuplicateEntitiesException.java index eee2942f1..f357923ca 100644 --- a/src/main/java/edu/ie3/datamodel/exceptions/DuplicateEntitiesException.java +++ b/src/main/java/edu/ie3/datamodel/exceptions/DuplicateEntitiesException.java @@ -8,12 +8,24 @@ import edu.ie3.datamodel.utils.ExceptionUtils; import java.util.List; +/** The type Duplicate entities exception. */ public class DuplicateEntitiesException extends ValidationException { + /** + * Instantiates a new Duplicate entities exception. + * + * @param s the s + */ public DuplicateEntitiesException(String s) { super(s); } + /** + * Instantiates a new Duplicate entities exception. + * + * @param entityName the entity name + * @param exceptions the exceptions + */ public DuplicateEntitiesException( String entityName, List exceptions) { this( diff --git a/src/main/java/edu/ie3/datamodel/exceptions/EntityProcessorException.java b/src/main/java/edu/ie3/datamodel/exceptions/EntityProcessorException.java index 749b190d8..529060920 100644 --- a/src/main/java/edu/ie3/datamodel/exceptions/EntityProcessorException.java +++ b/src/main/java/edu/ie3/datamodel/exceptions/EntityProcessorException.java @@ -7,17 +7,33 @@ /** * Is thrown, when something went wrong during entity field mapping creation in a {@link - * edu.ie3.datamodel.io.processor.EntityProcessor} + * edu.ie3.datamodel.io.processor.EntityProcessor}* */ public class EntityProcessorException extends Exception { + /** + * Instantiates a new Entity processor exception. + * + * @param message the message + * @param cause the cause + */ public EntityProcessorException(final String message, final Throwable cause) { super(message, cause); } + /** + * Instantiates a new Entity processor exception. + * + * @param cause the cause + */ public EntityProcessorException(final Throwable cause) { super(cause); } + /** + * Instantiates a new Entity processor exception. + * + * @param message the message + */ public EntityProcessorException(final String message) { super(message); } diff --git a/src/main/java/edu/ie3/datamodel/exceptions/ExtractorException.java b/src/main/java/edu/ie3/datamodel/exceptions/ExtractorException.java index 575ae373b..27ec0c774 100644 --- a/src/main/java/edu/ie3/datamodel/exceptions/ExtractorException.java +++ b/src/main/java/edu/ie3/datamodel/exceptions/ExtractorException.java @@ -7,21 +7,37 @@ /** * Exception that should be used whenever something invalid happens in a implementation of a {@link - * edu.ie3.datamodel.io.connectors.DataConnector} + * edu.ie3.datamodel.io.connectors.DataConnector}* * * @version 0.1 * @since 20.03.20 */ public class ExtractorException extends Exception { + /** + * Instantiates a new Extractor exception. + * + * @param message the message + * @param cause the cause + */ public ExtractorException(final String message, final Throwable cause) { super(message, cause); } + /** + * Instantiates a new Extractor exception. + * + * @param cause the cause + */ public ExtractorException(final Throwable cause) { super(cause); } + /** + * Instantiates a new Extractor exception. + * + * @param message the message + */ public ExtractorException(final String message) { super(message); } diff --git a/src/main/java/edu/ie3/datamodel/exceptions/FactoryException.java b/src/main/java/edu/ie3/datamodel/exceptions/FactoryException.java index 0a51c09bf..33727e030 100644 --- a/src/main/java/edu/ie3/datamodel/exceptions/FactoryException.java +++ b/src/main/java/edu/ie3/datamodel/exceptions/FactoryException.java @@ -7,14 +7,30 @@ /** Is thrown, when something went wrong during entity creation process in a EntityFactory */ public class FactoryException extends RuntimeException { + /** + * Instantiates a new Factory exception. + * + * @param message the message + * @param cause the cause + */ public FactoryException(final String message, final Throwable cause) { super(message, cause); } + /** + * Instantiates a new Factory exception. + * + * @param cause the cause + */ public FactoryException(final Throwable cause) { super(cause); } + /** + * Instantiates a new Factory exception. + * + * @param message the message + */ public FactoryException(final String message) { super(message); } diff --git a/src/main/java/edu/ie3/datamodel/exceptions/FailedValidationException.java b/src/main/java/edu/ie3/datamodel/exceptions/FailedValidationException.java index 19a64162e..b6eafc9b7 100644 --- a/src/main/java/edu/ie3/datamodel/exceptions/FailedValidationException.java +++ b/src/main/java/edu/ie3/datamodel/exceptions/FailedValidationException.java @@ -8,20 +8,39 @@ import edu.ie3.datamodel.utils.ExceptionUtils; import java.util.List; +/** The type Failed validation exception. */ public class FailedValidationException extends ValidationException { + /** + * Instantiates a new Failed validation exception. + * + * @param message the message + * @param throwable the throwable + */ public FailedValidationException(String message, Throwable throwable) { super(message, throwable); } + /** + * Instantiates a new Failed validation exception. + * + * @param throwable the throwable + */ public FailedValidationException(Throwable throwable) { super(throwable); } + /** + * Instantiates a new Failed validation exception. + * + * @param message the message + */ public FailedValidationException(String message) { super(message); } /** + * Instantiates a new Failed validation exception. + * * @param exceptions List of exceptions, which must not be empty */ public FailedValidationException(List exceptions) { diff --git a/src/main/java/edu/ie3/datamodel/exceptions/FailureException.java b/src/main/java/edu/ie3/datamodel/exceptions/FailureException.java index 7c1f257a2..51fe1f51b 100644 --- a/src/main/java/edu/ie3/datamodel/exceptions/FailureException.java +++ b/src/main/java/edu/ie3/datamodel/exceptions/FailureException.java @@ -5,15 +5,32 @@ */ package edu.ie3.datamodel.exceptions; +/** The type Failure exception. */ public class FailureException extends Exception { + /** + * Instantiates a new Failure exception. + * + * @param message the message + * @param throwable the throwable + */ public FailureException(String message, Throwable throwable) { super(message, throwable); } + /** + * Instantiates a new Failure exception. + * + * @param message the message + */ public FailureException(String message) { super(message); } + /** + * Instantiates a new Failure exception. + * + * @param throwable the throwable + */ public FailureException(Throwable throwable) { super(throwable); } diff --git a/src/main/java/edu/ie3/datamodel/exceptions/FileException.java b/src/main/java/edu/ie3/datamodel/exceptions/FileException.java index 14b3ab632..d04d487ee 100644 --- a/src/main/java/edu/ie3/datamodel/exceptions/FileException.java +++ b/src/main/java/edu/ie3/datamodel/exceptions/FileException.java @@ -5,11 +5,23 @@ */ package edu.ie3.datamodel.exceptions; +/** The type File exception. */ public class FileException extends Exception { + /** + * Instantiates a new File exception. + * + * @param message the message + */ public FileException(String message) { super(message); } + /** + * Instantiates a new File exception. + * + * @param message the message + * @param cause the cause + */ public FileException(String message, Throwable cause) { super(message, cause); } diff --git a/src/main/java/edu/ie3/datamodel/exceptions/GraphicSourceException.java b/src/main/java/edu/ie3/datamodel/exceptions/GraphicSourceException.java index 91d6958c7..fa1e52140 100644 --- a/src/main/java/edu/ie3/datamodel/exceptions/GraphicSourceException.java +++ b/src/main/java/edu/ie3/datamodel/exceptions/GraphicSourceException.java @@ -7,7 +7,14 @@ import java.util.List; +/** The type Graphic source exception. */ public class GraphicSourceException extends SourceException { + /** + * Instantiates a new Graphic source exception. + * + * @param message the message + * @param exceptions the exceptions + */ public GraphicSourceException(String message, List exceptions) { super(message, exceptions); } diff --git a/src/main/java/edu/ie3/datamodel/exceptions/InvalidColumnNameException.java b/src/main/java/edu/ie3/datamodel/exceptions/InvalidColumnNameException.java index 8418f0981..2e7ffcd7e 100644 --- a/src/main/java/edu/ie3/datamodel/exceptions/InvalidColumnNameException.java +++ b/src/main/java/edu/ie3/datamodel/exceptions/InvalidColumnNameException.java @@ -12,14 +12,30 @@ * @since 10.12.20 */ public class InvalidColumnNameException extends RuntimeException { + /** + * Instantiates a new Invalid column name exception. + * + * @param message the message + * @param cause the cause + */ public InvalidColumnNameException(final String message, final Throwable cause) { super(message, cause); } + /** + * Instantiates a new Invalid column name exception. + * + * @param cause the cause + */ public InvalidColumnNameException(final Throwable cause) { super(cause); } + /** + * Instantiates a new Invalid column name exception. + * + * @param message the message + */ public InvalidColumnNameException(final String message) { super(message); } diff --git a/src/main/java/edu/ie3/datamodel/exceptions/InvalidEntityException.java b/src/main/java/edu/ie3/datamodel/exceptions/InvalidEntityException.java index 162acd0b1..70ba9599e 100644 --- a/src/main/java/edu/ie3/datamodel/exceptions/InvalidEntityException.java +++ b/src/main/java/edu/ie3/datamodel/exceptions/InvalidEntityException.java @@ -12,15 +12,34 @@ public class InvalidEntityException extends ValidationException { private static final long serialVersionUID = 809496087520306374L; + /** + * Instantiates a new Invalid entity exception. + * + * @param faultDescription the fault description + * @param invalidEntity the invalid entity + */ public InvalidEntityException(String faultDescription, UniqueEntity invalidEntity) { super("Entity is invalid because of: " + faultDescription + " [" + invalidEntity + "]"); } + /** + * Instantiates a new Invalid entity exception. + * + * @param faultDescription the fault description + * @param cause the cause + * @param invalidEntity the invalid entity + */ public InvalidEntityException( String faultDescription, Throwable cause, UniqueEntity invalidEntity) { super("Entity is invalid because of: " + faultDescription + " [" + invalidEntity + "]", cause); } + /** + * Instantiates a new Invalid entity exception. + * + * @param message the message + * @param cause the cause + */ public InvalidEntityException(String message, Throwable cause) { super(message, cause); } diff --git a/src/main/java/edu/ie3/datamodel/exceptions/InvalidGridException.java b/src/main/java/edu/ie3/datamodel/exceptions/InvalidGridException.java index d1eada82f..efe0f6656 100644 --- a/src/main/java/edu/ie3/datamodel/exceptions/InvalidGridException.java +++ b/src/main/java/edu/ie3/datamodel/exceptions/InvalidGridException.java @@ -5,11 +5,23 @@ */ package edu.ie3.datamodel.exceptions; +/** The type Invalid grid exception. */ public class InvalidGridException extends ValidationException { + /** + * Instantiates a new Invalid grid exception. + * + * @param message the message + */ public InvalidGridException(String message) { super(message); } + /** + * Instantiates a new Invalid grid exception. + * + * @param message the message + * @param cause the cause + */ public InvalidGridException(String message, Throwable cause) { super(message, cause); } diff --git a/src/main/java/edu/ie3/datamodel/exceptions/NotImplementedException.java b/src/main/java/edu/ie3/datamodel/exceptions/NotImplementedException.java index 8cbc79b50..bfb3ebd16 100644 --- a/src/main/java/edu/ie3/datamodel/exceptions/NotImplementedException.java +++ b/src/main/java/edu/ie3/datamodel/exceptions/NotImplementedException.java @@ -5,7 +5,13 @@ */ package edu.ie3.datamodel.exceptions; +/** The type Not implemented exception. */ public class NotImplementedException extends UnsupportedOperationException { + /** + * Instantiates a new Not implemented exception. + * + * @param msg the msg + */ public NotImplementedException(String msg) { super(msg); } diff --git a/src/main/java/edu/ie3/datamodel/exceptions/ParsingException.java b/src/main/java/edu/ie3/datamodel/exceptions/ParsingException.java index f62d632cd..a07510fbd 100644 --- a/src/main/java/edu/ie3/datamodel/exceptions/ParsingException.java +++ b/src/main/java/edu/ie3/datamodel/exceptions/ParsingException.java @@ -5,11 +5,23 @@ */ package edu.ie3.datamodel.exceptions; +/** The type Parsing exception. */ public class ParsingException extends Exception { + /** + * Instantiates a new Parsing exception. + * + * @param message the message + */ public ParsingException(String message) { super(message); } + /** + * Instantiates a new Parsing exception. + * + * @param message the message + * @param cause the cause + */ public ParsingException(String message, Throwable cause) { super(message, cause); } diff --git a/src/main/java/edu/ie3/datamodel/exceptions/ProcessorProviderException.java b/src/main/java/edu/ie3/datamodel/exceptions/ProcessorProviderException.java index be4abe466..4120bb485 100644 --- a/src/main/java/edu/ie3/datamodel/exceptions/ProcessorProviderException.java +++ b/src/main/java/edu/ie3/datamodel/exceptions/ProcessorProviderException.java @@ -7,21 +7,37 @@ /** * Exception that should be used whenever an error occurs in a instance of {@link - * edu.ie3.datamodel.io.processor.ProcessorProvider} + * edu.ie3.datamodel.io.processor.ProcessorProvider}* * * @version 0.1 * @since 20.03.20 */ public class ProcessorProviderException extends Exception { + /** + * Instantiates a new Processor provider exception. + * + * @param message the message + * @param cause the cause + */ public ProcessorProviderException(final String message, final Throwable cause) { super(message, cause); } + /** + * Instantiates a new Processor provider exception. + * + * @param cause the cause + */ public ProcessorProviderException(final Throwable cause) { super(cause); } + /** + * Instantiates a new Processor provider exception. + * + * @param message the message + */ public ProcessorProviderException(final String message) { super(message); } diff --git a/src/main/java/edu/ie3/datamodel/exceptions/RawGridException.java b/src/main/java/edu/ie3/datamodel/exceptions/RawGridException.java index 629232220..623687cda 100644 --- a/src/main/java/edu/ie3/datamodel/exceptions/RawGridException.java +++ b/src/main/java/edu/ie3/datamodel/exceptions/RawGridException.java @@ -7,7 +7,14 @@ import java.util.List; +/** The type Raw grid exception. */ public class RawGridException extends SourceException { + /** + * Instantiates a new Raw grid exception. + * + * @param message the message + * @param exceptions the exceptions + */ public RawGridException(String message, List exceptions) { super(message, exceptions); } diff --git a/src/main/java/edu/ie3/datamodel/exceptions/SinkException.java b/src/main/java/edu/ie3/datamodel/exceptions/SinkException.java index 88518f3ec..2b84fee60 100644 --- a/src/main/java/edu/ie3/datamodel/exceptions/SinkException.java +++ b/src/main/java/edu/ie3/datamodel/exceptions/SinkException.java @@ -7,20 +7,36 @@ /** * Exception that should be used whenever an error occurs in a instance of a {@link - * edu.ie3.datamodel.io.sink.DataSink} + * edu.ie3.datamodel.io.sink.DataSink}* * * @version 0.1 * @since 19.03.20 */ public class SinkException extends Exception { + /** + * Instantiates a new Sink exception. + * + * @param message the message + * @param cause the cause + */ public SinkException(final String message, final Throwable cause) { super(message, cause); } + /** + * Instantiates a new Sink exception. + * + * @param cause the cause + */ public SinkException(final Throwable cause) { super(cause); } + /** + * Instantiates a new Sink exception. + * + * @param message the message + */ public SinkException(final String message) { super(message); } diff --git a/src/main/java/edu/ie3/datamodel/exceptions/SourceException.java b/src/main/java/edu/ie3/datamodel/exceptions/SourceException.java index 623dc801b..55f0f15c8 100644 --- a/src/main/java/edu/ie3/datamodel/exceptions/SourceException.java +++ b/src/main/java/edu/ie3/datamodel/exceptions/SourceException.java @@ -10,7 +10,7 @@ /** * Exception that should be used whenever an error occurs in a instance of a {@link - * edu.ie3.datamodel.io.source.DataSource} + * edu.ie3.datamodel.io.source.DataSource}* * * @version 0.1 * @since 19.03.20 @@ -19,18 +19,40 @@ public class SourceException extends Exception { private static final long serialVersionUID = -1861732230033172395L; + /** + * Instantiates a new Source exception. + * + * @param message the message + * @param cause the cause + */ public SourceException(final String message, final Throwable cause) { super(message, cause); } + /** + * Instantiates a new Source exception. + * + * @param cause the cause + */ public SourceException(final Throwable cause) { super(cause); } + /** + * Instantiates a new Source exception. + * + * @param message the message + */ public SourceException(final String message) { super(message); } + /** + * Instantiates a new Source exception. + * + * @param message the message + * @param exceptions the exceptions + */ public SourceException(String message, List exceptions) { super(message + "\n " + ExceptionUtils.combineExceptions(exceptions)); } diff --git a/src/main/java/edu/ie3/datamodel/exceptions/SystemParticipantsException.java b/src/main/java/edu/ie3/datamodel/exceptions/SystemParticipantsException.java index 7c97dadf7..dc0a6530d 100644 --- a/src/main/java/edu/ie3/datamodel/exceptions/SystemParticipantsException.java +++ b/src/main/java/edu/ie3/datamodel/exceptions/SystemParticipantsException.java @@ -7,7 +7,14 @@ import java.util.List; +/** The type System participants exception. */ public class SystemParticipantsException extends SourceException { + /** + * Instantiates a new System participants exception. + * + * @param message the message + * @param exceptions the exceptions + */ public SystemParticipantsException(String message, List exceptions) { super(message, exceptions); } diff --git a/src/main/java/edu/ie3/datamodel/exceptions/TopologyException.java b/src/main/java/edu/ie3/datamodel/exceptions/TopologyException.java index e8ec5e8a4..cf83a4285 100644 --- a/src/main/java/edu/ie3/datamodel/exceptions/TopologyException.java +++ b/src/main/java/edu/ie3/datamodel/exceptions/TopologyException.java @@ -5,15 +5,28 @@ */ package edu.ie3.datamodel.exceptions; +/** The type Topology exception. */ public class TopologyException extends Exception { + /** Instantiates a new Topology exception. */ public TopologyException() { super(); } + /** + * Instantiates a new Topology exception. + * + * @param s the s + */ public TopologyException(String s) { super(s); } + /** + * Instantiates a new Topology exception. + * + * @param s the s + * @param throwable the throwable + */ public TopologyException(String s, Throwable throwable) { super(s, throwable); } diff --git a/src/main/java/edu/ie3/datamodel/exceptions/TryException.java b/src/main/java/edu/ie3/datamodel/exceptions/TryException.java index 61d134d0f..84af096e1 100644 --- a/src/main/java/edu/ie3/datamodel/exceptions/TryException.java +++ b/src/main/java/edu/ie3/datamodel/exceptions/TryException.java @@ -5,7 +5,14 @@ */ package edu.ie3.datamodel.exceptions; +/** The type Try exception. */ public class TryException extends RuntimeException { + /** + * Instantiates a new Try exception. + * + * @param message the message + * @param throwable the throwable + */ public TryException(String message, Throwable throwable) { super(message, throwable); } diff --git a/src/main/java/edu/ie3/datamodel/exceptions/UnsafeEntityException.java b/src/main/java/edu/ie3/datamodel/exceptions/UnsafeEntityException.java index d754fb28f..fd15a9279 100644 --- a/src/main/java/edu/ie3/datamodel/exceptions/UnsafeEntityException.java +++ b/src/main/java/edu/ie3/datamodel/exceptions/UnsafeEntityException.java @@ -10,6 +10,12 @@ /** Is thrown, when a checked entity may be unsafe to use, but is not necessarily unsafe */ public class UnsafeEntityException extends ValidationException { + /** + * Instantiates a new Unsafe entity exception. + * + * @param faultDescription the fault description + * @param unsafeEntity the unsafe entity + */ public UnsafeEntityException(String faultDescription, UniqueEntity unsafeEntity) { super("Entity may be unsafe because of: " + faultDescription + " [" + unsafeEntity + "]"); } diff --git a/src/main/java/edu/ie3/datamodel/exceptions/ValidationException.java b/src/main/java/edu/ie3/datamodel/exceptions/ValidationException.java index 22eaa2ad0..d47cb91b6 100644 --- a/src/main/java/edu/ie3/datamodel/exceptions/ValidationException.java +++ b/src/main/java/edu/ie3/datamodel/exceptions/ValidationException.java @@ -5,15 +5,32 @@ */ package edu.ie3.datamodel.exceptions; +/** The type Validation exception. */ public abstract class ValidationException extends Exception { + /** + * Instantiates a new Validation exception. + * + * @param s the s + */ protected ValidationException(String s) { super(s); } + /** + * Instantiates a new Validation exception. + * + * @param throwable the throwable + */ protected ValidationException(Throwable throwable) { super(throwable); } + /** + * Instantiates a new Validation exception. + * + * @param s the s + * @param throwable the throwable + */ protected ValidationException(String s, Throwable throwable) { super(s, throwable); } diff --git a/src/main/java/edu/ie3/datamodel/exceptions/VoltageLevelException.java b/src/main/java/edu/ie3/datamodel/exceptions/VoltageLevelException.java index c152443ae..0747a9c48 100644 --- a/src/main/java/edu/ie3/datamodel/exceptions/VoltageLevelException.java +++ b/src/main/java/edu/ie3/datamodel/exceptions/VoltageLevelException.java @@ -7,10 +7,21 @@ /** Is thrown in case, there is some problem when building VoltageLevelInformation */ public class VoltageLevelException extends Exception { + /** + * Instantiates a new Voltage level exception. + * + * @param message the message + */ public VoltageLevelException(String message) { super(message); } + /** + * Instantiates a new Voltage level exception. + * + * @param message the message + * @param cause the cause + */ public VoltageLevelException(String message, Throwable cause) { super(message, cause); } diff --git a/src/main/java/edu/ie3/datamodel/graph/DistanceWeightedEdge.java b/src/main/java/edu/ie3/datamodel/graph/DistanceWeightedEdge.java index 577d58b4b..8981f0099 100644 --- a/src/main/java/edu/ie3/datamodel/graph/DistanceWeightedEdge.java +++ b/src/main/java/edu/ie3/datamodel/graph/DistanceWeightedEdge.java @@ -19,10 +19,20 @@ * methods. */ public class DistanceWeightedEdge extends DefaultWeightedEdge { + + /** Default constructor for DistanceWeightedEdge. */ + public DistanceWeightedEdge() {} + private static final long serialVersionUID = -3331046813188425728L; + /** The constant DEFAULT_DISTANCE_UNIT. */ protected static final Unit DEFAULT_DISTANCE_UNIT = METRE; + /** + * Gets distance. + * + * @return the distance + */ public Quantity getDistance() { return Quantities.getQuantity(getWeight(), DEFAULT_DISTANCE_UNIT); } diff --git a/src/main/java/edu/ie3/datamodel/graph/DistanceWeightedGraph.java b/src/main/java/edu/ie3/datamodel/graph/DistanceWeightedGraph.java index 6bd095294..80cbe2e00 100644 --- a/src/main/java/edu/ie3/datamodel/graph/DistanceWeightedGraph.java +++ b/src/main/java/edu/ie3/datamodel/graph/DistanceWeightedGraph.java @@ -17,10 +17,17 @@ public class DistanceWeightedGraph extends SimpleWeightedGraph vertexSupplier, Supplier edgeSupplier) { super(vertexSupplier, edgeSupplier); @@ -28,7 +35,7 @@ public DistanceWeightedGraph( /** * Assigns a {@link Quantity} of type {@link Length} to an instance of edge {@link - * DistanceWeightedEdge} + * DistanceWeightedEdge}* * * @param edge edge whose weight should be altered * @param weight the weight of the {@link DistanceWeightedEdge} diff --git a/src/main/java/edu/ie3/datamodel/graph/ImpedanceWeightedEdge.java b/src/main/java/edu/ie3/datamodel/graph/ImpedanceWeightedEdge.java index c29519a8d..c526322e3 100644 --- a/src/main/java/edu/ie3/datamodel/graph/ImpedanceWeightedEdge.java +++ b/src/main/java/edu/ie3/datamodel/graph/ImpedanceWeightedEdge.java @@ -17,15 +17,21 @@ * A default implementation for edges in a {@link ImpedanceWeightedGraph}. All access to the weight * of an edge must go through the graph interface, which is why this class doesn't expose any public * methods. - * - * @version 0.1 - * @since 04.06.20 */ public class ImpedanceWeightedEdge extends DefaultWeightedEdge { + /** Default constructor for ImpedanceWeightedEdge. */ + public ImpedanceWeightedEdge() {} + private static final long serialVersionUID = -3331046813188425729L; + /** The constant DEFAULT_IMPEDANCE_UNIT. */ protected static final Unit DEFAULT_IMPEDANCE_UNIT = OHM; + /** + * Gets impedance. + * + * @return the impedance + */ public Quantity getImpedance() { return Quantities.getQuantity(getWeight(), DEFAULT_IMPEDANCE_UNIT); } diff --git a/src/main/java/edu/ie3/datamodel/graph/ImpedanceWeightedGraph.java b/src/main/java/edu/ie3/datamodel/graph/ImpedanceWeightedGraph.java index 14e630dfa..d1459a5ed 100644 --- a/src/main/java/edu/ie3/datamodel/graph/ImpedanceWeightedGraph.java +++ b/src/main/java/edu/ie3/datamodel/graph/ImpedanceWeightedGraph.java @@ -17,10 +17,17 @@ public class ImpedanceWeightedGraph extends SimpleWeightedGraph vertexSupplier, Supplier edgeSupplier) { super(vertexSupplier, edgeSupplier); @@ -28,7 +35,7 @@ public ImpedanceWeightedGraph( /** * Assigns a {@link Quantity} of type {@link ElectricResistance} to an instance of edge {@link - * ImpedanceWeightedEdge} + * ImpedanceWeightedEdge}* * * @param edge edge whose weight should be altered * @param weight the weight of the {@link ImpedanceWeightedEdge} diff --git a/src/main/java/edu/ie3/datamodel/graph/SubGridGate.java b/src/main/java/edu/ie3/datamodel/graph/SubGridGate.java index 814a7aa80..b6e573308 100644 --- a/src/main/java/edu/ie3/datamodel/graph/SubGridGate.java +++ b/src/main/java/edu/ie3/datamodel/graph/SubGridGate.java @@ -15,7 +15,11 @@ /** * Defines gates between {@link SubGridContainer}s and serves as edge definition for {@link - * SubGridTopologyGraph} + * SubGridTopologyGraph}* + * + * @param link The transformer input that connects the subgrids. + * @param superiorNode The node that represents the higher voltage side of the connection. + * @param inferiorNode The node that represents the lower voltage side of the connection */ public record SubGridGate(TransformerInput link, NodeInput superiorNode, NodeInput inferiorNode) implements Serializable { @@ -54,10 +58,20 @@ public static SubGridGate fromTransformer3W( }; } + /** + * Gets superior sub grid. + * + * @return the superior sub grid + */ public int getSuperiorSubGrid() { return superiorNode.getSubnet(); } + /** + * Gets inferior sub grid. + * + * @return the inferior sub grid + */ public int getInferiorSubGrid() { return inferiorNode.getSubnet(); } diff --git a/src/main/java/edu/ie3/datamodel/io/DbGridMetadata.java b/src/main/java/edu/ie3/datamodel/io/DbGridMetadata.java index 8d42669af..a87a85f05 100644 --- a/src/main/java/edu/ie3/datamodel/io/DbGridMetadata.java +++ b/src/main/java/edu/ie3/datamodel/io/DbGridMetadata.java @@ -10,11 +10,21 @@ import java.util.UUID; import java.util.stream.Stream; -/** Class for identification of entities and results from grids in SQL databases. */ +/** + * Class for identification of entities and results from grids in SQL databases. + * + * @param gridName The name of the grid. + * @param uuid The unique identifier for the grid + */ public record DbGridMetadata(String gridName, UUID uuid) { + /** The constant GRID_TABLE_COLUMN. */ public static final String GRID_TABLE_COLUMN = "grids"; + + /** The constant GRID_NAME_COLUMN. */ public static final String GRID_NAME_COLUMN = "grid_name"; + + /** The constant GRID_UUID_COLUMN. */ public static final String GRID_UUID_COLUMN = "grid_uuid"; public String toString() { @@ -22,6 +32,8 @@ public String toString() { } /** + * Gets stream for query. + * * @return Stream with grid uuid */ public Stream getStreamForQuery() { diff --git a/src/main/java/edu/ie3/datamodel/io/IoUtil.java b/src/main/java/edu/ie3/datamodel/io/IoUtil.java index 0968b4f28..a2beec6a9 100644 --- a/src/main/java/edu/ie3/datamodel/io/IoUtil.java +++ b/src/main/java/edu/ie3/datamodel/io/IoUtil.java @@ -9,8 +9,12 @@ import java.nio.file.Path; import java.util.Optional; +/** The type Io util. */ public class IoUtil { + /** The constant FILE_SEPARATOR_REGEX. */ public static final String FILE_SEPARATOR_REGEX = "[\\\\/]"; + + /** The constant FILE_SEPARATOR_REPLACEMENT. */ public static final String FILE_SEPARATOR_REPLACEMENT = File.separator.equals("\\") ? "\\\\" : "/"; diff --git a/src/main/java/edu/ie3/datamodel/io/SqlUtils.java b/src/main/java/edu/ie3/datamodel/io/SqlUtils.java index cfb195d96..c515ac00a 100644 --- a/src/main/java/edu/ie3/datamodel/io/SqlUtils.java +++ b/src/main/java/edu/ie3/datamodel/io/SqlUtils.java @@ -9,9 +9,12 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; +/** The type Sql utils. */ public class SqlUtils { + /** The constant log. */ protected static final Logger log = LoggerFactory.getLogger(SqlUtils.class); + private static final String END_QUERY_CREATE_TABLE = ")\n \t WITHOUT OIDS\n \t TABLESPACE pg_default;"; @@ -24,6 +27,9 @@ private static String beginQueryCreateTable(String schemaName, String tableName) } /** + * Query create grid table string. + * + * @param schemaName the schema name * @return query to create a SQL table for a grid */ public static String queryCreateGridTable(String schemaName) { @@ -35,6 +41,8 @@ public static String queryCreateGridTable(String schemaName) { /** * To avoid data type conflicts while insertion into a SQL table all columns should be quoted. * + * @param input the input + * @param quoteSymbol the quote symbol * @return input with quoteSymbol */ public static String quote(String input, String quoteSymbol) { diff --git a/src/main/java/edu/ie3/datamodel/io/connectors/CouchbaseConnector.java b/src/main/java/edu/ie3/datamodel/io/connectors/CouchbaseConnector.java index 3dc769d71..9a9daa7b4 100644 --- a/src/main/java/edu/ie3/datamodel/io/connectors/CouchbaseConnector.java +++ b/src/main/java/edu/ie3/datamodel/io/connectors/CouchbaseConnector.java @@ -60,7 +60,11 @@ public CouchbaseConnector( cluster = Cluster.connect(url, clusterOptions); } - /** Returns the option for a set of found fields. */ + /** + * Returns the option for a set of found fields. + * + * @return the source fields + */ @SuppressWarnings("unchecked") public Optional> getSourceFields() { String query = @@ -138,6 +142,8 @@ public void shutdown() { } /** + * Gets bucket name. + * * @return the bucket name */ public String getBucketName() { 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 b2d10f5dc..cbf63e606 100644 --- a/src/main/java/edu/ie3/datamodel/io/connectors/CsvFileConnector.java +++ b/src/main/java/edu/ie3/datamodel/io/connectors/CsvFileConnector.java @@ -24,7 +24,7 @@ /** * Provides the connector (here: buffered writer) for specific files to be used by a {@link - * edu.ie3.datamodel.io.sink.CsvFileSink} or {@link edu.ie3.datamodel.io.source.csv.CsvDataSource} + * edu.ie3.datamodel.io.sink.CsvFileSink}* or {@link edu.ie3.datamodel.io.source.csv.CsvDataSource} * * @version 0.1 * @since 19.03.20 @@ -38,21 +38,44 @@ public class CsvFileConnector implements DataConnector { private final Optional> customInputStream; private static final String FILE_ENDING = ".csv"; + /** + * Instantiates a new Csv file connector. + * + * @param baseDirectory the base directory + */ public CsvFileConnector(Path baseDirectory) { this.baseDirectory = baseDirectory; this.customInputStream = Optional.empty(); } + /** + * Instantiates a new Csv file connector. + * + * @param baseDirectory the base directory + * @param inputStreamSupplier the input stream supplier + */ public CsvFileConnector(Path baseDirectory, Function inputStreamSupplier) { this.baseDirectory = baseDirectory; this.customInputStream = Optional.ofNullable(inputStreamSupplier); } - /** Returns the base directory of this connector. */ + /** + * Returns the base directory of this connector. + * + * @return the base directory + */ public Path getBaseDirectory() { return baseDirectory; } + /** + * Gets or init writer. + * + * @param clz the clz + * @param fileDefinition the file definition + * @return the or init writer + * @throws ConnectorException the connector exception + */ public synchronized BufferedCsvWriter getOrInitWriter( Class clz, CsvFileDefinition fileDefinition) throws ConnectorException { /* Try to the right writer */ @@ -71,6 +94,18 @@ public synchronized BufferedCsvWriter getOrInitWriter( } } + /** + * Gets or init writer. + * + * @param the type parameter + * @param the type parameter + * @param the type parameter + * @param the type parameter + * @param timeSeries the time series + * @param fileDefinition the file definition + * @return the or init writer + * @throws ConnectorException the connector exception + */ public synchronized < T extends TimeSeries, E extends TimeSeriesEntry, @@ -144,8 +179,8 @@ public synchronized void closeTimeSeriesWriter(UUID uuid) throws IOException { /** * Close an entity writer for the given class * - * @param clz Class, that the writer is able to persist * @param Type of class + * @param clz Class, that the writer is able to persist * @throws IOException If closing of writer fails. */ public synchronized void closeEntityWriter(Class clz) throws IOException { diff --git a/src/main/java/edu/ie3/datamodel/io/connectors/DataConnector.java b/src/main/java/edu/ie3/datamodel/io/connectors/DataConnector.java index 8d9a877fd..2c8d0def1 100644 --- a/src/main/java/edu/ie3/datamodel/io/connectors/DataConnector.java +++ b/src/main/java/edu/ie3/datamodel/io/connectors/DataConnector.java @@ -11,5 +11,6 @@ */ public interface DataConnector { + /** Shutdown. */ void shutdown(); } diff --git a/src/main/java/edu/ie3/datamodel/io/connectors/InfluxDbConnector.java b/src/main/java/edu/ie3/datamodel/io/connectors/InfluxDbConnector.java index f96fb621a..6725adb02 100644 --- a/src/main/java/edu/ie3/datamodel/io/connectors/InfluxDbConnector.java +++ b/src/main/java/edu/ie3/datamodel/io/connectors/InfluxDbConnector.java @@ -25,9 +25,11 @@ */ public class InfluxDbConnector implements DataConnector { + /** The constant NO_SCENARIO. */ /* default scenario parameter when no scenario is provided */ public static final String NO_SCENARIO = "no_scenario"; + /** The constant WEATHER_SCENARIO. */ /* default scenario parameter for weather data */ public static final String WEATHER_SCENARIO = "weather_scenario"; @@ -46,9 +48,9 @@ public class InfluxDbConnector implements DataConnector { * Initializes a new InfluxDbConnector with the given url, databaseName and scenario name. * * @param url the connection url for the influxDB database + * @param databaseName the name of the database the session should be set to * @param scenarioName the name of the simulation scenario which will be used in influxDB * measurement names - * @param databaseName the name of the database the session should be set to * @param createDb true if the connector should create the database if it doesn't exist yet, false * otherwise * @param logLevel log level of the {@link org.influxdb.InfluxDB.LogLevel} logger @@ -109,7 +111,11 @@ public InfluxDbConnector(String url, String databaseName) { this(url, databaseName, NO_SCENARIO, true, InfluxDB.LogLevel.NONE, BatchOptions.DEFAULTS); } - /** Returns the option for fields found in the source. */ + /** + * Returns the option for fields found in the source. + * + * @return the source fields + */ public Optional> getSourceFields() { QueryResult tagKeys = session.query(new Query("SHOW TAG KEYS ON " + databaseName)); Map>> tagResults = parseQueryResult(tagKeys); @@ -160,6 +166,11 @@ public InfluxDB getSession() { return session; } + /** + * Gets scenario name. + * + * @return the scenario name + */ public String getScenarioName() { return scenarioName; } diff --git a/src/main/java/edu/ie3/datamodel/io/connectors/SqlConnector.java b/src/main/java/edu/ie3/datamodel/io/connectors/SqlConnector.java index eed7307ad..a2523f438 100644 --- a/src/main/java/edu/ie3/datamodel/io/connectors/SqlConnector.java +++ b/src/main/java/edu/ie3/datamodel/io/connectors/SqlConnector.java @@ -20,6 +20,7 @@ * other databases. */ public class SqlConnector implements DataConnector { + /** The constant log. */ public static final Logger log = LoggerFactory.getLogger(SqlConnector.class); private final String jdbcUrl; @@ -45,7 +46,7 @@ public SqlConnector(String jdbcUrl, String userName, String password) { /** * Executes the given query. For update queries please use {@link - * SqlConnector#executeUpdate(String)}. + * SqlConnector#executeUpdate(String)}*. * * @param stmt the created statement * @param query the query to execute @@ -68,6 +69,7 @@ public ResultSet executeQuery(Statement stmt, String query) throws SQLException * * @param query the query to execute * @return The number of updates or a negative number if the execution failed + * @throws SQLException the sql exception */ public int executeUpdate(String query) throws SQLException { try (Statement statement = getConnection().createStatement()) { @@ -208,6 +210,7 @@ private void closeResultSet(PreparedStatement ps, ResultSet rs) { * * @param rs the ResultSet to use * @return the field map for the current row + * @throws SQLException the sql exception */ public Map extractFieldMap(ResultSet rs) throws SQLException { TreeMap insensitiveFieldsToAttributes = 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 fe56a4294..b04f2d798 100644 --- a/src/main/java/edu/ie3/datamodel/io/csv/CsvFileDefinition.java +++ b/src/main/java/edu/ie3/datamodel/io/csv/CsvFileDefinition.java @@ -24,6 +24,14 @@ * @param csvSep the separator that is used in this csv file */ public record CsvFileDefinition(Path filePath, String[] headLineElements, String csvSep) { + /** + * Instantiates a new Csv file definition. + * + * @param fileName the file name + * @param directoryPath the directory path + * @param headLineElements the head line elements + * @param csvSep the csv sep + */ public CsvFileDefinition( String fileName, Path directoryPath, String[] headLineElements, String csvSep) { this(FileUtils.ofCsv(fileName, directoryPath), headLineElements, csvSep); @@ -62,6 +70,10 @@ public CsvFileDefinition( /** * Builds a new file definition consisting of file name and headline elements * + * @param The type of the time series + * @param The type of the time series entries + * @param The type of values in the time series + * @param The type of result values * @param timeSeries Time series to derive naming information from * @param headLineElements Array of headline elements * @param csvSep Separator for csv columns @@ -95,6 +107,8 @@ public CsvFileDefinition( } /** + * Gets file path. + * * @return The path to the file relative to a not explicitly defined base directory, including the * file extension */ @@ -102,7 +116,11 @@ public Path getFilePath() { return filePath; } - /** Returns the directory path of this file. */ + /** + * Returns the directory path of this file. + * + * @return the directory path + */ public Path getDirectoryPath() { Path parent = filePath.getParent(); return parent != null ? parent : Path.of(""); diff --git a/src/main/java/edu/ie3/datamodel/io/csv/CsvIndividualTimeSeriesMetaInformation.java b/src/main/java/edu/ie3/datamodel/io/csv/CsvIndividualTimeSeriesMetaInformation.java index 49a5630d6..274980d4a 100644 --- a/src/main/java/edu/ie3/datamodel/io/csv/CsvIndividualTimeSeriesMetaInformation.java +++ b/src/main/java/edu/ie3/datamodel/io/csv/CsvIndividualTimeSeriesMetaInformation.java @@ -13,19 +13,38 @@ /** Enhancing the {@link IndividualTimeSeriesMetaInformation} with the full path to csv file */ public class CsvIndividualTimeSeriesMetaInformation extends IndividualTimeSeriesMetaInformation { + /** Represents the full file path to a specific resource or data file. */ private final Path fullFilePath; + /** + * Instantiates a new Csv individual time series meta information. + * + * @param uuid the uuid + * @param columnScheme the column scheme + * @param fullFilePath the full file path + */ public CsvIndividualTimeSeriesMetaInformation( UUID uuid, ColumnScheme columnScheme, Path fullFilePath) { super(uuid, columnScheme); this.fullFilePath = fullFilePath; } + /** + * Instantiates a new Csv individual time series meta information. + * + * @param metaInformation the meta information + * @param fullFilePath the full file path + */ public CsvIndividualTimeSeriesMetaInformation( IndividualTimeSeriesMetaInformation metaInformation, Path fullFilePath) { this(metaInformation.getUuid(), metaInformation.getColumnScheme(), fullFilePath); } + /** + * Gets full file path. + * + * @return the full file path + */ public Path getFullFilePath() { return fullFilePath; } diff --git a/src/main/java/edu/ie3/datamodel/io/csv/CsvLoadProfileMetaInformation.java b/src/main/java/edu/ie3/datamodel/io/csv/CsvLoadProfileMetaInformation.java index 905f1ee3f..b9ccb7618 100644 --- a/src/main/java/edu/ie3/datamodel/io/csv/CsvLoadProfileMetaInformation.java +++ b/src/main/java/edu/ie3/datamodel/io/csv/CsvLoadProfileMetaInformation.java @@ -9,19 +9,38 @@ import java.nio.file.Path; import java.util.Objects; +/** The type Csv load profile meta information. */ public class CsvLoadProfileMetaInformation extends LoadProfileMetaInformation { + /** Represents the full file path for the load profile. */ private final Path fullFilePath; + /** + * Instantiates a new Csv load profile meta information. + * + * @param profile the profile + * @param fullFilePath the full file path + */ public CsvLoadProfileMetaInformation(String profile, Path fullFilePath) { super(profile); this.fullFilePath = fullFilePath; } + /** + * Instantiates a new Csv load profile meta information. + * + * @param metaInformation the meta information + * @param fullFilePath the full file path + */ public CsvLoadProfileMetaInformation( LoadProfileMetaInformation metaInformation, Path fullFilePath) { this(metaInformation.getProfile(), fullFilePath); } + /** + * Gets full file path. + * + * @return the full file path + */ public Path getFullFilePath() { return fullFilePath; } diff --git a/src/main/java/edu/ie3/datamodel/io/extractor/Extractor.java b/src/main/java/edu/ie3/datamodel/io/extractor/Extractor.java index 2147fd647..5378e1b59 100644 --- a/src/main/java/edu/ie3/datamodel/io/extractor/Extractor.java +++ b/src/main/java/edu/ie3/datamodel/io/extractor/Extractor.java @@ -30,6 +30,13 @@ private Extractor() { throw new IllegalStateException("Utility classes cannot be instantiated"); } + /** + * Extract elements set. + * + * @param nestedEntity the nested entity + * @return the set + * @throws ExtractorException the extractor exception + */ public static Set extractElements(NestedEntity nestedEntity) throws ExtractorException { CopyOnWriteArrayList resultingList = new CopyOnWriteArrayList<>(); @@ -90,10 +97,22 @@ public static Set extractElements(NestedEntity nestedEntity) return Set.copyOf(resultingList); } + /** + * Extract type asset type input. + * + * @param entityWithType the entity with type + * @return the asset type input + */ public static AssetTypeInput extractType(HasType entityWithType) { return entityWithType.getType(); } + /** + * Extract operator optional. + * + * @param entityWithOperator the entity with operator + * @return the optional + */ public static Optional extractOperator(Operable entityWithOperator) { return entityWithOperator.getOperator().getId().equalsIgnoreCase("NO_OPERATOR_ASSIGNED") ? Optional.empty() diff --git a/src/main/java/edu/ie3/datamodel/io/extractor/HasEm.java b/src/main/java/edu/ie3/datamodel/io/extractor/HasEm.java index 64346912d..4ce0a82e9 100644 --- a/src/main/java/edu/ie3/datamodel/io/extractor/HasEm.java +++ b/src/main/java/edu/ie3/datamodel/io/extractor/HasEm.java @@ -10,9 +10,14 @@ /** * Interface that should be implemented by all elements that can be controlled by {@link - * edu.ie3.datamodel.models.input.EmInput} elements and should be processable by the {@link - * Extractor}. + * edu.ie3.datamodel.models.input.EmInput}* elements and should be processable by the {@link + * Extractor}*. */ public interface HasEm extends NestedEntity { + /** + * Gets controlling em. + * + * @return the controlling em + */ Optional getControllingEm(); } diff --git a/src/main/java/edu/ie3/datamodel/io/extractor/HasLine.java b/src/main/java/edu/ie3/datamodel/io/extractor/HasLine.java index d5aa72fb0..73c86f88b 100644 --- a/src/main/java/edu/ie3/datamodel/io/extractor/HasLine.java +++ b/src/main/java/edu/ie3/datamodel/io/extractor/HasLine.java @@ -16,5 +16,10 @@ */ public interface HasLine extends NestedEntity { + /** + * Gets line. + * + * @return the line + */ LineInput getLine(); } diff --git a/src/main/java/edu/ie3/datamodel/io/extractor/HasNodes.java b/src/main/java/edu/ie3/datamodel/io/extractor/HasNodes.java index ae3707d1d..1d86e38d6 100644 --- a/src/main/java/edu/ie3/datamodel/io/extractor/HasNodes.java +++ b/src/main/java/edu/ie3/datamodel/io/extractor/HasNodes.java @@ -11,10 +11,13 @@ /** * Interface that should be implemented by all elements holding one or more {@link NodeInput} * elements and should be processable by the {@link Extractor}. - * - * @version 0.1 - * @since 31.03.20 */ public interface HasNodes extends NestedEntity { + + /** + * Retrieves all nodes associated with this entity. + * + * @return a list of {@link NodeInput} representing all nodes. + */ List allNodes(); } diff --git a/src/main/java/edu/ie3/datamodel/io/extractor/HasThermalBus.java b/src/main/java/edu/ie3/datamodel/io/extractor/HasThermalBus.java index 0e4454dba..4632a384a 100644 --- a/src/main/java/edu/ie3/datamodel/io/extractor/HasThermalBus.java +++ b/src/main/java/edu/ie3/datamodel/io/extractor/HasThermalBus.java @@ -15,6 +15,10 @@ * @since 31.03.20 */ public interface HasThermalBus extends NestedEntity { - + /** + * Retrieves the thermal bus input associated with this entity. + * + * @return The {@link ThermalBusInput} associated with this entity. + */ ThermalBusInput getThermalBus(); } diff --git a/src/main/java/edu/ie3/datamodel/io/extractor/HasThermalStorage.java b/src/main/java/edu/ie3/datamodel/io/extractor/HasThermalStorage.java index 0e6712898..74928477b 100644 --- a/src/main/java/edu/ie3/datamodel/io/extractor/HasThermalStorage.java +++ b/src/main/java/edu/ie3/datamodel/io/extractor/HasThermalStorage.java @@ -15,6 +15,10 @@ * @since 31.03.20 */ public interface HasThermalStorage { - + /** + * Retrieves the thermal storage input associated with this entity. + * + * @return The {@link ThermalStorageInput} associated with this entity. + */ ThermalStorageInput getThermalStorage(); } diff --git a/src/main/java/edu/ie3/datamodel/io/extractor/HasType.java b/src/main/java/edu/ie3/datamodel/io/extractor/HasType.java index a8ab7fe7a..fc38873dc 100644 --- a/src/main/java/edu/ie3/datamodel/io/extractor/HasType.java +++ b/src/main/java/edu/ie3/datamodel/io/extractor/HasType.java @@ -16,5 +16,10 @@ */ public interface HasType extends NestedEntity { + /** + * Gets type. + * + * @return the type + */ AssetTypeInput getType(); } diff --git a/src/main/java/edu/ie3/datamodel/io/extractor/NestedEntity.java b/src/main/java/edu/ie3/datamodel/io/extractor/NestedEntity.java index e01d2f827..95f608c06 100644 --- a/src/main/java/edu/ie3/datamodel/io/extractor/NestedEntity.java +++ b/src/main/java/edu/ie3/datamodel/io/extractor/NestedEntity.java @@ -7,7 +7,7 @@ /** * This interface should be implemented only by other interfaces that should be used by the {@link - * Extractor} It provides the entry point for the extraction method in the {@link Extractor}. If + * Extractor}* It provides the entry point for the extraction method in the {@link Extractor}. If * this interface is implemented by other interfaces one has to take care about, that the * corresponding extractElements()-method in {@link Extractor} is extended accordingly. * diff --git a/src/main/java/edu/ie3/datamodel/io/factory/EntityData.java b/src/main/java/edu/ie3/datamodel/io/factory/EntityData.java index 6a5a51f3e..a784d2789 100644 --- a/src/main/java/edu/ie3/datamodel/io/factory/EntityData.java +++ b/src/main/java/edu/ie3/datamodel/io/factory/EntityData.java @@ -99,7 +99,7 @@ private Optional getGeometry(String field) { /** * Parses and returns a geometrical LineString from field value of given field name. Throws {@link - * FactoryException} if field does not exist or parsing fails. + * FactoryException}* if field does not exist or parsing fails. * * @param field field name * @return LineString if field value is not empty, empty Optional otherwise @@ -118,7 +118,7 @@ public Optional getLineString(String field) { /** * Parses and returns a geometrical Point from field value of given field name. Throws {@link - * FactoryException} if field does not exist or parsing fails. + * FactoryException}* if field does not exist or parsing fails. * * @param field field name * @return Point if field value is not empty, empty Optional otherwise @@ -137,7 +137,7 @@ public Optional getPoint(String field) { /** * Parses and returns a voltage level from field value of given field name. Throws {@link - * FactoryException} if field does not exist or parsing fails. + * FactoryException}* if field does not exist or parsing fails. * * @param voltLvlField name of the field containing the voltage level * @param ratedVoltField name of the field containing the rated voltage diff --git a/src/main/java/edu/ie3/datamodel/io/factory/Factory.java b/src/main/java/edu/ie3/datamodel/io/factory/Factory.java index 35a0daef3..a2b492b84 100644 --- a/src/main/java/edu/ie3/datamodel/io/factory/Factory.java +++ b/src/main/java/edu/ie3/datamodel/io/factory/Factory.java @@ -27,15 +27,26 @@ * edu.ie3.datamodel.io.factory.timeseries.TimeBasedValueFactory})). */ public abstract class Factory implements SourceValidator { + /** The constant log. */ public static final Logger log = LoggerFactory.getLogger(Factory.class); private final List> supportedClasses; + /** + * Instantiates a new Factory. + * + * @param supportedClasses the supported classes + */ @SafeVarargs protected Factory(Class... supportedClasses) { this.supportedClasses = Arrays.asList(supportedClasses); } + /** + * Gets supported classes. + * + * @return the supported classes + */ public List> getSupportedClasses() { return supportedClasses; } @@ -188,6 +199,12 @@ public Try validate( } } + /** + * Gets fields string. + * + * @param fieldSets the field sets + * @return the fields string + */ protected static StringBuilder getFieldsString(List> fieldSets) { StringBuilder possibleOptions = new StringBuilder(); for (int i = 0; i < fieldSets.size(); i++) { @@ -233,18 +250,36 @@ protected static TreeSet expandSet(Set attributeSet, String... m return newSet; } + /** + * To snake case set. + * + * @param set the set + * @return the set + */ protected static Set toSnakeCase(Set set) { TreeSet newSet = new TreeSet<>(String.CASE_INSENSITIVE_ORDER); newSet.addAll(set.stream().map(StringUtils::camelCaseToSnakeCase).toList()); return newSet; } + /** + * To camel case set. + * + * @param set the set + * @return the set + */ protected static Set toCamelCase(Set set) { TreeSet newSet = new TreeSet<>(String.CASE_INSENSITIVE_ORDER); newSet.addAll(set.stream().map(StringUtils::snakeCaseToCamelCase).toList()); return newSet; } + /** + * To lower case set. + * + * @param set the set + * @return the set + */ protected static Set toLowerCase(Set set) { TreeSet newSet = new TreeSet<>(String.CASE_INSENSITIVE_ORDER); newSet.addAll(set.stream().map(String::toLowerCase).toList()); diff --git a/src/main/java/edu/ie3/datamodel/io/factory/FactoryData.java b/src/main/java/edu/ie3/datamodel/io/factory/FactoryData.java index cc0cdd357..9b915c244 100644 --- a/src/main/java/edu/ie3/datamodel/io/factory/FactoryData.java +++ b/src/main/java/edu/ie3/datamodel/io/factory/FactoryData.java @@ -12,10 +12,17 @@ import tech.units.indriya.ComparableQuantity; import tech.units.indriya.quantity.Quantities; +/** The type Factory data. */ public abstract class FactoryData { private final Map fieldsToAttributes; private final Class targetClass; + /** + * Instantiates a new Factory data. + * + * @param fieldsToAttributes the fields to attributes + * @param targetClass the target class + */ protected FactoryData(Map fieldsToAttributes, Class targetClass) { // this does the magic: case-insensitive get/set calls on keys this.fieldsToAttributes = new TreeMap<>(String.CASE_INSENSITIVE_ORDER); @@ -23,10 +30,20 @@ protected FactoryData(Map fieldsToAttributes, Class targetCla this.targetClass = targetClass; } + /** + * Gets fields to values. + * + * @return the fields to values + */ public Map getFieldsToValues() { return fieldsToAttributes; } + /** + * Gets target class. + * + * @return the target class + */ public Class getTargetClass() { return targetClass; } @@ -67,11 +84,11 @@ public Optional getFieldOptional(String field) { /** * Parses and returns a Quantity from field value of given field name. Throws {@link - * FactoryException} if field does not exist or parsing fails. + * FactoryException}* if field does not exist or parsing fails. * + * @param unit type parameter * @param field field name * @param unit unit of Quantity - * @param unit type parameter * @return Quantity of given field with given unit */ public > ComparableQuantity getQuantity(String field, Unit unit) { @@ -81,9 +98,9 @@ public > ComparableQuantity getQuantity(String field, U /** * Returns field value for given field name, or empty Optional if field does not exist. * + * @param unit type parameter * @param field field name * @param unit unit of Quantity - * @param unit type parameter * @return field value */ public > Optional> getQuantityOptional( @@ -137,7 +154,7 @@ field, getField(field)), * if field does not exist or parsing fails. * * @param field field name - * @return UUID + * @return UUID uuid */ public UUID getUUID(String field) { try { diff --git a/src/main/java/edu/ie3/datamodel/io/factory/SimpleFactoryData.java b/src/main/java/edu/ie3/datamodel/io/factory/SimpleFactoryData.java index 28237948e..b22dde1fc 100644 --- a/src/main/java/edu/ie3/datamodel/io/factory/SimpleFactoryData.java +++ b/src/main/java/edu/ie3/datamodel/io/factory/SimpleFactoryData.java @@ -9,6 +9,12 @@ /** Simple class, that holds a mapping from key to value. */ public class SimpleFactoryData extends FactoryData { + /** + * Instantiates a new Simple factory data. + * + * @param fieldsToAttributes the fields to attributes + * @param targetClass the target class + */ public SimpleFactoryData(Map fieldsToAttributes, Class targetClass) { super(fieldsToAttributes, targetClass); } diff --git a/src/main/java/edu/ie3/datamodel/io/factory/UniqueEntityFactory.java b/src/main/java/edu/ie3/datamodel/io/factory/UniqueEntityFactory.java index 016630fb2..7b148c032 100644 --- a/src/main/java/edu/ie3/datamodel/io/factory/UniqueEntityFactory.java +++ b/src/main/java/edu/ie3/datamodel/io/factory/UniqueEntityFactory.java @@ -17,10 +17,17 @@ public abstract class UniqueEntityFactory extends EntityFactory { + /** The constant UUID. */ protected static final String UUID = "uuid"; + /** The constant ID. */ protected static final String ID = "id"; + /** + * Instantiates a new Unique entity factory. + * + * @param allowedClasses the allowed classes + */ @SafeVarargs protected UniqueEntityFactory(Class... allowedClasses) { super(allowedClasses); diff --git a/src/main/java/edu/ie3/datamodel/io/factory/input/AbstractThermalStorageInputFactory.java b/src/main/java/edu/ie3/datamodel/io/factory/input/AbstractThermalStorageInputFactory.java index f286217c7..916b941e5 100644 --- a/src/main/java/edu/ie3/datamodel/io/factory/input/AbstractThermalStorageInputFactory.java +++ b/src/main/java/edu/ie3/datamodel/io/factory/input/AbstractThermalStorageInputFactory.java @@ -13,6 +13,11 @@ import javax.measure.quantity.Volume; import tech.units.indriya.ComparableQuantity; +/** + * The type Abstract thermal storage input factory. + * + * @param the type parameter + */ public abstract class AbstractThermalStorageInputFactory extends AssetInputEntityFactory { @@ -22,6 +27,11 @@ public abstract class AbstractThermalStorageInputFactory private static final String C = "c"; private static final String P_THERMAL_MAX = "pThermalMax"; + /** + * Instantiates a new Abstract thermal storage input factory. + * + * @param clazz the clazz + */ public AbstractThermalStorageInputFactory(Class clazz) { super(clazz); } @@ -31,23 +41,53 @@ protected String[] getAdditionalFields() { return new String[] {STORAGE_VOLUME_LVL, INLET_TEMP, RETURN_TEMP, C, P_THERMAL_MAX}; } + /** + * Gets storage volume lvl. + * + * @param data the data + * @return the storage volume lvl + */ protected ComparableQuantity getStorageVolumeLvl(ThermalUnitInputEntityData data) { return data.getQuantity(STORAGE_VOLUME_LVL, StandardUnits.VOLUME); } + /** + * Gets inlet temp. + * + * @param data the data + * @return the inlet temp + */ protected ComparableQuantity getInletTemp(ThermalUnitInputEntityData data) { return data.getQuantity(INLET_TEMP, StandardUnits.TEMPERATURE); } + /** + * Gets return temp. + * + * @param data the data + * @return the return temp + */ protected ComparableQuantity getReturnTemp(ThermalUnitInputEntityData data) { return data.getQuantity(RETURN_TEMP, StandardUnits.TEMPERATURE); } + /** + * Gets specific heat capacity. + * + * @param data the data + * @return the specific heat capacity + */ protected ComparableQuantity getSpecificHeatCapacity( ThermalUnitInputEntityData data) { return data.getQuantity(C, StandardUnits.SPECIFIC_HEAT_CAPACITY); } + /** + * Gets max thermal power. + * + * @param data the data + * @return the max thermal power + */ protected ComparableQuantity getMaxThermalPower(ThermalUnitInputEntityData data) { return data.getQuantity(P_THERMAL_MAX, StandardUnits.ACTIVE_POWER_IN); } diff --git a/src/main/java/edu/ie3/datamodel/io/factory/input/AssetInputEntityData.java b/src/main/java/edu/ie3/datamodel/io/factory/input/AssetInputEntityData.java index 10f93153e..f08a00b2a 100644 --- a/src/main/java/edu/ie3/datamodel/io/factory/input/AssetInputEntityData.java +++ b/src/main/java/edu/ie3/datamodel/io/factory/input/AssetInputEntityData.java @@ -57,6 +57,11 @@ public AssetInputEntityData(EntityData entityData, OperatorInput operator) { this.operator = operator; } + /** + * Gets operator input. + * + * @return the operator input + */ public OperatorInput getOperatorInput() { return operator; } diff --git a/src/main/java/edu/ie3/datamodel/io/factory/input/AssetInputEntityFactory.java b/src/main/java/edu/ie3/datamodel/io/factory/input/AssetInputEntityFactory.java index 9670eca99..82460e5cb 100644 --- a/src/main/java/edu/ie3/datamodel/io/factory/input/AssetInputEntityFactory.java +++ b/src/main/java/edu/ie3/datamodel/io/factory/input/AssetInputEntityFactory.java @@ -24,10 +24,20 @@ public abstract class AssetInputEntityFactory extends UniqueEntityFactory { + /** The constant OPERATOR. */ protected static final String OPERATOR = "operator"; + + /** The constant OPERATES_FROM. */ protected static final String OPERATES_FROM = "operatesFrom"; + + /** The constant OPERATES_UNTIL. */ protected static final String OPERATES_UNTIL = "operatesUntil"; + /** + * Instantiates a new Asset input entity factory. + * + * @param allowedClasses the allowed classes + */ @SafeVarargs protected AssetInputEntityFactory(Class... allowedClasses) { super(allowedClasses); diff --git a/src/main/java/edu/ie3/datamodel/io/factory/input/ConnectorInputEntityData.java b/src/main/java/edu/ie3/datamodel/io/factory/input/ConnectorInputEntityData.java index 4c795e89d..5f6c8f66b 100644 --- a/src/main/java/edu/ie3/datamodel/io/factory/input/ConnectorInputEntityData.java +++ b/src/main/java/edu/ie3/datamodel/io/factory/input/ConnectorInputEntityData.java @@ -13,7 +13,7 @@ /** * Data used by {@link ConnectorInputEntityFactory} to create an instance of {@link - * edu.ie3.datamodel.models.input.connector.ConnectorInput}, thus needing additional information + * edu.ie3.datamodel.models.input.connector.ConnectorInput}*, thus needing additional information * about the {@link edu.ie3.datamodel.models.input.NodeInput}, which cannot be provided through the * attribute map. */ @@ -21,6 +21,14 @@ public class ConnectorInputEntityData extends AssetInputEntityData { private final NodeInput nodeA; private final NodeInput nodeB; + /** + * Instantiates a new Connector input entity data. + * + * @param fieldsToAttributes the fields to attributes + * @param entityClass the entity class + * @param nodeA the node a + * @param nodeB the node b + */ public ConnectorInputEntityData( Map fieldsToAttributes, Class entityClass, @@ -31,6 +39,15 @@ public ConnectorInputEntityData( this.nodeB = nodeB; } + /** + * Instantiates a new Connector input entity data. + * + * @param fieldsToAttributes the fields to attributes + * @param entityClass the entity class + * @param operator the operator + * @param nodeA the node a + * @param nodeB the node b + */ public ConnectorInputEntityData( Map fieldsToAttributes, Class entityClass, @@ -57,10 +74,20 @@ public ConnectorInputEntityData( this.nodeB = nodeB; } + /** + * Gets node a. + * + * @return the node a + */ public NodeInput getNodeA() { return nodeA; } + /** + * Gets node b. + * + * @return the node b + */ public NodeInput getNodeB() { return nodeB; } diff --git a/src/main/java/edu/ie3/datamodel/io/factory/input/ConnectorInputEntityFactory.java b/src/main/java/edu/ie3/datamodel/io/factory/input/ConnectorInputEntityFactory.java index 8fc59cbec..e7ae49750 100644 --- a/src/main/java/edu/ie3/datamodel/io/factory/input/ConnectorInputEntityFactory.java +++ b/src/main/java/edu/ie3/datamodel/io/factory/input/ConnectorInputEntityFactory.java @@ -26,11 +26,16 @@ public abstract class ConnectorInputEntityFactory< /** * Attribute that _can_, but does not _have to_ be present for the creation of {@link - * ConnectorInput}s. Thus, this attribute name declaration can be used in subclasses of {@link - * ConnectorInputEntityFactory} + * ConnectorInput}*s. Thus, this attribute name declaration can be used in subclasses of {@link + * ConnectorInputEntityFactory}* */ protected static final String PARALLEL_DEVICES = "parallelDevices"; + /** + * Instantiates a new Connector input entity factory. + * + * @param allowedClasses the allowed classes + */ @SafeVarargs protected ConnectorInputEntityFactory(Class... allowedClasses) { super(allowedClasses); @@ -45,6 +50,18 @@ protected T buildModel( return buildModel(data, uuid, id, nodeA, nodeB, operator, operationTime); } + /** + * Build model t. + * + * @param data the data + * @param uuid the uuid + * @param id the id + * @param nodeA the node a + * @param nodeB the node b + * @param operator the operator + * @param operationTime the operation time + * @return the t + */ protected abstract T buildModel( D data, UUID uuid, diff --git a/src/main/java/edu/ie3/datamodel/io/factory/input/CylindricalStorageInputFactory.java b/src/main/java/edu/ie3/datamodel/io/factory/input/CylindricalStorageInputFactory.java index 541aa7f56..29afef5e9 100644 --- a/src/main/java/edu/ie3/datamodel/io/factory/input/CylindricalStorageInputFactory.java +++ b/src/main/java/edu/ie3/datamodel/io/factory/input/CylindricalStorageInputFactory.java @@ -11,9 +11,11 @@ import edu.ie3.datamodel.models.input.thermal.ThermalBusInput; import java.util.UUID; +/** The type Cylindrical storage input factory. */ public class CylindricalStorageInputFactory extends AbstractThermalStorageInputFactory { + /** Instantiates a new Cylindrical storage input factory. */ public CylindricalStorageInputFactory() { super(CylindricalStorageInput.class); } diff --git a/src/main/java/edu/ie3/datamodel/io/factory/input/DomesticHotWaterStorageInputFactory.java b/src/main/java/edu/ie3/datamodel/io/factory/input/DomesticHotWaterStorageInputFactory.java index b59ed35bb..4091ad27b 100644 --- a/src/main/java/edu/ie3/datamodel/io/factory/input/DomesticHotWaterStorageInputFactory.java +++ b/src/main/java/edu/ie3/datamodel/io/factory/input/DomesticHotWaterStorageInputFactory.java @@ -11,9 +11,11 @@ import edu.ie3.datamodel.models.input.thermal.ThermalBusInput; import java.util.UUID; +/** The type Domestic hot water storage input factory. */ public class DomesticHotWaterStorageInputFactory extends AbstractThermalStorageInputFactory { + /** Instantiates a new Domestic hot water storage input factory. */ public DomesticHotWaterStorageInputFactory() { super(DomesticHotWaterStorageInput.class); } diff --git a/src/main/java/edu/ie3/datamodel/io/factory/input/EmAssetInputEntityData.java b/src/main/java/edu/ie3/datamodel/io/factory/input/EmAssetInputEntityData.java index a51835568..6af44e581 100644 --- a/src/main/java/edu/ie3/datamodel/io/factory/input/EmAssetInputEntityData.java +++ b/src/main/java/edu/ie3/datamodel/io/factory/input/EmAssetInputEntityData.java @@ -21,6 +21,13 @@ public class EmAssetInputEntityData extends AssetInputEntityData { private final EmInput controllingEm; + /** + * Instantiates a new Em asset input entity data. + * + * @param fieldsToAttributes the fields to attributes + * @param entityClass the entity class + * @param controllingEm the controlling em + */ public EmAssetInputEntityData( Map fieldsToAttributes, Class entityClass, @@ -29,6 +36,14 @@ public EmAssetInputEntityData( this.controllingEm = controllingEm; } + /** + * Instantiates a new Em asset input entity data. + * + * @param fieldsToAttributes the fields to attributes + * @param entityClass the entity class + * @param operator the operator + * @param controllingEm the controlling em + */ public EmAssetInputEntityData( Map fieldsToAttributes, Class entityClass, @@ -50,6 +65,11 @@ public EmAssetInputEntityData(AssetInputEntityData entityData, EmInput controlli this.controllingEm = controllingEm; } + /** + * Gets controlling em. + * + * @return the controlling em + */ public EmInput getControllingEm() { return controllingEm; } diff --git a/src/main/java/edu/ie3/datamodel/io/factory/input/EmInputFactory.java b/src/main/java/edu/ie3/datamodel/io/factory/input/EmInputFactory.java index 85e15822d..eca240186 100644 --- a/src/main/java/edu/ie3/datamodel/io/factory/input/EmInputFactory.java +++ b/src/main/java/edu/ie3/datamodel/io/factory/input/EmInputFactory.java @@ -10,12 +10,15 @@ import edu.ie3.datamodel.models.input.OperatorInput; import java.util.*; +/** The type Em input factory. */ public class EmInputFactory extends AssetInputEntityFactory { private static final String CONTROL_STRATEGY = "controlStrategy"; + /** The constant CONTROLLING_EM. */ public static final String CONTROLLING_EM = "controllingEm"; + /** Instantiates a new Em input factory. */ public EmInputFactory() { super(EmInput.class); } diff --git a/src/main/java/edu/ie3/datamodel/io/factory/input/LineInputFactory.java b/src/main/java/edu/ie3/datamodel/io/factory/input/LineInputFactory.java index ff8769100..763f66f0c 100644 --- a/src/main/java/edu/ie3/datamodel/io/factory/input/LineInputFactory.java +++ b/src/main/java/edu/ie3/datamodel/io/factory/input/LineInputFactory.java @@ -20,12 +20,14 @@ import org.locationtech.jts.geom.LineString; import tech.units.indriya.ComparableQuantity; +/** The type Line input factory. */ public class LineInputFactory extends ConnectorInputEntityFactory> { private static final String LENGTH = "length"; private static final String GEO_POSITION = "geoPosition"; private static final String OLM_CHARACTERISTIC = "olmCharacteristic"; + /** Instantiates a new Line input factory. */ public LineInputFactory() { super(LineInput.class); } diff --git a/src/main/java/edu/ie3/datamodel/io/factory/input/MeasurementUnitInputFactory.java b/src/main/java/edu/ie3/datamodel/io/factory/input/MeasurementUnitInputFactory.java index e15f6f494..c12fcf3c7 100644 --- a/src/main/java/edu/ie3/datamodel/io/factory/input/MeasurementUnitInputFactory.java +++ b/src/main/java/edu/ie3/datamodel/io/factory/input/MeasurementUnitInputFactory.java @@ -11,6 +11,7 @@ import edu.ie3.datamodel.models.input.OperatorInput; import java.util.UUID; +/** The type Measurement unit input factory. */ public class MeasurementUnitInputFactory extends AssetInputEntityFactory { private static final String V_MAG = "vMag"; @@ -18,6 +19,7 @@ public class MeasurementUnitInputFactory private static final String P = "p"; private static final String Q = "q"; + /** Instantiates a new Measurement unit input factory. */ public MeasurementUnitInputFactory() { super(MeasurementUnitInput.class); } diff --git a/src/main/java/edu/ie3/datamodel/io/factory/input/NodeAssetInputEntityData.java b/src/main/java/edu/ie3/datamodel/io/factory/input/NodeAssetInputEntityData.java index f911b6dfd..de7979fad 100644 --- a/src/main/java/edu/ie3/datamodel/io/factory/input/NodeAssetInputEntityData.java +++ b/src/main/java/edu/ie3/datamodel/io/factory/input/NodeAssetInputEntityData.java @@ -41,8 +41,8 @@ public NodeAssetInputEntityData( * * @param fieldsToAttributes attribute map: field name to value * @param entityClass class of the entity to be created with this data - * @param node input node * @param operator operator input + * @param node input node */ public NodeAssetInputEntityData( Map fieldsToAttributes, @@ -65,6 +65,11 @@ public NodeAssetInputEntityData(AssetInputEntityData assetInputEntityData, NodeI this.node = node; } + /** + * Gets node. + * + * @return the node + */ public NodeInput getNode() { return node; } diff --git a/src/main/java/edu/ie3/datamodel/io/factory/input/NodeInputFactory.java b/src/main/java/edu/ie3/datamodel/io/factory/input/NodeInputFactory.java index 96aa8859d..3f6fb6d90 100644 --- a/src/main/java/edu/ie3/datamodel/io/factory/input/NodeInputFactory.java +++ b/src/main/java/edu/ie3/datamodel/io/factory/input/NodeInputFactory.java @@ -15,14 +15,22 @@ import org.locationtech.jts.geom.Point; import tech.units.indriya.ComparableQuantity; +/** The type Node input factory. */ public class NodeInputFactory extends AssetInputEntityFactory { private static final String V_TARGET = "vTarget"; + + /** The constant V_RATED. */ public static final String V_RATED = "vRated"; + private static final String SLACK = "slack"; private static final String GEO_POSITION = "geoPosition"; + + /** The constant VOLT_LVL. */ public static final String VOLT_LVL = "voltLvl"; + private static final String SUBNET = "subnet"; + /** Instantiates a new Node input factory. */ public NodeInputFactory() { super(NodeInput.class); } diff --git a/src/main/java/edu/ie3/datamodel/io/factory/input/OperatorInputFactory.java b/src/main/java/edu/ie3/datamodel/io/factory/input/OperatorInputFactory.java index 76c01a6cc..b31523355 100644 --- a/src/main/java/edu/ie3/datamodel/io/factory/input/OperatorInputFactory.java +++ b/src/main/java/edu/ie3/datamodel/io/factory/input/OperatorInputFactory.java @@ -12,8 +12,10 @@ import java.util.List; import java.util.Set; +/** The type Operator input factory. */ public class OperatorInputFactory extends UniqueEntityFactory { + /** Instantiates a new Operator input factory. */ public OperatorInputFactory() { super(OperatorInput.class); } diff --git a/src/main/java/edu/ie3/datamodel/io/factory/input/SwitchInputFactory.java b/src/main/java/edu/ie3/datamodel/io/factory/input/SwitchInputFactory.java index d716324cc..ed552a34f 100644 --- a/src/main/java/edu/ie3/datamodel/io/factory/input/SwitchInputFactory.java +++ b/src/main/java/edu/ie3/datamodel/io/factory/input/SwitchInputFactory.java @@ -11,10 +11,12 @@ import edu.ie3.datamodel.models.input.connector.SwitchInput; import java.util.UUID; +/** The type Switch input factory. */ public class SwitchInputFactory extends ConnectorInputEntityFactory { private static final String CLOSED = "closed"; + /** Instantiates a new Switch input factory. */ public SwitchInputFactory() { super(SwitchInput.class); } diff --git a/src/main/java/edu/ie3/datamodel/io/factory/input/ThermalBusInputFactory.java b/src/main/java/edu/ie3/datamodel/io/factory/input/ThermalBusInputFactory.java index 7f80971d8..a5fcbe077 100644 --- a/src/main/java/edu/ie3/datamodel/io/factory/input/ThermalBusInputFactory.java +++ b/src/main/java/edu/ie3/datamodel/io/factory/input/ThermalBusInputFactory.java @@ -10,8 +10,10 @@ import edu.ie3.datamodel.models.input.thermal.ThermalBusInput; import java.util.UUID; +/** The type Thermal bus input factory. */ public class ThermalBusInputFactory extends AssetInputEntityFactory { + /** Instantiates a new Thermal bus input factory. */ public ThermalBusInputFactory() { super(ThermalBusInput.class); } 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 6972f99a0..7a0654008 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 @@ -16,6 +16,7 @@ import javax.measure.quantity.Temperature; import tech.units.indriya.ComparableQuantity; +/** The type Thermal house input factory. */ public class ThermalHouseInputFactory extends AssetInputEntityFactory { private static final String ETH_LOSSES = "ethLosses"; @@ -26,6 +27,7 @@ public class ThermalHouseInputFactory private static final String HOUSING_TYPE = "housingType"; private static final String NUMBER_INHABITANTS = "numberInhabitants"; + /** Instantiates a new Thermal house input factory. */ public ThermalHouseInputFactory() { super(ThermalHouseInput.class); } diff --git a/src/main/java/edu/ie3/datamodel/io/factory/input/ThermalUnitInputEntityData.java b/src/main/java/edu/ie3/datamodel/io/factory/input/ThermalUnitInputEntityData.java index c936b58f9..2cc5b47e4 100644 --- a/src/main/java/edu/ie3/datamodel/io/factory/input/ThermalUnitInputEntityData.java +++ b/src/main/java/edu/ie3/datamodel/io/factory/input/ThermalUnitInputEntityData.java @@ -11,9 +11,17 @@ import java.util.Map; import java.util.Objects; +/** The type Thermal unit input entity data. */ public class ThermalUnitInputEntityData extends AssetInputEntityData { private final ThermalBusInput busInput; + /** + * Instantiates a new Thermal unit input entity data. + * + * @param fieldsToAttributes the fields to attributes + * @param entityClass the entity class + * @param busInput the bus input + */ public ThermalUnitInputEntityData( Map fieldsToAttributes, Class entityClass, @@ -22,6 +30,14 @@ public ThermalUnitInputEntityData( this.busInput = busInput; } + /** + * Instantiates a new Thermal unit input entity data. + * + * @param fieldsToAttributes the fields to attributes + * @param entityClass the entity class + * @param operator the operator + * @param busInput the bus input + */ public ThermalUnitInputEntityData( Map fieldsToAttributes, Class entityClass, @@ -43,6 +59,11 @@ public ThermalUnitInputEntityData(AssetInputEntityData entityData, ThermalBusInp this.busInput = busInput; } + /** + * Gets bus input. + * + * @return the bus input + */ public ThermalBusInput getBusInput() { return busInput; } diff --git a/src/main/java/edu/ie3/datamodel/io/factory/input/Transformer2WInputFactory.java b/src/main/java/edu/ie3/datamodel/io/factory/input/Transformer2WInputFactory.java index 110f0572a..313cfd7f6 100644 --- a/src/main/java/edu/ie3/datamodel/io/factory/input/Transformer2WInputFactory.java +++ b/src/main/java/edu/ie3/datamodel/io/factory/input/Transformer2WInputFactory.java @@ -12,6 +12,7 @@ import edu.ie3.datamodel.models.input.connector.type.Transformer2WTypeInput; import java.util.UUID; +/** The type Transformer 2 w input factory. */ public class Transformer2WInputFactory extends ConnectorInputEntityFactory< Transformer2WInput, TypedConnectorInputEntityData> { @@ -19,6 +20,7 @@ public class Transformer2WInputFactory private static final String TAP_POS = "tapPos"; private static final String AUTO_TAP = "autoTap"; + /** Instantiates a new Transformer 2 w input factory. */ public Transformer2WInputFactory() { super(Transformer2WInput.class); } diff --git a/src/main/java/edu/ie3/datamodel/io/factory/input/Transformer3WInputEntityData.java b/src/main/java/edu/ie3/datamodel/io/factory/input/Transformer3WInputEntityData.java index deed94e8e..28a3daa22 100644 --- a/src/main/java/edu/ie3/datamodel/io/factory/input/Transformer3WInputEntityData.java +++ b/src/main/java/edu/ie3/datamodel/io/factory/input/Transformer3WInputEntityData.java @@ -12,10 +12,21 @@ import java.util.Map; import java.util.Objects; +/** The type Transformer 3 w input entity data. */ public class Transformer3WInputEntityData extends TypedConnectorInputEntityData { private final NodeInput nodeC; + /** + * Instantiates a new Transformer 3 w input entity data. + * + * @param fieldsToAttributes the fields to attributes + * @param entityClass the entity class + * @param nodeA the node a + * @param nodeB the node b + * @param nodeC the node c + * @param type the type + */ public Transformer3WInputEntityData( Map fieldsToAttributes, Class entityClass, @@ -27,6 +38,17 @@ public Transformer3WInputEntityData( this.nodeC = nodeC; } + /** + * Instantiates a new Transformer 3 w input entity data. + * + * @param fieldsToAttributes the fields to attributes + * @param entityClass the entity class + * @param operator the operator + * @param nodeA the node a + * @param nodeB the node b + * @param nodeC the node c + * @param type the type + */ public Transformer3WInputEntityData( Map fieldsToAttributes, Class entityClass, @@ -41,8 +63,8 @@ public Transformer3WInputEntityData( /** * Creates a new Transformer3WInputEntityData object based on a given {@link - * ConnectorInputEntityData} object, a given third node as well as a given {@link - * Transformer3WTypeInput}. + * ConnectorInputEntityData}* object, a given third node as well as a given {@link + * Transformer3WTypeInput}*. * * @param entityData The TypedConnectorInputEntityData object to enhance * @param nodeC The third node @@ -56,7 +78,7 @@ public Transformer3WInputEntityData( /** * Creates a new Transformer3WInputEntityData object based on a given {@link - * TypedConnectorInputEntityData} object and given third node + * TypedConnectorInputEntityData}* object and given third node * * @param entityData The TypedConnectorInputEntityData object to enhance * @param nodeC The third node @@ -67,6 +89,11 @@ public Transformer3WInputEntityData( this.nodeC = nodeC; } + /** + * Gets node c. + * + * @return the node c + */ public NodeInput getNodeC() { return nodeC; } diff --git a/src/main/java/edu/ie3/datamodel/io/factory/input/Transformer3WInputFactory.java b/src/main/java/edu/ie3/datamodel/io/factory/input/Transformer3WInputFactory.java index c9987fe1f..a2453781b 100644 --- a/src/main/java/edu/ie3/datamodel/io/factory/input/Transformer3WInputFactory.java +++ b/src/main/java/edu/ie3/datamodel/io/factory/input/Transformer3WInputFactory.java @@ -12,12 +12,14 @@ import edu.ie3.datamodel.models.input.connector.type.Transformer3WTypeInput; import java.util.UUID; +/** The type Transformer 3 w input factory. */ public class Transformer3WInputFactory extends ConnectorInputEntityFactory { private static final String TAP_POS = "tapPos"; private static final String AUTO_TAP = "autoTap"; + /** Instantiates a new Transformer 3 w input factory. */ public Transformer3WInputFactory() { super(Transformer3WInput.class); } diff --git a/src/main/java/edu/ie3/datamodel/io/factory/input/TypedConnectorInputEntityData.java b/src/main/java/edu/ie3/datamodel/io/factory/input/TypedConnectorInputEntityData.java index c70bb2231..7bac27e5b 100644 --- a/src/main/java/edu/ie3/datamodel/io/factory/input/TypedConnectorInputEntityData.java +++ b/src/main/java/edu/ie3/datamodel/io/factory/input/TypedConnectorInputEntityData.java @@ -15,7 +15,7 @@ /** * Data used for those classes of {@link edu.ie3.datamodel.models.input.connector.ConnectorInput} * that need an instance of some type T of {@link - * edu.ie3.datamodel.models.input.connector.type.Transformer2WTypeInput} as well. + * edu.ie3.datamodel.models.input.connector.type.Transformer2WTypeInput}* as well. * * @param Subclass of {@link AssetTypeInput} that is required for the construction of the * ConnectorInput @@ -69,7 +69,7 @@ public TypedConnectorInputEntityData( /** * Creates a new TypedConnectorInputEntityData object based on a given {@link - * ConnectorInputEntityData} object and given type + * ConnectorInputEntityData}* object and given type * * @param entityData The ConnectorInputEntityData object to enhance * @param type type input @@ -79,6 +79,11 @@ public TypedConnectorInputEntityData(ConnectorInputEntityData entityData, T type this.type = type; } + /** + * Gets type. + * + * @return the type + */ public T getType() { return type; } diff --git a/src/main/java/edu/ie3/datamodel/io/factory/input/graphics/GraphicInputFactory.java b/src/main/java/edu/ie3/datamodel/io/factory/input/graphics/GraphicInputFactory.java index c3a5a058b..01a3d733f 100644 --- a/src/main/java/edu/ie3/datamodel/io/factory/input/graphics/GraphicInputFactory.java +++ b/src/main/java/edu/ie3/datamodel/io/factory/input/graphics/GraphicInputFactory.java @@ -16,6 +16,8 @@ /** * Abstract factory implementation for all {@link GraphicInput} elements * + * @param the type parameter + * @param the type parameter * @version 0.1 * @since 08.04.20 */ @@ -26,6 +28,11 @@ public abstract class GraphicInputFactory... allowedClasses) { super(allowedClasses); } diff --git a/src/main/java/edu/ie3/datamodel/io/factory/input/graphics/LineGraphicInputEntityData.java b/src/main/java/edu/ie3/datamodel/io/factory/input/graphics/LineGraphicInputEntityData.java index 48b87b088..d2d2c7db0 100644 --- a/src/main/java/edu/ie3/datamodel/io/factory/input/graphics/LineGraphicInputEntityData.java +++ b/src/main/java/edu/ie3/datamodel/io/factory/input/graphics/LineGraphicInputEntityData.java @@ -13,7 +13,7 @@ /** * Data used by {@link LineGraphicInputFactory} used to create instances of {@link - * edu.ie3.datamodel.models.input.graphics.LineGraphicInput}s holding one {@link LineInput} entity. + * edu.ie3.datamodel.models.input.graphics.LineGraphicInput}*s holding one {@link LineInput} entity. */ public class LineGraphicInputEntityData extends EntityData { @@ -43,6 +43,11 @@ public LineGraphicInputEntityData(EntityData entityData, LineInput line) { this.line = line; } + /** + * Gets line. + * + * @return the line + */ public LineInput getLine() { return line; } diff --git a/src/main/java/edu/ie3/datamodel/io/factory/input/graphics/LineGraphicInputFactory.java b/src/main/java/edu/ie3/datamodel/io/factory/input/graphics/LineGraphicInputFactory.java index d2b57d35a..10be5f387 100644 --- a/src/main/java/edu/ie3/datamodel/io/factory/input/graphics/LineGraphicInputFactory.java +++ b/src/main/java/edu/ie3/datamodel/io/factory/input/graphics/LineGraphicInputFactory.java @@ -18,6 +18,7 @@ public final class LineGraphicInputFactory extends GraphicInputFactory { + /** Instantiates a new Line graphic input factory. */ public LineGraphicInputFactory() { super(LineGraphicInput.class); } diff --git a/src/main/java/edu/ie3/datamodel/io/factory/input/graphics/NodeGraphicInputEntityData.java b/src/main/java/edu/ie3/datamodel/io/factory/input/graphics/NodeGraphicInputEntityData.java index edba66b27..7c2b17227 100644 --- a/src/main/java/edu/ie3/datamodel/io/factory/input/graphics/NodeGraphicInputEntityData.java +++ b/src/main/java/edu/ie3/datamodel/io/factory/input/graphics/NodeGraphicInputEntityData.java @@ -13,7 +13,7 @@ /** * Data used by {@link NodeGraphicInputFactory} used to create instances of {@link - * edu.ie3.datamodel.models.input.graphics.NodeGraphicInput}s holding one {@link NodeInput} entity. + * edu.ie3.datamodel.models.input.graphics.NodeGraphicInput}*s holding one {@link NodeInput} entity. */ public class NodeGraphicInputEntityData extends EntityData { @@ -43,6 +43,11 @@ public NodeGraphicInputEntityData(EntityData entityData, NodeInput node) { this.node = node; } + /** + * Gets node. + * + * @return the node + */ public NodeInput getNode() { return node; } diff --git a/src/main/java/edu/ie3/datamodel/io/factory/input/graphics/NodeGraphicInputFactory.java b/src/main/java/edu/ie3/datamodel/io/factory/input/graphics/NodeGraphicInputFactory.java index bd23dedcc..e79fc7ad0 100644 --- a/src/main/java/edu/ie3/datamodel/io/factory/input/graphics/NodeGraphicInputFactory.java +++ b/src/main/java/edu/ie3/datamodel/io/factory/input/graphics/NodeGraphicInputFactory.java @@ -22,6 +22,7 @@ public final class NodeGraphicInputFactory private static final String POINT = "point"; + /** Instantiates a new Node graphic input factory. */ public NodeGraphicInputFactory() { super(NodeGraphicInput.class); } diff --git a/src/main/java/edu/ie3/datamodel/io/factory/input/participant/BmInputFactory.java b/src/main/java/edu/ie3/datamodel/io/factory/input/participant/BmInputFactory.java index dd17b0fb0..a21f2c247 100644 --- a/src/main/java/edu/ie3/datamodel/io/factory/input/participant/BmInputFactory.java +++ b/src/main/java/edu/ie3/datamodel/io/factory/input/participant/BmInputFactory.java @@ -17,6 +17,7 @@ import java.util.UUID; import tech.units.indriya.ComparableQuantity; +/** The type Bm input factory. */ public class BmInputFactory extends SystemParticipantInputEntityFactory< BmInput, SystemParticipantTypedEntityData> { @@ -24,6 +25,7 @@ public class BmInputFactory private static final String COST_CONTROLLED = "costControlled"; private static final String FEED_IN_TARIFF = "feedInTariff"; + /** Instantiates a new Bm input factory. */ public BmInputFactory() { super(BmInput.class); } diff --git a/src/main/java/edu/ie3/datamodel/io/factory/input/participant/ChpInputEntityData.java b/src/main/java/edu/ie3/datamodel/io/factory/input/participant/ChpInputEntityData.java index 81c11572a..a7e26f26f 100644 --- a/src/main/java/edu/ie3/datamodel/io/factory/input/participant/ChpInputEntityData.java +++ b/src/main/java/edu/ie3/datamodel/io/factory/input/participant/ChpInputEntityData.java @@ -15,10 +15,21 @@ import java.util.Map; import java.util.Objects; +/** The type Chp input entity data. */ public class ChpInputEntityData extends SystemParticipantTypedEntityData { private final ThermalBusInput thermalBusInput; private final ThermalStorageInput thermalStorageInput; + /** + * Instantiates a new Chp input entity data. + * + * @param fieldsToAttributes the fields to attributes + * @param node the node + * @param em the em + * @param typeInput the type input + * @param thermalBusInput the thermal bus input + * @param thermalStorageInput the thermal storage input + */ public ChpInputEntityData( Map fieldsToAttributes, NodeInput node, @@ -31,6 +42,17 @@ public ChpInputEntityData( this.thermalStorageInput = thermalStorageInput; } + /** + * Instantiates a new Chp input entity data. + * + * @param fieldsToAttributes the fields to attributes + * @param operator the operator + * @param node the node + * @param em the em + * @param typeInput the type input + * @param thermalBusInput the thermal bus input + * @param thermalStorageInput the thermal storage input + */ public ChpInputEntityData( Map fieldsToAttributes, OperatorInput operator, @@ -46,7 +68,7 @@ public ChpInputEntityData( /** * Creates a new ChpInputEntityData object based on a given {@link - * SystemParticipantTypedEntityData} object and a thermal bus and storage input + * SystemParticipantTypedEntityData}* object and a thermal bus and storage input * * @param entityData The SystemParticipantTypedEntityData object to enhance * @param thermalBusInput The thermal bus input @@ -61,10 +83,20 @@ public ChpInputEntityData( this.thermalStorageInput = thermalStorageInput; } + /** + * Gets thermal bus input. + * + * @return the thermal bus input + */ public ThermalBusInput getThermalBusInput() { return thermalBusInput; } + /** + * Gets thermal storage input. + * + * @return the thermal storage input + */ public ThermalStorageInput getThermalStorageInput() { return thermalStorageInput; } diff --git a/src/main/java/edu/ie3/datamodel/io/factory/input/participant/ChpInputFactory.java b/src/main/java/edu/ie3/datamodel/io/factory/input/participant/ChpInputFactory.java index db7bb3cdf..b19ddb4e1 100644 --- a/src/main/java/edu/ie3/datamodel/io/factory/input/participant/ChpInputFactory.java +++ b/src/main/java/edu/ie3/datamodel/io/factory/input/participant/ChpInputFactory.java @@ -13,10 +13,12 @@ import edu.ie3.datamodel.models.input.system.characteristic.ReactivePowerCharacteristic; import java.util.UUID; +/** The type Chp input factory. */ public class ChpInputFactory extends SystemParticipantInputEntityFactory { private static final String MARKET_REACTION = "marketReaction"; + /** Instantiates a new Chp input factory. */ public ChpInputFactory() { super(ChpInput.class); } diff --git a/src/main/java/edu/ie3/datamodel/io/factory/input/participant/EvInputFactory.java b/src/main/java/edu/ie3/datamodel/io/factory/input/participant/EvInputFactory.java index a24abad06..8ccb7a587 100644 --- a/src/main/java/edu/ie3/datamodel/io/factory/input/participant/EvInputFactory.java +++ b/src/main/java/edu/ie3/datamodel/io/factory/input/participant/EvInputFactory.java @@ -14,10 +14,12 @@ import edu.ie3.datamodel.models.input.system.type.EvTypeInput; import java.util.UUID; +/** The type Ev input factory. */ public class EvInputFactory extends SystemParticipantInputEntityFactory< EvInput, SystemParticipantTypedEntityData> { + /** Instantiates a new Ev input factory. */ public EvInputFactory() { super(EvInput.class); } 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 46b75a9f9..48bd040dc 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 @@ -36,6 +36,7 @@ public class EvcsInputFactory private static final String LOCATION_TYPE = "locationType"; private static final String V2G_SUPPORT = "v2gSupport"; + /** Instantiates a new Evcs input factory. */ public EvcsInputFactory() { super(EvcsInput.class); } diff --git a/src/main/java/edu/ie3/datamodel/io/factory/input/participant/FixedFeedInInputFactory.java b/src/main/java/edu/ie3/datamodel/io/factory/input/participant/FixedFeedInInputFactory.java index 257c40974..bc6748524 100644 --- a/src/main/java/edu/ie3/datamodel/io/factory/input/participant/FixedFeedInInputFactory.java +++ b/src/main/java/edu/ie3/datamodel/io/factory/input/participant/FixedFeedInInputFactory.java @@ -16,12 +16,14 @@ import javax.measure.quantity.Power; import tech.units.indriya.ComparableQuantity; +/** The type Fixed feed in input factory. */ public class FixedFeedInInputFactory extends SystemParticipantInputEntityFactory { private static final String S_RATED = "sRated"; private static final String COSPHI_RATED = "cosPhiRated"; + /** Instantiates a new Fixed feed in input factory. */ public FixedFeedInInputFactory() { super(FixedFeedInInput.class); } diff --git a/src/main/java/edu/ie3/datamodel/io/factory/input/participant/HpInputEntityData.java b/src/main/java/edu/ie3/datamodel/io/factory/input/participant/HpInputEntityData.java index 83f01970f..a26c8fd3d 100644 --- a/src/main/java/edu/ie3/datamodel/io/factory/input/participant/HpInputEntityData.java +++ b/src/main/java/edu/ie3/datamodel/io/factory/input/participant/HpInputEntityData.java @@ -14,9 +14,19 @@ import java.util.Map; import java.util.Objects; +/** The type Hp input entity data. */ public class HpInputEntityData extends SystemParticipantTypedEntityData { private final ThermalBusInput thermalBusInput; + /** + * Instantiates a new Hp input entity data. + * + * @param fieldsToAttributes the fields to attributes + * @param node the node + * @param em the em + * @param typeInput the type input + * @param thermalBusInput the thermal bus input + */ public HpInputEntityData( Map fieldsToAttributes, NodeInput node, @@ -27,6 +37,16 @@ public HpInputEntityData( this.thermalBusInput = thermalBusInput; } + /** + * Instantiates a new Hp input entity data. + * + * @param fieldsToAttributes the fields to attributes + * @param operator the operator + * @param node the node + * @param em the em + * @param typeInput the type input + * @param thermalBusInput the thermal bus input + */ public HpInputEntityData( Map fieldsToAttributes, OperatorInput operator, @@ -40,7 +60,7 @@ public HpInputEntityData( /** * Creates a new HpInputEntityData object based on a given {@link - * SystemParticipantTypedEntityData} object and given thermal bus input + * SystemParticipantTypedEntityData}* object and given thermal bus input * * @param entityData The SystemParticipantTypedEntityData object to enhance * @param thermalBusInput The thermal bus input @@ -51,6 +71,11 @@ public HpInputEntityData( this.thermalBusInput = thermalBusInput; } + /** + * Gets thermal bus input. + * + * @return the thermal bus input + */ public ThermalBusInput getThermalBusInput() { return thermalBusInput; } diff --git a/src/main/java/edu/ie3/datamodel/io/factory/input/participant/HpInputFactory.java b/src/main/java/edu/ie3/datamodel/io/factory/input/participant/HpInputFactory.java index d075d64a3..2273aab74 100644 --- a/src/main/java/edu/ie3/datamodel/io/factory/input/participant/HpInputFactory.java +++ b/src/main/java/edu/ie3/datamodel/io/factory/input/participant/HpInputFactory.java @@ -13,9 +13,11 @@ import edu.ie3.datamodel.models.input.system.characteristic.ReactivePowerCharacteristic; import java.util.UUID; +/** The type Hp input factory. */ public class HpInputFactory extends SystemParticipantInputEntityFactory { + /** Instantiates a new Hp input factory. */ public HpInputFactory() { super(HpInput.class); } 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 71af7c515..398be1e37 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 @@ -21,6 +21,7 @@ import org.slf4j.LoggerFactory; import tech.units.indriya.ComparableQuantity; +/** The type Load input factory. */ public class LoadInputFactory extends SystemParticipantInputEntityFactory { private static final Logger logger = LoggerFactory.getLogger(LoadInputFactory.class); @@ -30,6 +31,7 @@ public class LoadInputFactory private static final String S_RATED = "sRated"; private static final String COS_PHI = "cosPhiRated"; + /** Instantiates a new Load input factory. */ public LoadInputFactory() { super(LoadInput.class); } diff --git a/src/main/java/edu/ie3/datamodel/io/factory/input/participant/PvInputFactory.java b/src/main/java/edu/ie3/datamodel/io/factory/input/participant/PvInputFactory.java index 70f7253fc..b74e550c1 100644 --- a/src/main/java/edu/ie3/datamodel/io/factory/input/participant/PvInputFactory.java +++ b/src/main/java/edu/ie3/datamodel/io/factory/input/participant/PvInputFactory.java @@ -18,6 +18,7 @@ import javax.measure.quantity.Power; import tech.units.indriya.ComparableQuantity; +/** The type Pv input factory. */ public class PvInputFactory extends SystemParticipantInputEntityFactory { private static final String ALBEDO = "albedo"; @@ -30,6 +31,7 @@ public class PvInputFactory private static final String S_RATED = "sRated"; private static final String COS_PHI_RATED = "cosPhiRated"; + /** Instantiates a new Pv input factory. */ public PvInputFactory() { super(PvInput.class); } diff --git a/src/main/java/edu/ie3/datamodel/io/factory/input/participant/StorageInputFactory.java b/src/main/java/edu/ie3/datamodel/io/factory/input/participant/StorageInputFactory.java index 4b9149525..4a70cc050 100644 --- a/src/main/java/edu/ie3/datamodel/io/factory/input/participant/StorageInputFactory.java +++ b/src/main/java/edu/ie3/datamodel/io/factory/input/participant/StorageInputFactory.java @@ -14,10 +14,12 @@ import edu.ie3.datamodel.models.input.system.type.StorageTypeInput; import java.util.UUID; +/** The type Storage input factory. */ public class StorageInputFactory extends SystemParticipantInputEntityFactory< StorageInput, SystemParticipantTypedEntityData> { + /** Instantiates a new Storage input factory. */ public StorageInputFactory() { super(StorageInput.class); } diff --git a/src/main/java/edu/ie3/datamodel/io/factory/input/participant/SystemParticipantEntityData.java b/src/main/java/edu/ie3/datamodel/io/factory/input/participant/SystemParticipantEntityData.java index 5304124f2..2c4d83300 100644 --- a/src/main/java/edu/ie3/datamodel/io/factory/input/participant/SystemParticipantEntityData.java +++ b/src/main/java/edu/ie3/datamodel/io/factory/input/participant/SystemParticipantEntityData.java @@ -16,8 +16,8 @@ /** * Data used for those classes of {@link - * edu.ie3.datamodel.models.input.system.SystemParticipantInput}, including an (optional) link to an - * {@link EmInput} entity. + * edu.ie3.datamodel.models.input.system.SystemParticipantInput}*, including an (optional) link to + * an {@link EmInput} entity. */ public class SystemParticipantEntityData extends NodeAssetInputEntityData { @@ -43,6 +43,11 @@ public SystemParticipantEntityData( this.controllingEm = controllingEm; } + /** + * Gets controlling em. + * + * @return the controlling em + */ public Optional getControllingEm() { return Optional.ofNullable(controllingEm); } @@ -69,7 +74,7 @@ public SystemParticipantEntityData( /** * Creates a new SystemParticipantEntityData object based on a given {@link - * NodeAssetInputEntityData} object and given energy management unit + * NodeAssetInputEntityData}* object and given energy management unit * * @param nodeAssetInputEntityData The node asset entity data object to use attributes of * @param controllingEm The energy management unit that is managing the system participant. Null, diff --git a/src/main/java/edu/ie3/datamodel/io/factory/input/participant/SystemParticipantInputEntityFactory.java b/src/main/java/edu/ie3/datamodel/io/factory/input/participant/SystemParticipantInputEntityFactory.java index 035747601..5bb920eb6 100644 --- a/src/main/java/edu/ie3/datamodel/io/factory/input/participant/SystemParticipantInputEntityFactory.java +++ b/src/main/java/edu/ie3/datamodel/io/factory/input/participant/SystemParticipantInputEntityFactory.java @@ -18,7 +18,7 @@ /** * Abstract factory class for creating {@link SystemParticipantInput} entities with {@link - * NodeAssetInputEntityData} data objects. + * NodeAssetInputEntityData}* data objects. * * @param Type of entity that this factory can create. Must be a subclass of {@link * SystemParticipantInput} @@ -34,8 +34,14 @@ public abstract class SystemParticipantInputEntityFactory< private static final String Q_CHARACTERISTICS = "qCharacteristics"; + /** The constant CONTROLLING_EM. */ public static final String CONTROLLING_EM = "controllingEm"; + /** + * Instantiates a new System participant input entity factory. + * + * @param allowedClasses the allowed classes + */ @SafeVarargs protected SystemParticipantInputEntityFactory(Class... allowedClasses) { super(allowedClasses); diff --git a/src/main/java/edu/ie3/datamodel/io/factory/input/participant/SystemParticipantTypedEntityData.java b/src/main/java/edu/ie3/datamodel/io/factory/input/participant/SystemParticipantTypedEntityData.java index a57d814ed..51a67966d 100644 --- a/src/main/java/edu/ie3/datamodel/io/factory/input/participant/SystemParticipantTypedEntityData.java +++ b/src/main/java/edu/ie3/datamodel/io/factory/input/participant/SystemParticipantTypedEntityData.java @@ -15,7 +15,7 @@ /** * Data used for those classes of {@link - * edu.ie3.datamodel.models.input.system.SystemParticipantInput} that need an instance of some type + * edu.ie3.datamodel.models.input.system.SystemParticipantInput}* that need an instance of some type * T of {@link SystemParticipantTypeInput} as well. * * @param Subclass of {@link SystemParticipantTypeInput} that is required for the construction @@ -72,7 +72,7 @@ public SystemParticipantTypedEntityData( /** * Creates a new SystemParticipantTypedEntityData object based on a given {@link - * SystemParticipantEntityData} object and given type input + * SystemParticipantEntityData}* object and given type input * * @param systemParticipantEntityData The system participant entity data object to use attributes * of @@ -84,6 +84,11 @@ public SystemParticipantTypedEntityData( this.typeInput = typeInput; } + /** + * Gets type input. + * + * @return the type input + */ public T getTypeInput() { return typeInput; } diff --git a/src/main/java/edu/ie3/datamodel/io/factory/input/participant/WecInputFactory.java b/src/main/java/edu/ie3/datamodel/io/factory/input/participant/WecInputFactory.java index a1724fcac..24e7e47d7 100644 --- a/src/main/java/edu/ie3/datamodel/io/factory/input/participant/WecInputFactory.java +++ b/src/main/java/edu/ie3/datamodel/io/factory/input/participant/WecInputFactory.java @@ -14,11 +14,13 @@ import edu.ie3.datamodel.models.input.system.type.WecTypeInput; import java.util.UUID; +/** The type Wec input factory. */ public class WecInputFactory extends SystemParticipantInputEntityFactory< WecInput, SystemParticipantTypedEntityData> { private static final String MARKET_REACTION = "marketReaction"; + /** Instantiates a new Wec input factory. */ public WecInputFactory() { super(WecInput.class); } diff --git a/src/main/java/edu/ie3/datamodel/io/factory/result/CongestionResultFactory.java b/src/main/java/edu/ie3/datamodel/io/factory/result/CongestionResultFactory.java index 1ff917089..4e3f26a30 100644 --- a/src/main/java/edu/ie3/datamodel/io/factory/result/CongestionResultFactory.java +++ b/src/main/java/edu/ie3/datamodel/io/factory/result/CongestionResultFactory.java @@ -21,6 +21,7 @@ import javax.measure.quantity.Dimensionless; import tech.units.indriya.ComparableQuantity; +/** The type Congestion result factory. */ public class CongestionResultFactory extends ResultEntityFactory { private static final String TYPE = "type"; private static final String SUBGRID = "subgrid"; @@ -28,10 +29,16 @@ public class CongestionResultFactory extends ResultEntityFactory { private static final String IAMAG = "iAMag"; @@ -30,6 +31,7 @@ public class ConnectorResultFactory extends ResultEntityFactory private static final String ICANG = "iCAng"; private static final String TAPPOS = "tapPos"; + /** Instantiates a new Connector result factory. */ public ConnectorResultFactory() { super(LineResult.class, Transformer2WResult.class, Transformer3WResult.class); } diff --git a/src/main/java/edu/ie3/datamodel/io/factory/result/FlexOptionsResultFactory.java b/src/main/java/edu/ie3/datamodel/io/factory/result/FlexOptionsResultFactory.java index 1c31ea9db..53881faae 100644 --- a/src/main/java/edu/ie3/datamodel/io/factory/result/FlexOptionsResultFactory.java +++ b/src/main/java/edu/ie3/datamodel/io/factory/result/FlexOptionsResultFactory.java @@ -14,12 +14,14 @@ import javax.measure.quantity.Power; import tech.units.indriya.ComparableQuantity; +/** The type Flex options result factory. */ public class FlexOptionsResultFactory extends ResultEntityFactory { private static final String P_REF = "pRef"; private static final String P_MIN = "pMin"; private static final String P_MAX = "pMax"; + /** Instantiates a new Flex options result factory. */ public FlexOptionsResultFactory() { super(FlexOptionsResult.class); } 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 e7cbf1ea9..99b8cbfe1 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 @@ -15,10 +15,12 @@ import javax.measure.quantity.Dimensionless; import tech.units.indriya.ComparableQuantity; +/** The type Node result factory. */ public class NodeResultFactory extends ResultEntityFactory { private static final String VMAG = "vMag"; private static final String VANG = "vAng"; + /** Instantiates a new Node result factory. */ public NodeResultFactory() { super(NodeResult.class); } 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 6eadf1cd9..ecf206511 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 @@ -15,23 +15,39 @@ * Internal API for building {@link ResultEntity}s. This additional abstraction layer is necessary * to create generic reader for {@link ResultEntity}s only and furthermore removes code duplicates. * + * @param the type parameter * @version 0.1 * @since 11.02.20 */ public abstract class ResultEntityFactory extends EntityFactory { + /** The constant TIME. */ protected static final String TIME = "time"; + + /** The constant INPUT_MODEL. */ protected static final String INPUT_MODEL = "inputModel"; + /** The Time util. */ protected final TimeUtil timeUtil; + /** + * Instantiates a new Result entity factory. + * + * @param allowedClasses the allowed classes + */ @SafeVarargs protected ResultEntityFactory(Class... allowedClasses) { super(allowedClasses); timeUtil = TimeUtil.withDefaults; } + /** + * Instantiates a new Result entity factory. + * + * @param dateTimeFormatter the date time formatter + * @param allowedClasses the allowed classes + */ @SafeVarargs protected ResultEntityFactory( DateTimeFormatter dateTimeFormatter, Class... allowedClasses) { 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 0db6a14dc..866226b85 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 @@ -11,10 +11,12 @@ import java.time.format.DateTimeFormatter; import java.util.*; +/** The type Switch result factory. */ public class SwitchResultFactory extends ResultEntityFactory { private static final String CLOSED = "closed"; + /** Instantiates a new Switch result factory. */ public SwitchResultFactory() { super(SwitchResult.class); } 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 1d819be4e..d1322318a 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 @@ -21,7 +21,7 @@ /** * Factory class for creating {@link SystemParticipantResult} entities from provided {@link - * EntityData} data objects. + * EntityData}* data objects. */ public class SystemParticipantResultFactory extends ResultEntityFactory { @@ -30,6 +30,7 @@ public class SystemParticipantResultFactory extends ResultEntityFactory { private static final String Q_DOT = "qDot"; private static final String INDOOR_TEMPERATURE = "indoorTemperature"; private static final String ENERGY = "energy"; private static final String FILL_LEVEL = "fillLevel"; + /** Instantiates a new Thermal result factory. */ public ThermalResultFactory() { super( ThermalHouseResult.class, diff --git a/src/main/java/edu/ie3/datamodel/io/factory/timeseries/BdewLoadProfileFactory.java b/src/main/java/edu/ie3/datamodel/io/factory/timeseries/BdewLoadProfileFactory.java index 32f3e4780..14e36793b 100644 --- a/src/main/java/edu/ie3/datamodel/io/factory/timeseries/BdewLoadProfileFactory.java +++ b/src/main/java/edu/ie3/datamodel/io/factory/timeseries/BdewLoadProfileFactory.java @@ -28,16 +28,18 @@ import tech.units.indriya.ComparableQuantity; import tech.units.indriya.quantity.Quantities; +/** The type Bdew load profile factory. */ public class BdewLoadProfileFactory extends LoadProfileFactory { - // 1999 profile scheme + /** The constant BDEW1999_FIELDS. */ public static final BdewLoadValues.BdewMap BDEW1999_FIELDS = BdewKey.toMap(BdewScheme.BDEW1999); - // 2025 profile scheme + /** The constant BDEW2025_FIELDS. */ public static final BdewLoadValues.BdewMap BDEW2025_FIELDS = BdewKey.toMap(BdewScheme.BDEW2025); + /** Instantiates a new Bdew load profile factory. */ public BdewLoadProfileFactory() { super(BdewLoadValues.class); } diff --git a/src/main/java/edu/ie3/datamodel/io/factory/timeseries/CosmoIdCoordinateFactory.java b/src/main/java/edu/ie3/datamodel/io/factory/timeseries/CosmoIdCoordinateFactory.java index cf6b2cd26..b3168f82e 100644 --- a/src/main/java/edu/ie3/datamodel/io/factory/timeseries/CosmoIdCoordinateFactory.java +++ b/src/main/java/edu/ie3/datamodel/io/factory/timeseries/CosmoIdCoordinateFactory.java @@ -12,10 +12,13 @@ import java.util.Set; /** - * Factory, that is able to build coordinate id to coordinate mapping from German Federal Weather - * Service's COSMO model + * Factory that is able to build coordinate ID to coordinate mapping from the German Federal Weather + * Service's COSMO model. */ public class CosmoIdCoordinateFactory extends IdCoordinateFactory { + /** Default constructor for CosmoIdCoordinateFactory. */ + public CosmoIdCoordinateFactory() {} + private static final String TID = "tid"; private static final String COORDINATE_ID = "id"; private static final String LONG_GEO = "longGeo"; diff --git a/src/main/java/edu/ie3/datamodel/io/factory/timeseries/CosmoTimeBasedWeatherValueFactory.java b/src/main/java/edu/ie3/datamodel/io/factory/timeseries/CosmoTimeBasedWeatherValueFactory.java index 09048fb89..c8f28780d 100644 --- a/src/main/java/edu/ie3/datamodel/io/factory/timeseries/CosmoTimeBasedWeatherValueFactory.java +++ b/src/main/java/edu/ie3/datamodel/io/factory/timeseries/CosmoTimeBasedWeatherValueFactory.java @@ -33,14 +33,25 @@ public class CosmoTimeBasedWeatherValueFactory extends TimeBasedWeatherValueFact private static final String WIND_DIRECTION = "windDirection"; private static final String WIND_VELOCITY = "windVelocity"; + /** + * Instantiates a new Cosmo time based weather value factory. + * + * @param timeUtil the time util + */ public CosmoTimeBasedWeatherValueFactory(TimeUtil timeUtil) { super(timeUtil); } + /** + * Instantiates a new Cosmo time based weather value factory. + * + * @param dateTimeFormatter the date time formatter + */ public CosmoTimeBasedWeatherValueFactory(DateTimeFormatter dateTimeFormatter) { super(dateTimeFormatter); } + /** Instantiates a new Cosmo time based weather value factory. */ public CosmoTimeBasedWeatherValueFactory() { super(); } diff --git a/src/main/java/edu/ie3/datamodel/io/factory/timeseries/IconIdCoordinateFactory.java b/src/main/java/edu/ie3/datamodel/io/factory/timeseries/IconIdCoordinateFactory.java index 687b6cb3e..f0640e8d1 100644 --- a/src/main/java/edu/ie3/datamodel/io/factory/timeseries/IconIdCoordinateFactory.java +++ b/src/main/java/edu/ie3/datamodel/io/factory/timeseries/IconIdCoordinateFactory.java @@ -16,6 +16,9 @@ * Service's ICON model */ public class IconIdCoordinateFactory extends IdCoordinateFactory { + /** Default constructor for IconIdCoordinateFactory. */ + public IconIdCoordinateFactory() {} + private static final String COORDINATE_ID = "id"; private static final String LONG = "longitude"; private static final String LAT = "latitude"; diff --git a/src/main/java/edu/ie3/datamodel/io/factory/timeseries/IconTimeBasedWeatherValueFactory.java b/src/main/java/edu/ie3/datamodel/io/factory/timeseries/IconTimeBasedWeatherValueFactory.java index 189e40c57..cb5733b25 100644 --- a/src/main/java/edu/ie3/datamodel/io/factory/timeseries/IconTimeBasedWeatherValueFactory.java +++ b/src/main/java/edu/ie3/datamodel/io/factory/timeseries/IconTimeBasedWeatherValueFactory.java @@ -34,10 +34,16 @@ public class IconTimeBasedWeatherValueFactory extends TimeBasedWeatherValueFacto private static final String WIND_VELOCITY_U = "u131m"; private static final String WIND_VELOCITY_V = "v131m"; + /** Instantiates a new Icon time based weather value factory. */ public IconTimeBasedWeatherValueFactory() { super(); } + /** + * Instantiates a new Icon time based weather value factory. + * + * @param dateTimeFormatter the date time formatter + */ public IconTimeBasedWeatherValueFactory(DateTimeFormatter dateTimeFormatter) { super(dateTimeFormatter); } diff --git a/src/main/java/edu/ie3/datamodel/io/factory/timeseries/IdCoordinateFactory.java b/src/main/java/edu/ie3/datamodel/io/factory/timeseries/IdCoordinateFactory.java index c983e65c2..4802c746a 100644 --- a/src/main/java/edu/ie3/datamodel/io/factory/timeseries/IdCoordinateFactory.java +++ b/src/main/java/edu/ie3/datamodel/io/factory/timeseries/IdCoordinateFactory.java @@ -15,21 +15,28 @@ */ public abstract class IdCoordinateFactory extends Factory { + /** Instantiates a new Id coordinate factory. */ protected IdCoordinateFactory() { super(IdCoordinateInput.class); } /** + * Gets id field. + * * @return the field id for the coordinate id */ public abstract String getIdField(); /** + * Gets lat field. + * * @return the field id for the coordinate latitude */ public abstract String getLatField(); /** + * Gets lon field. + * * @return the field id for the coordinate longitude */ public abstract String getLonField(); diff --git a/src/main/java/edu/ie3/datamodel/io/factory/timeseries/LoadProfileData.java b/src/main/java/edu/ie3/datamodel/io/factory/timeseries/LoadProfileData.java index abdb140b3..880ec6035 100644 --- a/src/main/java/edu/ie3/datamodel/io/factory/timeseries/LoadProfileData.java +++ b/src/main/java/edu/ie3/datamodel/io/factory/timeseries/LoadProfileData.java @@ -11,11 +11,17 @@ /** * Data, that is used to build a {@link - * edu.ie3.datamodel.models.timeseries.repetitive.LoadProfileEntry} within a factory + * edu.ie3.datamodel.models.timeseries.repetitive.LoadProfileEntry}* within a factory * * @param Type of load values class */ public class LoadProfileData extends FactoryData { + /** + * Instantiates a new Load profile data. + * + * @param fieldsToAttributes the fields to attributes + * @param targetClass the target class + */ public LoadProfileData(Map fieldsToAttributes, Class targetClass) { super(fieldsToAttributes, targetClass); } diff --git a/src/main/java/edu/ie3/datamodel/io/factory/timeseries/LoadProfileFactory.java b/src/main/java/edu/ie3/datamodel/io/factory/timeseries/LoadProfileFactory.java index 6a07a3f40..3d0184fe7 100644 --- a/src/main/java/edu/ie3/datamodel/io/factory/timeseries/LoadProfileFactory.java +++ b/src/main/java/edu/ie3/datamodel/io/factory/timeseries/LoadProfileFactory.java @@ -26,20 +26,44 @@ */ public abstract class LoadProfileFactory

extends Factory, LoadProfileEntry> { + /** The constant QUARTER_HOUR. */ protected static final String QUARTER_HOUR = "quarterHour"; + /** + * Instantiates a new Load profile factory. + * + * @param valueClass the value class + */ public LoadProfileFactory(Class valueClass) { super(valueClass); } + /** + * Instantiates a new Load profile factory. + * + * @param valueClass the value class + */ @SafeVarargs protected LoadProfileFactory(Class... valueClass) { super(valueClass); } + /** + * Build load profile time series. + * + * @param metaInformation the meta information + * @param entries the entries + * @return the load profile time series + */ public abstract LoadProfileTimeSeries build( LoadProfileMetaInformation metaInformation, Set> entries); + /** + * Parse profile p. + * + * @param profile the profile + * @return the p + */ public abstract P parseProfile(String profile); /** @@ -53,12 +77,21 @@ public abstract LoadProfileTimeSeries build( public abstract ComparableQuantity calculateMaxPower( P loadProfile, Set> entries); - /** Returns the quarter-hour field. */ + /** + * Returns the quarter-hour field. + * + * @return the time field string + */ public String getTimeFieldString() { return QUARTER_HOUR; } - /** Returns the load profile energy scaling. The default value is 1000 kWh */ + /** + * Returns the load profile energy scaling. The default value is 1000 kWh + * + * @param loadProfile the load profile + * @return the load profile energy scaling + */ public ComparableQuantity getLoadProfileEnergyScaling(P loadProfile) { return Quantities.getQuantity(1000d, PowerSystemUnits.KILOWATTHOUR); } diff --git a/src/main/java/edu/ie3/datamodel/io/factory/timeseries/RandomLoadProfileFactory.java b/src/main/java/edu/ie3/datamodel/io/factory/timeseries/RandomLoadProfileFactory.java index 440639388..3c8e340bf 100644 --- a/src/main/java/edu/ie3/datamodel/io/factory/timeseries/RandomLoadProfileFactory.java +++ b/src/main/java/edu/ie3/datamodel/io/factory/timeseries/RandomLoadProfileFactory.java @@ -21,18 +21,37 @@ import tech.units.indriya.ComparableQuantity; import tech.units.indriya.quantity.Quantities; +/** The type Random load profile factory. */ public class RandomLoadProfileFactory extends LoadProfileFactory { + /** The constant K_WEEKDAY. */ public static final String K_WEEKDAY = "kWd"; + + /** The constant K_SATURDAY. */ public static final String K_SATURDAY = "kSa"; + + /** The constant K_SUNDAY. */ public static final String K_SUNDAY = "kSu"; + + /** The constant MY_WEEKDAY. */ public static final String MY_WEEKDAY = "myWd"; + + /** The constant MY_SATURDAY. */ public static final String MY_SATURDAY = "mySa"; + + /** The constant MY_SUNDAY. */ public static final String MY_SUNDAY = "mySu"; + + /** The constant SIGMA_WEEKDAY. */ public static final String SIGMA_WEEKDAY = "sigmaWd"; + + /** The constant SIGMA_SATURDAY. */ public static final String SIGMA_SATURDAY = "sigmaSa"; + + /** The constant SIGMA_SUNDAY. */ public static final String SIGMA_SUNDAY = "sigmaSu"; + /** Instantiates a new Random load profile factory. */ public RandomLoadProfileFactory() { super(RandomLoadValues.class); } diff --git a/src/main/java/edu/ie3/datamodel/io/factory/timeseries/SqlIdCoordinateFactory.java b/src/main/java/edu/ie3/datamodel/io/factory/timeseries/SqlIdCoordinateFactory.java index 81d7ee963..8d426dffe 100644 --- a/src/main/java/edu/ie3/datamodel/io/factory/timeseries/SqlIdCoordinateFactory.java +++ b/src/main/java/edu/ie3/datamodel/io/factory/timeseries/SqlIdCoordinateFactory.java @@ -17,7 +17,11 @@ import org.locationtech.jts.io.ParseException; import org.locationtech.jts.io.WKBReader; +/** The type Sql id coordinate factory. */ public class SqlIdCoordinateFactory extends IdCoordinateFactory { + /** Default constructor for SqlIdCoordinateFactory. */ + public SqlIdCoordinateFactory() {} + private static final String COORDINATE_ID = "id"; private static final String COORDINATE = "coordinate"; @@ -60,6 +64,11 @@ public String getLonField() { "this is not supported by " + SqlIdCoordinateFactory.class + "!"); } + /** + * Gets coordinate field. + * + * @return the coordinate field + */ public String getCoordinateField() { return COORDINATE; } diff --git a/src/main/java/edu/ie3/datamodel/io/factory/timeseries/TimeBasedSimpleValueFactory.java b/src/main/java/edu/ie3/datamodel/io/factory/timeseries/TimeBasedSimpleValueFactory.java index 52b39e2d7..7e68f0734 100644 --- a/src/main/java/edu/ie3/datamodel/io/factory/timeseries/TimeBasedSimpleValueFactory.java +++ b/src/main/java/edu/ie3/datamodel/io/factory/timeseries/TimeBasedSimpleValueFactory.java @@ -15,6 +15,11 @@ import java.time.format.DateTimeFormatter; import java.util.*; +/** + * The type Time based simple value factory. + * + * @param the type parameter + */ public class TimeBasedSimpleValueFactory extends TimeBasedValueFactory, V> { private static final String TIME = "time"; @@ -29,10 +34,21 @@ public class TimeBasedSimpleValueFactory private static final String VMAG = "vMag"; private static final String VANG = "VAng"; + /** + * Instantiates a new Time based simple value factory. + * + * @param valueClasses the value classes + */ public TimeBasedSimpleValueFactory(Class valueClasses) { super(valueClasses); } + /** + * Instantiates a new Time based simple value factory. + * + * @param valueClasses the value classes + * @param dateTimeFormatter the date time formatter + */ public TimeBasedSimpleValueFactory( Class valueClasses, DateTimeFormatter dateTimeFormatter) { super(valueClasses, dateTimeFormatter); diff --git a/src/main/java/edu/ie3/datamodel/io/factory/timeseries/TimeBasedValueFactory.java b/src/main/java/edu/ie3/datamodel/io/factory/timeseries/TimeBasedValueFactory.java index 724ac2c24..befb955b7 100644 --- a/src/main/java/edu/ie3/datamodel/io/factory/timeseries/TimeBasedValueFactory.java +++ b/src/main/java/edu/ie3/datamodel/io/factory/timeseries/TimeBasedValueFactory.java @@ -22,21 +22,40 @@ public abstract class TimeBasedValueFactory, V extends Value> extends Factory> { + /** The constant TIME. */ protected static final String TIME = "time"; + /** The Time util. */ protected final TimeUtil timeUtil; + /** + * Instantiates a new Time based value factory. + * + * @param valueClasses the value classes + */ protected TimeBasedValueFactory(Class... valueClasses) { super(valueClasses); this.timeUtil = TimeUtil.withDefaults; } + /** + * Instantiates a new Time based value factory. + * + * @param valueClasses the value classes + * @param dateTimeFormatter the date time formatter + */ protected TimeBasedValueFactory( Class valueClasses, DateTimeFormatter dateTimeFormatter) { super(valueClasses); this.timeUtil = new TimeUtil(dateTimeFormatter); } + /** + * Instantiates a new Time based value factory. + * + * @param valueClasses the value classes + * @param timeUtil the time util + */ protected TimeBasedValueFactory(Class valueClasses, TimeUtil timeUtil) { super(valueClasses); this.timeUtil = timeUtil; diff --git a/src/main/java/edu/ie3/datamodel/io/factory/timeseries/TimeBasedWeatherValueData.java b/src/main/java/edu/ie3/datamodel/io/factory/timeseries/TimeBasedWeatherValueData.java index e9e12aafc..8e3080a69 100644 --- a/src/main/java/edu/ie3/datamodel/io/factory/timeseries/TimeBasedWeatherValueData.java +++ b/src/main/java/edu/ie3/datamodel/io/factory/timeseries/TimeBasedWeatherValueData.java @@ -12,6 +12,7 @@ import org.locationtech.jts.geom.Point; import tech.units.indriya.ComparableQuantity; +/** The type Time based weather value data. */ public class TimeBasedWeatherValueData extends TimeBasedValueData { private final Point coordinate; @@ -27,6 +28,11 @@ public TimeBasedWeatherValueData(Map fieldsToAttributes, Point c this.coordinate = coordinate; } + /** + * Gets coordinate. + * + * @return the coordinate + */ public Point getCoordinate() { return coordinate; } diff --git a/src/main/java/edu/ie3/datamodel/io/factory/timeseries/TimeBasedWeatherValueFactory.java b/src/main/java/edu/ie3/datamodel/io/factory/timeseries/TimeBasedWeatherValueFactory.java index c281dd270..54a2fbd95 100644 --- a/src/main/java/edu/ie3/datamodel/io/factory/timeseries/TimeBasedWeatherValueFactory.java +++ b/src/main/java/edu/ie3/datamodel/io/factory/timeseries/TimeBasedWeatherValueFactory.java @@ -11,20 +11,32 @@ /** * Abstract factory to handle the conversion from "flat" field to value mapping onto actual {@link - * TimeBasedValueFactory} with {@link WeatherValue} + * TimeBasedValueFactory}* with {@link WeatherValue} */ public abstract class TimeBasedWeatherValueFactory extends TimeBasedValueFactory { + /** The constant COORDINATE_ID. */ protected static final String COORDINATE_ID = "coordinateId"; + /** Instantiates a new Time based weather value factory. */ protected TimeBasedWeatherValueFactory() { super(WeatherValue.class); } + /** + * Instantiates a new Time based weather value factory. + * + * @param dateTimeFormatter the date time formatter + */ protected TimeBasedWeatherValueFactory(DateTimeFormatter dateTimeFormatter) { super(WeatherValue.class, dateTimeFormatter); } + /** + * Instantiates a new Time based weather value factory. + * + * @param timeUtil the time util + */ protected TimeBasedWeatherValueFactory(TimeUtil timeUtil) { super(WeatherValue.class, timeUtil); } diff --git a/src/main/java/edu/ie3/datamodel/io/factory/timeseries/TimeSeriesMappingFactory.java b/src/main/java/edu/ie3/datamodel/io/factory/timeseries/TimeSeriesMappingFactory.java index 9172b99dd..1088d5586 100644 --- a/src/main/java/edu/ie3/datamodel/io/factory/timeseries/TimeSeriesMappingFactory.java +++ b/src/main/java/edu/ie3/datamodel/io/factory/timeseries/TimeSeriesMappingFactory.java @@ -12,11 +12,13 @@ import java.util.Set; import java.util.UUID; +/** The type Time series mapping factory. */ public class TimeSeriesMappingFactory extends EntityFactory { private static final String ASSET = "asset"; private static final String TIME_SERIES = "timeSeries"; + /** Instantiates a new Time series mapping factory. */ public TimeSeriesMappingFactory() { super(TimeSeriesMappingSource.MappingEntry.class); } diff --git a/src/main/java/edu/ie3/datamodel/io/factory/timeseries/TimeSeriesMetaInformationFactory.java b/src/main/java/edu/ie3/datamodel/io/factory/timeseries/TimeSeriesMetaInformationFactory.java index 71c64cbd8..deaa7478e 100644 --- a/src/main/java/edu/ie3/datamodel/io/factory/timeseries/TimeSeriesMetaInformationFactory.java +++ b/src/main/java/edu/ie3/datamodel/io/factory/timeseries/TimeSeriesMetaInformationFactory.java @@ -28,6 +28,7 @@ public class TimeSeriesMetaInformationFactory private static final String COLUMN_SCHEME = "columnScheme"; private static final String LOAD_PROFILE = "loadProfile"; + /** Instantiates a new Time series meta information factory. */ public TimeSeriesMetaInformationFactory() { super(IndividualTimeSeriesMetaInformation.class, LoadProfileMetaInformation.class); } diff --git a/src/main/java/edu/ie3/datamodel/io/factory/typeinput/AssetTypeInputEntityFactory.java b/src/main/java/edu/ie3/datamodel/io/factory/typeinput/AssetTypeInputEntityFactory.java index 4aae38c09..74b248dda 100644 --- a/src/main/java/edu/ie3/datamodel/io/factory/typeinput/AssetTypeInputEntityFactory.java +++ b/src/main/java/edu/ie3/datamodel/io/factory/typeinput/AssetTypeInputEntityFactory.java @@ -14,12 +14,18 @@ * to create generic reader for {@link AssetTypeInput}s only and furthermore removes code * duplicates. * + * @param the type parameter * @version 0.1 * @since 11.02.20 */ abstract class AssetTypeInputEntityFactory extends UniqueEntityFactory { + /** + * Instantiates a new Asset type input entity factory. + * + * @param allowedClasses the allowed classes + */ protected AssetTypeInputEntityFactory(Class... allowedClasses) { super(allowedClasses); } diff --git a/src/main/java/edu/ie3/datamodel/io/factory/typeinput/LineTypeInputFactory.java b/src/main/java/edu/ie3/datamodel/io/factory/typeinput/LineTypeInputFactory.java index 244a61839..4e350b0ea 100644 --- a/src/main/java/edu/ie3/datamodel/io/factory/typeinput/LineTypeInputFactory.java +++ b/src/main/java/edu/ie3/datamodel/io/factory/typeinput/LineTypeInputFactory.java @@ -18,6 +18,7 @@ import javax.measure.quantity.ElectricPotential; import tech.units.indriya.ComparableQuantity; +/** The type Line type input factory. */ public class LineTypeInputFactory extends AssetTypeInputEntityFactory { private static final String B = "b"; private static final String G = "g"; @@ -26,6 +27,7 @@ public class LineTypeInputFactory extends AssetTypeInputEntityFactory { // SystemParticipantTypeInput parameters @@ -57,6 +58,7 @@ public class SystemParticipantTypeInputFactory // WecTypeInput private static final String CP_CHARACTERISTIC = "cpCharacteristic"; + /** Instantiates a new System participant type input factory. */ public SystemParticipantTypeInputFactory() { super( EvTypeInput.class, diff --git a/src/main/java/edu/ie3/datamodel/io/factory/typeinput/Transformer2WTypeInputFactory.java b/src/main/java/edu/ie3/datamodel/io/factory/typeinput/Transformer2WTypeInputFactory.java index 6c3df5c0c..f4976b63e 100644 --- a/src/main/java/edu/ie3/datamodel/io/factory/typeinput/Transformer2WTypeInputFactory.java +++ b/src/main/java/edu/ie3/datamodel/io/factory/typeinput/Transformer2WTypeInputFactory.java @@ -15,6 +15,7 @@ import javax.measure.quantity.*; import tech.units.indriya.ComparableQuantity; +/** The type Transformer 2 w type input factory. */ public class Transformer2WTypeInputFactory extends AssetTypeInputEntityFactory { private static final String R_SC = "rSc"; @@ -31,6 +32,7 @@ public class Transformer2WTypeInputFactory private static final String TAP_MIN = "tapMin"; private static final String TAP_MAX = "tapMax"; + /** Instantiates a new Transformer 2 w type input factory. */ public Transformer2WTypeInputFactory() { super(Transformer2WTypeInput.class); } diff --git a/src/main/java/edu/ie3/datamodel/io/factory/typeinput/Transformer3WTypeInputFactory.java b/src/main/java/edu/ie3/datamodel/io/factory/typeinput/Transformer3WTypeInputFactory.java index 196eaf472..ba9c211e6 100644 --- a/src/main/java/edu/ie3/datamodel/io/factory/typeinput/Transformer3WTypeInputFactory.java +++ b/src/main/java/edu/ie3/datamodel/io/factory/typeinput/Transformer3WTypeInputFactory.java @@ -15,6 +15,7 @@ import javax.measure.quantity.*; import tech.units.indriya.ComparableQuantity; +/** The type Transformer 3 w type input factory. */ public class Transformer3WTypeInputFactory extends AssetTypeInputEntityFactory { private static final String S_RATED_A = "sRatedA"; @@ -37,6 +38,7 @@ public class Transformer3WTypeInputFactory private static final String TAP_MIN = "tapMin"; private static final String TAP_MAX = "tapMax"; + /** Instantiates a new Transformer 3 w type input factory. */ public Transformer3WTypeInputFactory() { super(Transformer3WTypeInput.class); } diff --git a/src/main/java/edu/ie3/datamodel/io/naming/DatabaseNamingStrategy.java b/src/main/java/edu/ie3/datamodel/io/naming/DatabaseNamingStrategy.java index 7e720e2d2..0a747039c 100644 --- a/src/main/java/edu/ie3/datamodel/io/naming/DatabaseNamingStrategy.java +++ b/src/main/java/edu/ie3/datamodel/io/naming/DatabaseNamingStrategy.java @@ -25,10 +25,16 @@ public class DatabaseNamingStrategy { private final EntityPersistenceNamingStrategy entityPersistenceNamingStrategy; + /** + * Instantiates a new Database naming strategy. + * + * @param entityPersistenceNamingStrategy the entity persistence naming strategy + */ public DatabaseNamingStrategy(EntityPersistenceNamingStrategy entityPersistenceNamingStrategy) { this.entityPersistenceNamingStrategy = entityPersistenceNamingStrategy; } + /** Instantiates a new Database naming strategy. */ public DatabaseNamingStrategy() { this(new EntityPersistenceNamingStrategy()); } @@ -42,7 +48,11 @@ public String getTimeSeriesPrefix() { return TIME_SERIES_PREFIX; } - /** Returns the String of the load profile table */ + /** + * Returns the String of the load profile table + * + * @return the load profile table name + */ public String getLoadProfileTableName() { return LOAD_PROFILE; } @@ -79,6 +89,10 @@ public Optional getEntityName(Class cls) { /** * Provides the name of a time series. Used to determine the table name in SQL database. * + * @param the type parameter + * @param the type parameter + * @param the type parameter + * @param the type parameter * @param timeSeries to be named TimeSeries * @return the table name */ 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 78d1cbf43..17119eb19 100644 --- a/src/main/java/edu/ie3/datamodel/io/naming/DefaultDirectoryHierarchy.java +++ b/src/main/java/edu/ie3/datamodel/io/naming/DefaultDirectoryHierarchy.java @@ -59,6 +59,12 @@ public class DefaultDirectoryHierarchy implements FileHierarchy { private final Path resultTree; + /** + * Instantiates a new Default directory hierarchy. + * + * @param baseDirectory the base directory + * @param gridName the grid name + */ public DefaultDirectoryHierarchy(Path baseDirectory, String gridName) { /* Prepare the base path */ Path baseDirectoryNormalized = @@ -202,6 +208,7 @@ public Optional getSubDirectory(Class cls) { } private enum SubDirectories { + /** Grid input sub directories. */ GRID_INPUT( Constants.INPUT_SUB_TREE.resolve("grid"), true, @@ -213,6 +220,7 @@ private enum SubDirectories { MeasurementUnitInput.class, NodeInput.class) .collect(Collectors.toSet())), + /** Grid result sub directories. */ GRID_RESULT( Constants.RESULT_SUB_TREE.resolve("grid"), false, @@ -223,6 +231,7 @@ private enum SubDirectories { Transformer3WResult.class, NodeResult.class) .collect(Collectors.toSet())), + /** Global sub directories. */ GLOBAL( Constants.INPUT_SUB_TREE.resolve("global"), true, @@ -239,6 +248,7 @@ private enum SubDirectories { OperatorInput.class, WecCharacteristicInput.class) .collect(Collectors.toSet())), + /** Participants input sub directories. */ PARTICIPANTS_INPUT( Constants.INPUT_SUB_TREE.resolve("participants"), true, @@ -254,6 +264,7 @@ private enum SubDirectories { StorageInput.class, WecInput.class) .collect(Collectors.toSet())), + /** Participants results sub directories. */ PARTICIPANTS_RESULTS( Constants.RESULT_SUB_TREE.resolve("participants"), false, @@ -271,19 +282,23 @@ private enum SubDirectories { EmResult.class, FlexOptionsResult.class) .collect(Collectors.toSet())), + /** Time series sub directories. */ TIME_SERIES( PARTICIPANTS_INPUT.relPath.resolve("time_series"), false, Stream.of(TimeSeries.class, TimeSeriesMappingSource.MappingEntry.class) .collect(Collectors.toSet())), + /** Thermal input sub directories. */ THERMAL_INPUT( Constants.INPUT_SUB_TREE.resolve("thermal"), false, Stream.of(ThermalUnitInput.class, ThermalBusInput.class).collect(Collectors.toSet())), + /** Thermal results sub directories. */ THERMAL_RESULTS( Constants.RESULT_SUB_TREE.resolve("thermal"), false, Stream.of(ThermalUnitResult.class).collect(Collectors.toSet())), + /** Graphics sub directories. */ GRAPHICS( Constants.INPUT_SUB_TREE.resolve("graphics"), false, @@ -292,14 +307,29 @@ private enum SubDirectories { private final boolean mandatory; private final Set> relevantClasses; + /** + * Gets rel path. + * + * @return the rel path + */ public Path getRelPath() { return relPath; } + /** + * Is mandatory boolean. + * + * @return the boolean + */ public boolean isMandatory() { return mandatory; } + /** + * Gets relevant classes. + * + * @return the relevant classes + */ public Set> getRelevantClasses() { return relevantClasses; } 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 0c6f5ca2a..d9b6242d5 100644 --- a/src/main/java/edu/ie3/datamodel/io/naming/EntityPersistenceNamingStrategy.java +++ b/src/main/java/edu/ie3/datamodel/io/naming/EntityPersistenceNamingStrategy.java @@ -36,6 +36,7 @@ */ public class EntityPersistenceNamingStrategy { + /** The constant logger. */ protected static final Logger logger = LoggerFactory.getLogger(EntityPersistenceNamingStrategy.class); @@ -117,10 +118,20 @@ public EntityPersistenceNamingStrategy(String prefix, String suffix) { + suffix); } + /** + * Gets load profile time series pattern. + * + * @return the load profile time series pattern + */ public Pattern getLoadProfileTimeSeriesPattern() { return loadProfileTimeSeriesPattern; } + /** + * Gets individual time series pattern. + * + * @return the individual time series pattern + */ public Pattern getIndividualTimeSeriesPattern() { return individualTimeSeriesPattern; } @@ -340,6 +351,7 @@ public Optional getTimeSeriesMappingEntityName() { * @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 the type parameter * @param timeSeries Time series to derive naming information from * @return A file name for this particular time series */ 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 fd7084a60..61afc7b90 100644 --- a/src/main/java/edu/ie3/datamodel/io/naming/FileNamingStrategy.java +++ b/src/main/java/edu/ie3/datamodel/io/naming/FileNamingStrategy.java @@ -83,6 +83,7 @@ public Optional getFilePath(Class cls) { * @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 the type parameter * @param timeSeries Time series to derive naming information from * @return An optional sub path to the actual file */ @@ -138,6 +139,7 @@ public Optional getDirectoryPath(Class cls) { * @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 the type parameter * @param timeSeries Time series to derive naming information from * @return An optional sub directory path */ @@ -241,20 +243,44 @@ else if (getLoadProfileTimeSeriesPattern().matcher(withoutEnding).matches()) "Unknown format of '" + fileName + "'. Cannot extract meta information."); } + /** + * Individual time series meta information individual time series meta information. + * + * @param fileName the file name + * @return the individual time series meta information + */ public IndividualTimeSeriesMetaInformation individualTimeSeriesMetaInformation(String fileName) { return entityPersistenceNamingStrategy.individualTimesSeriesMetaInformation( removeFileNameEnding(fileName)); } + /** + * Load profile time series meta information load profile meta information. + * + * @param fileName the file name + * @return the load profile meta information + */ public LoadProfileMetaInformation loadProfileTimeSeriesMetaInformation(String fileName) { return entityPersistenceNamingStrategy.loadProfileTimesSeriesMetaInformation( removeFileNameEnding(fileName)); } + /** + * Remove file name ending string. + * + * @param fileName the file name + * @return the string + */ public static String removeFileNameEnding(String fileName) { return fileName.replaceAll("(?:\\.[^.\\\\/\\s]{1,255}){1,2}$", ""); } + /** + * Remove file name ending path. + * + * @param filename the filename + * @return the path + */ public static Path removeFileNameEnding(Path filename) { return Path.of(removeFileNameEnding(filename.toString())); } @@ -285,6 +311,7 @@ public Optional getEntityName(Class cls) { * @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 the type parameter * @param timeSeries Time series to derive naming information from * @return A file name for this particular time series */ 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 18dd38621..180633ba1 100644 --- a/src/main/java/edu/ie3/datamodel/io/naming/FlatDirectoryHierarchy.java +++ b/src/main/java/edu/ie3/datamodel/io/naming/FlatDirectoryHierarchy.java @@ -9,8 +9,10 @@ import java.nio.file.Path; import java.util.Optional; -/** Default directory hierarchy for input models */ +/** Implementation of the FileHierarchy interface that represents a flat directory structure. */ public class FlatDirectoryHierarchy implements FileHierarchy { + /** Default constructor for FlatDirectoryHierarchy. */ + public FlatDirectoryHierarchy() {} /** * Gives empty sub directory. diff --git a/src/main/java/edu/ie3/datamodel/io/naming/TimeSeriesMetaInformation.java b/src/main/java/edu/ie3/datamodel/io/naming/TimeSeriesMetaInformation.java index 26ff2aaa6..412c48d59 100644 --- a/src/main/java/edu/ie3/datamodel/io/naming/TimeSeriesMetaInformation.java +++ b/src/main/java/edu/ie3/datamodel/io/naming/TimeSeriesMetaInformation.java @@ -11,6 +11,11 @@ /** Meta information, that describe a certain data source */ public abstract class TimeSeriesMetaInformation extends UniqueInputEntity { + /** + * Instantiates a new Time series meta information. + * + * @param uuid the uuid + */ protected TimeSeriesMetaInformation(UUID uuid) { super(uuid); } diff --git a/src/main/java/edu/ie3/datamodel/io/naming/timeseries/ColumnScheme.java b/src/main/java/edu/ie3/datamodel/io/naming/timeseries/ColumnScheme.java index 6ea64b458..36b104201 100644 --- a/src/main/java/edu/ie3/datamodel/io/naming/timeseries/ColumnScheme.java +++ b/src/main/java/edu/ie3/datamodel/io/naming/timeseries/ColumnScheme.java @@ -13,13 +13,21 @@ /** Supported column schemes in individual time series */ public enum ColumnScheme { + /** Energy price column scheme. */ ENERGY_PRICE("c", EnergyPriceValue.class), + /** Active power column scheme. */ ACTIVE_POWER("p", PValue.class), + /** Apparent power column scheme. */ APPARENT_POWER("pq", SValue.class), + /** Heat demand column scheme. */ HEAT_DEMAND("h", HeatDemandValue.class), + /** Active power and heat demand column scheme. */ ACTIVE_POWER_AND_HEAT_DEMAND("ph", HeatAndPValue.class), + /** Apparent power and heat demand column scheme. */ APPARENT_POWER_AND_HEAT_DEMAND("pqh", HeatAndSValue.class), + /** Weather column scheme. */ WEATHER("weather", WeatherValue.class), + /** Voltage column scheme. */ VOLTAGE("v", VoltageValue.class); private final String scheme; @@ -30,14 +38,30 @@ public enum ColumnScheme { this.valueClass = valueClass; } + /** + * Gets scheme. + * + * @return the scheme + */ public String getScheme() { return scheme; } + /** + * Gets value class. + * + * @return the value class + */ public Class getValueClass() { return valueClass; } + /** + * Parse optional. + * + * @param key the key + * @return the optional + */ public static Optional parse(String key) { String cleanString = StringUtils.cleanString(key).toLowerCase(); return Arrays.stream(ColumnScheme.values()) @@ -45,6 +69,13 @@ public static Optional parse(String key) { .findFirst(); } + /** + * Parse optional. + * + * @param the type parameter + * @param valueClass the value class + * @return the optional + */ public static Optional parse(Class valueClass) { /* IMPORTANT NOTE: Make sure to start with child classes and then use parent classes to allow for most precise * parsing (child class instances are also assignable to parent classes) */ diff --git a/src/main/java/edu/ie3/datamodel/io/naming/timeseries/IndividualTimeSeriesMetaInformation.java b/src/main/java/edu/ie3/datamodel/io/naming/timeseries/IndividualTimeSeriesMetaInformation.java index dfd42685b..0eaa1f673 100644 --- a/src/main/java/edu/ie3/datamodel/io/naming/timeseries/IndividualTimeSeriesMetaInformation.java +++ b/src/main/java/edu/ie3/datamodel/io/naming/timeseries/IndividualTimeSeriesMetaInformation.java @@ -11,13 +11,25 @@ /** Specific meta information, that can be derived from an individual time series file */ public class IndividualTimeSeriesMetaInformation extends TimeSeriesMetaInformation { + /** The scheme that defines the columns of the time series data. */ private final ColumnScheme columnScheme; + /** + * Instantiates a new Individual time series meta information. + * + * @param uuid the uuid + * @param columnScheme the column scheme + */ public IndividualTimeSeriesMetaInformation(UUID uuid, ColumnScheme columnScheme) { super(uuid); this.columnScheme = columnScheme; } + /** + * Gets column scheme. + * + * @return the column scheme + */ public ColumnScheme getColumnScheme() { return columnScheme; } diff --git a/src/main/java/edu/ie3/datamodel/io/naming/timeseries/LoadProfileMetaInformation.java b/src/main/java/edu/ie3/datamodel/io/naming/timeseries/LoadProfileMetaInformation.java index 875c881e6..6ca3b3f54 100644 --- a/src/main/java/edu/ie3/datamodel/io/naming/timeseries/LoadProfileMetaInformation.java +++ b/src/main/java/edu/ie3/datamodel/io/naming/timeseries/LoadProfileMetaInformation.java @@ -11,18 +11,35 @@ /** Specific meta information, that can be derived from a load profile time series file */ public class LoadProfileMetaInformation extends TimeSeriesMetaInformation { + /** The name or identifier of the load profile. */ private final String profile; + /** + * Instantiates a new Load profile meta information. + * + * @param profile the profile + */ public LoadProfileMetaInformation(String profile) { super(UUID.randomUUID()); this.profile = profile; } + /** + * Instantiates a new Load profile meta information. + * + * @param uuid the uuid + * @param profile the profile + */ public LoadProfileMetaInformation(UUID uuid, String profile) { super(uuid); this.profile = profile; } + /** + * Gets profile. + * + * @return the profile + */ public String getProfile() { return profile; } diff --git a/src/main/java/edu/ie3/datamodel/io/processor/EntityProcessor.java b/src/main/java/edu/ie3/datamodel/io/processor/EntityProcessor.java index f36814748..7a3d36b53 100644 --- a/src/main/java/edu/ie3/datamodel/io/processor/EntityProcessor.java +++ b/src/main/java/edu/ie3/datamodel/io/processor/EntityProcessor.java @@ -26,13 +26,16 @@ * fieldName to value representation to allow for an easy processing into a database or file sink * e.g. .csv * - * @version 0.1 - * @since 31.01.20 + * @param The type of entity that this processor handles, which must extend {@link Entity}. */ public abstract class EntityProcessor extends Processor { + /** The constant log. */ public static final Logger log = LoggerFactory.getLogger(EntityProcessor.class); + + /** The Header elements. */ protected final String[] headerElements; + private final SortedMap fieldNameToMethod; private static final String NODE_INTERNAL = "nodeInternal"; @@ -41,6 +44,7 @@ public abstract class EntityProcessor extends Processor { * Create a new EntityProcessor * * @param registeredClass the class the entity processor should be able to handle + * @throws EntityProcessorException the entity processor exception */ protected EntityProcessor(Class registeredClass) throws EntityProcessorException { super(registeredClass); @@ -55,6 +59,7 @@ protected EntityProcessor(Class registeredClass) throws EntityProce * @param entity the entity that should be 'serialized' into a map of fieldName to fieldValue * @return an optional Map with fieldName to fieldValue or an empty optional if an error occurred * during processing + * @throws EntityProcessorException the entity processor exception */ public LinkedHashMap handleEntity(T entity) throws EntityProcessorException { if (!registeredClass.isAssignableFrom(entity.getClass())) diff --git a/src/main/java/edu/ie3/datamodel/io/processor/GetterMethod.java b/src/main/java/edu/ie3/datamodel/io/processor/GetterMethod.java index 17f7835b3..54468212f 100644 --- a/src/main/java/edu/ie3/datamodel/io/processor/GetterMethod.java +++ b/src/main/java/edu/ie3/datamodel/io/processor/GetterMethod.java @@ -8,19 +8,50 @@ import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; +/** + * The type Getter method. + * + * @param name the name + * @param getter the getter + * @param returnType the returnType + */ public record GetterMethod(String name, Getter getter, String returnType) { + /** + * Instantiates a new Getter method. + * + * @param method the method + */ public GetterMethod(Method method) { this(method.getName(), method::invoke, method.getReturnType().getSimpleName()); } + /** + * Invoke object. + * + * @param object the object + * @return the object + * @throws IllegalAccessException the illegal access exception + * @throws IllegalArgumentException the illegal argument exception + * @throws InvocationTargetException the invocation target exception + */ public Object invoke(Object object) throws IllegalAccessException, IllegalArgumentException, InvocationTargetException { return getter.get(object); } + /** The interface Getter. */ @FunctionalInterface public interface Getter { + /** + * Get object. + * + * @param object the object + * @return the object + * @throws IllegalAccessException the illegal access exception + * @throws IllegalArgumentException the illegal argument exception + * @throws InvocationTargetException the invocation target exception + */ Object get(Object object) throws IllegalAccessException, IllegalArgumentException, InvocationTargetException; } 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 d232dbf27..c2a258bbf 100644 --- a/src/main/java/edu/ie3/datamodel/io/processor/Processor.java +++ b/src/main/java/edu/ie3/datamodel/io/processor/Processor.java @@ -40,8 +40,10 @@ * @param Type parameter of the class to handle */ public abstract class Processor { + /** The constant logger. */ protected static final Logger logger = LoggerFactory.getLogger(Processor.class); + /** The Registered class. */ protected final Class registeredClass; /* Quantities associated to those fields must be treated differently (e.g. input and result), all other quantity / @@ -75,6 +77,7 @@ public abstract class Processor { * Instantiates a Processor for a foreseen class * * @param foreSeenClass Class and its children that are foreseen to be handled with this processor + * @throws EntityProcessorException the entity processor exception */ protected Processor(Class foreSeenClass) throws EntityProcessorException { if (!getEligibleEntityClasses().contains(foreSeenClass)) @@ -109,6 +112,7 @@ public int compare(String a, String b) { * * @param cls class to use for mapping * @return a map of all field values of the class + * @throws EntityProcessorException the entity processor exception */ protected SortedMap mapFieldNameToGetter(Class cls) throws EntityProcessorException { @@ -121,6 +125,7 @@ protected SortedMap mapFieldNameToGetter(Class cls) * @param cls class to use for mapping * @param ignoreFields A collection of all field names to ignore during process * @return a map of all field values of the class + * @throws EntityProcessorException the entity processor exception */ protected SortedMap mapFieldNameToGetter( Class cls, Collection ignoreFields) throws EntityProcessorException { @@ -167,8 +172,8 @@ protected SortedMap mapFieldNameToGetter( * Ensure, that the uuid field is put first. All other fields are sorted alphabetically. * Additionally, the map is immutable * - * @param unsorted The unsorted map * @param Type of the values in the map + * @param unsorted The unsorted map * @return The sorted map - what a surprise! */ public static SortedMap putUuidFirst(Map unsorted) { @@ -183,6 +188,7 @@ public static SortedMap putUuidFirst(Map unsorted) { * @param object The object to process * @param fieldNameToGetter Mapping from field name to getter * @return Mapping from field name to value as String representation + * @throws EntityProcessorException the entity processor exception */ protected LinkedHashMap processObject( Object object, Map fieldNameToGetter) throws EntityProcessorException { @@ -213,6 +219,7 @@ protected LinkedHashMap processObject( * @param method The method, that is invoked * @param fieldName Name of the foreseen field * @return A String representation of the result + * @throws EntityProcessorException the entity processor exception */ protected String processMethodResult( Object methodReturnObject, GetterMethod method, String fieldName) @@ -327,6 +334,7 @@ protected String processMethodResult( * @param fieldName the field name that should be generated (either v_rated or volt_lvl) * @return the resulting string of a VoltageLevel attribute value for the provided field or an * empty string when an invalid field name is provided + * @throws EntityProcessorException the entity processor exception */ protected String processVoltageLevel(VoltageLevel voltageLevel, String fieldName) throws EntityProcessorException { @@ -346,6 +354,7 @@ protected String processVoltageLevel(VoltageLevel voltageLevel, String fieldName * @param fieldName the field name the quantity is set to * @return an optional string with the normalized to {@link StandardUnits} value of the quantity * or empty if an error occurred during processing + * @throws EntityProcessorException the entity processor exception */ protected String handleQuantity(Quantity quantity, String fieldName) throws EntityProcessorException { diff --git a/src/main/java/edu/ie3/datamodel/io/processor/ProcessorProvider.java b/src/main/java/edu/ie3/datamodel/io/processor/ProcessorProvider.java index ae248786f..1ed4d920b 100644 --- a/src/main/java/edu/ie3/datamodel/io/processor/ProcessorProvider.java +++ b/src/main/java/edu/ie3/datamodel/io/processor/ProcessorProvider.java @@ -26,7 +26,7 @@ * Wrapper providing the class specific processor to convert an instance of a {@link Entity} into a * mapping from attribute to value which can be used to write data e.g. into .csv files. This * wrapper can always be used if it's not clear which specific instance of a subclass of {@link - * Entity} is received in the implementation. It can either be used for specific entity processors + * Entity}* is received in the implementation. It can either be used for specific entity processors * only or as a general provider for all known entity processors. * * @version 0.1 @@ -46,7 +46,11 @@ public class ProcessorProvider { Value>> timeSeriesProcessors; - /** Get an instance of this class with all existing entity processors */ + /** + * Get an instance of this class with all existing entity processors + * + * @throws EntityProcessorException the entity processor exception + */ public ProcessorProvider() throws EntityProcessorException { this.entityProcessors = init(allEntityProcessors()); this.timeSeriesProcessors = allTimeSeriesProcessors(); @@ -73,6 +77,13 @@ public ProcessorProvider( this.timeSeriesProcessors = timeSeriesProcessors; } + /** + * Handle entity try. + * + * @param the type parameter + * @param entity the entity + * @return the try + */ public Try, ProcessorProviderException> handleEntity(T entity) { return Try.of(() -> getEntityProcessor(entity.getClass()), ProcessorProviderException.class) @@ -83,6 +94,14 @@ Try, ProcessorProviderException> handleEntity(T en .transformF(ProcessorProviderException::new)); } + /** + * Handle entities set. + * + * @param the type parameter + * @param entities the entities + * @return the set + * @throws ProcessorProviderException the processor provider exception + */ public Set> handleEntities(List entities) throws ProcessorProviderException { Set setOfEntities = new HashSet<>(entities); @@ -121,12 +140,13 @@ private EntityProcessor getEntityProcessor(Class Type of the time series * @param Type of the time series entries * @param Type of the value inside the time series entries * @param Type of the value, the time series will return + * @param timeSeries Time series to process * @return A set of mappings from field name to value + * @throws ProcessorProviderException the processor provider exception */ public < T extends TimeSeries, @@ -185,6 +205,11 @@ public List> getRegisteredClasses() { .collect(Collectors.toList()); } + /** + * Gets registered time series combinations. + * + * @return the registered time series combinations + */ public Set getRegisteredTimeSeriesCombinations() { return timeSeriesProcessors.keySet(); } @@ -261,6 +286,7 @@ private Map, EntityProcessor> init( * Build a collection of all existing processors * * @return a collection of all existing processors + * @throws EntityProcessorException the entity processor exception */ public static Collection> allEntityProcessors() throws EntityProcessorException { @@ -274,6 +300,7 @@ public static Collection> allEntityProcessors( * Build a collection of all input processors * * @return a collection of all input processors + * @throws EntityProcessorException the entity processor exception */ public static Collection> allInputEntityProcessors() throws EntityProcessorException { @@ -288,6 +315,7 @@ public static Collection> allInputEntityProces * Build a collection of all result processors * * @return a collection of all result processors + * @throws EntityProcessorException the entity processor exception */ public static Collection> allResultEntityProcessors() throws EntityProcessorException { @@ -302,6 +330,7 @@ public static Collection> allResultEntityProce * Create processors for all known eligible combinations and map them * * @return A mapping from eligible combinations to processors + * @throws EntityProcessorException the entity processor exception */ @SuppressWarnings("unchecked") public static Map< diff --git a/src/main/java/edu/ie3/datamodel/io/processor/input/InputEntityProcessor.java b/src/main/java/edu/ie3/datamodel/io/processor/input/InputEntityProcessor.java index 6986361ee..e1d909081 100644 --- a/src/main/java/edu/ie3/datamodel/io/processor/input/InputEntityProcessor.java +++ b/src/main/java/edu/ie3/datamodel/io/processor/input/InputEntityProcessor.java @@ -77,6 +77,12 @@ public class InputEntityProcessor extends EntityProcessor { StorageTypeInput.class, WecTypeInput.class); + /** + * Instantiates a new Input entity processor. + * + * @param registeredClass the registered class + * @throws EntityProcessorException the entity processor exception + */ public InputEntityProcessor(Class registeredClass) throws EntityProcessorException { super(registeredClass); diff --git a/src/main/java/edu/ie3/datamodel/io/processor/result/ResultEntityProcessor.java b/src/main/java/edu/ie3/datamodel/io/processor/result/ResultEntityProcessor.java index 224b75850..9fbd666dd 100644 --- a/src/main/java/edu/ie3/datamodel/io/processor/result/ResultEntityProcessor.java +++ b/src/main/java/edu/ie3/datamodel/io/processor/result/ResultEntityProcessor.java @@ -64,6 +64,12 @@ public class ResultEntityProcessor extends EntityProcessor { FlexOptionsResult.class, CongestionResult.class); + /** + * Instantiates a new Result entity processor. + * + * @param registeredClass the registered class + * @throws EntityProcessorException the entity processor exception + */ public ResultEntityProcessor(Class registeredClass) throws EntityProcessorException { super(registeredClass); diff --git a/src/main/java/edu/ie3/datamodel/io/processor/timeseries/FieldSourceToMethod.java b/src/main/java/edu/ie3/datamodel/io/processor/timeseries/FieldSourceToMethod.java index ac2977d72..ced166c09 100644 --- a/src/main/java/edu/ie3/datamodel/io/processor/timeseries/FieldSourceToMethod.java +++ b/src/main/java/edu/ie3/datamodel/io/processor/timeseries/FieldSourceToMethod.java @@ -10,6 +10,11 @@ /** * Represent a tuple of {@link FieldSource} to {@link GetterMethod} to highlight, where information * of a time series can be obtained from + * + * @param source The source from which data can be retrieved, represented by the {@link FieldSource} + * enum. + * @param method The method used to retrieve values from the specified source, represented by {@link + * GetterMethod}. */ public record FieldSourceToMethod(FieldSource source, GetterMethod method) { @Override @@ -19,11 +24,17 @@ public String toString() { /** Enum to denote, where information can be received from */ public enum FieldSource { + /** Timeseries field source. */ TIMESERIES, + /** Entry field source. */ ENTRY, + /** Value field source. */ VALUE, + /** Weather irradiance field source. */ WEATHER_IRRADIANCE, + /** Weather temperature field source. */ WEATHER_TEMPERATURE, + /** Weather wind field source. */ WEATHER_WIND, } } 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 430746a34..4eff0bbac 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 @@ -26,6 +26,14 @@ import java.util.function.Function; import java.util.stream.Collectors; +/** + * The type Time series processor. + * + * @param the type parameter + * @param the type parameter + * @param the type parameter + * @param the type parameter + */ public class TimeSeriesProcessor< T extends TimeSeries, E extends TimeSeriesEntry, @@ -85,17 +93,43 @@ public class TimeSeriesProcessor< private final String[] flattenedHeaderElements; + /** + * Instantiates a new Time series processor. + * + * @param timeSeriesClass the time series class + * @param entryClass the entry class + * @param valueClass the value class + * @throws EntityProcessorException the entity processor exception + */ public TimeSeriesProcessor(Class timeSeriesClass, Class entryClass, Class valueClass) throws EntityProcessorException { this(timeSeriesClass, entryClass, valueClass, Optional.empty()); } + /** + * Instantiates a new Time series processor. + * + * @param timeSeriesClass the time series class + * @param entryClass the entry class + * @param valueClass the value class + * @param scheme the scheme + * @throws EntityProcessorException the entity processor exception + */ public TimeSeriesProcessor( Class timeSeriesClass, Class entryClass, Class valueClass, LoadValues.Scheme scheme) throws EntityProcessorException { this(timeSeriesClass, entryClass, valueClass, Optional.ofNullable(scheme)); } + /** + * Instantiates a new Time series processor. + * + * @param timeSeriesClass the time series class + * @param entryClass the entry class + * @param valueClass the value class + * @param scheme the scheme + * @throws EntityProcessorException the entity processor exception + */ public TimeSeriesProcessor( Class timeSeriesClass, Class entryClass, @@ -126,6 +160,11 @@ public TimeSeriesProcessor( this.flattenedHeaderElements = fieldToSource.keySet().toArray(new String[0]); } + /** + * Gets registered key. + * + * @return the registered key + */ public TimeSeriesProcessorKey getRegisteredKey() { return registeredKey; } @@ -213,6 +252,7 @@ public LinkedHashMap handleEntity(TimeSeries entity) { * * @param timeSeries Time series to handle * @return A set of mappings from field name to value + * @throws EntityProcessorException the entity processor exception */ public Set> handleTimeSeries(T timeSeries) throws EntityProcessorException { diff --git a/src/main/java/edu/ie3/datamodel/io/processor/timeseries/TimeSeriesProcessorKey.java b/src/main/java/edu/ie3/datamodel/io/processor/timeseries/TimeSeriesProcessorKey.java index cb918d5be..6d8ab7b44 100644 --- a/src/main/java/edu/ie3/datamodel/io/processor/timeseries/TimeSeriesProcessorKey.java +++ b/src/main/java/edu/ie3/datamodel/io/processor/timeseries/TimeSeriesProcessorKey.java @@ -24,6 +24,11 @@ public class TimeSeriesProcessorKey { // for load profile time series private final Optional scheme; + /** + * Instantiates a new Time series processor key. + * + * @param timeSeries the time series + */ public TimeSeriesProcessorKey(TimeSeries, ?, ?> timeSeries) { this.timeSeriesClass = timeSeries.getClass(); this.entryClass = @@ -49,6 +54,13 @@ public TimeSeriesProcessorKey(TimeSeries, ?, ?> tim } } + /** + * Instantiates a new Time series processor key. + * + * @param timeSeriesClass the time series class + * @param entryClass the entry class + * @param valueClass the value class + */ public TimeSeriesProcessorKey( Class timeSeriesClass, Class entryClass, @@ -59,6 +71,14 @@ public TimeSeriesProcessorKey( this.scheme = Optional.empty(); } + /** + * Instantiates a new Time series processor key. + * + * @param timeSeriesClass the time series class + * @param entryClass the entry class + * @param valueClass the value class + * @param scheme the scheme + */ public TimeSeriesProcessorKey( Class timeSeriesClass, Class entryClass, @@ -70,6 +90,14 @@ public TimeSeriesProcessorKey( this.scheme = Optional.ofNullable(scheme); } + /** + * Instantiates a new Time series processor key. + * + * @param timeSeriesClass the time series class + * @param entryClass the entry class + * @param valueClass the value class + * @param scheme the scheme + */ public TimeSeriesProcessorKey( Class timeSeriesClass, Class entryClass, @@ -81,18 +109,38 @@ public TimeSeriesProcessorKey( this.scheme = scheme; } + /** + * Gets time series class. + * + * @return the time series class + */ public Class getTimeSeriesClass() { return timeSeriesClass; } + /** + * Gets entry class. + * + * @return the entry class + */ public Class getEntryClass() { return entryClass; } + /** + * Gets value class. + * + * @return the value class + */ public Class getValueClass() { return valueClass; } + /** + * Gets scheme. + * + * @return the scheme + */ public Optional getScheme() { return scheme; } 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 4b08d00f6..bc62ed58d 100644 --- a/src/main/java/edu/ie3/datamodel/io/sink/CsvFileSink.java +++ b/src/main/java/edu/ie3/datamodel/io/sink/CsvFileSink.java @@ -57,6 +57,12 @@ public class CsvFileSink implements InputDataSink, OutputDataSink { private final FileNamingStrategy fileNamingStrategy; private final String csvSep; + /** + * Instantiates a new Csv file sink. + * + * @param baseFolderPath the base folder path + * @throws EntityProcessorException the entity processor exception + */ public CsvFileSink(Path baseFolderPath) throws EntityProcessorException { this(baseFolderPath, new FileNamingStrategy(), ","); } @@ -69,6 +75,7 @@ public CsvFileSink(Path baseFolderPath) throws EntityProcessorException { * @param baseFolderPath the base folder path where the files should be put into * @param fileNamingStrategy the data sink file naming strategy that should be used * @param csvSep the csv file separator that should be use + * @throws EntityProcessorException the entity processor exception */ public CsvFileSink(Path baseFolderPath, FileNamingStrategy fileNamingStrategy, String csvSep) throws EntityProcessorException { @@ -82,7 +89,7 @@ public CsvFileSink(Path baseFolderPath, FileNamingStrategy fileNamingStrategy, S * {@link ProcessorProvider} because if you're not 100% sure that it knows about all entities * you're going to process exceptions might occur. Therefore it is strongly advised to either use * a constructor without providing the {@link ProcessorProvider} or provide a general {@link - * ProcessorProvider} by calling {@link ProcessorProvider#ProcessorProvider()} + * ProcessorProvider}* by calling {@link ProcessorProvider#ProcessorProvider()} * * @param baseFolderPath the base folder path where the files should be put into * @param processorProvider the processor provided that should be used for entity serialization diff --git a/src/main/java/edu/ie3/datamodel/io/sink/DataSink.java b/src/main/java/edu/ie3/datamodel/io/sink/DataSink.java index 553392391..f418aba52 100644 --- a/src/main/java/edu/ie3/datamodel/io/sink/DataSink.java +++ b/src/main/java/edu/ie3/datamodel/io/sink/DataSink.java @@ -34,9 +34,10 @@ public interface DataSink { * that neglects the nested objects persistence and only persists the uuid of the nested objects * (if any), instead of the object itself use {@link InputDataSink#persistIgnoreNested} * - * @param entity the entity that should be persisted * @param bounded to be all unique entities. Handling of specific entities is normally then * executed by a specific {@link EntityProcessor} + * @param entity the entity that should be persisted + * @throws ProcessorProviderException the processor provider exception */ void persist(C entity) throws ProcessorProviderException; @@ -46,11 +47,12 @@ public interface DataSink { * any) of input entities and use {@link edu.ie3.datamodel.io.extractor.Extractor} accordingly. * For a faster method that neglects the nested objects persistence and only persists the uuid of * the nested * objects (if any), instead of the object itself use {@link - * InputDataSink#persistAllIgnoreNested} + * InputDataSink#persistAllIgnoreNested}* * - * @param entities a collection of entities that should be persisted * @param bounded to be all unique entities. Handling of specific entities is normally then * executed by a specific {@link EntityProcessor} + * @param entities a collection of entities that should be persisted + * @throws ProcessorProviderException the processor provider exception */ void persistAll(Collection entities) throws ProcessorProviderException; @@ -58,10 +60,11 @@ public interface DataSink { * Should implement the handling of a whole time series. Therefore the single entries have to be * extracted and persisted accordingly. * - * @param timeSeries Time series to persist * @param Type of entry in the time series * @param Type of actual value, that is inside the entry * @param Type of the value, the time series will return + * @param timeSeries Time series to persist + * @throws ProcessorProviderException the processor provider exception */ , V extends Value, R extends Value> void persistTimeSeries( TimeSeries timeSeries) throws ProcessorProviderException; 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 275d549aa..6eca94f6c 100644 --- a/src/main/java/edu/ie3/datamodel/io/sink/InfluxDbSink.java +++ b/src/main/java/edu/ie3/datamodel/io/sink/InfluxDbSink.java @@ -25,6 +25,7 @@ /** InfluxDB Sink for result and time series data */ public class InfluxDbSink implements OutputDataSink { + /** The constant log. */ public static final Logger log = LoggerFactory.getLogger(InfluxDbSink.class); /** Field name for time */ @@ -42,6 +43,7 @@ public class InfluxDbSink implements OutputDataSink { * * @param connector needed for database connection * @param entityPersistenceNamingStrategy needed to create measurement names for entities + * @throws EntityProcessorException the entity processor exception */ public InfluxDbSink( InfluxDbConnector connector, EntityPersistenceNamingStrategy entityPersistenceNamingStrategy) @@ -58,6 +60,7 @@ public InfluxDbSink( * Initializes a new InfluxDbWeatherSource with a default EntityPersistenceNamingStrategy * * @param connector needed for database connection + * @throws EntityProcessorException the entity processor exception */ public InfluxDbSink(InfluxDbConnector connector) throws EntityProcessorException { this(connector, new EntityPersistenceNamingStrategy()); diff --git a/src/main/java/edu/ie3/datamodel/io/sink/InputDataSink.java b/src/main/java/edu/ie3/datamodel/io/sink/InputDataSink.java index f49dcaca5..9c91660b1 100644 --- a/src/main/java/edu/ie3/datamodel/io/sink/InputDataSink.java +++ b/src/main/java/edu/ie3/datamodel/io/sink/InputDataSink.java @@ -11,6 +11,7 @@ import edu.ie3.datamodel.models.input.container.JointGridContainer; import java.util.Collection; +/** The interface Input data sink. */ public interface InputDataSink extends DataSink { /** @@ -24,16 +25,16 @@ public interface InputDataSink extends DataSink { * entity contains needed nested data or not {@link DataSink#persist(Entity)} is the recommended * method to be used. * - * @param entity the entity that should be persisted * @param bounded to be all input entities. Handling of the entities is normally then executed * by a {@link InputEntityProcessor} + * @param entity the entity that should be persisted */ void persistIgnoreNested(C entity); /** * Should implement the entry point of a data sink to persist multiple input entities in a * collection. In contrast to {@link DataSink#persistAll(Collection)} and {@link - * InputDataSink#persistAllIncludeNested}, this method should not take care about the + * InputDataSink#persistAllIncludeNested}*, this method should not take care about the * extraction process of nested entities (if any) but only persist the uuid of the nested entity. * This might speed up things a little bit because of missing if-/else-clauses but but can * also lead to missing persisted data that should be persisted, but is not e.g. nested types that @@ -41,9 +42,9 @@ public interface InputDataSink extends DataSink { * nested entities. For all doubts about if the provided entity contains needed nested data or not * {@link DataSink#persistAll(Collection)} is the recommended method to be used. * - * @param entities the entities that should be persisted * @param bounded to be all unique entities. Handling of the entities is normally then * executed by a {@link InputEntityProcessor} + * @param entities the entities that should be persisted */ void persistAllIgnoreNested(Collection entities); @@ -52,9 +53,9 @@ public interface InputDataSink extends DataSink { * entities of an input entity are supposed to be persisted as well. However this might take * longer as additional entities have to be extracted and persisted. * - * @param entity the entity that should be persisted including its nested entities * @param bounded to be all input entities. Handling of specific entities is normally then * executed by a specific {@link InputEntityProcessor} + * @param entity the entity that should be persisted including its nested entities */ void persistIncludeNested(C entity); @@ -63,9 +64,9 @@ public interface InputDataSink extends DataSink { * entities of the input entities are supposed to be persisted as well. However this might take * longer as additional entities have to be extracted and persisted. * - * @param entities the entities that should be persisted including its nested entities * @param bounded to be all unique entities. Handling of the entities is normally then * executed by a {@link InputEntityProcessor} + * @param entities the entities that should be persisted including its nested entities */ void persistAllIncludeNested(Collection entities); diff --git a/src/main/java/edu/ie3/datamodel/io/sink/OutputDataSink.java b/src/main/java/edu/ie3/datamodel/io/sink/OutputDataSink.java index d72a4eb35..b5d7be4bb 100644 --- a/src/main/java/edu/ie3/datamodel/io/sink/OutputDataSink.java +++ b/src/main/java/edu/ie3/datamodel/io/sink/OutputDataSink.java @@ -5,4 +5,5 @@ */ package edu.ie3.datamodel.io.sink; +/** The interface Output data sink. */ public interface OutputDataSink extends DataSink {} diff --git a/src/main/java/edu/ie3/datamodel/io/sink/SqlSink.java b/src/main/java/edu/ie3/datamodel/io/sink/SqlSink.java index 438f88fd7..f96d3e0d3 100644 --- a/src/main/java/edu/ie3/datamodel/io/sink/SqlSink.java +++ b/src/main/java/edu/ie3/datamodel/io/sink/SqlSink.java @@ -44,8 +44,10 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; +/** The type Sql sink. */ public class SqlSink { + /** The constant log. */ protected static final Logger log = LoggerFactory.getLogger(SqlSink.class); private final SqlConnector connector; @@ -56,12 +58,28 @@ public class SqlSink { private static final String TIME_SERIES = "time_series"; private static final String LOAD_PROFILE = "load_profile"; + /** + * Instantiates a new Sql sink. + * + * @param schemaName the schema name + * @param databaseNamingStrategy the database naming strategy + * @param connector the connector + * @throws EntityProcessorException the entity processor exception + */ public SqlSink( String schemaName, DatabaseNamingStrategy databaseNamingStrategy, SqlConnector connector) throws EntityProcessorException { this(schemaName, new ProcessorProvider(), databaseNamingStrategy, connector); } + /** + * Instantiates a new Sql sink. + * + * @param schemaName the schema name + * @param processorProvider the processor provider + * @param databaseNamingStrategy the database naming strategy + * @param connector the connector + */ public SqlSink( String schemaName, ProcessorProvider processorProvider, @@ -73,6 +91,7 @@ public SqlSink( this.schemaName = schemaName; } + /** Shutdown. */ public void shutdown() { connector.shutdown(); } @@ -82,10 +101,10 @@ public void shutdown() { /** * Entry point of a data sink to persist multiple entities in a collection. * - * @param entities a collection of entities that should be persisted - * @param identifier identifier of the grid * @param bounded to be all unique entities. Handling of specific entities is normally then * executed by a specific {@link EntityProcessor} + * @param entities a collection of entities that should be persisted + * @param identifier identifier of the grid */ public void persistAll(Collection entities, DbGridMetadata identifier) { // Extract nested entities and add them to the set of entities @@ -120,6 +139,7 @@ public void persistAll(Collection entities, DbGridMetadata * Persist an entity. By default, this method takes care of the extraction process of nested * entities (if any) * + * @param the type parameter * @param entity the entity that should be persisted * @param identifier identifier of the grid * @throws SQLException if an error occurred @@ -141,8 +161,10 @@ public void persist(C entity, DbGridMetadata identifier) thro * Persist an entity. In contrast to {@link SqlSink#persist} this function does not extract nested * entities. * + * @param the type parameter * @param entity the entity that should be persisted * @param identifier identifier of the grid + * @throws SQLException the sql exception */ public void persistIgnoreNested(C entity, DbGridMetadata identifier) throws SQLException { @@ -152,6 +174,7 @@ public void persistIgnoreNested(C entity, DbGridMetadata iden /** * Persist an entity and all nested entities. * + * @param the type parameter * @param entity the entity that should be persisted * @param identifier identifier of the grid */ @@ -230,7 +253,15 @@ private void insertListIgnoreNested( } } - /** Persist one time series. */ + /** + * Persist one time series. + * + * @param the type parameter + * @param the type parameter + * @param the type parameter + * @param timeSeries the time series + * @param identifier the identifier + */ protected , V extends Value, R extends Value> void persistTimeSeries( TimeSeries timeSeries, DbGridMetadata identifier) { try { @@ -296,7 +327,12 @@ private void executeQueryToPersist(String query) { } } - /** Persists a whole {@link JointGridContainer}. */ + /** + * Persists a whole {@link JointGridContainer}. + * + * @param jointGridContainer the joint grid container + * @param gridUUID the grid uuid + */ public void persistJointGrid(JointGridContainer jointGridContainer, UUID gridUUID) { DbGridMetadata identifier = new DbGridMetadata(jointGridContainer.getGridName(), gridUUID); List toAdd = new LinkedList<>(jointGridContainer.allEntitiesAsList()); diff --git a/src/main/java/edu/ie3/datamodel/io/source/AssetEntitySource.java b/src/main/java/edu/ie3/datamodel/io/source/AssetEntitySource.java index 1757fdacd..eac79522a 100644 --- a/src/main/java/edu/ie3/datamodel/io/source/AssetEntitySource.java +++ b/src/main/java/edu/ie3/datamodel/io/source/AssetEntitySource.java @@ -24,18 +24,29 @@ /** Class that provides all functionalities to build asset entities */ public abstract class AssetEntitySource extends EntitySource { + /** Logger for logging information and errors. */ protected static final Logger log = LoggerFactory.getLogger(AssetEntitySource.class); + /** Data source for retrieving asset entity data. */ protected final DataSource dataSource; - // field names + /** Name of the operator field. */ protected static final String OPERATOR = "operator"; + + /** Node field. */ protected static final String NODE = "node"; + + /** Name of the node A field. */ protected static final String NODE_A = "nodeA"; + + /** Name of the node B field. */ protected static final String NODE_B = "nodeB"; + + /** Type field. */ protected static final String TYPE = "type"; // enriching functions + /** Function to enrich asset input entity data with operator information. */ protected static final EnrichFunction assetEnricher = (data, operators) -> @@ -43,6 +54,7 @@ public abstract class AssetEntitySource extends EntitySource { OPERATOR, operators, NO_OPERATOR_ASSIGNED, AssetInputEntityData::new) .apply(data); + /** Function to enrich node asset input entity data with operator and node information. */ protected static final BiEnrichFunction< EntityData, OperatorInput, NodeInput, NodeAssetInputEntityData> nodeAssetEnricher = @@ -51,6 +63,7 @@ public abstract class AssetEntitySource extends EntitySource { .andThen(enrich(NODE, nodes, NodeAssetInputEntityData::new)) .apply(data, operators); + /** Function to enrich connector input entity data with operator and node information. */ protected static final BiEnrichFunction< EntityData, OperatorInput, NodeInput, ConnectorInputEntityData> connectorEnricher = @@ -59,6 +72,11 @@ public abstract class AssetEntitySource extends EntitySource { .andThen(biEnrich(NODE_A, nodes, NODE_B, nodes, ConnectorInputEntityData::new)) .apply(data, operators); + /** + * Constructor for AssetEntitySource. + * + * @param dataSource The data source used to retrieve asset entity data. + */ protected AssetEntitySource(DataSource dataSource) { this.dataSource = dataSource; } @@ -68,6 +86,8 @@ protected AssetEntitySource(DataSource dataSource) { /** * Method to build typed connector entities. * + * @param type of connector input + * @param type of asset types * @param entityClass class of the entity * @param dataSource source for the data * @param factory to build the entity @@ -75,8 +95,6 @@ protected AssetEntitySource(DataSource dataSource) { * @param nodes map: uuid to {@link NodeInput} * @param types map: uuid to {@link AssetTypeInput} * @return a stream of {@link ConnectorInput}s - * @param type of connector input - * @param type of asset types * @throws SourceException if an error happens during reading */ protected static diff --git a/src/main/java/edu/ie3/datamodel/io/source/DataSource.java b/src/main/java/edu/ie3/datamodel/io/source/DataSource.java index fe4fa1f51..a95ce7c72 100644 --- a/src/main/java/edu/ie3/datamodel/io/source/DataSource.java +++ b/src/main/java/edu/ie3/datamodel/io/source/DataSource.java @@ -20,10 +20,17 @@ public interface DataSource { * * @param entityClass class of the source * @return an option for the found fields + * @throws SourceException the source exception */ Optional> getSourceFields(Class entityClass) throws SourceException; - /** Creates a stream of maps that represent the rows in the database */ + /** + * Creates a stream of maps that represent the rows in the database + * + * @param entityClass the entity class + * @return the source data + * @throws SourceException the source exception + */ Stream> getSourceData(Class entityClass) throws SourceException; } diff --git a/src/main/java/edu/ie3/datamodel/io/source/EnergyManagementSource.java b/src/main/java/edu/ie3/datamodel/io/source/EnergyManagementSource.java index 5cea8a531..a8ba049ed 100644 --- a/src/main/java/edu/ie3/datamodel/io/source/EnergyManagementSource.java +++ b/src/main/java/edu/ie3/datamodel/io/source/EnergyManagementSource.java @@ -21,12 +21,19 @@ import java.util.stream.Collectors; import java.util.stream.Stream; +/** The type Energy management source. */ public class EnergyManagementSource extends AssetEntitySource { private final TypeSource typeSource; private static final EmInputFactory emInputFactory = new EmInputFactory(); + /** + * Instantiates a new Energy management source. + * + * @param typeSource the type source + * @param dataSource the data source + */ public EnergyManagementSource(TypeSource typeSource, DataSource dataSource) { super(dataSource); this.typeSource = typeSource; @@ -41,10 +48,11 @@ public void validate() throws ValidationException { * Returns a unique set of {@link EmInput} 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 EmInput} which has to be checked manually, as - * {@link EmInput#equals(Object)} is NOT restricted on the UUID of {@link EmInput}. + * java.util.UUID}* uniqueness of the provided {@link EmInput} which has to be checked manually, + * as {@link EmInput#equals(Object)} is NOT restricted on the UUID of {@link EmInput}. * * @return a map of UUID to {@link EmInput} entities + * @throws SourceException the source exception */ public Map getEmUnits() throws SourceException { Map operators = typeSource.getOperators(); @@ -53,8 +61,8 @@ public Map getEmUnits() throws SourceException { /** * 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 EmInput} which has to be checked manually, as - * {@link EmInput#equals(Object)} is NOT restricted on the UUID of {@link EmInput}. + * java.util.UUID}* uniqueness of the provided {@link EmInput} which has to be checked manually, + * as {@link EmInput#equals(Object)} is NOT restricted on the UUID of {@link EmInput}. * *

In contrast to {@link #getEmUnits()} this method provides the ability to pass in an already * existing set of {@link OperatorInput} entities, the {@link EmInput} instances depend on. Doing @@ -66,6 +74,7 @@ public Map getEmUnits() throws SourceException { * * @param operators a map of UUID to object- and uuid-unique {@link OperatorInput} entities * @return a map of UUID to {@link EmInput} entities + * @throws SourceException the source exception */ public Map getEmUnits(Map operators) throws SourceException { return createEmInputs( diff --git a/src/main/java/edu/ie3/datamodel/io/source/EntitySource.java b/src/main/java/edu/ie3/datamodel/io/source/EntitySource.java index 149ec52ac..1ed3ed36c 100644 --- a/src/main/java/edu/ie3/datamodel/io/source/EntitySource.java +++ b/src/main/java/edu/ie3/datamodel/io/source/EntitySource.java @@ -42,6 +42,7 @@ * sources. */ public abstract class EntitySource { + /** The constant log. */ protected static final Logger log = LoggerFactory.getLogger(EntitySource.class); // file system for build-in entities @@ -49,14 +50,27 @@ public abstract class EntitySource { // convenience collectors + /** + * To map collector. + * + * @param the type parameter + * @return the collector + */ protected static Collector> toMap() { return Collectors.toMap(UniqueEntity::getUuid, Function.identity()); } + /** + * To set collector. + * + * @param the type parameter + * @return the collector + */ protected static Collector> toSet() { return Collectors.toSet(); } + /** Instantiates a new Entity source. */ protected EntitySource() {} /** @@ -69,10 +83,11 @@ protected EntitySource() {} /** * Method for validating a single source. * + * @param type of the class * @param entityClass class to be validated * @param dataSource source for the fields * @param validator used to validate - * @param type of the class + * @return Try object encapsulating success or failure of validation */ protected static Try validate( Class entityClass, DataSource dataSource, SourceValidator validator) { @@ -82,10 +97,11 @@ protected static Try validate( /** * Method for validating a single source. * + * @param type of the class * @param entityClass class to be validated * @param sourceFields supplier for source fields * @param validator used to validate - * @param type of the class + * @return Try object encapsulating success or failure of validation */ protected static Try validate( Class entityClass, @@ -108,10 +124,12 @@ protected static Try validate( } /** - * Method to get a source for the build in entities. + * Method to get a source for the built-in entities. * + * @param clazz class from which resources will be loaded * @param subdirectory from the resource folder * @return a new {@link CsvDataSource} + * @throws SourceException if there is an issue finding or loading resources */ protected static CsvDataSource getBuildInSource(Class clazz, String subdirectory) throws SourceException { @@ -151,11 +169,11 @@ protected static CsvDataSource getBuildInSource(Class clazz, String subdirect /** * Universal method to get a map: uuid to {@link UniqueEntity}. * + * @param type of entity * @param entityClass subclass of {@link UniqueEntity} * @param dataSource source for the data * @param factory to build the entity * @return a map: uuid to {@link UniqueEntity} - * @param type of entity * @throws SourceException - if an error happen during reading */ @SuppressWarnings("unchecked") @@ -174,13 +192,13 @@ protected static Map getEntities( /** * Universal method to get a {@link Entity} stream. * + * @param type of entity + * @param type of entity data * @param entityClass class of the entity * @param dataSource source for the entity * @param factory to build the entity * @param enrichFunction function to enrich the given entity data * @return a set of {@link Entity}s - * @param type of entity - * @param type of entity data * @throws SourceException - if an error happen during reading */ protected static Stream getEntities( @@ -199,9 +217,10 @@ protected static Stream getEntities( * Returns a stream of {@link EntityData} that can be used to build instances of several subtypes * of {@link Entity} by a corresponding {@link EntityFactory} that consumes this data. * - * @param entityClass the entity class that should be build + * @param entityClass the entity class that should be built * @param dataSource source for the data - * @return a stream of the entity data wrapped in a {@link Try} + * @return a stream of entities wrapped in {@link Try} + * @throws SourceException if there is an issue reading data */ protected static Stream> buildEntityData( Class entityClass, DataSource dataSource) throws SourceException { @@ -216,11 +235,12 @@ protected static Stream> buildEntityData( * Returns a stream of {@link EntityData} that can be used to build instances of several subtypes * of {@link Entity} by a corresponding {@link EntityFactory} that consumes this data. * + * @param type of entity data that extends {@link EntityData} * @param entityClass class of the entity * @param dataSource source for the data - * @param converter to convert {@link EntityData} to {@link E} - * @return an entity data - * @param type of entity data + * @param converter function to convert {@link EntityData} to {@link E} + * @return an entity data wrapped in {@link Try} + * @throws SourceException if there is an issue reading data */ protected static Stream> buildEntityData( Class entityClass, @@ -235,14 +255,14 @@ protected static Stream> buildEnt /** * Method to build an enrich function. * + * @param type of entity data + * @param type of entity + * @param type of returned entity data * @param fieldName name of the field * @param entities map: uuid to {@link Entity} * @param defaultEntity entity that should be used if no other entity was extracted * @param buildingFcn to build the returned {@link EntityData} * @return an enrich function - * @param type of entity data - * @param type of entity - * @param type of returned entity data */ protected static WrappedFunction enrichWithDefault( @@ -261,13 +281,13 @@ WrappedFunction enrichWithDefault( /** * Method to build an enrich function. * + * @param type of entity data + * @param type of entity + * @param type of returned entity data * @param fieldName name of the field * @param entities map: uuid to {@link Entity} * @param buildingFcn to build the returned {@link EntityData} * @return an enrich function - * @param type of entity data - * @param type of entity - * @param type of returned entity data */ protected static WrappedFunction enrich( String fieldName, Map entities, BiFunction buildingFcn) { @@ -280,16 +300,16 @@ protected static WrappedFunction /** * Method to build an enrich function. * + * @param type of entity data + * @param type of the first entity + * @param type of the second entity + * @param type of returned entity data * @param fieldName1 name of the first field * @param entities1 map: uuid to {@link Entity} * @param fieldName2 name of the second field * @param entities2 map: uuid to {@link Entity} * @param buildingFcn to build the returned {@link EntityData} * @return an enrich function - * @param type of entity data - * @param type of the first entity - * @param type of the second entity - * @param type of returned entity data */ protected static < E extends EntityData, T1 extends Entity, T2 extends Entity, R extends EntityData> @@ -318,12 +338,12 @@ WrappedFunction biEnrich( /** * Method to build a function to create an {@link EntityData}. * - * @param fieldNames list with field names - * @param buildingFcn to build the returned {@link EntityData} - * @return an entity data * @param type of given entity data * @param type of entities * @param type of returned entity data + * @param fieldNames list with field names + * @param buildingFcn to build the returned {@link EntityData} + * @return an entity data */ protected static Function, R> enrichFunction( @@ -346,11 +366,11 @@ Function, R> enrichFunction( /** * Method to unpack a stream of tries. * + * @param type of entity + * @param type of exception * @param inputStream given stream * @param clazz class of the entity * @return a stream of entities - * @param type of entity - * @param type of exception * @throws SourceException - if an error occurred during reading */ protected static Stream unpack( @@ -361,12 +381,12 @@ protected static Stream unpack( /** * Method to extract an entity. * + * @param type of entity data + * @param type of entity * @param entityData data containing complex entities * @param fieldName name of the field * @param entities map: uuid to {@link Entity} * @return an enrichment - * @param type of entity data - * @param type of entity */ protected static Try extractFunction( Try entityData, String fieldName, Map entities) { @@ -386,10 +406,10 @@ protected static Try extractFuncti /** * Method to extract an {@link Entity} from a given map. * + * @param type of entity * @param uuid of the entity * @param entityMap map: uuid to entity * @return a try of the {@link Entity} - * @param type of entity */ protected static Try extractFunction(UUID uuid, Map entityMap) { return Optional.ofNullable(entityMap.get(uuid)) diff --git a/src/main/java/edu/ie3/datamodel/io/source/GraphicSource.java b/src/main/java/edu/ie3/datamodel/io/source/GraphicSource.java index 904e0a42d..002c2959b 100644 --- a/src/main/java/edu/ie3/datamodel/io/source/GraphicSource.java +++ b/src/main/java/edu/ie3/datamodel/io/source/GraphicSource.java @@ -44,6 +44,13 @@ public class GraphicSource extends AssetEntitySource { private final LineGraphicInputFactory lineGraphicInputFactory; private final NodeGraphicInputFactory nodeGraphicInputFactory; + /** + * Instantiates a new Graphic source. + * + * @param typeSource the type source + * @param rawGridSource the raw grid source + * @param dataSource the data source + */ public GraphicSource(TypeSource typeSource, RawGridSource rawGridSource, DataSource dataSource) { super(dataSource); this.typeSource = typeSource; @@ -64,7 +71,12 @@ public void validate() throws ValidationException { .getOrThrow(); } - /** Returns the graphic elements of the grid or throws a {@link SourceException} */ + /** + * Returns the graphic elements of the grid or throws a {@link SourceException} + * + * @return the graphic elements + * @throws SourceException the source exception + */ public GraphicElements getGraphicElements() throws SourceException { // read all needed entities @@ -87,6 +99,8 @@ public GraphicElements getGraphicElements() throws SourceException { * * @param nodes a map of UUID to object- and uuid-unique {@link NodeInput} entities * @param lines a map of UUID to object- and uuid-unique {@link LineInput} entities + * @return the graphic elements + * @throws SourceException the source exception */ public GraphicElements getGraphicElements(Map nodes, Map lines) throws SourceException { @@ -113,13 +127,23 @@ public GraphicElements getGraphicElements(Map nodes, Map getNodeGraphicInput() throws SourceException { return getNodeGraphicInput(rawGridSource.getNodes(typeSource.getOperators())); } + /** + * Gets node graphic input. + * + * @param nodes the nodes + * @return the node graphic input + * @throws SourceException the source exception + */ public Set getNodeGraphicInput(Map nodes) throws SourceException { return getEntities( @@ -132,8 +156,11 @@ public Set getNodeGraphicInput(Map nodes) /** * If the set of {@link LineInput} entities is not exhaustive for all available {@link - * LineGraphicInput} entities or if an error during the building process occurs a {@link - * SourceException} is thrown, else all entities that have been able to be built are returned. + * LineGraphicInput}* entities or if an error during the building process occurs a {@link + * SourceException}* is thrown, else all entities that have been able to be built are returned. + * + * @return the line graphic input + * @throws SourceException the source exception */ public Set getLineGraphicInput() throws SourceException { Map operators = typeSource.getOperators(); @@ -142,6 +169,13 @@ public Set getLineGraphicInput() throws SourceException { operators, rawGridSource.getNodes(operators), typeSource.getLineTypes())); } + /** + * Gets line graphic input. + * + * @param lines the lines + * @return the line graphic input + * @throws SourceException the source exception + */ public Set getLineGraphicInput(Map lines) throws SourceException { return getEntities( diff --git a/src/main/java/edu/ie3/datamodel/io/source/IdCoordinateSource.java b/src/main/java/edu/ie3/datamodel/io/source/IdCoordinateSource.java index 33fb8b9f5..ee8e0f432 100644 --- a/src/main/java/edu/ie3/datamodel/io/source/IdCoordinateSource.java +++ b/src/main/java/edu/ie3/datamodel/io/source/IdCoordinateSource.java @@ -19,11 +19,14 @@ * combined primary or foreign keys. */ public abstract class IdCoordinateSource extends EntitySource { + /** Default constructor for IdCoordinateSource. */ + public IdCoordinateSource() {} /** * Method to retrieve the fields found in the source. * * @return an option for the found fields + * @throws SourceException the source exception */ public abstract Optional> getSourceFields() throws SourceException; diff --git a/src/main/java/edu/ie3/datamodel/io/source/LoadProfileSource.java b/src/main/java/edu/ie3/datamodel/io/source/LoadProfileSource.java index fa49931ad..a3abc4f91 100644 --- a/src/main/java/edu/ie3/datamodel/io/source/LoadProfileSource.java +++ b/src/main/java/edu/ie3/datamodel/io/source/LoadProfileSource.java @@ -37,11 +37,26 @@ import javax.measure.quantity.Power; import tech.units.indriya.ComparableQuantity; +/** + * The type Load profile source. + * + * @param

the type parameter + * @param the type parameter + */ public abstract class LoadProfileSource

> extends EntitySource { + /** The Entry class. */ protected final Class entryClass; + + /** The Entry factory. */ protected final LoadProfileFactory entryFactory; + /** + * Instantiates a new Load profile source. + * + * @param entryClass the entry class + * @param entryFactory the entry factory + */ protected LoadProfileSource(Class entryClass, LoadProfileFactory entryFactory) { this.entryClass = entryClass; this.entryFactory = entryFactory; @@ -60,6 +75,11 @@ protected Try, FactoryException> createEntries( return entryFactory.get(factoryData); } + /** + * Gets time series. + * + * @return the time series + */ public abstract LoadProfileTimeSeries getTimeSeries(); /** @@ -79,13 +99,25 @@ protected Try, FactoryException> createEntries( */ public abstract Optional getValue(ZonedDateTime time) throws SourceException; - /** Returns the load profile of this source. */ + /** + * Returns the load profile of this source. + * + * @return the load profile + */ public abstract P getLoadProfile(); - /** Returns the maximal power value of the time series */ + /** + * Returns the maximal power value of the time series + * + * @return the max power + */ public abstract Optional> getMaxPower(); - /** Returns the load profile energy scaling for this load profile time series. */ + /** + * Returns the load profile energy scaling for this load profile time series. + * + * @return the load profile energy scaling + */ public abstract Optional> getLoadProfileEnergyScaling(); /** @@ -109,6 +141,7 @@ public static long getResolution(LoadProfile loadProfile) { * Method to read in the build-in {@link BdewStandardLoadProfile}s. * * @return a map: load profile to load profile source + * @throws SourceException the source exception */ public static Map< BdewStandardLoadProfile, CsvLoadProfileSource> @@ -132,6 +165,7 @@ public static long getResolution(LoadProfile loadProfile) { * Method to read in the build-in {@link RandomLoadProfileTimeSeries}. * * @return the random load profile source + * @throws SourceException the source exception */ public static CsvLoadProfileSource getRandomLoadProfile() throws SourceException { diff --git a/src/main/java/edu/ie3/datamodel/io/source/RawGridSource.java b/src/main/java/edu/ie3/datamodel/io/source/RawGridSource.java index 0fde7ede6..915b1e185 100644 --- a/src/main/java/edu/ie3/datamodel/io/source/RawGridSource.java +++ b/src/main/java/edu/ie3/datamodel/io/source/RawGridSource.java @@ -47,6 +47,12 @@ public class RawGridSource extends AssetEntitySource { private final SwitchInputFactory switchInputFactory; private final MeasurementUnitInputFactory measurementUnitInputFactory; + /** + * Instantiates a new Raw grid source. + * + * @param typeSource the type source + * @param dataSource the data source + */ public RawGridSource(TypeSource typeSource, DataSource dataSource) { super(dataSource); this.typeSource = typeSource; @@ -77,9 +83,9 @@ public void validate() throws ValidationException { /** * Should return either a consistent instance of {@link RawGridElements} or throw a {@link - * SourceException}. The decision to throw a {@link SourceException} instead of returning the + * SourceException}*. The decision to throw a {@link SourceException} instead of returning the * incomplete {@link RawGridElements} instance is motivated by the fact, that a {@link - * RawGridElements} is a container instance that depends on several other entities. Without being + * RawGridElements}* is a container instance that depends on several other entities. Without being * complete, it is useless for further processing. * *

Hence, whenever at least one entity {@link RawGridElements} depends on cannot be provided, @@ -108,9 +114,9 @@ public RawGridElements getGridData() throws SourceException { /** * Should return either a consistent instance of {@link RawGridElements} or throw a {@link - * SourceException}. The decision to throw a {@link SourceException} instead of returning the + * SourceException}*. The decision to throw a {@link SourceException} instead of returning the * incomplete {@link RawGridElements} instance is motivated by the fact, that a {@link - * RawGridElements} is a container instance that depends on several other entities. Without being + * RawGridElements}* is a container instance that depends on several other entities. Without being * complete, it is useless for further processing. * *

Hence, whenever at least one entity {@link RawGridElements} depends on cannot be provided, @@ -180,10 +186,11 @@ public RawGridElements getGridData( * Returns a unique set of {@link NodeInput} instances within a map by UUID. * *

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 NodeInput} which has to be checked manually, + * java.util.UUID}* uniqueness of the provided {@link NodeInput} which has to be checked manually, * as {@link NodeInput#equals(Object)} is NOT restricted on the uuid of {@link NodeInput}. * * @return a map of UUID to object- and uuid-unique {@link NodeInput} entities + * @throws SourceException the source exception */ public Map getNodes() throws SourceException { return getNodes(typeSource.getOperators()); @@ -193,7 +200,7 @@ public Map getNodes() throws SourceException { * Returns a unique set of {@link NodeInput} instances within a map by UUID. * *

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 NodeInput} which has to be checked manually, + * java.util.UUID}* uniqueness of the provided {@link NodeInput} which has to be checked manually, * as {@link NodeInput#equals(Object)} is NOT restricted on the uuid of {@link NodeInput}. * *

In contrast to {@link #getNodes} this method provides the ability to pass in an already @@ -206,6 +213,7 @@ public Map getNodes() throws SourceException { * * @param operators a map of UUID to object- and uuid-unique {@link OperatorInput} entities * @return a map of UUID to object- and uuid-unique {@link NodeInput} entities + * @throws SourceException the source exception */ public Map getNodes(Map operators) throws SourceException { return getEntities( @@ -220,10 +228,11 @@ public Map getNodes(Map operators) throws * Returns a unique set of {@link LineInput} instances within a map by UUID. * *

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 LineInput} which has to be checked manually, + * java.util.UUID}* uniqueness of the provided {@link LineInput} which has to be checked manually, * as {@link LineInput#equals(Object)} is NOT restricted on the uuid of {@link LineInput}. * * @return a map of UUID to object- and uuid-unique {@link LineInput} entities + * @throws SourceException the source exception */ public Map getLines() throws SourceException { Map operators = typeSource.getOperators(); @@ -234,7 +243,7 @@ public Map getLines() throws SourceException { * Returns a unique set of {@link LineInput} instances within a map by UUID. * *

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 LineInput} which has to be checked manually, + * java.util.UUID}* uniqueness of the provided {@link LineInput} which has to be checked manually, * as {@link LineInput#equals(Object)} is NOT restricted on the uuid of {@link LineInput}. * *

In contrast to {@link #getNodes} this method provides the ability to pass in an already @@ -249,6 +258,7 @@ public Map getLines() throws SourceException { * @param nodes a map of UUID to object- and uuid-unique {@link NodeInput} entities * @param lineTypeInputs a map of UUID to object- and uuid-unique {@link LineTypeInput} entities * @return a map of UUID to object- and uuid-unique {@link LineInput} entities + * @throws SourceException the source exception */ public Map getLines( Map operators, @@ -264,11 +274,12 @@ public Map getLines( * Returns a unique set of {@link Transformer2WInput} 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 Transformer2WInput} which has to be checked + * java.util.UUID}* uniqueness of the provided {@link Transformer2WInput} which has to be checked * manually, as {@link Transformer2WInput#equals(Object)} is NOT restricted on the uuid of {@link - * Transformer2WInput}. + * Transformer2WInput}*. * * @return a set of object- and uuid-unique {@link Transformer2WInput} entities + * @throws SourceException the source exception */ public Set get2WTransformers() throws SourceException { Map operators = typeSource.getOperators(); @@ -279,7 +290,8 @@ public Set get2WTransformers() throws SourceException { * Returns a set of {@link Transformer2WInput} 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 Transformer2WInput} which has to be checked manually, as {@link - * Transformer2WInput#equals(Object)} is NOT restricted on the uuid of {@link Transformer2WInput}. + * Transformer2WInput#equals(Object)}* is NOT restricted on the uuid of {@link + * Transformer2WInput}. * *

In contrast to {@link #getNodes()} this method provides the ability to pass in an already * existing set of {@link NodeInput}, {@link Transformer2WTypeInput} and {@link OperatorInput} @@ -295,6 +307,7 @@ public Set get2WTransformers() throws SourceException { * @param transformer2WTypes a map of UUID to object- and uuid-unique {@link * Transformer2WTypeInput} entities * @return a set of object- and uuid-unique {@link Transformer2WInput} entities + * @throws SourceException the source exception */ public Set get2WTransformers( Map operators, @@ -315,11 +328,12 @@ public Set get2WTransformers( * Returns a unique set of {@link Transformer3WInput} 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 Transformer3WInput} which has to be checked + * java.util.UUID}* uniqueness of the provided {@link Transformer3WInput} which has to be checked * manually, as {@link Transformer3WInput#equals(Object)} is NOT restricted on the uuid of {@link - * Transformer3WInput}. + * Transformer3WInput}*. * * @return a set of object- and uuid-unique {@link Transformer3WInput} entities + * @throws SourceException the source exception */ public Set get3WTransformers() throws SourceException { Map operators = typeSource.getOperators(); @@ -330,7 +344,8 @@ public Set get3WTransformers() throws SourceException { * Returns a set of {@link Transformer3WInput} 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 Transformer3WInput} which has to be checked manually, as {@link - * Transformer3WInput#equals(Object)} is NOT restricted on the uuid of {@link Transformer3WInput}. + * Transformer3WInput#equals(Object)}* is NOT restricted on the uuid of {@link + * Transformer3WInput}. * *

In contrast to {@link #getNodes()} this method provides the ability to pass in an already * existing set of {@link NodeInput}, {@link Transformer3WTypeInput} and {@link OperatorInput} @@ -346,6 +361,7 @@ public Set get3WTransformers() throws SourceException { * @param transformer3WTypes a map of UUID to object- and uuid-unique {@link * Transformer3WTypeInput} entities * @return a set of object- and uuid-unique {@link Transformer3WInput} entities + * @throws SourceException the source exception */ public Set get3WTransformers( Map operators, @@ -372,11 +388,12 @@ public Set get3WTransformers( * Returns a unique set of {@link SwitchInput} 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 SwitchInput} which has to be checked + * java.util.UUID}* uniqueness of the provided {@link SwitchInput} which has to be checked * manually, as {@link SwitchInput#equals(Object)} is NOT restricted on the uuid of {@link - * SwitchInput}. + * SwitchInput}*. * * @return a set of object- and uuid-unique {@link SwitchInput} entities + * @throws SourceException the source exception */ public Set getSwitches() throws SourceException { Map operators = typeSource.getOperators(); @@ -400,6 +417,7 @@ public Set getSwitches() throws SourceException { * @param operators a map of UUID to object- and uuid-unique {@link OperatorInput} entities * @param nodes a map of UUID to object- and uuid-unique {@link NodeInput} entities * @return a set of object- and uuid-unique {@link SwitchInput} entities + * @throws SourceException the source exception */ public Set getSwitches( Map operators, Map nodes) throws SourceException { @@ -415,11 +433,12 @@ public Set getSwitches( * Returns a unique set of {@link MeasurementUnitInput} 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 MeasurementUnitInput} which has to be checked - * manually, as {@link MeasurementUnitInput#equals(Object)} is NOT restricted on the uuid of - * {@link MeasurementUnitInput}. + * java.util.UUID}* uniqueness of the provided {@link MeasurementUnitInput} which has to be + * checked manually, as {@link MeasurementUnitInput#equals(Object)} is NOT restricted on the uuid + * of {@link MeasurementUnitInput}. * * @return a set of object- and uuid-unique {@link MeasurementUnitInput} entities + * @throws SourceException the source exception */ public Set getMeasurementUnits() throws SourceException { Map operators = typeSource.getOperators(); @@ -430,12 +449,12 @@ public Set getMeasurementUnits() throws SourceException { * Returns a set of {@link MeasurementUnitInput} 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 MeasurementUnitInput} which has to be checked manually, as {@link - * MeasurementUnitInput#equals(Object)} is NOT restricted on the uuid of {@link - * MeasurementUnitInput}. + * MeasurementUnitInput#equals(Object)}* is NOT restricted on the uuid of {@link + * MeasurementUnitInput}*. * *

In contrast to {@link #getNodes()} this method provides the ability to pass in an already * existing set of {@link NodeInput} and {@link OperatorInput} entities, the {@link - * MeasurementUnitInput} instances depend on. Doing so, already loaded nodes, line types and + * MeasurementUnitInput}* instances depend on. Doing so, already loaded nodes, line types and * operators can be recycled to improve performance and prevent unnecessary loading operations. * *

If something fails during the creation process a {@link SourceException} is thrown, else a @@ -444,6 +463,7 @@ public Set getMeasurementUnits() throws SourceException { * @param operators a map of UUID to object- and uuid-unique {@link OperatorInput} entities * @param nodes a map of UUID to object- and uuid-unique {@link NodeInput} entities * @return a set of object- and uuid-unique {@link MeasurementUnitInput} entities + * @throws SourceException the source exception */ public Set getMeasurementUnits( Map operators, Map nodes) throws SourceException { 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 1e555cc56..894629956 100644 --- a/src/main/java/edu/ie3/datamodel/io/source/ResultEntitySource.java +++ b/src/main/java/edu/ie3/datamodel/io/source/ResultEntitySource.java @@ -47,6 +47,11 @@ public class ResultEntitySource extends EntitySource { private final DataSource dataSource; + /** + * Instantiates a new Result entity source. + * + * @param dataSource the data source + */ public ResultEntitySource(DataSource dataSource) { this.dataSource = dataSource; @@ -60,6 +65,12 @@ public ResultEntitySource(DataSource dataSource) { this.flexOptionsResultFactory = new FlexOptionsResultFactory(); } + /** + * Instantiates a new Result entity source. + * + * @param dataSource the data source + * @param dateTimeFormatter the date time formatter + */ public ResultEntitySource(DataSource dataSource, DateTimeFormatter dateTimeFormatter) { this.dataSource = dataSource; @@ -112,10 +123,12 @@ public void validate() throws ValidationException { * 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 by the uuid of {@link NodeResult}. + * java.util.UUID}* uniqueness of the provided {@link NodeResult} which has to be checked + * manually, as {@link NodeResult#equals(Object)} is NOT restricted by the uuid of {@link + * NodeResult}. * * @return a set of object and uuid unique {@link NodeResult} entities + * @throws SourceException the source exception */ public Set getNodeResults() throws SourceException { return getResultEntities(NodeResult.class, nodeResultFactory); @@ -125,11 +138,12 @@ public Set getNodeResults() throws SourceException { * 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 + * java.util.UUID}* uniqueness of the provided {@link SwitchResult} which has to be checked * manually, as {@link SwitchResult#equals(Object)} is NOT restricted by the uuid of {@link - * SwitchResult}. + * SwitchResult}*. * * @return a set of object and uuid unique {@link SwitchResult} entities + * @throws SourceException the source exception */ public Set getSwitchResults() throws SourceException { return getResultEntities(SwitchResult.class, switchResultFactory); @@ -139,10 +153,12 @@ public Set getSwitchResults() throws SourceException { * 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 by the uuid of {@link LineResult}. + * java.util.UUID}* uniqueness of the provided {@link LineResult} which has to be checked + * manually, as {@link LineResult#equals(Object)} is NOT restricted by the uuid of {@link + * LineResult}. * * @return a set of object and uuid unique {@link LineResult} entities + * @throws SourceException the source exception */ public Set getLineResults() throws SourceException { return getResultEntities(LineResult.class, connectorResultFactory); @@ -152,11 +168,12 @@ public Set getLineResults() throws SourceException { * 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 + * java.util.UUID}* uniqueness of the provided {@link Transformer2WResult} which has to be checked * manually, as {@link Transformer2WResult#equals(Object)} is NOT restricted by the uuid of {@link - * Transformer2WResult}. + * Transformer2WResult}*. * * @return a set of object and uuid unique {@link Transformer2WResult} entities + * @throws SourceException the source exception */ public Set getTransformer2WResultResults() throws SourceException { return getResultEntities(Transformer2WResult.class, connectorResultFactory); @@ -166,11 +183,12 @@ public Set getTransformer2WResultResults() throws SourceExc * 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 + * java.util.UUID}* uniqueness of the provided {@link Transformer3WResult} which has to be checked * manually, as {@link Transformer3WResult#equals(Object)} is NOT restricted by the uuid of {@link - * Transformer3WResult}. + * Transformer3WResult}*. * * @return a set of object and uuid unique {@link Transformer3WResult} entities + * @throws SourceException the source exception */ public Set getTransformer3WResultResults() throws SourceException { return getResultEntities(Transformer3WResult.class, connectorResultFactory); @@ -180,11 +198,12 @@ public Set getTransformer3WResultResults() throws SourceExc * Returns a unique set of {@link FlexOptionsResult} 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 FlexOptionsResult} which has to be checked + * java.util.UUID}* uniqueness of the provided {@link FlexOptionsResult} which has to be checked * manually, as {@link FlexOptionsResult#equals(Object)} is NOT restricted by the uuid of {@link - * FlexOptionsResult}. + * FlexOptionsResult}*. * * @return a set of object and uuid unique {@link FlexOptionsResult} entities + * @throws SourceException the source exception */ public Set getFlexOptionsResults() throws SourceException { return getResultEntities(FlexOptionsResult.class, flexOptionsResultFactory); @@ -194,10 +213,12 @@ public Set getFlexOptionsResults() throws SourceException { * 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 by the uuid of {@link LoadResult}. + * java.util.UUID}* uniqueness of the provided {@link LoadResult} which has to be checked + * manually, as {@link LoadResult#equals(Object)} is NOT restricted by the uuid of {@link + * LoadResult}. * * @return a set of object and uuid unique {@link LoadResult} entities + * @throws SourceException the source exception */ public Set getLoadResults() throws SourceException { return getResultEntities(LoadResult.class, systemParticipantResultFactory); @@ -207,10 +228,11 @@ public Set getLoadResults() throws SourceException { * 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, + * java.util.UUID}* uniqueness of the provided {@link PvResult} which has to be checked manually, * as {@link PvResult#equals(Object)} is NOT restricted by the uuid of {@link PvResult}. * * @return a set of object and uuid unique {@link PvResult} entities + * @throws SourceException the source exception */ public Set getPvResults() throws SourceException { return getResultEntities(PvResult.class, systemParticipantResultFactory); @@ -220,11 +242,12 @@ public Set getPvResults() throws SourceException { * 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 + * java.util.UUID}* uniqueness of the provided {@link FixedFeedInResult} which has to be checked * manually, as {@link FixedFeedInResult#equals(Object)} is NOT restricted by the uuid of {@link - * FixedFeedInResult}. + * FixedFeedInResult}*. * * @return a set of object and uuid unique {@link FixedFeedInResult} entities + * @throws SourceException the source exception */ public Set getFixedFeedInResults() throws SourceException { return getResultEntities(FixedFeedInResult.class, systemParticipantResultFactory); @@ -234,10 +257,11 @@ public Set getFixedFeedInResults() throws SourceException { * 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, + * java.util.UUID}* uniqueness of the provided {@link BmResult} which has to be checked manually, * as {@link BmResult#equals(Object)} is NOT restricted by the uuid of {@link BmResult}. * * @return a set of object and uuid unique {@link BmResult} entities + * @throws SourceException the source exception */ public Set getBmResults() throws SourceException { return getResultEntities(BmResult.class, systemParticipantResultFactory); @@ -247,10 +271,11 @@ public Set getBmResults() throws SourceException { * 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, + * java.util.UUID}* uniqueness of the provided {@link ChpResult} which has to be checked manually, * as {@link ChpResult#equals(Object)} is NOT restricted by the uuid of {@link ChpResult}. * * @return a set of object and uuid unique {@link ChpResult} entities + * @throws SourceException the source exception */ public Set getChpResults() throws SourceException { return getResultEntities(ChpResult.class, systemParticipantResultFactory); @@ -260,10 +285,11 @@ public Set getChpResults() throws SourceException { * 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, + * java.util.UUID}* uniqueness of the provided {@link WecResult} which has to be checked manually, * as {@link WecResult#equals(Object)} is NOT restricted by the uuid of {@link WecResult}. * * @return a set of object and uuid unique {@link WecResult} entities + * @throws SourceException the source exception */ public Set getWecResults() throws SourceException { return getResultEntities(WecResult.class, systemParticipantResultFactory); @@ -273,11 +299,12 @@ public Set getWecResults() throws SourceException { * 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 + * java.util.UUID}* uniqueness of the provided {@link StorageResult} which has to be checked * manually, as {@link StorageResult#equals(Object)} is NOT restricted by the uuid of {@link - * StorageResult}. + * StorageResult}*. * * @return a set of object and uuid unique {@link StorageResult} entities + * @throws SourceException the source exception */ public Set getStorageResults() throws SourceException { return getResultEntities(StorageResult.class, systemParticipantResultFactory); @@ -287,10 +314,12 @@ public Set getStorageResults() throws SourceException { * 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 by the uuid of {@link EvcsResult}. + * java.util.UUID}* uniqueness of the provided {@link EvcsResult} which has to be checked + * manually, as {@link EvcsResult#equals(Object)} is NOT restricted by the uuid of {@link + * EvcsResult}. * * @return a set of object and uuid unique {@link EvcsResult} entities + * @throws SourceException the source exception */ public Set getEvcsResults() throws SourceException { return getResultEntities(EvcsResult.class, systemParticipantResultFactory); @@ -300,10 +329,11 @@ public Set getEvcsResults() throws SourceException { * 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, + * java.util.UUID}* uniqueness of the provided {@link EvResult} which has to be checked manually, * as {@link EvResult#equals(Object)} is NOT restricted by the uuid of {@link EvResult}. * * @return a set of object and uuid unique {@link EvResult} entities + * @throws SourceException the source exception */ public Set getEvResults() throws SourceException { return getResultEntities(EvResult.class, systemParticipantResultFactory); @@ -313,10 +343,11 @@ public Set getEvResults() throws SourceException { * 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, + * java.util.UUID}* uniqueness of the provided {@link HpResult} which has to be checked manually, * as {@link HpResult#equals(Object)} is NOT restricted by the uuid of {@link HpResult}. * * @return a set of object and uuid unique {@link HpResult} entities + * @throws SourceException the source exception */ public Set getHpResults() throws SourceException { return getResultEntities(HpResult.class, systemParticipantResultFactory); @@ -326,11 +357,12 @@ public Set getHpResults() throws SourceException { * 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 + * java.util.UUID}* uniqueness of the provided {@link CylindricalStorageResult} which has to be * checked manually, as {@link CylindricalStorageResult#equals(Object)} is NOT restricted by the * uuid of {@link CylindricalStorageResult}. * * @return a set of object and uuid unique {@link CylindricalStorageResult} entities + * @throws SourceException the source exception */ public Set getCylindricalStorageResult() throws SourceException { return getResultEntities(CylindricalStorageResult.class, thermalResultFactory); @@ -340,11 +372,12 @@ public Set getCylindricalStorageResult() throws Source * Returns a unique set of {@link DomesticHotWaterStorageResult} 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 DomesticHotWaterStorageResult} which has to + * java.util.UUID}* uniqueness of the provided {@link DomesticHotWaterStorageResult} which has to * be checked manually, as {@link DomesticHotWaterStorageResult#equals(Object)} is NOT restricted * by the uuid of {@link DomesticHotWaterStorageResult}. * * @return a set of object and uuid unique {@link DomesticHotWaterStorageResult} entities + * @throws SourceException the source exception */ public Set getDomesticHotWaterStorageResult() throws SourceException { @@ -355,11 +388,12 @@ public Set getDomesticHotWaterStorageResult() * 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 + * java.util.UUID}* uniqueness of the provided {@link ThermalHouseResult} which has to be checked * manually, as {@link ThermalHouseResult#equals(Object)} is NOT restricted by the uuid of {@link - * ThermalHouseResult}. + * ThermalHouseResult}*. * * @return a set of object and uuid unique {@link ThermalHouseResult} entities + * @throws SourceException the source exception */ public Set getThermalHouseResults() throws SourceException { return getResultEntities(ThermalHouseResult.class, thermalResultFactory); @@ -369,10 +403,11 @@ public Set getThermalHouseResults() throws SourceException { * Returns a unique set of {@link EmResult} 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 EmResult} which has to be checked manually, + * java.util.UUID}* uniqueness of the provided {@link EmResult} which has to be checked manually, * as {@link EmResult#equals(Object)} is NOT restricted by the uuid of {@link EmResult}. * * @return a set of object and uuid unique {@link EmResult} entities + * @throws SourceException the source exception */ public Set getEmResults() throws SourceException { return getResultEntities(EmResult.class, systemParticipantResultFactory); @@ -382,6 +417,7 @@ public Set getEmResults() throws SourceException { * Returns a unique set of {@link CongestionResult} instances. * * @return a set of object and subgrid unique {@link CongestionResult} entities + * @throws SourceException the source exception */ public Set getCongestionResults() throws SourceException { return getResultEntities(CongestionResult.class, congestionResultFactory); diff --git a/src/main/java/edu/ie3/datamodel/io/source/SourceValidator.java b/src/main/java/edu/ie3/datamodel/io/source/SourceValidator.java index e1c43c89f..3ee4c0408 100644 --- a/src/main/java/edu/ie3/datamodel/io/source/SourceValidator.java +++ b/src/main/java/edu/ie3/datamodel/io/source/SourceValidator.java @@ -10,6 +10,11 @@ import edu.ie3.datamodel.utils.Try.Failure; import java.util.Set; +/** + * The interface Source validator. + * + * @param the type parameter + */ public interface SourceValidator { /** diff --git a/src/main/java/edu/ie3/datamodel/io/source/SystemParticipantSource.java b/src/main/java/edu/ie3/datamodel/io/source/SystemParticipantSource.java index fd4c0f2cc..f3f6d8f18 100644 --- a/src/main/java/edu/ie3/datamodel/io/source/SystemParticipantSource.java +++ b/src/main/java/edu/ie3/datamodel/io/source/SystemParticipantSource.java @@ -30,7 +30,7 @@ /** * Implementation that provides the capability to build entities of type {@link - * SystemParticipantInput} as well as {@link SystemParticipants} container. + * SystemParticipantInput}* as well as {@link SystemParticipants} container. */ public class SystemParticipantSource extends AssetEntitySource { @@ -55,6 +55,7 @@ public class SystemParticipantSource extends AssetEntitySource { private final WecInputFactory wecInputFactory; private final EvcsInputFactory evcsInputFactory; + /** The constant participantEnricher. */ // enriching function protected static final TriEnrichFunction< EntityData, OperatorInput, NodeInput, EmInput, SystemParticipantEntityData> @@ -70,6 +71,15 @@ public class SystemParticipantSource extends AssetEntitySource { SystemParticipantEntityData::new)) .apply(data, operators); + /** + * Instantiates a new System participant source. + * + * @param typeSource the type source + * @param thermalSource the thermal source + * @param rawGridSource the raw grid source + * @param energyManagementSource the energy management source + * @param dataSource the data source + */ public SystemParticipantSource( TypeSource typeSource, ThermalSource thermalSource, @@ -117,9 +127,9 @@ public void validate() throws ValidationException { /** * Should return either a consistent instance of {@link SystemParticipants} or throw a {@link - * SourceException}. The decision to throw a {@link SourceException} instead of returning the + * SourceException}*. The decision to throw a {@link SourceException} instead of returning the * incomplete {@link SystemParticipants} instance is motivated by the fact, that a {@link - * SystemParticipants} is a container instance that depends on several other entities. Without + * SystemParticipants}* is a container instance that depends on several other entities. Without * being complete, it is useless for further processing. * *

Hence, whenever at least one entity {@link SystemParticipants} depends on cannot be @@ -144,9 +154,9 @@ public SystemParticipants getSystemParticipants() throws SourceException { /** * Should return either a consistent instance of {@link SystemParticipants} or throw a {@link - * SourceException}. The decision to throw a {@link SourceException} instead of returning the + * SourceException}*. The decision to throw a {@link SourceException} instead of returning the * incomplete {@link SystemParticipants} instance is motivated by the fact, that a {@link - * SystemParticipants} is a container instance that depends on several other entities. Without + * SystemParticipants}* is a container instance that depends on several other entities. Without * being complete, it is useless for further processing. * *

Hence, whenever at least one entity {@link SystemParticipants} depends on cannot be @@ -251,11 +261,12 @@ public SystemParticipants getSystemParticipants( * Returns a unique set of {@link FixedFeedInInput} 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 FixedFeedInInput} which has to be checked + * java.util.UUID}* uniqueness of the provided {@link FixedFeedInInput} which has to be checked * manually, as {@link FixedFeedInInput#equals(Object)} is NOT restricted on the uuid of {@link - * FixedFeedInInput}. + * FixedFeedInInput}*. * * @return a set of object- and uuid-unique {@link FixedFeedInInput} entities + * @throws SourceException the source exception */ public Set getFixedFeedIns() throws SourceException { Map operators = typeSource.getOperators(); @@ -267,11 +278,11 @@ public Set getFixedFeedIns() throws SourceException { * Returns a set of {@link FixedFeedInInput} 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 FixedFeedInInput} which has to be checked manually, as {@link - * FixedFeedInInput#equals(Object)} is NOT restricted on the uuid of {@link FixedFeedInInput}. + * FixedFeedInInput#equals(Object)}* is NOT restricted on the uuid of {@link FixedFeedInInput}. * *

In contrast to {@link #getFixedFeedIns()} this method provides the ability to pass in an * already existing set of {@link NodeInput} and {@link OperatorInput} entities, the {@link - * FixedFeedInInput} instances depend on. Doing so, already loaded nodes can be recycled to + * FixedFeedInInput}* instances depend on. Doing so, already loaded nodes can be recycled to * improve performance and prevent unnecessary loading operations. * *

If something fails during the creation process a {@link SourceException} is thrown, else a @@ -281,6 +292,7 @@ public Set getFixedFeedIns() throws SourceException { * @param nodes a map of UUID to object- and uuid-unique {@link NodeInput} entities * @param emUnits a map of UUID to object- and uuid-unique {@link EmInput} entities * @return a set of object- and uuid-unique {@link FixedFeedInInput} entities + * @throws SourceException the source exception */ public Set getFixedFeedIns( Map operators, Map nodes, Map emUnits) @@ -297,10 +309,11 @@ public Set getFixedFeedIns( * Returns a unique set of {@link PvInput} 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 PvInput} which has to be checked manually, as - * {@link PvInput#equals(Object)} is NOT restricted on the uuid of {@link PvInput}. + * java.util.UUID}* uniqueness of the provided {@link PvInput} which has to be checked manually, + * as {@link PvInput#equals(Object)} is NOT restricted on the uuid of {@link PvInput}. * * @return a set of object- and uuid-unique {@link PvInput} entities + * @throws SourceException the source exception */ public Set getPvPlants() throws SourceException { Map operators = typeSource.getOperators(); @@ -311,7 +324,7 @@ public Set getPvPlants() throws SourceException { /** * Returns a set of {@link PvInput} 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 - * PvInput} which has to be checked manually, as {@link PvInput#equals(Object)} is NOT restricted + * PvInput}* which has to be checked manually, as {@link PvInput#equals(Object)} is NOT restricted * on the uuid of {@link PvInput}. * *

In contrast to {@link #getPvPlants()} this method provides the ability to pass in an already @@ -326,6 +339,7 @@ public Set getPvPlants() throws SourceException { * @param nodes a map of UUID to object- and uuid-unique {@link NodeInput} entities * @param emUnits a map of UUID to object- and uuid-unique {@link EmInput} entities * @return a set of object- and uuid-unique {@link PvInput} entities + * @throws SourceException the source exception */ public Set getPvPlants( Map operators, Map nodes, Map emUnits) @@ -342,10 +356,11 @@ public Set getPvPlants( * Returns a unique set of {@link LoadInput} 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 LoadInput} which has to be checked manually, + * java.util.UUID}* uniqueness of the provided {@link LoadInput} which has to be checked manually, * as {@link LoadInput#equals(Object)} is NOT restricted on the uuid of {@link LoadInput}. * * @return a set of object- and uuid-unique {@link LoadInput} entities + * @throws SourceException the source exception */ public Set getLoads() throws SourceException { Map operators = typeSource.getOperators(); @@ -356,7 +371,7 @@ public Set getLoads() throws SourceException { /** * Returns a set of {@link LoadInput} 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 - * LoadInput} which has to be checked manually, as {@link LoadInput#equals(Object)} is NOT + * LoadInput}* which has to be checked manually, as {@link LoadInput#equals(Object)} is NOT * restricted on the uuid of {@link LoadInput}. * *

In contrast to {@link #getLoads()} this method provides the ability to pass in an already @@ -371,6 +386,7 @@ public Set getLoads() throws SourceException { * @param nodes a map of UUID to object- and uuid-unique {@link NodeInput} entities * @param emUnits a map of UUID to object- and uuid-unique {@link EmInput} entities * @return a set of object- and uuid-unique {@link LoadInput} entities + * @throws SourceException the source exception */ public Set getLoads( Map operators, Map nodes, Map emUnits) @@ -387,10 +403,11 @@ public Set getLoads( * Returns a unique set of {@link EvcsInput} 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 EvcsInput} which has to be checked manually, + * java.util.UUID}* uniqueness of the provided {@link EvcsInput} which has to be checked manually, * as {@link EvcsInput#equals(Object)} is NOT restricted on the uuid of {@link EvcsInput}. * * @return a set of object- and uuid-unique {@link EvcsInput} entities + * @throws SourceException the source exception */ public Set getEvcs() throws SourceException { Map operators = typeSource.getOperators(); @@ -401,7 +418,7 @@ public Set getEvcs() throws SourceException { /** * Returns a set of {@link EvcsInput} 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 - * EvcsInput} which has to be checked manually, as {@link EvcsInput#equals(Object)} is NOT + * EvcsInput}* which has to be checked manually, as {@link EvcsInput#equals(Object)} is NOT * restricted on the uuid of {@link EvcsInput}. * *

In contrast to {@link #getEvcs()} this method provides the ability to pass in an already @@ -416,6 +433,7 @@ public Set getEvcs() throws SourceException { * @param nodes a map of UUID to object- and uuid-unique {@link NodeInput} entities * @param emUnits a map of UUID to object- and uuid-unique {@link EmInput} entities * @return a set of object- and uuid-unique {@link EvcsInput} entities + * @throws SourceException the source exception */ public Set getEvcs( Map operators, Map nodes, Map emUnits) @@ -432,10 +450,11 @@ public Set getEvcs( * Returns a unique set of {@link BmInput} 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 BmInput} which has to be checked manually, as - * {@link BmInput#equals(Object)} is NOT restricted on the uuid of {@link BmInput}. + * java.util.UUID}* uniqueness of the provided {@link BmInput} which has to be checked manually, + * as {@link BmInput#equals(Object)} is NOT restricted on the uuid of {@link BmInput}. * * @return a set of object- and uuid-unique {@link BmInput} entities + * @throws SourceException the source exception */ public Set getBmPlants() throws SourceException { Map operators = typeSource.getOperators(); @@ -447,7 +466,7 @@ public Set getBmPlants() throws SourceException { /** * Returns a set of {@link BmInput} 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 - * BmInput} which has to be checked manually, as {@link BmInput#equals(Object)} is NOT restricted + * BmInput}* which has to be checked manually, as {@link BmInput#equals(Object)} is NOT restricted * on the uuid of {@link BmInput}. * *

In contrast to {@link #getBmPlants()} this method provides the ability to pass in an already @@ -463,6 +482,7 @@ public Set getBmPlants() throws SourceException { * @param emUnits a map of UUID to object- and uuid-unique {@link EmInput} entities * @param types a map of UUID to object- and uuid-unique {@link BmTypeInput} entities * @return a set of object- and uuid-unique {@link BmInput} entities + * @throws SourceException the source exception */ public Set getBmPlants( Map operators, @@ -485,11 +505,12 @@ public Set getBmPlants( * Returns a unique set of {@link StorageInput} 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 StorageInput} which has to be checked + * java.util.UUID}* uniqueness of the provided {@link StorageInput} which has to be checked * manually, as {@link StorageInput#equals(Object)} is NOT restricted on the uuid of {@link - * StorageInput}. + * StorageInput}*. * * @return a set of object- and uuid-unique {@link StorageInput} entities + * @throws SourceException the source exception */ public Set getStorages() throws SourceException { Map operators = typeSource.getOperators(); @@ -518,6 +539,7 @@ public Set getStorages() throws SourceException { * @param emUnits a map of UUID to object- and uuid-unique {@link EmInput} entities * @param types a map of UUID to object- and uuid-unique {@link StorageTypeInput} entities * @return a set of object- and uuid-unique {@link StorageInput} entities + * @throws SourceException the source exception */ public Set getStorages( Map operators, @@ -540,10 +562,11 @@ public Set getStorages( * Returns a unique set of {@link WecInput} 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 WecInput} which has to be checked manually, + * java.util.UUID}* uniqueness of the provided {@link WecInput} which has to be checked manually, * as {@link WecInput#equals(Object)} is NOT restricted on the uuid of {@link WecInput}. * * @return a set of object- and uuid-unique {@link WecInput} entities + * @throws SourceException the source exception */ public Set getWecPlants() throws SourceException { Map operators = typeSource.getOperators(); @@ -555,7 +578,7 @@ public Set getWecPlants() throws SourceException { /** * Returns a set of {@link WecInput} 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 - * WecInput} which has to be checked manually, as {@link WecInput#equals(Object)} is NOT + * WecInput}* which has to be checked manually, as {@link WecInput#equals(Object)} is NOT * restricted on the uuid of {@link WecInput}. * *

In contrast to {@link #getWecPlants()} this method provides the ability to pass in an @@ -571,6 +594,7 @@ public Set getWecPlants() throws SourceException { * @param emUnits a map of UUID to object- and uuid-unique {@link EmInput} entities * @param types a map of UUID to object- and uuid-unique {@link WecTypeInput} entities * @return a set of object- and uuid-unique {@link WecInput} entities + * @throws SourceException the source exception */ public Set getWecPlants( Map operators, @@ -593,10 +617,11 @@ public Set getWecPlants( * Returns a unique set of {@link EvInput} 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 EvInput} which has to be checked manually, as - * {@link EvInput#equals(Object)} is NOT restricted on the uuid of {@link EvInput}. + * java.util.UUID}* uniqueness of the provided {@link EvInput} which has to be checked manually, + * as {@link EvInput#equals(Object)} is NOT restricted on the uuid of {@link EvInput}. * * @return a set of object- and uuid-unique {@link EvInput} entities + * @throws SourceException the source exception */ public Set getEvs() throws SourceException { Map operators = typeSource.getOperators(); @@ -607,7 +632,7 @@ public Set getEvs() throws SourceException { /** * Returns a set of {@link EvInput} 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 - * EvInput} which has to be checked manually, as {@link EvInput#equals(Object)} is NOT restricted + * EvInput}* which has to be checked manually, as {@link EvInput#equals(Object)} is NOT restricted * on the uuid of {@link EvInput}. * *

In contrast to {@link #getEvs()} this method provides the ability to pass in an already @@ -623,6 +648,7 @@ public Set getEvs() throws SourceException { * @param emUnits a map of UUID to object- and uuid-unique {@link EmInput} entities * @param types a map of UUID to object- and uuid-unique {@link EvTypeInput} entities * @return a set of object- and uuid-unique {@link EvInput} entities + * @throws SourceException the source exception */ public Set getEvs( Map operators, @@ -641,6 +667,12 @@ public Set getEvs( .collect(toSet()); } + /** + * Gets chp plants. + * + * @return the chp plants + * @throws SourceException the source exception + */ public Set getChpPlants() throws SourceException { Map operators = typeSource.getOperators(); Map emUnits = energyManagementSource.getEmUnits(operators); @@ -672,6 +704,7 @@ public Set getChpPlants() throws SourceException { * @param thermalStorages a map of UUID to object- and uuid-unique {@link ThermalStorageInput} * entities * @return a set of object- and uuid-unique {@link ChpInput} entities + * @throws SourceException the source exception */ public Set getChpPlants( Map operators, @@ -698,6 +731,12 @@ public Set getChpPlants( return getEntities(ChpInput.class, dataSource, chpInputFactory, builder).collect(toSet()); } + /** + * Gets heat pumps. + * + * @return the heat pumps + * @throws SourceException the source exception + */ public Set getHeatPumps() throws SourceException { Map operators = typeSource.getOperators(); Map emUnits = energyManagementSource.getEmUnits(operators); @@ -725,6 +764,7 @@ public Set getHeatPumps() throws SourceException { * @param types a map of UUID to object- and uuid-unique {@link HpTypeInput} entities * @param thermalBuses a map of UUID to object- and uuid-unique {@link ThermalBusInput} entities * @return a set of object- and uuid-unique {@link HpInput} entities + * @throws SourceException the source exception */ public Set getHeatPumps( Map operators, diff --git a/src/main/java/edu/ie3/datamodel/io/source/ThermalSource.java b/src/main/java/edu/ie3/datamodel/io/source/ThermalSource.java index bc955ff82..00d74a61a 100644 --- a/src/main/java/edu/ie3/datamodel/io/source/ThermalSource.java +++ b/src/main/java/edu/ie3/datamodel/io/source/ThermalSource.java @@ -19,7 +19,7 @@ /** * Interface that provides the capability to build thermal {@link - * edu.ie3.datamodel.models.input.AssetInput} entities from persistent data e.g. .csv files or + * edu.ie3.datamodel.models.input.AssetInput}* entities from persistent data e.g. .csv files or * databases * * @version 0.1 @@ -35,6 +35,7 @@ public class ThermalSource extends AssetEntitySource { private final DomesticHotWaterStorageInputFactory domesticHotWaterStorageInputFactory; private final ThermalHouseInputFactory thermalHouseInputFactory; + /** The Thermal unit enricher. */ // enriching function protected static BiEnrichFunction< EntityData, OperatorInput, ThermalBusInput, ThermalUnitInputEntityData> @@ -44,6 +45,12 @@ public class ThermalSource extends AssetEntitySource { .andThen(enrich("thermalbus", buses, ThermalUnitInputEntityData::new)) .apply(data, operators); + /** + * Instantiates a new Thermal source. + * + * @param typeSource the type source + * @param dataSource the data source + */ public ThermalSource(TypeSource typeSource, DataSource dataSource) { super(dataSource); this.typeSource = typeSource; @@ -74,11 +81,12 @@ public void validate() throws ValidationException { * Returns a unique set of {@link ThermalBusInput} instances within a map by UUID. * *

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 ThermalBusInput} which has to be checked + * java.util.UUID}* uniqueness of the provided {@link ThermalBusInput} which has to be checked * manually, as {@link ThermalBusInput#equals(Object)} is NOT restricted on the uuid of {@link - * ThermalBusInput}. + * ThermalBusInput}*. * * @return a map of UUID to object- and uuid-unique {@link ThermalBusInput} entities + * @throws SourceException the source exception */ public Map getThermalBuses() throws SourceException { return getThermalBuses(typeSource.getOperators()); @@ -88,9 +96,9 @@ public Map getThermalBuses() throws SourceException { * Returns a unique set of {@link ThermalBusInput} instances within a map by UUID. * *

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 ThermalBusInput} which has to be checked + * java.util.UUID}* uniqueness of the provided {@link ThermalBusInput} which has to be checked * manually, as {@link ThermalBusInput#equals(Object)} is NOT restricted on the uuid of {@link - * ThermalBusInput}. + * ThermalBusInput}*. * *

In contrast to {@link #getThermalBuses()} this interface provides the ability to pass in an * already existing set of {@link OperatorInput} entities, the {@link ThermalBusInput} instances @@ -102,6 +110,7 @@ public Map getThermalBuses() throws SourceException { * * @param operators a set of object- and uuid-unique {@link OperatorInput} entities * @return a map of UUID to object- and uuid-unique {@link ThermalBusInput} entities + * @throws SourceException the source exception */ public Map getThermalBuses(Map operators) throws SourceException { @@ -118,11 +127,12 @@ public Map getThermalBuses(Map opera * abstract class within a map by UUID. * *

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 ThermalStorageInput} which has to be checked + * java.util.UUID}* uniqueness of the provided {@link ThermalStorageInput} which has to be checked * manually, as {@link ThermalStorageInput#equals(Object)} is NOT restricted on the uuid of {@link - * ThermalStorageInput}. + * ThermalStorageInput}*. * * @return a map of UUID to object- and uuid-unique {@link ThermalStorageInput} entities + * @throws SourceException the source exception */ public Map getThermalStorages() throws SourceException { return Stream.of(getCylindricalStorages(), getDomesticHotWaterStorages()) @@ -148,6 +158,7 @@ public Map getThermalStorages() throws SourceExceptio * @param operators a set of object- and uuid-unique {@link OperatorInput} entities * @param thermalBuses a set of object- and uuid-unique {@link ThermalBusInput} entities * @return a map of UUID to object- and uuid-unique {@link ThermalStorageInput} entities + * @throws SourceException the source exception */ public Map getThermalStorages( Map operators, Map thermalBuses) @@ -163,11 +174,12 @@ public Map getThermalStorages( * Returns a unique set of {@link ThermalHouseInput} 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 ThermalHouseInput} which has to be checked + * java.util.UUID}* uniqueness of the provided {@link ThermalHouseInput} which has to be checked * manually, as {@link ThermalHouseInput#equals(Object)} is NOT restricted on the uuid of {@link - * ThermalHouseInput}. + * ThermalHouseInput}*. * * @return a map of UUID to object- and uuid-unique {@link ThermalHouseInput} entities + * @throws SourceException the source exception */ public Map getThermalHouses() throws SourceException { Map operators = typeSource.getOperators(); @@ -180,9 +192,9 @@ public Map getThermalHouses() throws SourceException { * Returns a set of {@link ThermalHouseInput} 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 ThermalHouseInput} which has to be checked + * java.util.UUID}* uniqueness of the provided {@link ThermalHouseInput} which has to be checked * manually, as {@link ThermalHouseInput#equals(Object)} is NOT restricted on the uuid of {@link - * ThermalHouseInput}. + * ThermalHouseInput}*. * *

In contrast to {@link #getThermalHouses()} this interface provides the ability to pass in an * already existing set of {@link OperatorInput} entities, the {@link ThermalHouseInput} instances @@ -195,6 +207,7 @@ public Map getThermalHouses() throws SourceException { * @param operators a set of object- and uuid-unique {@link OperatorInput} entities * @param thermalBuses a set of object- and uuid-unique {@link ThermalBusInput} entities * @return a map of UUID to object- and uuid-unique {@link ThermalHouseInput} entities + * @throws SourceException the source exception */ public Map getThermalHouses( Map operators, Map thermalBuses) @@ -211,11 +224,12 @@ public Map getThermalHouses( * Returns a unique set of {@link CylindricalStorageInput} 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 CylindricalStorageInput} which has to be + * java.util.UUID}* uniqueness of the provided {@link CylindricalStorageInput} which has to be * checked manually, as {@link CylindricalStorageInput#equals(Object)} is NOT restricted on the * uuid of {@link CylindricalStorageInput}. * * @return a set of object- and uuid-unique {@link CylindricalStorageInput} entities + * @throws SourceException the source exception */ public Set getCylindricalStorages() throws SourceException { Map operators = typeSource.getOperators(); @@ -228,11 +242,12 @@ public Set getCylindricalStorages() throws SourceExcept * Returns a unique set of {@link DomesticHotWaterStorageInput} 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 DomesticHotWaterStorageInput} which has to be - * checked manually, as {@link DomesticHotWaterStorageInput#equals(Object)} is NOT restricted on - * the uuid of {@link DomesticHotWaterStorageInput}. + * java.util.UUID}* uniqueness of the provided {@link DomesticHotWaterStorageInput} which has to + * be checked manually, as {@link DomesticHotWaterStorageInput#equals(Object)} is NOT restricted + * on the uuid of {@link DomesticHotWaterStorageInput}. * * @return a set of object- and uuid-unique {@link DomesticHotWaterStorageInput} entities + * @throws SourceException the source exception */ public Set getDomesticHotWaterStorages() throws SourceException { Map operators = typeSource.getOperators(); @@ -245,14 +260,14 @@ public Set getDomesticHotWaterStorages() throws So * Returns a set of {@link CylindricalStorageInput} 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 CylindricalStorageInput} which has to be + * java.util.UUID}* uniqueness of the provided {@link CylindricalStorageInput} which has to be * checked manually, as {@link CylindricalStorageInput#equals(Object)} is NOT restricted on the * uuid of {@link CylindricalStorageInput}. * *

In contrast to {@link #getCylindricalStorages()} this interface provides the ability to pass * in an already existing set of {@link OperatorInput} entities, the {@link - * CylindricalStorageInput} instances depend on. Doing so, already loaded nodes can be recycled to - * improve performance and prevent unnecessary loading operations. + * CylindricalStorageInput}* instances depend on. Doing so, already loaded nodes can be recycled + * to improve performance and prevent unnecessary loading operations. * *

If something fails during the creation process it's up to the concrete implementation of an * empty set or a set with all entities that has been able to be build is returned. @@ -260,6 +275,7 @@ public Set getDomesticHotWaterStorages() throws So * @param operators a set of object- and uuid-unique {@link OperatorInput} entities * @param thermalBuses a set of object- and uuid-unique {@link ThermalBusInput} entities * @return a set of object- and uuid-unique {@link CylindricalStorageInput} entities + * @throws SourceException the source exception */ public Set getCylindricalStorages( Map operators, Map thermalBuses) @@ -276,13 +292,13 @@ public Set getCylindricalStorages( * Returns a set of {@link DomesticHotWaterStorageInput} 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 DomesticHotWaterStorageInput} which has to be - * checked manually, as {@link DomesticHotWaterStorageInput#equals(Object)} is NOT restricted on - * the uuid of {@link DomesticHotWaterStorageInput}. + * java.util.UUID}* uniqueness of the provided {@link DomesticHotWaterStorageInput} which has to + * be checked manually, as {@link DomesticHotWaterStorageInput#equals(Object)} is NOT restricted + * on the uuid of {@link DomesticHotWaterStorageInput}. * *

In contrast to {@link #getDomesticHotWaterStorages()} this interface provides the ability to * pass in an already existing set of {@link OperatorInput} entities, the {@link - * DomesticHotWaterStorageInput} instances depend on. Doing so, already loaded nodes can be + * DomesticHotWaterStorageInput}* instances depend on. Doing so, already loaded nodes can be * recycled to improve performance and prevent unnecessary loading operations. * *

If something fails during the creation process it's up to the concrete implementation of an @@ -291,6 +307,7 @@ public Set getCylindricalStorages( * @param operators a set of object- and uuid-unique {@link OperatorInput} entities * @param thermalBuses a set of object- and uuid-unique {@link ThermalBusInput} entities * @return a set of object- and uuid-unique {@link DomesticHotWaterStorageInput} entities + * @throws SourceException the source exception */ public Set getDomesticHotWaterStorages( Map operators, Map thermalBuses) diff --git a/src/main/java/edu/ie3/datamodel/io/source/TimeSeriesMappingSource.java b/src/main/java/edu/ie3/datamodel/io/source/TimeSeriesMappingSource.java index eeb956b56..43afbe6d1 100644 --- a/src/main/java/edu/ie3/datamodel/io/source/TimeSeriesMappingSource.java +++ b/src/main/java/edu/ie3/datamodel/io/source/TimeSeriesMappingSource.java @@ -21,8 +21,10 @@ */ public abstract class TimeSeriesMappingSource extends EntitySource { + /** The Mapping factory. */ protected final TimeSeriesMappingFactory mappingFactory; + /** Instantiates a new Time series mapping source. */ protected TimeSeriesMappingSource() { this.mappingFactory = new TimeSeriesMappingFactory(); } @@ -36,6 +38,7 @@ public void validate() throws ValidationException { * Get a mapping from model {@link UUID} to the time series {@link UUID} * * @return That mapping + * @throws SourceException the source exception */ public Map getMapping() throws SourceException { return Try.scanStream( @@ -52,6 +55,7 @@ public Map getMapping() throws SourceException { * * @param modelIdentifier Identifier of the model * @return An {@link Optional} to the time series identifier + * @throws SourceException the source exception */ public Optional getTimeSeriesUuid(UUID modelIdentifier) throws SourceException { return Optional.ofNullable(getMapping().get(modelIdentifier)); @@ -61,10 +65,16 @@ public Optional getTimeSeriesUuid(UUID modelIdentifier) throws SourceExcep * Extract a stream of maps from the database for the mapping * * @return Stream of maps + * @throws SourceException the source exception */ public abstract Stream> getMappingSourceData() throws SourceException; - /** Returns the option for fields found in the source */ + /** + * Returns the option for fields found in the source + * + * @return the source fields + * @throws SourceException the source exception + */ public abstract Optional> getSourceFields() throws SourceException; // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- @@ -82,17 +92,31 @@ public static class MappingEntry implements InputEntity { private final UUID asset; private final UUID timeSeries; + /** + * Instantiates a new Mapping entry. + * + * @param asset the asset + * @param timeSeries the time series + */ public MappingEntry(UUID asset, UUID timeSeries) { this.asset = asset; this.timeSeries = timeSeries; } - /** Returns the {@link UUID} of the {@link edu.ie3.datamodel.models.input.AssetInput}. */ + /** + * Returns the {@link UUID} of the {@link edu.ie3.datamodel.models.input.AssetInput}. + * + * @return the asset + */ public UUID getAsset() { return asset; } - /** Returns the {@link UUID} of the {@link TimeSeries}. */ + /** + * Returns the {@link UUID} of the {@link TimeSeries}. + * + * @return the time series + */ public UUID getTimeSeries() { return timeSeries; } diff --git a/src/main/java/edu/ie3/datamodel/io/source/TimeSeriesMetaInformationSource.java b/src/main/java/edu/ie3/datamodel/io/source/TimeSeriesMetaInformationSource.java index 7bf442bca..fb993d76c 100644 --- a/src/main/java/edu/ie3/datamodel/io/source/TimeSeriesMetaInformationSource.java +++ b/src/main/java/edu/ie3/datamodel/io/source/TimeSeriesMetaInformationSource.java @@ -17,11 +17,15 @@ /** Source for all available time series with their {@link UUID} and {@link ColumnScheme} */ public abstract class TimeSeriesMetaInformationSource { + /** The Load profile meta information. */ protected Map loadProfileMetaInformation; + /** Default constructor for TimeSeriesMetaInformationSource. */ + protected TimeSeriesMetaInformationSource() {} + /** * Get a mapping from time series {@link UUID} to its meta information {@link - * IndividualTimeSeriesMetaInformation} + * IndividualTimeSeriesMetaInformation}* * * @return that mapping */ diff --git a/src/main/java/edu/ie3/datamodel/io/source/TimeSeriesSource.java b/src/main/java/edu/ie3/datamodel/io/source/TimeSeriesSource.java index 338fb510d..09fa862f3 100644 --- a/src/main/java/edu/ie3/datamodel/io/source/TimeSeriesSource.java +++ b/src/main/java/edu/ie3/datamodel/io/source/TimeSeriesSource.java @@ -20,12 +20,23 @@ /** * The interface definition of a source, that is able to provide one specific time series for one * model + * + * @param the type parameter */ public abstract class TimeSeriesSource extends EntitySource { + /** The Value class. */ protected Class valueClass; + + /** The Value factory. */ protected final TimeBasedSimpleValueFactory valueFactory; + /** + * Instantiates a new Time series source. + * + * @param valueClass the value class + * @param factory the factory + */ protected TimeSeriesSource(Class valueClass, TimeBasedSimpleValueFactory factory) { this.valueFactory = factory; this.valueClass = valueClass; @@ -45,11 +56,29 @@ protected Try, FactoryException> createTimeBasedValue( return valueFactory.get(factoryData); } + /** + * Gets time series. + * + * @return the time series + */ public abstract IndividualTimeSeries getTimeSeries(); + /** + * Gets time series. + * + * @param timeInterval the time interval + * @return the time series + * @throws SourceException the source exception + */ public abstract IndividualTimeSeries getTimeSeries(ClosedInterval timeInterval) throws SourceException; + /** + * Gets value. + * + * @param time the time + * @return the value + */ public abstract Optional getValue(ZonedDateTime time); /** @@ -68,6 +97,12 @@ public Optional getValueOrLast(ZonedDateTime time) { return value; } + /** + * Gets previous time based value. + * + * @param time the time + * @return the previous time based value + */ public abstract Optional> getPreviousTimeBasedValue(ZonedDateTime time); /** diff --git a/src/main/java/edu/ie3/datamodel/io/source/TypeSource.java b/src/main/java/edu/ie3/datamodel/io/source/TypeSource.java index 67f3ecd0b..4237719f3 100644 --- a/src/main/java/edu/ie3/datamodel/io/source/TypeSource.java +++ b/src/main/java/edu/ie3/datamodel/io/source/TypeSource.java @@ -27,8 +27,8 @@ /** * Interface that provides the capability to build entities of type {@link - * SystemParticipantTypeInput} and {@link OperatorInput} from different data sources e.g. .csv files - * or databases + * SystemParticipantTypeInput}* and {@link OperatorInput} from different data sources e.g. .csv + * files or databases * * @version 0.1 * @since 08.04.20 @@ -43,6 +43,11 @@ public class TypeSource extends EntitySource { private final DataSource dataSource; + /** + * Instantiates a new Type source. + * + * @param dataSource the data source + */ public TypeSource(DataSource dataSource) { this.dataSource = dataSource; @@ -81,11 +86,12 @@ public void validate() throws ValidationException { * Returns a set of {@link Transformer2WTypeInput} instances within a map by UUID. * *

This set has to be unique in the sense of object uniqueness but also in the sense of {@link - * UUID} uniqueness of the provided {@link Transformer2WTypeInput} which has to be checked + * UUID}* uniqueness of the provided {@link Transformer2WTypeInput} which has to be checked * manually, as {@link Transformer2WTypeInput#equals(Object)} is NOT restricted on the uuid of * {@link Transformer2WTypeInput}. * * @return a map of UUID to object- and uuid-unique {@link Transformer2WTypeInput} entities + * @throws SourceException the source exception */ public Map getTransformer2WTypes() throws SourceException { return getEntities(Transformer2WTypeInput.class, dataSource, transformer2WTypeInputFactory); @@ -95,10 +101,11 @@ public Map getTransformer2WTypes() throws SourceEx * Returns a set of {@link OperatorInput} instances within a map by UUID. * *

This set has to be unique in the sense of object uniqueness but also in the sense of {@link - * UUID} uniqueness of the provided {@link OperatorInput} which has to be checked manually, as + * UUID}* uniqueness of the provided {@link OperatorInput} which has to be checked manually, as * {@link OperatorInput#equals(Object)} is NOT restricted on the uuid of {@link OperatorInput}. * * @return a map of UUID to object- and uuid-unique {@link OperatorInput} entities + * @throws SourceException the source exception */ public Map getOperators() throws SourceException { return getEntities(OperatorInput.class, dataSource, operatorInputFactory); @@ -108,10 +115,11 @@ public Map getOperators() throws SourceException { * Returns a set of {@link LineTypeInput} instances within a map by UUID. * *

This set has to be unique in the sense of object uniqueness but also in the sense of {@link - * UUID} uniqueness of the provided {@link LineTypeInput} which has to be checked manually, as + * UUID}* uniqueness of the provided {@link LineTypeInput} which has to be checked manually, as * {@link LineTypeInput#equals(Object)} is NOT restricted on the uuid of {@link LineTypeInput}. * * @return a map of UUID to object- and uuid-unique {@link LineTypeInput} entities + * @throws SourceException the source exception */ public Map getLineTypes() throws SourceException { return getEntities(LineTypeInput.class, dataSource, lineTypeInputFactory); @@ -121,11 +129,12 @@ public Map getLineTypes() throws SourceException { * Returns a set of {@link Transformer3WTypeInput} instances within a map by UUID. * *

This set has to be unique in the sense of object uniqueness but also in the sense of {@link - * UUID} uniqueness of the provided {@link Transformer3WTypeInput} which has to be checked + * UUID}* uniqueness of the provided {@link Transformer3WTypeInput} which has to be checked * manually, as {@link Transformer3WTypeInput#equals(Object)} is NOT restricted on the uuid of * {@link Transformer3WTypeInput}. * * @return a map of UUID to object- and uuid-unique {@link Transformer3WTypeInput} entities + * @throws SourceException the source exception */ public Map getTransformer3WTypes() throws SourceException { return getEntities(Transformer3WTypeInput.class, dataSource, transformer3WTypeInputFactory); @@ -135,10 +144,11 @@ public Map getTransformer3WTypes() throws SourceEx * Returns a set of {@link BmTypeInput} instances within a map by UUID. * *

This set has to be unique in the sense of object uniqueness but also in the sense of {@link - * UUID} uniqueness of the provided {@link BmTypeInput} which has to be checked manually, as + * UUID}* uniqueness of the provided {@link BmTypeInput} which has to be checked manually, as * {@link BmTypeInput#equals(Object)} is NOT restricted on the uuid of {@link BmTypeInput}. * * @return a map of UUID to object- and uuid-unique {@link BmTypeInput} entities + * @throws SourceException the source exception */ public Map getBmTypes() throws SourceException { return getEntities(BmTypeInput.class, dataSource, systemParticipantTypeInputFactory); @@ -148,10 +158,11 @@ public Map getBmTypes() throws SourceException { * Returns a set of {@link ChpTypeInput} instances within a map by UUID. * *

This set has to be unique in the sense of object uniqueness but also in the sense of {@link - * UUID} uniqueness of the provided {@link ChpTypeInput} which has to be checked manually, as + * UUID}* uniqueness of the provided {@link ChpTypeInput} which has to be checked manually, as * {@link ChpTypeInput#equals(Object)} is NOT restricted on the uuid of {@link ChpTypeInput}. * * @return a map of UUID to object- and uuid-unique {@link ChpTypeInput} entities + * @throws SourceException the source exception */ public Map getChpTypes() throws SourceException { return getEntities(ChpTypeInput.class, dataSource, systemParticipantTypeInputFactory); @@ -161,10 +172,11 @@ public Map getChpTypes() throws SourceException { * Returns a set of {@link HpTypeInput} instances within a map by UUID. * *

This set has to be unique in the sense of object uniqueness but also in the sense of {@link - * UUID} uniqueness of the provided {@link HpTypeInput} which has to be checked manually, as + * UUID}* uniqueness of the provided {@link HpTypeInput} which has to be checked manually, as * {@link HpTypeInput#equals(Object)} is NOT restricted on the uuid of {@link HpTypeInput}. * * @return a map of UUID to object- and uuid-unique {@link HpTypeInput} entities + * @throws SourceException the source exception */ public Map getHpTypes() throws SourceException { return getEntities(HpTypeInput.class, dataSource, systemParticipantTypeInputFactory); @@ -174,11 +186,12 @@ public Map getHpTypes() throws SourceException { * Returns a set of {@link StorageTypeInput} instances within a map by UUID. * *

This set has to be unique in the sense of object uniqueness but also in the sense of {@link - * UUID} uniqueness of the provided {@link StorageTypeInput} which has to be checked manually, as + * UUID}* uniqueness of the provided {@link StorageTypeInput} which has to be checked manually, as * {@link StorageTypeInput#equals(Object)} is NOT restricted on the uuid of {@link - * StorageTypeInput}. + * StorageTypeInput}*. * * @return a map of UUID to object- and uuid-unique {@link StorageTypeInput} entities + * @throws SourceException the source exception */ public Map getStorageTypes() throws SourceException { return getEntities(StorageTypeInput.class, dataSource, systemParticipantTypeInputFactory); @@ -188,10 +201,11 @@ public Map getStorageTypes() throws SourceException { * Returns a set of {@link WecTypeInput} instances within a map by UUID. * *

This set has to be unique in the sense of object uniqueness but also in the sense of {@link - * UUID} uniqueness of the provided {@link WecTypeInput} which has to be checked manually, as + * UUID}* uniqueness of the provided {@link WecTypeInput} which has to be checked manually, as * {@link WecTypeInput#equals(Object)} is NOT restricted on the uuid of {@link WecTypeInput}. * * @return a map of UUID to object- and uuid-unique {@link WecTypeInput} entities + * @throws SourceException the source exception */ public Map getWecTypes() throws SourceException { return getEntities(WecTypeInput.class, dataSource, systemParticipantTypeInputFactory); @@ -201,10 +215,11 @@ public Map getWecTypes() throws SourceException { * Returns a set of {@link EvTypeInput} instances within a map by UUID. * *

This set has to be unique in the sense of object uniqueness but also in the sense of {@link - * UUID} uniqueness of the provided {@link EvTypeInput} which has to be checked manually, as + * UUID}* uniqueness of the provided {@link EvTypeInput} which has to be checked manually, as * {@link EvTypeInput#equals(Object)} is NOT restricted on the uuid of {@link EvTypeInput}. * * @return a map of UUID to object- and uuid-unique {@link EvTypeInput} entities + * @throws SourceException the source exception */ public Map getEvTypes() throws SourceException { return getEntities(EvTypeInput.class, dataSource, systemParticipantTypeInputFactory); diff --git a/src/main/java/edu/ie3/datamodel/io/source/WeatherSource.java b/src/main/java/edu/ie3/datamodel/io/source/WeatherSource.java index 94fdbd733..531e2f503 100644 --- a/src/main/java/edu/ie3/datamodel/io/source/WeatherSource.java +++ b/src/main/java/edu/ie3/datamodel/io/source/WeatherSource.java @@ -26,14 +26,24 @@ /** Abstract class for WeatherSource by Csv and Sql Data */ public abstract class WeatherSource extends EntitySource { + /** The constant log. */ protected static final Logger log = LoggerFactory.getLogger(WeatherSource.class); + /** The Weather factory. */ protected TimeBasedWeatherValueFactory weatherFactory; + /** The Id coordinate source. */ protected IdCoordinateSource idCoordinateSource; + /** The constant COORDINATE_ID. */ protected static final String COORDINATE_ID = "coordinateid"; + /** + * Instantiates a new Weather source. + * + * @param idCoordinateSource the id coordinate source + * @param weatherFactory the weather factory + */ protected WeatherSource( IdCoordinateSource idCoordinateSource, TimeBasedWeatherValueFactory weatherFactory) { this.idCoordinateSource = idCoordinateSource; @@ -44,6 +54,7 @@ protected WeatherSource( * Method to retrieve the fields found in the source. * * @return an option for fields found in the source + * @throws SourceException the source exception */ public abstract Optional> getSourceFields() throws SourceException; @@ -54,19 +65,57 @@ public void validate() throws ValidationException { // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- + /** + * Gets weather. + * + * @param timeInterval the time interval + * @return the weather + * @throws SourceException the source exception + */ public abstract Map> getWeather( ClosedInterval timeInterval) throws SourceException; + /** + * Gets weather. + * + * @param timeInterval the time interval + * @param coordinates the coordinates + * @return the weather + * @throws SourceException the source exception + */ public abstract Map> getWeather( ClosedInterval timeInterval, Collection coordinates) throws SourceException; + /** + * Gets weather. + * + * @param date the date + * @param coordinate the coordinate + * @return the weather + * @throws SourceException the source exception + */ public abstract Optional> getWeather( ZonedDateTime date, Point coordinate) throws SourceException; + /** + * Gets time keys after. + * + * @param time the time + * @return the time keys after + * @throws SourceException the source exception + */ public abstract Map> getTimeKeysAfter(ZonedDateTime time) throws SourceException; + /** + * Gets time keys after. + * + * @param time the time + * @param coordinate the coordinate + * @return the time keys after + * @throws SourceException the source exception + */ public List getTimeKeysAfter(ZonedDateTime time, Point coordinate) throws SourceException { return getTimeKeysAfter(time).getOrDefault(coordinate, Collections.emptyList()); @@ -118,6 +167,13 @@ protected Map> mapWeatherValuesToPoint return coordinateToTimeSeriesMap; } + /** + * To time keys map. + * + * @param fieldMaps the field maps + * @param factory the factory + * @return the map + */ protected Map> toTimeKeys( Stream> fieldMaps, TimeBasedWeatherValueFactory factory) { return groupTime( @@ -135,6 +191,12 @@ protected Map> toTimeKeys( })); } + /** + * Group time map. + * + * @param values the values + * @return the map + */ protected Map> groupTime( Stream, ZonedDateTime>> values) { return values @@ -157,6 +219,7 @@ protected Map> groupTime( * @param factory TimeBasedWeatherValueFactory * @param inputStream stream of fields to convert into TimeBasedValues * @return a list of that TimeBasedValues + * @throws SourceException the source exception */ protected List> buildTimeBasedValues( TimeBasedWeatherValueFactory factory, Stream> inputStream) 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 6879b57eb..c064f3e8a 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 @@ -44,20 +44,38 @@ */ public class CsvDataSource implements DataSource { + /** The constant log. */ protected static final Logger log = LoggerFactory.getLogger(CsvDataSource.class); + /** The Csv sep. */ // general fields protected final String csvSep; + + /** The Connector. */ protected final CsvFileConnector connector; private final FileNamingStrategy fileNamingStrategy; + /** + * Instantiates a new Csv data source. + * + * @param csvSep the csv sep + * @param directoryPath the directory path + * @param fileNamingStrategy the file naming strategy + */ public CsvDataSource(String csvSep, Path directoryPath, FileNamingStrategy fileNamingStrategy) { this.csvSep = csvSep; this.connector = new CsvFileConnector(directoryPath); this.fileNamingStrategy = fileNamingStrategy; } + /** + * Instantiates a new Csv data source. + * + * @param csvSep the csv sep + * @param connector the connector + * @param fileNamingStrategy the file naming strategy + */ public CsvDataSource( String csvSep, CsvFileConnector connector, FileNamingStrategy fileNamingStrategy) { this.csvSep = csvSep; @@ -72,6 +90,8 @@ public Optional> getSourceFields(Class entityClass } /** + * Gets source fields. + * * @param filePath path of file starting from base folder, including file name but not file * extension * @return The source field names as a set, if file exists @@ -108,6 +128,8 @@ public Stream> getSourceData(Class entityC } /** + * Gets source data. + * * @param filePath to the csv file * @return a stream of maps that represent the rows in the csv file * @throws SourceException on error while reading the source file @@ -118,7 +140,11 @@ public Stream> getSourceData(Path filePath) throws SourceExc // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- - /** Returns the set {@link FileNamingStrategy}. */ + /** + * Returns the set {@link FileNamingStrategy}. + * + * @return the naming strategy + */ public FileNamingStrategy getNamingStrategy() { return fileNamingStrategy; } @@ -156,6 +182,7 @@ public FileNamingStrategy getNamingStrategy() { * Receive the information for specific load profile time series. They are given back mapped to * their uuid. * + * @param profiles the profiles * @return A mapping from profile to the load profile time series meta information */ public Map getCsvLoadProfileMetaInformation( @@ -216,6 +243,7 @@ protected Set getTimeSeriesFilePaths(Pattern pattern) { * @param headline the headline fields of the csv file * @return a map containing the mapping of (fieldName to fieldValue) or an empty map if an error * occurred + * @throws SourceException the source exception */ protected Map buildFieldsToAttributes( final String csvRow, final String[] headline) throws SourceException { @@ -286,6 +314,7 @@ protected String[] parseCsvRow(String csvRow, String csvSep) { * * @param entityClass the entity class that should be build and that is used to get the * corresponding reader + * @param allowFileNotExisting the allow file not existing * @return a parallel stream of maps, where each map represents one row of the csv file with the * mapping (fieldName to fieldValue) */ @@ -301,6 +330,7 @@ protected Try>, SourceException> buildStreamWithField * the returning stream is a parallel stream, the order of the elements cannot be guaranteed. * * @param filePath the path of the file to read + * @param allowFileNotExisting the allow file not existing * @return a try containing either a parallel stream of maps, where each map represents one row of * the csv file with the mapping (fieldName to fieldValue) or an exception */ 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 59c29d28c..72af2d687 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 @@ -38,6 +38,7 @@ */ public class CsvIdCoordinateSource extends IdCoordinateSource { + /** The constant log. */ protected static final Logger log = LoggerFactory.getLogger(CsvIdCoordinateSource.class); /** Mapping in both ways (id -> coordinate) and (coordinate -> id) have to be unique */ @@ -48,6 +49,13 @@ public class CsvIdCoordinateSource extends IdCoordinateSource { private final CsvDataSource dataSource; private final IdCoordinateFactory factory; + /** + * Instantiates a new Csv id coordinate source. + * + * @param factory the factory + * @param dataSource the data source + * @throws SourceException the source exception + */ public CsvIdCoordinateSource(IdCoordinateFactory factory, CsvDataSource dataSource) throws SourceException { this.factory = factory; @@ -177,6 +185,11 @@ public List findCornerPoints( coordinate, GeoUtils.calcOrderedCoordinateDistances(coordinate, points)); } + /** + * Gets coordinate count. + * + * @return the coordinate count + */ public int getCoordinateCount() { return idToCoordinate.size(); } diff --git a/src/main/java/edu/ie3/datamodel/io/source/csv/CsvJointGridContainerSource.java b/src/main/java/edu/ie3/datamodel/io/source/csv/CsvJointGridContainerSource.java index 5796454a8..ba95fca5e 100644 --- a/src/main/java/edu/ie3/datamodel/io/source/csv/CsvJointGridContainerSource.java +++ b/src/main/java/edu/ie3/datamodel/io/source/csv/CsvJointGridContainerSource.java @@ -26,6 +26,18 @@ public class CsvJointGridContainerSource { private CsvJointGridContainerSource() {} + /** + * Read joint grid container. + * + * @param gridName the grid name + * @param csvSep the csv sep + * @param directoryPath the directory path + * @param isHierarchic the is hierarchic + * @return the joint grid container + * @throws SourceException the source exception + * @throws FileException the file exception + * @throws InvalidGridException the invalid grid exception + */ public static JointGridContainer read( String gridName, String csvSep, Path directoryPath, boolean isHierarchic) throws SourceException, FileException, InvalidGridException { diff --git a/src/main/java/edu/ie3/datamodel/io/source/csv/CsvLoadProfileSource.java b/src/main/java/edu/ie3/datamodel/io/source/csv/CsvLoadProfileSource.java index 429580fac..1e6d45e2d 100644 --- a/src/main/java/edu/ie3/datamodel/io/source/csv/CsvLoadProfileSource.java +++ b/src/main/java/edu/ie3/datamodel/io/source/csv/CsvLoadProfileSource.java @@ -28,6 +28,9 @@ /** * Source that is capable of providing information around load profile time series from csv files. + * + * @param

the type parameter + * @param the type parameter */ public class CsvLoadProfileSource

> extends LoadProfileSource { @@ -35,6 +38,14 @@ public class CsvLoadProfileSource

private final CsvDataSource dataSource; private final Path filePath; + /** + * Instantiates a new Csv load profile source. + * + * @param source the source + * @param metaInformation the meta information + * @param entryClass the entry class + * @param entryFactory the entry factory + */ public CsvLoadProfileSource( CsvDataSource source, CsvLoadProfileMetaInformation metaInformation, @@ -103,8 +114,8 @@ public Optional> getLoadProfileEnergyScaling() { * to read as well as the profile * @param fieldToValueFunction function, that is able to transfer a mapping (from field to value) * onto a specific instance of the targeted entry class - * @throws SourceException If the file cannot be read properly * @return an individual time series + * @throws SourceException If the file cannot be read properly */ protected LoadProfileTimeSeries buildLoadProfileTimeSeries( CsvLoadProfileMetaInformation metaInformation, 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 c6de18c1e..4f75ff165 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 @@ -14,10 +14,18 @@ import java.util.Set; import java.util.stream.Stream; +/** The type Csv time series mapping source. */ public class CsvTimeSeriesMappingSource extends TimeSeriesMappingSource { private final CsvDataSource dataSource; + /** + * Instantiates a new Csv time series mapping source. + * + * @param csvSep the csv sep + * @param gridFolderPath the grid folder path + * @param fileNamingStrategy the file naming strategy + */ public CsvTimeSeriesMappingSource( String csvSep, Path gridFolderPath, FileNamingStrategy fileNamingStrategy) { this.dataSource = new CsvDataSource(csvSep, gridFolderPath, fileNamingStrategy); diff --git a/src/main/java/edu/ie3/datamodel/io/source/csv/CsvTimeSeriesMetaInformationSource.java b/src/main/java/edu/ie3/datamodel/io/source/csv/CsvTimeSeriesMetaInformationSource.java index 786474e87..2f8074280 100644 --- a/src/main/java/edu/ie3/datamodel/io/source/csv/CsvTimeSeriesMetaInformationSource.java +++ b/src/main/java/edu/ie3/datamodel/io/source/csv/CsvTimeSeriesMetaInformationSource.java @@ -26,6 +26,7 @@ */ public class CsvTimeSeriesMetaInformationSource extends TimeSeriesMetaInformationSource { + /** The Data source. */ protected final CsvDataSource dataSource; private final Map timeSeriesMetaInformation; 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 05c9185c3..441824c68 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 @@ -24,7 +24,11 @@ import java.util.function.Function; import java.util.stream.Stream; -/** Source that is capable of providing information around time series from csv files. */ +/** + * Source that is capable of providing information around time series from csv files. + * + * @param The type of {@link IndividualTimeSeries} + */ public class CsvTimeSeriesSource extends TimeSeriesSource { private final IndividualTimeSeries timeSeries; private final CsvDataSource dataSource; @@ -37,8 +41,8 @@ public class CsvTimeSeriesSource extends TimeSeriesSource { * @param folderPath path to the folder holding the time series files * @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 + * @throws SourceException If the given meta information are not supported */ public static CsvTimeSeriesSource getSource( String csvSep, @@ -133,6 +137,12 @@ public Optional> getPreviousTimeBasedValue(ZonedDateTime time) return timeSeries.getPreviousTimeBasedValue(time); } + /** + * Gets next time based value. + * + * @param time the time + * @return the next time based value + */ public Optional> getNextTimeBasedValue(ZonedDateTime time) { return timeSeries.getNextTimeBasedValue(time); } @@ -158,8 +168,8 @@ public Optional getLastTimeKeyBefore(ZonedDateTime time) { * @param filePath path to the file to read * @param fieldToValueFunction function, that is able to transfer a mapping (from field to value) * onto a specific instance of the targeted entry class - * @throws SourceException If the file cannot be read properly * @return an individual time series + * @throws SourceException If the file cannot be read properly */ protected IndividualTimeSeries buildIndividualTimeSeries( UUID timeSeriesUuid, 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 241442725..e717cf091 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 @@ -55,6 +55,7 @@ public class CsvWeatherSource extends WeatherSource { * @param idCoordinateSource a coordinate source to map ids to points * @param weatherFactory factory to transfer field to value mapping into actual java object * instances + * @throws SourceException the source exception */ public CsvWeatherSource( String csvSep, @@ -141,6 +142,7 @@ private Map> trimMapToInterval( /** * Merge two individual time series into a new time series with the UUID of the first parameter * + * @param the type parameter * @param a the first time series to merge * @param b the second time series to merge * @return merged time series with a's UUID diff --git a/src/main/java/edu/ie3/datamodel/io/source/sql/SqlDataSource.java b/src/main/java/edu/ie3/datamodel/io/source/sql/SqlDataSource.java index 2d214a260..b40ec21bc 100644 --- a/src/main/java/edu/ie3/datamodel/io/source/sql/SqlDataSource.java +++ b/src/main/java/edu/ie3/datamodel/io/source/sql/SqlDataSource.java @@ -22,12 +22,25 @@ /** Contains all functions that are needed to read a SQL data source. */ public class SqlDataSource implements DataSource { + /** The constant log. */ protected static final Logger log = LoggerFactory.getLogger(SqlDataSource.class); + /** The Connector. */ protected final SqlConnector connector; + + /** The Database naming strategy. */ protected final DatabaseNamingStrategy databaseNamingStrategy; + + /** The Schema name. */ protected String schemaName; + /** + * Instantiates a new Sql data source. + * + * @param connector the connector + * @param schemaName the schema name + * @param databaseNamingStrategy the database naming strategy + */ public SqlDataSource( SqlConnector connector, String schemaName, DatabaseNamingStrategy databaseNamingStrategy) { this.connector = connector; @@ -166,6 +179,9 @@ protected interface AddParams { /** * Creates a stream with maps representing a data point in the SQL data source using an explicit * table name. + * + * @param tableName the table name + * @return the stream */ protected Stream> buildStreamByTableName(String tableName) { String query = createBaseQueryString(schemaName, tableName); @@ -175,6 +191,10 @@ protected Stream> buildStreamByTableName(String tableName) { /** * Creates a stream with maps representing a data point in the SQL data source using an explicit * table name. + * + * @param query the query + * @param addParams the add params + * @return the stream */ protected Stream> executeQuery(String query, AddParams addParams) { try { @@ -192,6 +212,12 @@ protected Stream> executeQuery(String query, AddParams addPa return Stream.empty(); } + /** + * Execute query stream. + * + * @param query the query + * @return the stream + */ protected Stream> executeQuery(String query) { return executeQuery(query, x -> {}); } diff --git a/src/main/java/edu/ie3/datamodel/io/source/sql/SqlIdCoordinateSource.java b/src/main/java/edu/ie3/datamodel/io/source/sql/SqlIdCoordinateSource.java index 83661604c..0d92721f1 100644 --- a/src/main/java/edu/ie3/datamodel/io/source/sql/SqlIdCoordinateSource.java +++ b/src/main/java/edu/ie3/datamodel/io/source/sql/SqlIdCoordinateSource.java @@ -46,6 +46,13 @@ public class SqlIdCoordinateSource extends IdCoordinateSource { private final SqlIdCoordinateFactory factory; + /** + * Instantiates a new Sql id coordinate source. + * + * @param factory the factory + * @param coordinateTableName the coordinate table name + * @param dataSource the data source + */ public SqlIdCoordinateSource( SqlIdCoordinateFactory factory, String coordinateTableName, SqlDataSource dataSource) { this.factory = factory; diff --git a/src/main/java/edu/ie3/datamodel/io/source/sql/SqlLoadProfileSource.java b/src/main/java/edu/ie3/datamodel/io/source/sql/SqlLoadProfileSource.java index 3b54684f8..6699e1ddf 100644 --- a/src/main/java/edu/ie3/datamodel/io/source/sql/SqlLoadProfileSource.java +++ b/src/main/java/edu/ie3/datamodel/io/source/sql/SqlLoadProfileSource.java @@ -41,7 +41,9 @@ */ public class SqlLoadProfileSource

> extends LoadProfileSource { + /** The constant log. */ protected static final Logger log = LoggerFactory.getLogger(SqlTimeSeriesSource.class); + private final SqlDataSource dataSource; private final String tableName; @@ -60,6 +62,14 @@ public class SqlLoadProfileSource

private final String queryTime; + /** + * Instantiates a new Sql load profile source. + * + * @param dataSource the data source + * @param metaInformation the meta information + * @param entryClass the entry class + * @param entryFactory the entry factory + */ public SqlLoadProfileSource( SqlDataSource dataSource, LoadProfileMetaInformation metaInformation, @@ -79,6 +89,16 @@ public SqlLoadProfileSource( this.queryTime = createQueryForTime(dataSource.schemaName, tableName, dbTimeColumnName); } + /** + * Instantiates a new Sql load profile source. + * + * @param connector the connector + * @param schemaName the schema name + * @param namingStrategy the naming strategy + * @param metaInformation the meta information + * @param entryClass the entry class + * @param entryFactory the entry factory + */ public SqlLoadProfileSource( SqlConnector connector, String schemaName, diff --git a/src/main/java/edu/ie3/datamodel/io/source/sql/SqlTimeSeriesMappingSource.java b/src/main/java/edu/ie3/datamodel/io/source/sql/SqlTimeSeriesMappingSource.java index 410290967..33e474c04 100644 --- a/src/main/java/edu/ie3/datamodel/io/source/sql/SqlTimeSeriesMappingSource.java +++ b/src/main/java/edu/ie3/datamodel/io/source/sql/SqlTimeSeriesMappingSource.java @@ -17,12 +17,20 @@ import java.util.Set; import java.util.stream.Stream; +/** The type Sql time series mapping source. */ public class SqlTimeSeriesMappingSource extends TimeSeriesMappingSource { private final EntityPersistenceNamingStrategy entityPersistenceNamingStrategy; private final String queryFull; private final String tableName; private final SqlDataSource dataSource; + /** + * Instantiates a new Sql time series mapping source. + * + * @param connector the connector + * @param schemaName the schema name + * @param entityPersistenceNamingStrategy the entity persistence naming strategy + */ public SqlTimeSeriesMappingSource( SqlConnector connector, String schemaName, diff --git a/src/main/java/edu/ie3/datamodel/io/source/sql/SqlTimeSeriesMetaInformationSource.java b/src/main/java/edu/ie3/datamodel/io/source/sql/SqlTimeSeriesMetaInformationSource.java index ffdc47c7a..9c90ef4e4 100644 --- a/src/main/java/edu/ie3/datamodel/io/source/sql/SqlTimeSeriesMetaInformationSource.java +++ b/src/main/java/edu/ie3/datamodel/io/source/sql/SqlTimeSeriesMetaInformationSource.java @@ -32,6 +32,13 @@ public class SqlTimeSeriesMetaInformationSource extends TimeSeriesMetaInformatio private final DatabaseNamingStrategy namingStrategy; private final SqlDataSource dataSource; + /** + * Instantiates a new Sql time series meta information source. + * + * @param connector the connector + * @param schemaName the schema name + * @param databaseNamingStrategy the database naming strategy + */ public SqlTimeSeriesMetaInformationSource( SqlConnector connector, String schemaName, DatabaseNamingStrategy databaseNamingStrategy) { this.dataSource = new SqlDataSource(connector, schemaName, databaseNamingStrategy); diff --git a/src/main/java/edu/ie3/datamodel/io/source/sql/SqlTimeSeriesSource.java b/src/main/java/edu/ie3/datamodel/io/source/sql/SqlTimeSeriesSource.java index e61d98ef2..fe23a7087 100644 --- a/src/main/java/edu/ie3/datamodel/io/source/sql/SqlTimeSeriesSource.java +++ b/src/main/java/edu/ie3/datamodel/io/source/sql/SqlTimeSeriesSource.java @@ -28,9 +28,16 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; +/** + * The type Sql time series source. + * + * @param the type parameter + */ public class SqlTimeSeriesSource extends TimeSeriesSource { + /** The constant log. */ protected static final Logger log = LoggerFactory.getLogger(SqlTimeSeriesSource.class); + private final SqlDataSource dataSource; private final String tableName; @@ -51,6 +58,14 @@ public class SqlTimeSeriesSource extends TimeSeriesSource { private final String queryForValueBefore; private final String queryTime; + /** + * Instantiates a new Sql time series source. + * + * @param sqlDataSource the sql data source + * @param timeSeriesUuid the time series uuid + * @param valueClass the value class + * @param factory the factory + */ public SqlTimeSeriesSource( SqlDataSource sqlDataSource, UUID timeSeriesUuid, diff --git a/src/main/java/edu/ie3/datamodel/models/ElectricCurrentType.java b/src/main/java/edu/ie3/datamodel/models/ElectricCurrentType.java index 7612b8ffd..c1d2d2cd0 100644 --- a/src/main/java/edu/ie3/datamodel/models/ElectricCurrentType.java +++ b/src/main/java/edu/ie3/datamodel/models/ElectricCurrentType.java @@ -11,14 +11,20 @@ /** * Generic electric current type implementation. Main purpose is to indicate the current type that * is provided by a specific asset e.g. {@link edu.ie3.datamodel.models.input.system.EvcsInput} - * - * @version 0.1 - * @since 25.07.20 */ public enum ElectricCurrentType { + /** Alternating Current (AC). */ AC, + + /** Direct Current (DC). */ DC; + /** + * Parse optional. + * + * @param electricCurrentId the electric current id + * @return the optional + */ public static Optional parse(String electricCurrentId) { String cleanedElectricCurrentId = StringUtils.cleanString(electricCurrentId).replace("_", "").trim().toUpperCase(); diff --git a/src/main/java/edu/ie3/datamodel/models/Operable.java b/src/main/java/edu/ie3/datamodel/models/Operable.java index b6b3737d1..b26d837ea 100644 --- a/src/main/java/edu/ie3/datamodel/models/Operable.java +++ b/src/main/java/edu/ie3/datamodel/models/Operable.java @@ -11,12 +11,27 @@ /** Describes an operable Entity, with operation period interval */ public interface Operable extends NestedEntity { - + /** + * Retrieves the operation time associated with this entity. + * + * @return an {@link OperationTime} object representing the operation time. + */ OperationTime getOperationTime(); + /** + * Checks if this entity is in operation on a specified date. + * + * @param date the date to check for operation status + * @return true if the entity is in operation on the given date; false otherwise + */ default boolean inOperationOn(ZonedDateTime date) { return getOperationTime().includes(date); } + /** + * Retrieves the operator associated with this entity. + * + * @return an {@link OperatorInput} object representing the operator. + */ OperatorInput getOperator(); } diff --git a/src/main/java/edu/ie3/datamodel/models/OperationTime.java b/src/main/java/edu/ie3/datamodel/models/OperationTime.java index df4287686..452bb5052 100644 --- a/src/main/java/edu/ie3/datamodel/models/OperationTime.java +++ b/src/main/java/edu/ie3/datamodel/models/OperationTime.java @@ -45,6 +45,8 @@ protected OperationTime(ZonedDateTime startDate, ZonedDateTime endDate, boolean private OperationTime() {} /** + * Not limited operation time. + * * @return an OperationTime without time limitations (= always on) */ public static OperationTime notLimited() { @@ -52,6 +54,8 @@ public static OperationTime notLimited() { } /** + * Gets start date. + * * @return date of operation start, if present */ public Optional getStartDate() { @@ -59,17 +63,26 @@ public Optional getStartDate() { } /** + * Gets end date. + * * @return date of operation end, if present */ public Optional getEndDate() { return Optional.ofNullable(endDate); } + /** + * Is limited boolean. + * + * @return the boolean + */ public boolean isLimited() { return isLimited; } /** + * Gets operation limit. + * * @return Optional.empty(), if the time frame is unlimited
*
* Optional.of(ClosedInterval(startDate, endDate)), if the upper and lower bound is set
@@ -128,6 +141,8 @@ public String toString() { } /** + * Builder operation time builder. + * * @return OperationTimeBuilder instance */ public static OperationTimeBuilder builder() { @@ -137,6 +152,9 @@ public static OperationTimeBuilder builder() { /** Builder class for {@link edu.ie3.datamodel.models.OperationTime} */ public static class OperationTimeBuilder { + /** Default constructor for OperationTimeBuilder. */ + public OperationTimeBuilder() {} + private ZonedDateTime startDate; private ZonedDateTime endDate; diff --git a/src/main/java/edu/ie3/datamodel/models/UniqueEntity.java b/src/main/java/edu/ie3/datamodel/models/UniqueEntity.java index 3d57c1312..ce8da66df 100644 --- a/src/main/java/edu/ie3/datamodel/models/UniqueEntity.java +++ b/src/main/java/edu/ie3/datamodel/models/UniqueEntity.java @@ -14,16 +14,28 @@ public abstract class UniqueEntity implements Entity, Serializable { /** Field name of {@link UniqueEntity} uuid */ public static final String UUID_FIELD_NAME = "uuid"; + /** Unique identifier for this entity. */ private final UUID uuid; + /** Default constructor that generates a new random UUID. */ protected UniqueEntity() { uuid = UUID.randomUUID(); } + /** + * Constructor that allows setting a specific UUID. + * + * @param uuid the UUID to set; if null, a new random UUID will be generated + */ protected UniqueEntity(UUID uuid) { this.uuid = uuid == null ? UUID.randomUUID() : uuid; } + /** + * Gets the unique identifier (UUID) for this entity. + * + * @return the unique identifier of this entity + */ public UUID getUuid() { return uuid; } @@ -49,32 +61,58 @@ public String toString() { /** * Abstract class for all builder that build child entities of abstract class {@link UniqueEntity} * - * @version 0.1 - * @since 05.06.20 + * @param The builder type extending from {@link UniqueEntityBuilder} */ public abstract static class UniqueEntityCopyBuilder implements UniqueEntityBuilder { private UUID uuid; + /** + * Constructor that initializes the builder with an existing entity's UUID. + * + * @param entity the existing entity to copy the UUID from + */ protected UniqueEntityCopyBuilder(UniqueEntity entity) { this.uuid = entity.getUuid(); } + /** + * Sets the UUID for this builder. + * + * @param uuid the new UUID to set + * @return this concrete builder instance + */ public B uuid(UUID uuid) { this.uuid = uuid; return thisInstance(); } + /** + * Returns the UUID associated with this builder. + * + * @return the unique identifier (UUID) for this builder + */ protected UUID getUuid() { return uuid; } + /** + * Returns an instance of the concrete builder implementation. + * + * @return This concrete builder instance. + */ protected abstract B thisInstance(); } + /** Builds and returns a unique entity. */ protected interface UniqueEntityBuilder { + /** + * Build method. + * + * @return an instance of UniqueEntity + */ UniqueEntity build(); } } diff --git a/src/main/java/edu/ie3/datamodel/models/input/AssetInput.java b/src/main/java/edu/ie3/datamodel/models/input/AssetInput.java index 3904c31f4..ef1663861 100644 --- a/src/main/java/edu/ie3/datamodel/models/input/AssetInput.java +++ b/src/main/java/edu/ie3/datamodel/models/input/AssetInput.java @@ -56,10 +56,20 @@ public OperatorInput getOperator() { return operator; } + /** + * Gets id. + * + * @return the id + */ public String getId() { return id; } + /** + * Copy asset input copy builder. + * + * @return the asset input copy builder + */ public abstract AssetInputCopyBuilder copy(); @Override @@ -94,6 +104,7 @@ public String toString() { /** * Abstract class for all builder that build child entities of abstract class {@link AssetInput} * + * @param the type parameter * @version 0.1 * @since 05.06.20 */ @@ -104,6 +115,11 @@ public abstract static class AssetInputCopyBuilder copy(); @Override @@ -48,7 +60,9 @@ public String toString() { /** * Abstract class for all builder that build child entities of abstract class {@link - * AssetTypeInput} + * AssetTypeInput}* + * + * @param the type parameter */ public abstract static class AssetTypeInputCopyBuilder< B extends AssetTypeInput.AssetTypeInputCopyBuilder> @@ -56,16 +70,32 @@ public abstract static class AssetTypeInputCopyBuilder< private String id; + /** + * Instantiates a new Asset type input copy builder. + * + * @param entity the entity + */ protected AssetTypeInputCopyBuilder(AssetTypeInput entity) { super(entity); this.id = entity.getId(); } + /** + * Id b. + * + * @param id the id + * @return the b + */ public B id(String id) { this.id = id; return thisInstance(); } + /** + * Gets id. + * + * @return the id + */ protected String getId() { return id; } diff --git a/src/main/java/edu/ie3/datamodel/models/input/EmInput.java b/src/main/java/edu/ie3/datamodel/models/input/EmInput.java index e75a5e716..906ae66bb 100644 --- a/src/main/java/edu/ie3/datamodel/models/input/EmInput.java +++ b/src/main/java/edu/ie3/datamodel/models/input/EmInput.java @@ -12,6 +12,7 @@ import java.util.Optional; import java.util.UUID; +/** The type Em input. */ public class EmInput extends AssetInput implements HasEm { /** Reference to the control strategy to be used for this model */ @@ -59,6 +60,11 @@ public EmInput(UUID uuid, String id, String emControlStrategy, EmInput controlli this.controllingEm = controllingEm; } + /** + * Gets control strategy. + * + * @return the control strategy + */ public String getControlStrategy() { return controlStrategy; } @@ -105,23 +111,41 @@ public Optional getControllingEm() { return Optional.ofNullable(controllingEm); } + /** The type Em input copy builder. */ public static class EmInputCopyBuilder extends AssetInputCopyBuilder { private String controlStrategy; private EmInput parentEm; + /** + * Instantiates a new Em input copy builder. + * + * @param entity the entity + */ protected EmInputCopyBuilder(EmInput entity) { super(entity); this.controlStrategy = entity.getControlStrategy(); this.parentEm = entity.controllingEm; } + /** + * Control strategy em input copy builder. + * + * @param controlStrategy the control strategy + * @return the em input copy builder + */ public EmInputCopyBuilder controlStrategy(String controlStrategy) { this.controlStrategy = controlStrategy; return thisInstance(); } + /** + * Parent em em input copy builder. + * + * @param parentEm the parent em + * @return the em input copy builder + */ public EmInputCopyBuilder parentEm(EmInput parentEm) { this.parentEm = parentEm; return thisInstance(); diff --git a/src/main/java/edu/ie3/datamodel/models/input/IdCoordinateInput.java b/src/main/java/edu/ie3/datamodel/models/input/IdCoordinateInput.java index ab584c6fe..77e03d718 100644 --- a/src/main/java/edu/ie3/datamodel/models/input/IdCoordinateInput.java +++ b/src/main/java/edu/ie3/datamodel/models/input/IdCoordinateInput.java @@ -8,6 +8,12 @@ import edu.ie3.util.geo.GeoUtils; import org.locationtech.jts.geom.Point; +/** + * The type Id coordinate input. + * + * @param id of the pair + * @param point of the pair + */ public record IdCoordinateInput(Integer id, Point point) implements InputEntity { /** * Constructor for an {@link IdCoordinateInput}. diff --git a/src/main/java/edu/ie3/datamodel/models/input/MeasurementUnitInput.java b/src/main/java/edu/ie3/datamodel/models/input/MeasurementUnitInput.java index 663c8d5c5..6c461f772 100644 --- a/src/main/java/edu/ie3/datamodel/models/input/MeasurementUnitInput.java +++ b/src/main/java/edu/ie3/datamodel/models/input/MeasurementUnitInput.java @@ -78,22 +78,47 @@ public MeasurementUnitInput( this.q = q; } + /** + * Gets node. + * + * @return the node + */ public NodeInput getNode() { return node; } + /** + * Gets v mag. + * + * @return the v mag + */ public boolean getVMag() { return vMag; } + /** + * Gets v ang. + * + * @return the v ang + */ public boolean getVAng() { return vAng; } + /** + * Gets p. + * + * @return the p + */ public boolean getP() { return p; } + /** + * Gets q. + * + * @return the q + */ public boolean getQ() { return q; } @@ -152,7 +177,7 @@ public List allNodes() { /** * A builder pattern based approach to create copies of {@link MeasurementUnitInput} entities with * altered field values. For detailed field descriptions refer to java docs of {@link - * MeasurementUnitInput} + * MeasurementUnitInput}* * * @version 0.1 * @since 05.06.20 @@ -181,26 +206,56 @@ public MeasurementUnitInput build() { getUuid(), getId(), getOperator(), getOperationTime(), node, vMag, vAng, p, q); } + /** + * Node measurement unit input copy builder. + * + * @param node the node + * @return the measurement unit input copy builder + */ public MeasurementUnitInputCopyBuilder node(NodeInput node) { this.node = node; return thisInstance(); } + /** + * V mag measurement unit input copy builder. + * + * @param vMag the v mag + * @return the measurement unit input copy builder + */ public MeasurementUnitInputCopyBuilder vMag(boolean vMag) { this.vMag = vMag; return thisInstance(); } + /** + * V ang measurement unit input copy builder. + * + * @param vAng the v ang + * @return the measurement unit input copy builder + */ public MeasurementUnitInputCopyBuilder vAng(boolean vAng) { this.vAng = vAng; return thisInstance(); } + /** + * P measurement unit input copy builder. + * + * @param p the p + * @return the measurement unit input copy builder + */ public MeasurementUnitInputCopyBuilder p(boolean p) { this.p = p; return thisInstance(); } + /** + * Q measurement unit input copy builder. + * + * @param q the q + * @return the measurement unit input copy builder + */ public MeasurementUnitInputCopyBuilder q(boolean q) { this.q = q; return thisInstance(); diff --git a/src/main/java/edu/ie3/datamodel/models/input/NodeInput.java b/src/main/java/edu/ie3/datamodel/models/input/NodeInput.java index b4bc55aec..4b6425331 100644 --- a/src/main/java/edu/ie3/datamodel/models/input/NodeInput.java +++ b/src/main/java/edu/ie3/datamodel/models/input/NodeInput.java @@ -98,22 +98,47 @@ public NodeInput( this.subnet = subnet; } + /** + * Gets target. + * + * @return the target + */ public ComparableQuantity getvTarget() { return vTarget; } + /** + * Is slack boolean. + * + * @return the boolean + */ public boolean isSlack() { return slack; } + /** + * Gets geo position. + * + * @return the geo position + */ public Point getGeoPosition() { return geoPosition; } + /** + * Gets volt lvl. + * + * @return the volt lvl + */ public VoltageLevel getVoltLvl() { return voltLvl; } + /** + * Gets subnet. + * + * @return the subnet + */ public int getSubnet() { return subnet; } @@ -204,26 +229,56 @@ public NodeInput build() { subnet); } + /** + * V target node input copy builder. + * + * @param vTarget the v target + * @return the node input copy builder + */ public NodeInputCopyBuilder vTarget(ComparableQuantity vTarget) { this.vTarget = vTarget; return thisInstance(); } + /** + * Slack node input copy builder. + * + * @param isSlack the is slack + * @return the node input copy builder + */ public NodeInputCopyBuilder slack(boolean isSlack) { this.slack = isSlack; return thisInstance(); } + /** + * Geo position node input copy builder. + * + * @param geoPosition the geo position + * @return the node input copy builder + */ public NodeInputCopyBuilder geoPosition(Point geoPosition) { this.geoPosition = geoPosition; return thisInstance(); } + /** + * Volt lvl node input copy builder. + * + * @param voltLvl the volt lvl + * @return the node input copy builder + */ public NodeInputCopyBuilder voltLvl(VoltageLevel voltLvl) { this.voltLvl = voltLvl; return thisInstance(); } + /** + * Subnet node input copy builder. + * + * @param subnet the subnet + * @return the node input copy builder + */ public NodeInputCopyBuilder subnet(int subnet) { this.subnet = subnet; return thisInstance(); diff --git a/src/main/java/edu/ie3/datamodel/models/input/OperatorInput.java b/src/main/java/edu/ie3/datamodel/models/input/OperatorInput.java index 1886ec918..3e03164b3 100644 --- a/src/main/java/edu/ie3/datamodel/models/input/OperatorInput.java +++ b/src/main/java/edu/ie3/datamodel/models/input/OperatorInput.java @@ -11,6 +11,7 @@ /** Describes an operator, that operates assets */ public class OperatorInput extends UniqueInputEntity { + /** The constant NO_OPERATOR_ASSIGNED. */ public static final OperatorInput NO_OPERATOR_ASSIGNED = new OperatorInput(UUID.randomUUID(), "NO_OPERATOR_ASSIGNED"); @@ -28,10 +29,20 @@ public OperatorInput(UUID uuid, String id) { this.id = id; } + /** + * Gets id. + * + * @return the id + */ public String getId() { return id; } + /** + * Copy operator input copy builder. + * + * @return the operator input copy builder + */ public OperatorInputCopyBuilder copy() { return new OperatorInputCopyBuilder(this); } @@ -57,7 +68,7 @@ public String toString() { /** * A builder pattern based approach to create copies of {@link OperatorInput} entities with * altered field values. For detailed field descriptions refer to java docs of {@link - * OperatorInput} + * OperatorInput}* * * @version 0.1 * @since 05.06.20 @@ -77,6 +88,12 @@ public OperatorInput build() { return new OperatorInput(getUuid(), id); } + /** + * Id operator input copy builder. + * + * @param id the id + * @return the operator input copy builder + */ public OperatorInputCopyBuilder id(String id) { this.id = id; return thisInstance(); diff --git a/src/main/java/edu/ie3/datamodel/models/input/UniqueInputEntity.java b/src/main/java/edu/ie3/datamodel/models/input/UniqueInputEntity.java index a60b5dc54..02a2e3e3b 100644 --- a/src/main/java/edu/ie3/datamodel/models/input/UniqueInputEntity.java +++ b/src/main/java/edu/ie3/datamodel/models/input/UniqueInputEntity.java @@ -11,6 +11,11 @@ /** Functionless class to describe that all subclasses are unique input classes */ public abstract class UniqueInputEntity extends UniqueEntity implements InputEntity { + /** + * Instantiates a new Unique input entity. + * + * @param uuid the uuid + */ protected UniqueInputEntity(UUID uuid) { super(uuid); } 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 576c7ed3b..c8813d979 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 @@ -67,10 +67,20 @@ protected ConnectorInput( this.parallelDevices = parallelDevices; } + /** + * Gets node a. + * + * @return the node a + */ public NodeInput getNodeA() { return nodeA; } + /** + * Gets node b. + * + * @return the node b + */ public NodeInput getNodeB() { return nodeB; } @@ -83,6 +93,11 @@ public List allNodes() { return List.of(getNodeA(), getNodeB()); } + /** + * Gets parallel devices. + * + * @return the parallel devices + */ public int getParallelDevices() { return parallelDevices; } @@ -124,10 +139,9 @@ public String toString() { /** * Abstract class for all builder that build child entities of abstract class {@link - * ConnectorInput} + * ConnectorInput}* * - * @version 0.1 - * @since 05.06.20 + * @param The builder type extending from {@link ConnectorInputCopyBuilder}. */ public abstract static class ConnectorInputCopyBuilder> extends AssetInputCopyBuilder { @@ -136,6 +150,11 @@ public abstract static class ConnectorInputCopyBuilder getLength() { return length; } + /** + * Gets geo position. + * + * @return the geo position + */ public LineString getGeoPosition() { return geoPosition; } + /** + * Gets olm characteristic. + * + * @return the olm characteristic + */ public OlmCharacteristicInput getOlmCharacteristic() { return olmCharacteristic; } @@ -206,21 +221,45 @@ public LineInput build() { olmCharacteristic); } + /** + * Geo position line input copy builder. + * + * @param geoPosition the geo position + * @return the line input copy builder + */ public LineInputCopyBuilder geoPosition(LineString geoPosition) { this.geoPosition = geoPosition; return thisInstance(); } + /** + * Type line input copy builder. + * + * @param type the type + * @return the line input copy builder + */ public LineInputCopyBuilder type(LineTypeInput type) { this.type = type; return thisInstance(); } + /** + * Length line input copy builder. + * + * @param length the length + * @return the line input copy builder + */ public LineInputCopyBuilder length(ComparableQuantity length) { this.length = length; return thisInstance(); } + /** + * Olm characteristic line input copy builder. + * + * @param olmCharacteristic the olm characteristic + * @return the line input copy builder + */ public LineInputCopyBuilder olmCharacteristic(OlmCharacteristicInput olmCharacteristic) { this.olmCharacteristic = olmCharacteristic; return thisInstance(); diff --git a/src/main/java/edu/ie3/datamodel/models/input/connector/SwitchInput.java b/src/main/java/edu/ie3/datamodel/models/input/connector/SwitchInput.java index 6ca1f9b6b..b078121ab 100644 --- a/src/main/java/edu/ie3/datamodel/models/input/connector/SwitchInput.java +++ b/src/main/java/edu/ie3/datamodel/models/input/connector/SwitchInput.java @@ -53,6 +53,11 @@ public SwitchInput(UUID uuid, String id, NodeInput nodeA, NodeInput nodeB, boole this.closed = closed; } + /** + * Is closed boolean. + * + * @return the boolean + */ public boolean isClosed() { return closed; } @@ -121,6 +126,12 @@ public SwitchInput build() { getUuid(), getId(), getOperator(), getOperationTime(), getNodeA(), getNodeB(), closed); } + /** + * Closed switch input copy builder. + * + * @param closed the closed + * @return the switch input copy builder + */ public SwitchInputCopyBuilder closed(boolean closed) { this.closed = closed; return thisInstance(); 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 85a49abe5..4aeb3bf89 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 @@ -17,7 +17,7 @@ /** * Describes a two winding transformer, that is connected to two {@link - * edu.ie3.datamodel.models.input.NodeInput}s + * edu.ie3.datamodel.models.input.NodeInput}*s */ public class Transformer2WInput extends TransformerInput implements HasType { /** Type of this 2W transformer, containing default values for transformers of this kind */ @@ -129,7 +129,7 @@ public String toString() { /** * A builder pattern based approach to create copies of {@link Transformer2WInput} entities with * altered field values. For detailed field descriptions refer to java docs of {@link - * Transformer2WInput} + * Transformer2WInput}* * * @version 0.1 * @since 05.06.20 @@ -159,6 +159,12 @@ public Transformer2WInput build() { isAutoTap()); } + /** + * Type transformer 2 w input copy builder. + * + * @param type the type + * @return the transformer 2 w input copy builder + */ public Transformer2WInputCopyBuilder type(Transformer2WTypeInput type) { this.type = type; return thisInstance(); 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 a0fcf54cd..4d4a17f00 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 @@ -18,7 +18,7 @@ /** * Describes a three winding transformer, that is connected to three {@link - * edu.ie3.datamodel.models.input.NodeInput}s + * edu.ie3.datamodel.models.input.NodeInput}*s */ public class Transformer3WInput extends TransformerInput implements HasType { /** Type of this 3W transformer, containing default values for transformers of this kind */ @@ -234,6 +234,8 @@ public NodeInput getNodeB() { } /** + * Gets node c. + * * @return the node with the lowest voltage level */ public NodeInput getNodeC() { @@ -241,6 +243,8 @@ public NodeInput getNodeC() { } /** + * Gets node internal. + * * @return The internal node of the T equivalent circuit */ public NodeInput getNodeInternal() { @@ -297,7 +301,7 @@ public List allNodes() { /** * A builder pattern based approach to create copies of {@link Transformer3WInput} entities with * altered field values. For detailed field descriptions refer to java docs of {@link - * Transformer3WInput} + * Transformer3WInput}* * * @version 0.1 * @since 05.06.20 @@ -336,16 +340,34 @@ public Transformer3WInput build() { internalNode.copy().slack(internSlack).build()); } + /** + * Type transformer 3 w input copy builder. + * + * @param type the type + * @return the transformer 3 w input copy builder + */ public Transformer3WInputCopyBuilder type(Transformer3WTypeInput type) { this.type = type; return thisInstance(); } + /** + * Node c transformer 3 w input copy builder. + * + * @param nodeC the node c + * @return the transformer 3 w input copy builder + */ public Transformer3WInputCopyBuilder nodeC(NodeInput nodeC) { this.nodeC = nodeC; return thisInstance(); } + /** + * Internal slack transformer 3 w input copy builder. + * + * @param internalNodeIsSlack the internal node is slack + * @return the transformer 3 w input copy builder + */ public Transformer3WInputCopyBuilder internalSlack(boolean internalNodeIsSlack) { this.internSlack = internalNodeIsSlack; return thisInstance(); 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 2acd38143..f5f2deb52 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 @@ -73,10 +73,20 @@ protected TransformerInput( this.autoTap = autoTap; } + /** + * Is auto tap boolean. + * + * @return the boolean + */ public boolean isAutoTap() { return autoTap; } + /** + * Gets tap pos. + * + * @return the tap pos + */ public int getTapPos() { return tapPos; } @@ -123,10 +133,9 @@ public String toString() { /** * Abstract class for all builder that build child entities of abstract class {@link - * TransformerInput} + * TransformerInput}* * - * @version 0.1 - * @since 05.06.20 + * @param The builder type extending from {@link TransformerInputCopyBuilder}. */ public abstract static class TransformerInputCopyBuilder> extends ConnectorInputCopyBuilder { @@ -134,26 +143,53 @@ public abstract static class TransformerInputCopyBuilder vRated; /** + * Instantiates a new Line type input. + * * @param uuid of the input entity * @param id of this type * @param b Specific phase-to-ground susceptance for this type of line (typically in µS/km) @@ -63,26 +65,56 @@ public LineTypeInput( this.vRated = vRated.to(StandardUnits.RATED_VOLTAGE_MAGNITUDE); } + /** + * Gets b. + * + * @return the b + */ public ComparableQuantity getB() { return b; } + /** + * Gets g. + * + * @return the g + */ public ComparableQuantity getG() { return g; } + /** + * Gets r. + * + * @return the r + */ public ComparableQuantity getR() { return r; } + /** + * Gets x. + * + * @return the x + */ public ComparableQuantity getX() { return x; } + /** + * Gets max. + * + * @return the max + */ public ComparableQuantity getiMax() { return iMax; } + /** + * Gets rated. + * + * @return the rated + */ public ComparableQuantity getvRated() { return vRated; } @@ -134,7 +166,7 @@ public String toString() { /** * Abstract class for all builder that build child entities of abstract class {@link - * LineTypeInput} + * LineTypeInput}* */ public static final class LineTypeInputCopyBuilder extends AssetTypeInput.AssetTypeInputCopyBuilder { @@ -146,6 +178,11 @@ public static final class LineTypeInputCopyBuilder private ComparableQuantity iMax; private ComparableQuantity vRated; + /** + * Instantiates a new Line type input copy builder. + * + * @param entity the entity + */ protected LineTypeInputCopyBuilder(LineTypeInput entity) { super(entity); this.b = entity.b; @@ -156,32 +193,67 @@ protected LineTypeInputCopyBuilder(LineTypeInput entity) { this.vRated = entity.vRated; } - /** Setter */ + /** + * Setter + * + * @param b the b + * @return the line type input copy builder + */ public LineTypeInputCopyBuilder b(ComparableQuantity b) { this.b = b; return thisInstance(); } + /** + * G line type input copy builder. + * + * @param g the g + * @return the line type input copy builder + */ public LineTypeInputCopyBuilder g(ComparableQuantity g) { this.g = g; return thisInstance(); } + /** + * R line type input copy builder. + * + * @param r the r + * @return the line type input copy builder + */ public LineTypeInputCopyBuilder r(ComparableQuantity r) { this.r = r; return thisInstance(); } + /** + * X line type input copy builder. + * + * @param x the x + * @return the line type input copy builder + */ public LineTypeInputCopyBuilder x(ComparableQuantity x) { this.x = x; return thisInstance(); } + /** + * Max line type input copy builder. + * + * @param iMax the max + * @return the line type input copy builder + */ public LineTypeInputCopyBuilder iMax(ComparableQuantity iMax) { this.iMax = iMax; return thisInstance(); } + /** + * V rated line type input copy builder. + * + * @param vRated the v rated + * @return the line type input copy builder + */ public LineTypeInputCopyBuilder vRated(ComparableQuantity vRated) { this.vRated = vRated; return thisInstance(); diff --git a/src/main/java/edu/ie3/datamodel/models/input/connector/type/Transformer2WTypeInput.java b/src/main/java/edu/ie3/datamodel/models/input/connector/type/Transformer2WTypeInput.java index 072d5fb85..3b41bcd83 100644 --- a/src/main/java/edu/ie3/datamodel/models/input/connector/type/Transformer2WTypeInput.java +++ b/src/main/java/edu/ie3/datamodel/models/input/connector/type/Transformer2WTypeInput.java @@ -54,6 +54,8 @@ public class Transformer2WTypeInput extends AssetTypeInput { private final int tapMax; /** + * Instantiates a new Transformer 2 w type input. + * * @param uuid of the input entity * @param id of the type * @param rSc Short circuit resistance @@ -102,54 +104,119 @@ public Transformer2WTypeInput( this.tapMax = tapMax; } + /** + * Gets sc. + * + * @return the sc + */ public ComparableQuantity getrSc() { return rSc; } + /** + * Gets sc. + * + * @return the sc + */ public ComparableQuantity getxSc() { return xSc; } + /** + * Gets rated. + * + * @return the rated + */ public ComparableQuantity getsRated() { return sRated; } + /** + * Gets rated a. + * + * @return the rated a + */ public ComparableQuantity getvRatedA() { return vRatedA; } + /** + * Gets rated b. + * + * @return the rated b + */ public ComparableQuantity getvRatedB() { return vRatedB; } + /** + * Gets m. + * + * @return the m + */ public ComparableQuantity getgM() { return gM; } + /** + * Gets m. + * + * @return the m + */ public ComparableQuantity getbM() { return bM; } + /** + * Gets v. + * + * @return the v + */ public ComparableQuantity getdV() { return dV; } + /** + * Gets phi. + * + * @return the phi + */ public ComparableQuantity getdPhi() { return dPhi; } + /** + * Is tap side boolean. + * + * @return the boolean + */ public boolean isTapSide() { return tapSide; } + /** + * Gets tap neutr. + * + * @return the tap neutr + */ public int getTapNeutr() { return tapNeutr; } + /** + * Gets tap min. + * + * @return the tap min + */ public int getTapMin() { return tapMin; } + /** + * Gets tap max. + * + * @return the tap max + */ public int getTapMax() { return tapMax; } @@ -236,7 +303,7 @@ public String toString() { /** * Abstract class for all builder that build child entities of abstract class {@link - * Transformer2WTypeInput} + * Transformer2WTypeInput}* */ public static final class Transformer2WTypeInputCopyBuilder extends AssetTypeInput.AssetTypeInputCopyBuilder { @@ -272,69 +339,146 @@ private Transformer2WTypeInputCopyBuilder(Transformer2WTypeInput entity) { this.tapMax = entity.tapMax; } - /** Setter */ + /** + * Setter + * + * @param rSc the r sc + * @return the transformer 2 w type input copy builder + */ public Transformer2WTypeInputCopyBuilder rSc(ComparableQuantity rSc) { this.rSc = rSc; return thisInstance(); } + /** + * X sc transformer 2 w type input copy builder. + * + * @param xSc the x sc + * @return the transformer 2 w type input copy builder + */ public Transformer2WTypeInputCopyBuilder xSc(ComparableQuantity xSc) { this.xSc = xSc; return thisInstance(); } + /** + * S rated transformer 2 w type input copy builder. + * + * @param sRated the s rated + * @return the transformer 2 w type input copy builder + */ public Transformer2WTypeInputCopyBuilder sRated(ComparableQuantity sRated) { this.sRated = sRated; return thisInstance(); } + /** + * V rated a transformer 2 w type input copy builder. + * + * @param vRatedA the v rated a + * @return the transformer 2 w type input copy builder + */ public Transformer2WTypeInputCopyBuilder vRatedA( ComparableQuantity vRatedA) { this.vRatedA = vRatedA; return thisInstance(); } + /** + * V rated b transformer 2 w type input copy builder. + * + * @param vRatedB the v rated b + * @return the transformer 2 w type input copy builder + */ public Transformer2WTypeInputCopyBuilder vRatedB( ComparableQuantity vRatedB) { this.vRatedB = vRatedB; return thisInstance(); } + /** + * G m transformer 2 w type input copy builder. + * + * @param gM the g m + * @return the transformer 2 w type input copy builder + */ public Transformer2WTypeInputCopyBuilder gM(ComparableQuantity gM) { this.gM = gM; return thisInstance(); } + /** + * B m transformer 2 w type input copy builder. + * + * @param bM the b m + * @return the transformer 2 w type input copy builder + */ public Transformer2WTypeInputCopyBuilder bM(ComparableQuantity bM) { this.bM = bM; return thisInstance(); } + /** + * D v transformer 2 w type input copy builder. + * + * @param dV the d v + * @return the transformer 2 w type input copy builder + */ public Transformer2WTypeInputCopyBuilder dV(ComparableQuantity dV) { this.dV = dV; return thisInstance(); } + /** + * D phi transformer 2 w type input copy builder. + * + * @param dPhi the d phi + * @return the transformer 2 w type input copy builder + */ public Transformer2WTypeInputCopyBuilder dPhi(ComparableQuantity dPhi) { this.dPhi = dPhi; return thisInstance(); } + /** + * Tap side transformer 2 w type input copy builder. + * + * @param tapSide the tap side + * @return the transformer 2 w type input copy builder + */ public Transformer2WTypeInputCopyBuilder tapSide(boolean tapSide) { this.tapSide = tapSide; return thisInstance(); } + /** + * Tap neutr transformer 2 w type input copy builder. + * + * @param tapNeutr the tap neutr + * @return the transformer 2 w type input copy builder + */ public Transformer2WTypeInputCopyBuilder tapNeutr(int tapNeutr) { this.tapNeutr = tapNeutr; return thisInstance(); } + /** + * Tap min transformer 2 w type input copy builder. + * + * @param tapMin the tap min + * @return the transformer 2 w type input copy builder + */ public Transformer2WTypeInputCopyBuilder tapMin(int tapMin) { this.tapMin = tapMin; return thisInstance(); } + /** + * Tap max transformer 2 w type input copy builder. + * + * @param tapMax the tap max + * @return the transformer 2 w type input copy builder + */ public Transformer2WTypeInputCopyBuilder tapMax(int tapMax) { this.tapMax = tapMax; return thisInstance(); diff --git a/src/main/java/edu/ie3/datamodel/models/input/connector/type/Transformer3WTypeInput.java b/src/main/java/edu/ie3/datamodel/models/input/connector/type/Transformer3WTypeInput.java index f08daf255..354ad142b 100644 --- a/src/main/java/edu/ie3/datamodel/models/input/connector/type/Transformer3WTypeInput.java +++ b/src/main/java/edu/ie3/datamodel/models/input/connector/type/Transformer3WTypeInput.java @@ -72,6 +72,8 @@ public class Transformer3WTypeInput extends AssetTypeInput { private final int tapMax; /** + * Instantiates a new Transformer 3 w type input. + * * @param uuid of the input entity * @param id of this type * @param sRatedA Rated apparent power of the high voltage winding @@ -138,78 +140,173 @@ public Transformer3WTypeInput( this.tapMax = tapMax; } + /** + * Gets rated a. + * + * @return the rated a + */ public ComparableQuantity getsRatedA() { return sRatedA; } + /** + * Gets rated b. + * + * @return the rated b + */ public ComparableQuantity getsRatedB() { return sRatedB; } + /** + * Gets rated c. + * + * @return the rated c + */ public ComparableQuantity getsRatedC() { return sRatedC; } + /** + * Gets rated a. + * + * @return the rated a + */ public ComparableQuantity getvRatedA() { return vRatedA; } + /** + * Gets rated b. + * + * @return the rated b + */ public ComparableQuantity getvRatedB() { return vRatedB; } + /** + * Gets rated c. + * + * @return the rated c + */ public ComparableQuantity getvRatedC() { return vRatedC; } + /** + * Gets sc a. + * + * @return the sc a + */ public ComparableQuantity getrScA() { return rScA; } + /** + * Gets sc b. + * + * @return the sc b + */ public ComparableQuantity getrScB() { return rScB; } + /** + * Gets sc c. + * + * @return the sc c + */ public ComparableQuantity getrScC() { return rScC; } + /** + * Gets sc a. + * + * @return the sc a + */ public ComparableQuantity getxScA() { return xScA; } + /** + * Gets sc b. + * + * @return the sc b + */ public ComparableQuantity getxScB() { return xScB; } + /** + * Gets sc c. + * + * @return the sc c + */ public ComparableQuantity getxScC() { return xScC; } + /** + * Gets m. + * + * @return the m + */ public ComparableQuantity getgM() { return gM; } + /** + * Gets m. + * + * @return the m + */ public ComparableQuantity getbM() { return bM; } + /** + * Gets v. + * + * @return the v + */ public ComparableQuantity getdV() { return dV; } + /** + * Gets phi. + * + * @return the phi + */ public ComparableQuantity getdPhi() { return dPhi; } + /** + * Gets tap neutr. + * + * @return the tap neutr + */ public int getTapNeutr() { return tapNeutr; } + /** + * Gets tap min. + * + * @return the tap min + */ public int getTapMin() { return tapMin; } + /** + * Gets tap max. + * + * @return the tap max + */ public int getTapMax() { return tapMax; } @@ -320,7 +417,7 @@ public String toString() { /** * Abstract class for all builder that build child entities of abstract class {@link - * Transformer3WTypeInput} + * Transformer3WTypeInput}* */ public static final class Transformer3WTypeInputCopyBuilder extends AssetTypeInput.AssetTypeInputCopyBuilder { @@ -368,100 +465,213 @@ private Transformer3WTypeInputCopyBuilder(Transformer3WTypeInput entity) { this.tapMax = entity.tapMax; } - /** Setter */ + /** + * Setter + * + * @param sRatedA the s rated a + * @return the transformer 3 w type input copy builder + */ public Transformer3WTypeInputCopyBuilder sRatedA(ComparableQuantity sRatedA) { this.sRatedA = sRatedA; return thisInstance(); } + /** + * S rated b transformer 3 w type input copy builder. + * + * @param sRatedB the s rated b + * @return the transformer 3 w type input copy builder + */ public Transformer3WTypeInputCopyBuilder sRatedB(ComparableQuantity sRatedB) { this.sRatedB = sRatedB; return thisInstance(); } + /** + * S rated c transformer 3 w type input copy builder. + * + * @param sRatedC the s rated c + * @return the transformer 3 w type input copy builder + */ public Transformer3WTypeInputCopyBuilder sRatedC(ComparableQuantity sRatedC) { this.sRatedC = sRatedC; return thisInstance(); } + /** + * V rated a transformer 3 w type input copy builder. + * + * @param vRatedA the v rated a + * @return the transformer 3 w type input copy builder + */ public Transformer3WTypeInputCopyBuilder vRatedA( ComparableQuantity vRatedA) { this.vRatedA = vRatedA; return thisInstance(); } + /** + * V rated b transformer 3 w type input copy builder. + * + * @param vRatedB the v rated b + * @return the transformer 3 w type input copy builder + */ public Transformer3WTypeInputCopyBuilder vRatedB( ComparableQuantity vRatedB) { this.vRatedB = vRatedB; return thisInstance(); } + /** + * V rated c transformer 3 w type input copy builder. + * + * @param vRatedC the v rated c + * @return the transformer 3 w type input copy builder + */ public Transformer3WTypeInputCopyBuilder vRatedC( ComparableQuantity vRatedC) { this.vRatedC = vRatedC; return thisInstance(); } + /** + * R sc a transformer 3 w type input copy builder. + * + * @param rScA the r sc a + * @return the transformer 3 w type input copy builder + */ public Transformer3WTypeInputCopyBuilder rScA(ComparableQuantity rScA) { this.rScA = rScA; return thisInstance(); } + /** + * R sc b transformer 3 w type input copy builder. + * + * @param rScB the r sc b + * @return the transformer 3 w type input copy builder + */ public Transformer3WTypeInputCopyBuilder rScB(ComparableQuantity rScB) { this.rScB = rScB; return thisInstance(); } + /** + * R sc c transformer 3 w type input copy builder. + * + * @param rScC the r sc c + * @return the transformer 3 w type input copy builder + */ public Transformer3WTypeInputCopyBuilder rScC(ComparableQuantity rScC) { this.rScC = rScC; return thisInstance(); } + /** + * X sc a transformer 3 w type input copy builder. + * + * @param xScA the x sc a + * @return the transformer 3 w type input copy builder + */ public Transformer3WTypeInputCopyBuilder xScA(ComparableQuantity xScA) { this.xScA = xScA; return thisInstance(); } + /** + * X sc b transformer 3 w type input copy builder. + * + * @param xScB the x sc b + * @return the transformer 3 w type input copy builder + */ public Transformer3WTypeInputCopyBuilder xScB(ComparableQuantity xScB) { this.xScB = xScB; return thisInstance(); } + /** + * X sc c transformer 3 w type input copy builder. + * + * @param xScC the x sc c + * @return the transformer 3 w type input copy builder + */ public Transformer3WTypeInputCopyBuilder xScC(ComparableQuantity xScC) { this.xScC = xScC; return thisInstance(); } + /** + * G m transformer 3 w type input copy builder. + * + * @param gM the g m + * @return the transformer 3 w type input copy builder + */ public Transformer3WTypeInputCopyBuilder gM(ComparableQuantity gM) { this.gM = gM; return thisInstance(); } + /** + * B m transformer 3 w type input copy builder. + * + * @param bM the b m + * @return the transformer 3 w type input copy builder + */ public Transformer3WTypeInputCopyBuilder bM(ComparableQuantity bM) { this.bM = bM; return thisInstance(); } + /** + * D v transformer 3 w type input copy builder. + * + * @param dV the d v + * @return the transformer 3 w type input copy builder + */ public Transformer3WTypeInputCopyBuilder dV(ComparableQuantity dV) { this.dV = dV; return thisInstance(); } + /** + * D phi transformer 3 w type input copy builder. + * + * @param dPhi the d phi + * @return the transformer 3 w type input copy builder + */ public Transformer3WTypeInputCopyBuilder dPhi(ComparableQuantity dPhi) { this.dPhi = dPhi; return thisInstance(); } + /** + * Tap neutr transformer 3 w type input copy builder. + * + * @param tapNeutr the tap neutr + * @return the transformer 3 w type input copy builder + */ public Transformer3WTypeInputCopyBuilder tapNeutr(int tapNeutr) { this.tapNeutr = tapNeutr; return thisInstance(); } + /** + * Tap min transformer 3 w type input copy builder. + * + * @param tapMin the tap min + * @return the transformer 3 w type input copy builder + */ public Transformer3WTypeInputCopyBuilder tapMin(int tapMin) { this.tapMin = tapMin; return thisInstance(); } + /** + * Tap max transformer 3 w type input copy builder. + * + * @param tapMax the tap max + * @return the transformer 3 w type input copy builder + */ public Transformer3WTypeInputCopyBuilder tapMax(int tapMax) { this.tapMax = tapMax; return thisInstance(); 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 658744c09..706b58e32 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 @@ -14,9 +14,18 @@ /** Represents the accumulation of graphic data elements (node graphics, line graphics) */ public class GraphicElements implements InputContainer { + /** A set of node graphic inputs representing graphical representations of nodes. */ private final Set nodeGraphics; + + /** A set of line graphic inputs representing graphical representations of lines. */ private final Set lineGraphics; + /** + * Instantiates a new Graphic elements. + * + * @param nodeGraphics the node graphics + * @param lineGraphics the line graphics + */ public GraphicElements(Set nodeGraphics, Set lineGraphics) { this.nodeGraphics = nodeGraphics; this.lineGraphics = lineGraphics; @@ -40,7 +49,7 @@ public GraphicElements(Collection graphicElements) { /** * Create an instance based on a list of {@link GraphicInput} entities that are included in {@link - * GraphicElements} + * GraphicElements}* * * @param graphics list of grid elements this container instance should created from */ @@ -73,6 +82,8 @@ public GraphicElementsCopyBuilder copy() { } /** + * Gets node graphics. + * * @return unmodifiable Set of all node graphic data for this grid */ public Set getNodeGraphics() { @@ -80,6 +91,8 @@ public Set getNodeGraphics() { } /** + * Gets line graphics. + * * @return unmodifiable Set of all line graphic data for this grid */ public Set getLineGraphics() { @@ -101,7 +114,7 @@ public int hashCode() { /** * A builder pattern based approach to create copies of {@link GraphicElements} containers with * altered field values. For detailed field descriptions refer to java docs of {@link - * GraphicElements} + * GraphicElements}* * * @version 3.1 * @since 14.02.23 diff --git a/src/main/java/edu/ie3/datamodel/models/input/container/GridContainer.java b/src/main/java/edu/ie3/datamodel/models/input/container/GridContainer.java index 46f50ae97..294ff68eb 100644 --- a/src/main/java/edu/ie3/datamodel/models/input/container/GridContainer.java +++ b/src/main/java/edu/ie3/datamodel/models/input/container/GridContainer.java @@ -8,6 +8,7 @@ import edu.ie3.datamodel.models.input.UniqueInputEntity; import java.util.*; +/** The type Grid container. */ public abstract class GridContainer implements InputContainer { /** Name of this grid */ protected final String gridName; @@ -21,6 +22,14 @@ public abstract class GridContainer implements InputContainer /** Accumulated graphic data entities (node graphics, line graphics) */ protected final GraphicElements graphics; + /** + * Instantiates a new Grid container. + * + * @param gridName the grid name + * @param rawGrid the raw grid + * @param systemParticipants the system participants + * @param graphics the graphics + */ protected GridContainer( String gridName, RawGridElements rawGrid, @@ -43,6 +52,8 @@ public List allEntitiesAsList() { } /** + * Gets grid name. + * * @return true, as we are positive people and believe in what we do. Just kidding. Checks are * made during initialisation. */ @@ -50,14 +61,29 @@ public String getGridName() { return gridName; } + /** + * Gets raw grid. + * + * @return the raw grid + */ public RawGridElements getRawGrid() { return rawGrid; } + /** + * Gets system participants. + * + * @return the system participants + */ public SystemParticipants getSystemParticipants() { return systemParticipants; } + /** + * Gets graphics. + * + * @return the graphics + */ public GraphicElements getGraphics() { return graphics; } @@ -84,10 +110,9 @@ public String toString() { /** * Abstract class for all builder that build child containers of abstract class {@link - * GridContainer} + * GridContainer}* * - * @version 3.1 - * @since 14.02.23 + * @param The builder type extending from {@link GridContainerCopyBuilder} */ protected abstract static class GridContainerCopyBuilder> extends InputContainerCopyBuilder { @@ -108,22 +133,38 @@ protected GridContainerCopyBuilder(GridContainer gridContainer) { this.graphics = gridContainer.getGraphics(); } - /** Returns grid name */ + /** + * Returns grid name + * + * @return the grid name + */ protected String getGridName() { return gridName; } - /** Returns {@link RawGridElements}. */ + /** + * Returns {@link RawGridElements}. + * + * @return the raw grid + */ protected RawGridElements getRawGrid() { return rawGrid; } - /** Returns {@link SystemParticipants} */ + /** + * Returns {@link SystemParticipants} + * + * @return the system participants + */ protected SystemParticipants getSystemParticipants() { return systemParticipants; } - /** Returns {@link GraphicElements} */ + /** + * Returns {@link GraphicElements} + * + * @return the graphics + */ protected GraphicElements getGraphics() { return graphics; } 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 dfaae5bc1..b75a8ee7d 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 @@ -10,29 +10,52 @@ import java.io.Serializable; import java.util.List; -/** Represents an aggregation of different entities */ +/** + * Represents an aggregation of different entities + * + * @param The type of entities contained in this container, which must extend {@link + * UniqueInputEntity}. + */ public interface InputContainer extends Serializable { /** + * All entities as list list. + * * @return unmodifiable List of all entities */ List allEntitiesAsList(); - /** Returns an input container copy builder */ + /** + * Returns an input container copy builder + * + * @return the input container copy builder + */ InputContainerCopyBuilder copy(); /** * Abstract class for all builder that build child containers of interface {@link - * edu.ie3.datamodel.models.input.container.InputContainer} + * edu.ie3.datamodel.models.input.container.InputContainer}* * - * @version 3.1 - * @since 14.02.23 + * @param The type of entities contained in this container, which must extend {@link + * UniqueInputEntity}. */ abstract class InputContainerCopyBuilder { + /** Default constructor for InputContainerCopyBuilder. */ + public InputContainerCopyBuilder() {} - /** Returns the altered {@link InputContainer} */ + /** + * Returns an unmodifiable list of all entities contained within this input container. + * + * @return An unmodifiable List of all entities. + * @throws ValidationException the validation exception + */ public abstract InputContainer build() throws ValidationException; + /** + * This instance input container copy builder. + * + * @return the input container copy builder + */ protected abstract InputContainerCopyBuilder thisInstance(); } } diff --git a/src/main/java/edu/ie3/datamodel/models/input/container/JointGridContainer.java b/src/main/java/edu/ie3/datamodel/models/input/container/JointGridContainer.java index 5a15f0bfb..99c810d0d 100644 --- a/src/main/java/edu/ie3/datamodel/models/input/container/JointGridContainer.java +++ b/src/main/java/edu/ie3/datamodel/models/input/container/JointGridContainer.java @@ -19,6 +19,15 @@ public class JointGridContainer extends GridContainer { private static final Logger logger = LoggerFactory.getLogger(JointGridContainer.class); + /** + * Instantiates a new Joint grid container. + * + * @param gridName the grid name + * @param rawGrid the raw grid + * @param systemParticipants the system participants + * @param graphics the graphics + * @throws InvalidGridException the invalid grid exception + */ public JointGridContainer( String gridName, RawGridElements rawGrid, @@ -34,6 +43,15 @@ public JointGridContainer( checkSubGridTopologyGraph(subGridTopologyGraph); } + /** + * Instantiates a new Joint grid container. + * + * @param gridName the grid name + * @param rawGrid the raw grid + * @param systemParticipants the system participants + * @param graphics the graphics + * @param subGridTopologyGraph the sub grid topology graph + */ public JointGridContainer( String gridName, RawGridElements rawGrid, @@ -57,6 +75,11 @@ private void checkSubGridTopologyGraph(SubGridTopologyGraph subGridTopologyGraph } } + /** + * Gets sub grid topology graph. + * + * @return the sub grid topology graph + */ public SubGridTopologyGraph getSubGridTopologyGraph() { return subGridTopologyGraph; } @@ -87,7 +110,7 @@ public JointGridContainerCopyBuilder copy() { /** * A builder pattern based approach to create copies of {@link JointGridContainer} containers with * altered field values. For detailed field descriptions refer to java docs of {@link - * JointGridContainer} + * JointGridContainer}* * * @version 3.1 * @since 14.02.23 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 afd2fc532..6e78e33c3 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 @@ -32,6 +32,16 @@ public class RawGridElements implements InputContainer { /** Measurement units in this grid */ private final Set measurementUnits; + /** + * Instantiates a new Raw grid elements. + * + * @param nodes the nodes + * @param lines the lines + * @param transformer2Ws the transformer 2 ws + * @param transformer3Ws the transformer 3 ws + * @param switches the switches + * @param measurementUnits the measurement units + */ public RawGridElements( Set nodes, Set lines, @@ -81,7 +91,7 @@ public RawGridElements(Collection rawGridElements) { /** * Create an instance based on a list of {@link AssetInput} entities that are included in {@link - * RawGridElements} + * RawGridElements}* * * @param rawGridElements list of grid elements this container instance should created from */ @@ -138,6 +148,8 @@ public RawGridElementsCopyBuilder copy() { } /** + * Gets nodes. + * * @return unmodifiable ; of all three winding transformers in this grid */ public Set getNodes() { @@ -145,6 +157,8 @@ public Set getNodes() { } /** + * Gets lines. + * * @return unmodifiable Set of all lines in this grid */ public Set getLines() { @@ -152,6 +166,8 @@ public Set getLines() { } /** + * Gets transformer 2 ws. + * * @return unmodifiable Set of all two winding transformers in this grid */ public Set getTransformer2Ws() { @@ -159,6 +175,8 @@ public Set getTransformer2Ws() { } /** + * Gets transformer 3 ws. + * * @return unmodifiable Set of all three winding transformers in this grid */ public Set getTransformer3Ws() { @@ -166,6 +184,8 @@ public Set getTransformer3Ws() { } /** + * Gets switches. + * * @return unmodifiable Set of all switches in this grid */ public Set getSwitches() { @@ -173,6 +193,8 @@ public Set getSwitches() { } /** + * Gets measurement units. + * * @return unmodifiable Set of all measurement units in this grid */ public Set getMeasurementUnits() { @@ -199,7 +221,7 @@ public int hashCode() { /** * A builder pattern based approach to create copies of {@link RawGridElements} containers with * altered field values. For detailed field descriptions refer to java docs of {@link - * RawGridElements} + * RawGridElements}* * * @version 3.1 * @since 14.02.23 diff --git a/src/main/java/edu/ie3/datamodel/models/input/container/SubGridContainer.java b/src/main/java/edu/ie3/datamodel/models/input/container/SubGridContainer.java index f20ee9d4e..b2b38ebe1 100644 --- a/src/main/java/edu/ie3/datamodel/models/input/container/SubGridContainer.java +++ b/src/main/java/edu/ie3/datamodel/models/input/container/SubGridContainer.java @@ -20,6 +20,16 @@ public class SubGridContainer extends GridContainer { /** Predominantly apparent voltage level in this single grid */ private final VoltageLevel predominantVoltageLevel; + /** + * Instantiates a new Sub grid container. + * + * @param gridName the grid name + * @param subnet the subnet + * @param rawGrid the raw grid + * @param systemParticipants the system participants + * @param graphics the graphics + * @throws InvalidGridException the invalid grid exception + */ public SubGridContainer( String gridName, int subnet, @@ -32,10 +42,20 @@ public SubGridContainer( this.predominantVoltageLevel = ContainerUtils.determinePredominantVoltLvl(rawGrid, subnet); } + /** + * Gets subnet. + * + * @return the subnet + */ public int getSubnet() { return subnet; } + /** + * Gets predominant voltage level. + * + * @return the predominant voltage level + */ public VoltageLevel getPredominantVoltageLevel() { return predominantVoltageLevel; } @@ -75,7 +95,7 @@ public SubGridContainerCopyBuilder copy() { /** * A builder pattern based approach to create copies of {@link SubGridContainer} containers with * altered field values. For detailed field descriptions refer to java docs of {@link - * SubGridContainer} + * SubGridContainer}* * * @version 3.1 * @since 14.02.23 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 fa81ea0fd..87998c801 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 @@ -14,17 +14,50 @@ * feed ins, heat pumps, loads, PV plants, storages, WECs) */ public class SystemParticipants implements InputContainer { + /** Set of biomass plants in the system. */ private final Set bmPlants; + + /** Set of combined heat and power plants (CHP) in the system. */ private final Set chpPlants; + + /** Set of electric vehicle charging stations (EVCS) in the system. */ private final Set evcs; + + /** Set of electric vehicles (EVs) in the system. */ private final Set evs; + + /** Set of fixed feed-in inputs for renewable energy sources. */ private final Set fixedFeedIns; + + /** Set of heat pumps in the system. */ private final Set heatPumps; + + /** Set of load inputs representing various consumption loads in the system. */ private final Set loads; + + /** Set of photovoltaic plants (PV) in the system. */ private final Set pvPlants; + + /** Set of storage inputs for energy storage systems in the grid. */ private final Set storages; + + /** Set of wind energy converters (WEC) plants in the system. */ private final Set wecPlants; + /** + * Instantiates a new System participants. + * + * @param bmPlants the bm plants + * @param chpPlants the chp plants + * @param evcs the evcs + * @param evs the evs + * @param fixedFeedIns the fixed feed ins + * @param heatPumps the heat pumps + * @param loads the loads + * @param pvPlants the pv plants + * @param storages the storages + * @param wecPlants the wec plants + */ public SystemParticipants( Set bmPlants, Set chpPlants, @@ -178,6 +211,8 @@ public SystemParticipantsCopyBuilder copy() { } /** + * Gets bm plants. + * * @return unmodifiable Set of all biomass plants in this grid */ public Set getBmPlants() { @@ -185,6 +220,8 @@ public Set getBmPlants() { } /** + * Gets chp plants. + * * @return unmodifiable Set of all CHP plants in this grid */ public Set getChpPlants() { @@ -192,6 +229,8 @@ public Set getChpPlants() { } /** + * Gets evcs. + * * @return unmodifiable Set of all ev charging stations in this grid */ public Set getEvcs() { @@ -199,6 +238,8 @@ public Set getEvcs() { } /** + * Gets evs. + * * @return unmodifiable Set of all electric vehicles in this grid */ public Set getEvs() { @@ -206,6 +247,8 @@ public Set getEvs() { } /** + * Gets fixed feed ins. + * * @return unmodifiable Set of all fixed feed in this grid */ public Set getFixedFeedIns() { @@ -213,6 +256,8 @@ public Set getFixedFeedIns() { } /** + * Gets heat pumps. + * * @return unmodifiable Set of all heat pumps in this grid */ public Set getHeatPumps() { @@ -220,6 +265,8 @@ public Set getHeatPumps() { } /** + * Gets loads. + * * @return unmodifiable Set of all loads in this grid */ public Set getLoads() { @@ -227,6 +274,8 @@ public Set getLoads() { } /** + * Gets pv plants. + * * @return unmodifiable Set of all PV plants in this grid */ public Set getPvPlants() { @@ -234,6 +283,8 @@ public Set getPvPlants() { } /** + * Gets storages. + * * @return unmodifiable Set of all storages in this grid */ public Set getStorages() { @@ -241,6 +292,8 @@ public Set getStorages() { } /** + * Gets wec plants. + * * @return unmodifiable Set of all WECs in this grid */ public Set getWecPlants() { @@ -281,7 +334,7 @@ public int hashCode() { /** * A builder pattern based approach to create copies of {@link SystemParticipants} containers with * altered field values. For detailed field descriptions refer to java docs of {@link - * SystemParticipants} + * SystemParticipants}* * * @version 3.1 * @since 14.02.23 diff --git a/src/main/java/edu/ie3/datamodel/models/input/container/ThermalGrid.java b/src/main/java/edu/ie3/datamodel/models/input/container/ThermalGrid.java index 232779211..44d72461c 100644 --- a/src/main/java/edu/ie3/datamodel/models/input/container/ThermalGrid.java +++ b/src/main/java/edu/ie3/datamodel/models/input/container/ThermalGrid.java @@ -15,7 +15,13 @@ /** * Container object to denote a fully connected thermal "grid". As there are currently no branch * elements, a grid always only consists of one {@link ThermalBusInput} and all its connected {@link - * edu.ie3.datamodel.models.input.thermal.ThermalUnitInput}s + * edu.ie3.datamodel.models.input.thermal.ThermalUnitInput}*s + * + * @param bus The thermal bus of this thermal grid. Working like a thermal node. + * @param houses A collection of houses connected to the thermal grid. + * @param heatStorages A collection of heat storage units within the thermal grid. + * @param domesticHotWaterStorages A collection of domestic hot water storage units within the + * thermal grid. */ public record ThermalGrid( ThermalBusInput bus, @@ -23,6 +29,14 @@ public record ThermalGrid( Set heatStorages, Set domesticHotWaterStorages) implements InputContainer { + /** + * Instantiates a new Thermal grid. + * + * @param bus the bus + * @param houses the houses + * @param heatStorages the heat storages + * @param domesticHotWaterStorages the domestic hot water storages + */ public ThermalGrid( ThermalBusInput bus, Collection houses, @@ -135,6 +149,12 @@ public ThermalGridCopyBuilder domesticHotWaterStorages( return thisInstance(); } + /** + * Scale thermal grid copy builder. + * + * @param factor the factor + * @return the thermal grid copy builder + */ public ThermalGridCopyBuilder scale(Double factor) { houses( houses.stream() diff --git a/src/main/java/edu/ie3/datamodel/models/input/container/ThermalUnits.java b/src/main/java/edu/ie3/datamodel/models/input/container/ThermalUnits.java index 7b0906b32..fe2f8479d 100644 --- a/src/main/java/edu/ie3/datamodel/models/input/container/ThermalUnits.java +++ b/src/main/java/edu/ie3/datamodel/models/input/container/ThermalUnits.java @@ -18,6 +18,12 @@ */ public record ThermalUnits(Set houses, Set storages) implements InputContainer { + /** + * Instantiates a new Thermal units. + * + * @param houses the houses + * @param storages the storages + */ public ThermalUnits( Collection houses, Collection storages) { this(new HashSet<>(houses), new HashSet<>(storages)); @@ -44,7 +50,7 @@ public String toString() { /** * A builder pattern based approach to create copies of {@link ThermalUnits} containers with * altered field values. For detailed field descriptions refer to java docs of {@link - * ThermalUnits} + * ThermalUnits}* * * @version 3.1 * @since 14.02.23 diff --git a/src/main/java/edu/ie3/datamodel/models/input/graphics/GraphicInput.java b/src/main/java/edu/ie3/datamodel/models/input/graphics/GraphicInput.java index c0cc6a78c..1f89c4ab3 100644 --- a/src/main/java/edu/ie3/datamodel/models/input/graphics/GraphicInput.java +++ b/src/main/java/edu/ie3/datamodel/models/input/graphics/GraphicInput.java @@ -20,6 +20,8 @@ public abstract class GraphicInput extends UniqueInputEntity { private final LineString path; /** + * Instantiates a new Graphic input. + * * @param uuid of the input entity * @param graphicLayer Description of the graphic layer, this graphic is located on * @param path A graphic representation as path @@ -33,10 +35,20 @@ protected GraphicInput(UUID uuid, String graphicLayer, LineString path) { : GeoUtils.buildSafeLineString(path); } + /** + * Gets graphic layer. + * + * @return the graphic layer + */ public String getGraphicLayer() { return graphicLayer; } + /** + * Gets path. + * + * @return the path + */ public LineString getPath() { return path; } @@ -66,13 +78,17 @@ public String toString() { + '}'; } + /** + * Copy graphic input copy builder. + * + * @return the graphic input copy builder + */ public abstract GraphicInputCopyBuilder> copy(); /** * Abstract class for all builder that build child entities of abstract class {@link GraphicInput} * - * @version 0.1 - * @since 05.06.20 + * @param The builder type extending from {@link GraphicInputCopyBuilder} */ public abstract static class GraphicInputCopyBuilder> extends UniqueEntityCopyBuilder { @@ -80,26 +96,53 @@ public abstract static class GraphicInputCopyBuilder allNodes() { /** * A builder pattern based approach to create copies of {@link NodeGraphicInput} entities with * altered field values. For detailed field descriptions refer to java docs of {@link - * NodeGraphicInput} + * NodeGraphicInput}* * * @version 0.1 * @since 05.06.20 @@ -95,11 +107,23 @@ private NodeGraphicInputCopyBuilder(NodeGraphicInput entity) { this.point = entity.getPoint(); } + /** + * Point node graphic input copy builder. + * + * @param point the point + * @return the node graphic input copy builder + */ public NodeGraphicInputCopyBuilder point(Point point) { this.point = point; return thisInstance(); } + /** + * Node node graphic input copy builder. + * + * @param node the node + * @return the node graphic input copy builder + */ public NodeGraphicInputCopyBuilder node(NodeInput node) { this.node = node; return thisInstance(); diff --git a/src/main/java/edu/ie3/datamodel/models/input/system/BmInput.java b/src/main/java/edu/ie3/datamodel/models/input/system/BmInput.java index f5a51d64e..0d956e140 100644 --- a/src/main/java/edu/ie3/datamodel/models/input/system/BmInput.java +++ b/src/main/java/edu/ie3/datamodel/models/input/system/BmInput.java @@ -100,19 +100,39 @@ public BmInput( this.feedInTariff = feedInTariff.to(StandardUnits.ENERGY_PRICE); } + /** + * Returns the type associated with this biomass input. + * + * @return The {@link BmTypeInput} representing the type of biomass input. + */ @Override public BmTypeInput getType() { return type; } + /** + * Is market reaction boolean. + * + * @return the boolean + */ public boolean isMarketReaction() { return marketReaction; } + /** + * Is cost controlled boolean. + * + * @return the boolean + */ public boolean isCostControlled() { return costControlled; } + /** + * Gets feed in tariff. + * + * @return the feed in tariff + */ public ComparableQuantity getFeedInTariff() { return feedInTariff; } @@ -188,21 +208,45 @@ private BmInputCopyBuilder(BmInput entity) { this.feedInTariff = entity.getFeedInTariff(); } + /** + * Type bm input copy builder. + * + * @param type the type + * @return the bm input copy builder + */ public BmInputCopyBuilder type(BmTypeInput type) { this.type = type; return thisInstance(); } + /** + * Market reaction bm input copy builder. + * + * @param marketReaction the market reaction + * @return the bm input copy builder + */ public BmInputCopyBuilder marketReaction(boolean marketReaction) { this.marketReaction = marketReaction; return thisInstance(); } + /** + * Cost controlled bm input copy builder. + * + * @param costControlled the cost controlled + * @return the bm input copy builder + */ public BmInputCopyBuilder costControlled(boolean costControlled) { this.costControlled = costControlled; return thisInstance(); } + /** + * Feed in tariff bm input copy builder. + * + * @param feedInTariff the feed in tariff + * @return the bm input copy builder + */ public BmInputCopyBuilder feedInTariff(ComparableQuantity feedInTariff) { this.feedInTariff = feedInTariff; return thisInstance(); diff --git a/src/main/java/edu/ie3/datamodel/models/input/system/ChpInput.java b/src/main/java/edu/ie3/datamodel/models/input/system/ChpInput.java index 024e8f36e..c84b6175c 100644 --- a/src/main/java/edu/ie3/datamodel/models/input/system/ChpInput.java +++ b/src/main/java/edu/ie3/datamodel/models/input/system/ChpInput.java @@ -115,6 +115,11 @@ public ThermalStorageInput getThermalStorage() { return thermalStorage; } + /** + * Is market reaction boolean. + * + * @return the boolean + */ public boolean isMarketReaction() { return marketReaction; } @@ -205,21 +210,45 @@ public ChpInput build() { marketReaction); } + /** + * Type chp input copy builder. + * + * @param type the type + * @return the chp input copy builder + */ public ChpInputCopyBuilder type(ChpTypeInput type) { this.type = type; return thisInstance(); } + /** + * Thermal bus chp input copy builder. + * + * @param thermalBus the thermal bus + * @return the chp input copy builder + */ public ChpInputCopyBuilder thermalBus(ThermalBusInput thermalBus) { this.thermalBus = thermalBus; return thisInstance(); } + /** + * Thermal storage chp input copy builder. + * + * @param thermalStorage the thermal storage + * @return the chp input copy builder + */ public ChpInputCopyBuilder thermalStorage(ThermalStorageInput thermalStorage) { this.thermalStorage = thermalStorage; return thisInstance(); } + /** + * Market reaction chp input copy builder. + * + * @param marketReaction the market reaction + * @return the chp input copy builder + */ public ChpInputCopyBuilder marketReaction(boolean marketReaction) { this.marketReaction = marketReaction; return thisInstance(); diff --git a/src/main/java/edu/ie3/datamodel/models/input/system/EvInput.java b/src/main/java/edu/ie3/datamodel/models/input/system/EvInput.java index 548d0afe5..02f0a2ef8 100644 --- a/src/main/java/edu/ie3/datamodel/models/input/system/EvInput.java +++ b/src/main/java/edu/ie3/datamodel/models/input/system/EvInput.java @@ -127,6 +127,12 @@ private EvInputCopyBuilder(EvInput entity) { this.type = entity.getType(); } + /** + * Type ev input copy builder. + * + * @param type the type + * @return the ev input copy builder + */ public EvInputCopyBuilder type(EvTypeInput type) { this.type = type; return thisInstance(); 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 7c41cf70b..012642e61 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 @@ -15,6 +15,7 @@ import java.util.Objects; import java.util.UUID; +/** The type Evcs input. */ public class EvcsInput extends SystemParticipantInput { /** type of all installed charging points */ @@ -33,6 +34,8 @@ public class EvcsInput extends SystemParticipantInput { private final boolean v2gSupport; /** + * Instantiates a new Evcs input. + * * @param uuid Unique identifier * @param id Human readable identifier * @param operator of the asset @@ -68,6 +71,8 @@ public EvcsInput( } /** + * Instantiates a new Evcs input. + * * @param uuid Unique identifier * @param id Human readable identifier * @param operator of the asset @@ -108,6 +113,8 @@ public EvcsInput( } /** + * Instantiates a new Evcs input. + * * @param uuid Unique identifier * @param id Human readable identifier * @param node that the asset is connected to @@ -139,6 +146,8 @@ public EvcsInput( } /** + * Instantiates a new Evcs input. + * * @param uuid Unique identifier * @param id Human readable identifier * @param node that the asset is connected to @@ -162,22 +171,47 @@ public EvcsInput( this(uuid, id, node, qCharacteristics, em, type, 1, cosPhiRated, locationType, v2gSupport); } + /** + * Gets type. + * + * @return the type + */ public ChargingPointType getType() { return type; } + /** + * Gets charging points. + * + * @return the charging points + */ public int getChargingPoints() { return chargingPoints; } + /** + * Gets cos phi rated. + * + * @return the cos phi rated + */ public double getCosPhiRated() { return cosPhiRated; } + /** + * Gets location type. + * + * @return the location type + */ public EvcsLocationType getLocationType() { return locationType; } + /** + * Gets v 2 g support. + * + * @return the v 2 g support + */ public boolean getV2gSupport() { return v2gSupport; } @@ -250,6 +284,11 @@ public static class EvcsInputCopyBuilder private EvcsLocationType locationType; private boolean v2gSupport; + /** + * Instantiates a new Evcs input copy builder. + * + * @param entity the entity + */ public EvcsInputCopyBuilder(EvcsInput entity) { super(entity); this.type = entity.type; @@ -259,26 +298,56 @@ public EvcsInputCopyBuilder(EvcsInput entity) { this.v2gSupport = entity.v2gSupport; } + /** + * Type evcs input copy builder. + * + * @param type the type + * @return the evcs input copy builder + */ public EvcsInputCopyBuilder type(ChargingPointType type) { this.type = type; return thisInstance(); } + /** + * Charging points evcs input copy builder. + * + * @param noChargingPoints the no charging points + * @return the evcs input copy builder + */ public EvcsInputCopyBuilder chargingPoints(int noChargingPoints) { this.chargingPoints = noChargingPoints; return thisInstance(); } + /** + * Cos phi rated evcs input copy builder. + * + * @param cosPhiRated the cos phi rated + * @return the evcs input copy builder + */ public EvcsInputCopyBuilder cosPhiRated(double cosPhiRated) { this.cosPhiRated = cosPhiRated; return thisInstance(); } + /** + * Location type evcs input copy builder. + * + * @param locationType the location type + * @return the evcs input copy builder + */ public EvcsInputCopyBuilder locationType(EvcsLocationType locationType) { this.locationType = locationType; return thisInstance(); } + /** + * V 2 g support evcs input copy builder. + * + * @param v2gSupport the v 2 g support + * @return the evcs input copy builder + */ public EvcsInputCopyBuilder v2gSupport(boolean v2gSupport) { this.v2gSupport = v2gSupport; return thisInstance(); diff --git a/src/main/java/edu/ie3/datamodel/models/input/system/FixedFeedInInput.java b/src/main/java/edu/ie3/datamodel/models/input/system/FixedFeedInInput.java index c9676a97e..b12f33a45 100644 --- a/src/main/java/edu/ie3/datamodel/models/input/system/FixedFeedInInput.java +++ b/src/main/java/edu/ie3/datamodel/models/input/system/FixedFeedInInput.java @@ -76,10 +76,20 @@ public FixedFeedInInput( this.cosPhiRated = cosPhiRated; } + /** + * Gets rated. + * + * @return the rated + */ public ComparableQuantity getsRated() { return sRated; } + /** + * Gets cos phi rated. + * + * @return the cos phi rated + */ public double getCosPhiRated() { return cosPhiRated; } @@ -128,7 +138,7 @@ public String toString() { /** * A builder pattern based approach to create copies of {@link FixedFeedInInput} entities with * altered field values. For detailed field descriptions refer to java docs of {@link - * FixedFeedInInput} + * FixedFeedInInput}* * * @version 0.1 * @since 05.06.20 @@ -145,11 +155,23 @@ private FixedFeedInInputCopyBuilder(FixedFeedInInput entity) { this.cosPhiRated = entity.getCosPhiRated(); } + /** + * S rated fixed feed in input copy builder. + * + * @param sRated the s rated + * @return the fixed feed in input copy builder + */ public FixedFeedInInputCopyBuilder sRated(ComparableQuantity sRated) { this.sRated = sRated; return thisInstance(); } + /** + * Cos phi rated fixed feed in input copy builder. + * + * @param cosPhiRated the cos phi rated + * @return the fixed feed in input copy builder + */ public FixedFeedInInputCopyBuilder cosPhiRated(double cosPhiRated) { this.cosPhiRated = cosPhiRated; return thisInstance(); diff --git a/src/main/java/edu/ie3/datamodel/models/input/system/HpInput.java b/src/main/java/edu/ie3/datamodel/models/input/system/HpInput.java index e9eca6403..9e41840f6 100644 --- a/src/main/java/edu/ie3/datamodel/models/input/system/HpInput.java +++ b/src/main/java/edu/ie3/datamodel/models/input/system/HpInput.java @@ -147,11 +147,23 @@ private HpInputCopyBuilder(HpInput entity) { this.thermalBus = entity.getThermalBus(); } + /** + * Type hp input copy builder. + * + * @param type the type + * @return the hp input copy builder + */ public HpInputCopyBuilder type(HpTypeInput type) { this.type = type; return thisInstance(); } + /** + * Thermal bus hp input copy builder. + * + * @param thermalBus the thermal bus + * @return the hp input copy builder + */ public HpInputCopyBuilder thermalBus(ThermalBusInput thermalBus) { this.thermalBus = thermalBus; return thisInstance(); diff --git a/src/main/java/edu/ie3/datamodel/models/input/system/LoadInput.java b/src/main/java/edu/ie3/datamodel/models/input/system/LoadInput.java index c1fe0014f..736aae719 100644 --- a/src/main/java/edu/ie3/datamodel/models/input/system/LoadInput.java +++ b/src/main/java/edu/ie3/datamodel/models/input/system/LoadInput.java @@ -90,6 +90,7 @@ public LoadInput( * @param eConsAnnual Annually consumed energy (typically in kWh) * @param sRated Rated apparent power (in kVA) * @param cosPhiRated Rated power factor + * @throws ParsingException the parsing exception */ public LoadInput( UUID uuid, @@ -163,6 +164,7 @@ public LoadInput( * @param eConsAnnual Annually consumed energy (typically in kWh) * @param sRated Rated apparent power (in kVA) * @param cosPhiRated Rated power factor + * @throws ParsingException the parsing exception */ public LoadInput( UUID uuid, @@ -187,18 +189,38 @@ public LoadInput( cosPhiRated); } + /** + * Gets load profile. + * + * @return the load profile + */ public LoadProfile getLoadProfile() { return loadProfile; } + /** + * Gets cons annual. + * + * @return the cons annual + */ public ComparableQuantity geteConsAnnual() { return eConsAnnual; } + /** + * Gets rated. + * + * @return the rated + */ public ComparableQuantity getsRated() { return sRated; } + /** + * Gets cos phi rated. + * + * @return the cos phi rated + */ public double getCosPhiRated() { return cosPhiRated; } @@ -272,21 +294,45 @@ private LoadInputCopyBuilder(LoadInput entity) { this.cosPhiRated = entity.getCosPhiRated(); } + /** + * Loadprofile load input copy builder. + * + * @param standardLoadProfile the standard load profile + * @return the load input copy builder + */ public LoadInputCopyBuilder loadprofile(StandardLoadProfile standardLoadProfile) { this.loadProfile = standardLoadProfile; return thisInstance(); } + /** + * E cons annual load input copy builder. + * + * @param eConsAnnual the e cons annual + * @return the load input copy builder + */ public LoadInputCopyBuilder eConsAnnual(ComparableQuantity eConsAnnual) { this.eConsAnnual = eConsAnnual; return thisInstance(); } + /** + * S rated load input copy builder. + * + * @param sRated the s rated + * @return the load input copy builder + */ public LoadInputCopyBuilder sRated(ComparableQuantity sRated) { this.sRated = sRated; return thisInstance(); } + /** + * Cos phi rated load input copy builder. + * + * @param cosPhiRated the cos phi rated + * @return the load input copy builder + */ public LoadInputCopyBuilder cosPhiRated(double cosPhiRated) { this.cosPhiRated = cosPhiRated; return thisInstance(); diff --git a/src/main/java/edu/ie3/datamodel/models/input/system/PvInput.java b/src/main/java/edu/ie3/datamodel/models/input/system/PvInput.java index d3ddcc490..2c6e5dda7 100644 --- a/src/main/java/edu/ie3/datamodel/models/input/system/PvInput.java +++ b/src/main/java/edu/ie3/datamodel/models/input/system/PvInput.java @@ -142,38 +142,83 @@ public PvInput( this.cosPhiRated = cosPhiRated; } + /** + * Gets albedo. + * + * @return the albedo + */ public double getAlbedo() { return albedo; } + /** + * Gets azimuth. + * + * @return the azimuth + */ public ComparableQuantity getAzimuth() { return azimuth; } + /** + * Gets eta conv. + * + * @return the eta conv + */ public ComparableQuantity getEtaConv() { return etaConv; } + /** + * Gets elevation angle. + * + * @return the elevation angle + */ public ComparableQuantity getElevationAngle() { return elevationAngle; } + /** + * Is market reaction boolean. + * + * @return the boolean + */ public boolean isMarketReaction() { return marketReaction; } + /** + * Gets cos phi rated. + * + * @return the cos phi rated + */ public double getCosPhiRated() { return cosPhiRated; } + /** + * Gets g. + * + * @return the g + */ public double getkG() { return kG; } + /** + * Gets t. + * + * @return the t + */ public double getkT() { return kT; } + /** + * Gets rated. + * + * @return the rated + */ public ComparableQuantity getsRated() { return sRated; } @@ -271,6 +316,11 @@ public static class PvInputCopyBuilder private ComparableQuantity sRated; private double cosPhiRated; + /** + * Instantiates a new Pv input copy builder. + * + * @param entity the entity + */ public PvInputCopyBuilder(PvInput entity) { super(entity); this.albedo = entity.getAlbedo(); @@ -284,46 +334,100 @@ public PvInputCopyBuilder(PvInput entity) { this.cosPhiRated = entity.getCosPhiRated(); } + /** + * Albedo pv input copy builder. + * + * @param albedo the albedo + * @return the pv input copy builder + */ public PvInputCopyBuilder albedo(double albedo) { this.albedo = albedo; return thisInstance(); } + /** + * Azimuth pv input copy builder. + * + * @param azimuth the azimuth + * @return the pv input copy builder + */ public PvInputCopyBuilder azimuth(ComparableQuantity azimuth) { this.azimuth = azimuth; return thisInstance(); } + /** + * Eta conv pv input copy builder. + * + * @param etaConv the eta conv + * @return the pv input copy builder + */ public PvInputCopyBuilder etaConv(ComparableQuantity etaConv) { this.etaConv = etaConv; return thisInstance(); } + /** + * Elevation angle pv input copy builder. + * + * @param elevationAngle the elevation angle + * @return the pv input copy builder + */ public PvInputCopyBuilder elevationAngle(ComparableQuantity elevationAngle) { this.elevationAngle = elevationAngle; return thisInstance(); } + /** + * K g pv input copy builder. + * + * @param kG the k g + * @return the pv input copy builder + */ public PvInputCopyBuilder kG(double kG) { this.kG = kG; return thisInstance(); } + /** + * K t pv input copy builder. + * + * @param kT the k t + * @return the pv input copy builder + */ public PvInputCopyBuilder kT(double kT) { this.kT = kT; return thisInstance(); } + /** + * Market reaction pv input copy builder. + * + * @param marketReaction the market reaction + * @return the pv input copy builder + */ public PvInputCopyBuilder marketReaction(boolean marketReaction) { this.marketReaction = marketReaction; return thisInstance(); } + /** + * S rated pv input copy builder. + * + * @param sRated the s rated + * @return the pv input copy builder + */ public PvInputCopyBuilder sRated(ComparableQuantity sRated) { this.sRated = sRated; return thisInstance(); } + /** + * Cos phi rated pv input copy builder. + * + * @param cosPhiRated the cos phi rated + * @return the pv input copy builder + */ public PvInputCopyBuilder cosPhiRated(double cosPhiRated) { this.cosPhiRated = cosPhiRated; return thisInstance(); diff --git a/src/main/java/edu/ie3/datamodel/models/input/system/StorageInput.java b/src/main/java/edu/ie3/datamodel/models/input/system/StorageInput.java index 518170844..9c4306eb2 100644 --- a/src/main/java/edu/ie3/datamodel/models/input/system/StorageInput.java +++ b/src/main/java/edu/ie3/datamodel/models/input/system/StorageInput.java @@ -127,6 +127,12 @@ private StorageInputCopyBuilder(StorageInput entity) { this.type = entity.getType(); } + /** + * Type storage input copy builder. + * + * @param type the type + * @return the storage input copy builder + */ public StorageInputCopyBuilder type(StorageTypeInput type) { this.type = type; return thisInstance(); diff --git a/src/main/java/edu/ie3/datamodel/models/input/system/SystemParticipantInput.java b/src/main/java/edu/ie3/datamodel/models/input/system/SystemParticipantInput.java index f27e5053b..03a3c347a 100644 --- a/src/main/java/edu/ie3/datamodel/models/input/system/SystemParticipantInput.java +++ b/src/main/java/edu/ie3/datamodel/models/input/system/SystemParticipantInput.java @@ -77,10 +77,20 @@ protected SystemParticipantInput( this.controllingEm = em; } + /** + * Gets node. + * + * @return the node + */ public NodeInput getNode() { return node; } + /** + * Gets characteristics. + * + * @return the characteristics + */ public ReactivePowerCharacteristic getqCharacteristics() { return qCharacteristics; } @@ -135,8 +145,9 @@ public String toString() { /** * Abstract class for all builder that build child entities of abstract class {@link - * SystemParticipantInput} + * SystemParticipantInput}* * + * @param the type parameter * @version 0.1 * @since 05.06.20 */ @@ -148,6 +159,11 @@ public abstract static class SystemParticipantInputCopyBuilder< private ReactivePowerCharacteristic qCharacteristics; private EmInput em; + /** + * Instantiates a new System participant input copy builder. + * + * @param entity the entity + */ protected SystemParticipantInputCopyBuilder(SystemParticipantInput entity) { super(entity); this.node = entity.getNode(); @@ -155,30 +171,60 @@ protected SystemParticipantInputCopyBuilder(SystemParticipantInput entity) { this.em = entity.getControllingEm().orElse(null); } + /** + * Node b. + * + * @param node the node + * @return the b + */ public B node(NodeInput node) { this.node = node; return thisInstance(); } + /** + * Q characteristics b. + * + * @param qCharacteristics the q characteristics + * @return the b + */ public B qCharacteristics(ReactivePowerCharacteristic qCharacteristics) { this.qCharacteristics = qCharacteristics; return thisInstance(); } + /** + * Em b. + * + * @param em the em + * @return the b + */ public B em(EmInput em) { this.em = em; return thisInstance(); } + /** + * Gets node. + * + * @return the node + */ protected NodeInput getNode() { return node; } + /** + * Gets characteristics. + * + * @return the characteristics + */ protected ReactivePowerCharacteristic getqCharacteristics() { return qCharacteristics; } /** + * Gets em. + * * @return The {@link EmInput} controlling this system participant. CAN BE NULL. */ public EmInput getEm() { diff --git a/src/main/java/edu/ie3/datamodel/models/input/system/WecInput.java b/src/main/java/edu/ie3/datamodel/models/input/system/WecInput.java index 099d4c9ce..d9d611929 100644 --- a/src/main/java/edu/ie3/datamodel/models/input/system/WecInput.java +++ b/src/main/java/edu/ie3/datamodel/models/input/system/WecInput.java @@ -76,6 +76,11 @@ public WecInput( this.marketReaction = marketReaction; } + /** + * Is market reaction boolean. + * + * @return the boolean + */ public boolean isMarketReaction() { return marketReaction; } @@ -166,11 +171,23 @@ public WecInput build() { marketReaction); } + /** + * Type wec input copy builder. + * + * @param type the type + * @return the wec input copy builder + */ public WecInputCopyBuilder type(WecTypeInput type) { this.type = type; return thisInstance(); } + /** + * Market reaction wec input copy builder. + * + * @param marketReaction the market reaction + * @return the wec input copy builder + */ public WecInputCopyBuilder marketReaction(boolean marketReaction) { this.marketReaction = marketReaction; return thisInstance(); diff --git a/src/main/java/edu/ie3/datamodel/models/input/system/characteristic/CharacteristicInput.java b/src/main/java/edu/ie3/datamodel/models/input/system/characteristic/CharacteristicInput.java index 1519f7865..29ee42720 100644 --- a/src/main/java/edu/ie3/datamodel/models/input/system/characteristic/CharacteristicInput.java +++ b/src/main/java/edu/ie3/datamodel/models/input/system/characteristic/CharacteristicInput.java @@ -20,8 +20,11 @@ */ public abstract class CharacteristicInput, O extends Quantity> implements Serializable { + + /** Prefix used to identify this characteristic input. */ protected final String characteristicPrefix; + /** A sorted set of points defining the characteristic curve. */ private final SortedSet> points; /** @@ -33,9 +36,19 @@ public abstract class CharacteristicInput, O extends Quant protected CharacteristicInput( SortedSet> points, String characteristicPrefix) { this.points = Collections.unmodifiableSortedSet(points); + /** Prefix used to identify this characteristic input. */ this.characteristicPrefix = characteristicPrefix; } + /** + * Instantiates a new Characteristic input. + * + * @param input the input + * @param abscissaUnit the abscissa unit + * @param ordinateUnit the ordinate unit + * @param characteristicPrefix the characteristic prefix + * @throws ParsingException the parsing exception + */ protected CharacteristicInput( String input, Unit abscissaUnit, Unit ordinateUnit, String characteristicPrefix) throws ParsingException { @@ -101,6 +114,12 @@ private SortedSet> buildCoordinatesFromString( return Collections.unmodifiableSortedSet(parsedCoordinates); } + /** + * Returns all points that define this characteristic. + * + * @return An unmodifiable sorted set containing all {@link CharacteristicPoint}s associated with + * this characterisitc input. + */ public SortedSet> getPoints() { return points; } diff --git a/src/main/java/edu/ie3/datamodel/models/input/system/characteristic/CharacteristicPoint.java b/src/main/java/edu/ie3/datamodel/models/input/system/characteristic/CharacteristicPoint.java index 3cb2c4d06..0574ac9af 100644 --- a/src/main/java/edu/ie3/datamodel/models/input/system/characteristic/CharacteristicPoint.java +++ b/src/main/java/edu/ie3/datamodel/models/input/system/characteristic/CharacteristicPoint.java @@ -14,12 +14,21 @@ import tech.units.indriya.ComparableQuantity; import tech.units.indriya.quantity.Quantities; -/** Class to describe one point of a given {@link CharacteristicInput} */ +/** + * Class to describe one point of a given {@link CharacteristicInput}. + * + * @param The type of quantity for the abscissa (x-axis). + * @param The type of quantity for the ordinate (y-axis). + */ public class CharacteristicPoint, O extends Quantity> implements Comparable>, Serializable { + /** The constant REQUIRED_FORMAT. */ public static final String REQUIRED_FORMAT = "(%d,%d)"; + /** The x-coordinate of the characteristic point. */ private final ComparableQuantity x; + + /** The y-coordinate of the characteristic point. */ private final ComparableQuantity y; /** @@ -86,6 +95,8 @@ private static String buildExceptionMessage(String input, String message) { } /** + * Returns the position on the abscissa + * * @return the position on the abscissa */ public ComparableQuantity getX() { @@ -93,6 +104,8 @@ public ComparableQuantity getX() { } /** + * Returns the position on the ordinate + * * @return the position on the ordinate */ public ComparableQuantity getY() { diff --git a/src/main/java/edu/ie3/datamodel/models/input/system/characteristic/CosPhiFixed.java b/src/main/java/edu/ie3/datamodel/models/input/system/characteristic/CosPhiFixed.java index 499f62a0a..c6b26ffa9 100644 --- a/src/main/java/edu/ie3/datamodel/models/input/system/characteristic/CosPhiFixed.java +++ b/src/main/java/edu/ie3/datamodel/models/input/system/characteristic/CosPhiFixed.java @@ -20,15 +20,31 @@ * infeed */ public class CosPhiFixed extends ReactivePowerCharacteristic { + /** The constant PREFIX. */ public static final String PREFIX = "cosPhiFixed"; + + /** The constant CONSTANT_CHARACTERISTIC. */ public static final CosPhiFixed CONSTANT_CHARACTERISTIC = buildConstantCharacteristic(); + + /** The constant STARTING_REGEX. */ public static final String STARTING_REGEX = buildStartingRegex(PREFIX); + /** + * Instantiates a new Cos phi fixed. + * + * @param characteristicPoints the characteristic points + */ public CosPhiFixed( SortedSet> characteristicPoints) { super(characteristicPoints, PREFIX); } + /** + * Instantiates a new Cos phi fixed. + * + * @param input the input + * @throws ParsingException the parsing exception + */ public CosPhiFixed(String input) throws ParsingException { super(input, StandardUnits.Q_CHARACTERISTIC, StandardUnits.Q_CHARACTERISTIC, PREFIX); } diff --git a/src/main/java/edu/ie3/datamodel/models/input/system/characteristic/CosPhiP.java b/src/main/java/edu/ie3/datamodel/models/input/system/characteristic/CosPhiP.java index 8e2113242..ecb54f434 100644 --- a/src/main/java/edu/ie3/datamodel/models/input/system/characteristic/CosPhiP.java +++ b/src/main/java/edu/ie3/datamodel/models/input/system/characteristic/CosPhiP.java @@ -15,14 +15,28 @@ * infeed */ public class CosPhiP extends ReactivePowerCharacteristic { + /** The constant PREFIX. */ public static final String PREFIX = "cosPhiP"; + + /** The constant STARTING_REGEX. */ public static final String STARTING_REGEX = buildStartingRegex(PREFIX); + /** + * Instantiates a new Cos phi p. + * + * @param characteristicPoints the characteristic points + */ public CosPhiP( SortedSet> characteristicPoints) { super(characteristicPoints, PREFIX); } + /** + * Instantiates a new Cos phi p. + * + * @param input the input + * @throws ParsingException the parsing exception + */ public CosPhiP(String input) throws ParsingException { super(input, StandardUnits.Q_CHARACTERISTIC, StandardUnits.Q_CHARACTERISTIC, PREFIX); } diff --git a/src/main/java/edu/ie3/datamodel/models/input/system/characteristic/OlmCharacteristicInput.java b/src/main/java/edu/ie3/datamodel/models/input/system/characteristic/OlmCharacteristicInput.java index 5213f6cd0..d1fcac19b 100644 --- a/src/main/java/edu/ie3/datamodel/models/input/system/characteristic/OlmCharacteristicInput.java +++ b/src/main/java/edu/ie3/datamodel/models/input/system/characteristic/OlmCharacteristicInput.java @@ -19,14 +19,26 @@ /** Characteristic for overhead line monitoring */ public class OlmCharacteristicInput extends CharacteristicInput { + /** The constant CONSTANT_CHARACTERISTIC. */ public static final OlmCharacteristicInput CONSTANT_CHARACTERISTIC = buildConstantCharacteristic(); + /** + * Instantiates a new Olm characteristic input. + * + * @param characteristicPoints the characteristic points + */ public OlmCharacteristicInput( SortedSet> characteristicPoints) { super(characteristicPoints, "olm"); } + /** + * Instantiates a new Olm characteristic input. + * + * @param input the input + * @throws ParsingException the parsing exception + */ public OlmCharacteristicInput(String input) throws ParsingException { super(input, StandardUnits.WIND_VELOCITY, StandardUnits.OLM_CHARACTERISTIC, "olm"); } diff --git a/src/main/java/edu/ie3/datamodel/models/input/system/characteristic/QV.java b/src/main/java/edu/ie3/datamodel/models/input/system/characteristic/QV.java index 855d7adc2..dd34677d7 100644 --- a/src/main/java/edu/ie3/datamodel/models/input/system/characteristic/QV.java +++ b/src/main/java/edu/ie3/datamodel/models/input/system/characteristic/QV.java @@ -15,13 +15,27 @@ * connecting node */ public class QV extends ReactivePowerCharacteristic { + /** The constant PREFIX. */ public static final String PREFIX = "qV"; + + /** The constant STARTING_REGEX. */ public static final String STARTING_REGEX = buildStartingRegex(PREFIX); + /** + * Instantiates a new Qv. + * + * @param characteristicPoints the characteristic points + */ public QV(SortedSet> characteristicPoints) { super(characteristicPoints, PREFIX); } + /** + * Instantiates a new Qv. + * + * @param input the input + * @throws ParsingException the parsing exception + */ public QV(String input) throws ParsingException { super(input, StandardUnits.VOLTAGE_MAGNITUDE, StandardUnits.Q_CHARACTERISTIC, PREFIX); } diff --git a/src/main/java/edu/ie3/datamodel/models/input/system/characteristic/ReactivePowerCharacteristic.java b/src/main/java/edu/ie3/datamodel/models/input/system/characteristic/ReactivePowerCharacteristic.java index b3184a58e..99dd1cc1b 100644 --- a/src/main/java/edu/ie3/datamodel/models/input/system/characteristic/ReactivePowerCharacteristic.java +++ b/src/main/java/edu/ie3/datamodel/models/input/system/characteristic/ReactivePowerCharacteristic.java @@ -13,12 +13,27 @@ /** Abstract class (only for grouping all reactive power characteristics together */ public abstract class ReactivePowerCharacteristic extends CharacteristicInput { + /** + * Instantiates a new Reactive power characteristic. + * + * @param characteristicPoints the characteristic points + * @param prefix the prefix + */ protected ReactivePowerCharacteristic( SortedSet> characteristicPoints, String prefix) { super(characteristicPoints, prefix); } + /** + * Instantiates a new Reactive power characteristic. + * + * @param input the input + * @param abscissaUnit the abscissa unit + * @param ordinateUnit the ordinate unit + * @param prefix the prefix + * @throws ParsingException the parsing exception + */ protected ReactivePowerCharacteristic( String input, Unit abscissaUnit, diff --git a/src/main/java/edu/ie3/datamodel/models/input/system/characteristic/WecCharacteristicInput.java b/src/main/java/edu/ie3/datamodel/models/input/system/characteristic/WecCharacteristicInput.java index 5a3475446..e2276a234 100644 --- a/src/main/java/edu/ie3/datamodel/models/input/system/characteristic/WecCharacteristicInput.java +++ b/src/main/java/edu/ie3/datamodel/models/input/system/characteristic/WecCharacteristicInput.java @@ -13,11 +13,22 @@ /** Characteristic mapping the wind velocity to its corresponding Betz coefficient */ public class WecCharacteristicInput extends CharacteristicInput { + /** + * Instantiates a new Wec characteristic input. + * + * @param characteristicPoints the characteristic points + */ public WecCharacteristicInput( SortedSet> characteristicPoints) { super(characteristicPoints, "cP"); } + /** + * Instantiates a new Wec characteristic input. + * + * @param input the input + * @throws ParsingException the parsing exception + */ public WecCharacteristicInput(String input) throws ParsingException { super(input, StandardUnits.WIND_VELOCITY, StandardUnits.CP_CHARACTERISTIC, "cP"); } diff --git a/src/main/java/edu/ie3/datamodel/models/input/system/type/BmTypeInput.java b/src/main/java/edu/ie3/datamodel/models/input/system/type/BmTypeInput.java index 2f3b5b451..ae450db72 100644 --- a/src/main/java/edu/ie3/datamodel/models/input/system/type/BmTypeInput.java +++ b/src/main/java/edu/ie3/datamodel/models/input/system/type/BmTypeInput.java @@ -25,13 +25,15 @@ public class BmTypeInput extends SystemParticipantTypeInput { private final ComparableQuantity etaConv; /** + * Instantiates a new Bm type input. + * * @param uuid of the input entity * @param id of this type of BM * @param capex Capital expense for this type of BM (typically in €) * @param opex Operating expense for this type of BM (typically in €) - * @param cosphiRated Power factor for this type of BM * @param activePowerGradient Maximum permissible gradient of active power change * @param sRated Rated apparent power for this type of BM (typically in kVA) + * @param cosphiRated Power factor for this type of BM * @param etaConv Efficiency of converter for this type of BM (typically in %) */ public BmTypeInput( @@ -48,10 +50,20 @@ public BmTypeInput( this.etaConv = etaConv.to(StandardUnits.EFFICIENCY); } + /** + * Gets active power gradient. + * + * @return the active power gradient + */ public ComparableQuantity getActivePowerGradient() { return activePowerGradient; } + /** + * Gets eta conv. + * + * @return the eta conv + */ public ComparableQuantity getEtaConv() { return etaConv; } @@ -112,21 +124,43 @@ private BmTypeInputCopyBuilder(BmTypeInput entity) { this.etaConv = entity.getEtaConv(); } + /** + * Sets active power gradient. + * + * @param activePowerGradient the active power gradient + * @return the active power gradient + */ public BmTypeInputCopyBuilder setActivePowerGradient( ComparableQuantity activePowerGradient) { this.activePowerGradient = activePowerGradient; return thisInstance(); } + /** + * Sets eta conv. + * + * @param etaConv the eta conv + * @return the eta conv + */ public BmTypeInputCopyBuilder setEtaConv(ComparableQuantity etaConv) { this.etaConv = etaConv; return thisInstance(); } + /** + * Gets active power gradient. + * + * @return the active power gradient + */ public ComparableQuantity getActivePowerGradient() { return activePowerGradient; } + /** + * Gets eta conv. + * + * @return the eta conv + */ public ComparableQuantity getEtaConv() { return etaConv; } diff --git a/src/main/java/edu/ie3/datamodel/models/input/system/type/ChpTypeInput.java b/src/main/java/edu/ie3/datamodel/models/input/system/type/ChpTypeInput.java index 7a67e08ff..da72d68fd 100644 --- a/src/main/java/edu/ie3/datamodel/models/input/system/type/ChpTypeInput.java +++ b/src/main/java/edu/ie3/datamodel/models/input/system/type/ChpTypeInput.java @@ -29,6 +29,8 @@ public class ChpTypeInput extends SystemParticipantTypeInput { private final ComparableQuantity pOwn; /** + * Instantiates a new Chp type input. + * * @param uuid of the input entity * @param id of this type of CHP * @param capex Capital expense for this type of CHP (typically in €) @@ -58,18 +60,38 @@ public ChpTypeInput( this.pOwn = pOwn.to(StandardUnits.ACTIVE_POWER_IN); } + /** + * Gets eta el. + * + * @return the eta el + */ public ComparableQuantity getEtaEl() { return etaEl; } + /** + * Gets eta thermal. + * + * @return the eta thermal + */ public ComparableQuantity getEtaThermal() { return etaThermal; } + /** + * Gets thermal. + * + * @return the thermal + */ public ComparableQuantity getpThermal() { return pThermal; } + /** + * Gets own. + * + * @return the own + */ public ComparableQuantity getpOwn() { return pOwn; } @@ -141,38 +163,82 @@ private ChpTypeInputCopyBuilder(ChpTypeInput entity) { this.pOwn = entity.getpOwn(); } + /** + * Eta el chp type input copy builder. + * + * @param etaEl the eta el + * @return the chp type input copy builder + */ public ChpTypeInputCopyBuilder etaEl(ComparableQuantity etaEl) { this.etaEl = etaEl; return thisInstance(); } + /** + * Eta thermal chp type input copy builder. + * + * @param etaThermal the eta thermal + * @return the chp type input copy builder + */ public ChpTypeInputCopyBuilder etaThermal(ComparableQuantity etaThermal) { this.etaThermal = etaThermal; return thisInstance(); } + /** + * P thermal chp type input copy builder. + * + * @param pThermal the p thermal + * @return the chp type input copy builder + */ public ChpTypeInputCopyBuilder pThermal(ComparableQuantity pThermal) { this.pThermal = pThermal; return thisInstance(); } + /** + * P own chp type input copy builder. + * + * @param pOwn the p own + * @return the chp type input copy builder + */ public ChpTypeInputCopyBuilder pOwn(ComparableQuantity pOwn) { this.pOwn = pOwn; return thisInstance(); } + /** + * Gets eta el. + * + * @return the eta el + */ public ComparableQuantity getEtaEl() { return etaEl; } + /** + * Gets eta thermal. + * + * @return the eta thermal + */ public ComparableQuantity getEtaThermal() { return etaThermal; } + /** + * Gets thermal. + * + * @return the thermal + */ public ComparableQuantity getpThermal() { return pThermal; } + /** + * Gets own. + * + * @return the own + */ public ComparableQuantity getpOwn() { return pOwn; } diff --git a/src/main/java/edu/ie3/datamodel/models/input/system/type/EvTypeInput.java b/src/main/java/edu/ie3/datamodel/models/input/system/type/EvTypeInput.java index 0da3e0e63..6379bd133 100644 --- a/src/main/java/edu/ie3/datamodel/models/input/system/type/EvTypeInput.java +++ b/src/main/java/edu/ie3/datamodel/models/input/system/type/EvTypeInput.java @@ -27,6 +27,8 @@ public class EvTypeInput extends SystemParticipantTypeInput { private final ComparableQuantity sRatedDC; /** + * Instantiates a new Ev type input. + * * @param uuid of the input entity * @param id of this type of EV * @param capex Capital expense for this type of EV (typically in €) @@ -53,14 +55,29 @@ public EvTypeInput( this.sRatedDC = sRatedDC.to(StandardUnits.ACTIVE_POWER_IN); } + /** + * Gets storage. + * + * @return the storage + */ public ComparableQuantity geteStorage() { return eStorage; } + /** + * Gets cons. + * + * @return the cons + */ public ComparableQuantity geteCons() { return eCons; } + /** + * Gets rated dc. + * + * @return the rated dc + */ public ComparableQuantity getsRatedDC() { return sRatedDC; } @@ -127,29 +144,62 @@ private EvTypeInputCopyBuilder(EvTypeInput entity) { this.sRatedDC = entity.getsRatedDC(); } + /** + * Sets storage. + * + * @param eStorage the e storage + * @return the storage + */ public EvTypeInputCopyBuilder seteStorage(ComparableQuantity eStorage) { this.eStorage = eStorage; return thisInstance(); } + /** + * Sets cons. + * + * @param eCons the e cons + * @return the cons + */ public EvTypeInputCopyBuilder seteCons(ComparableQuantity eCons) { this.eCons = eCons; return thisInstance(); } + /** + * Sets rated dc. + * + * @param sRatedDC the s rated dc + * @return the rated dc + */ public EvTypeInputCopyBuilder setsRatedDC(ComparableQuantity sRatedDC) { this.sRatedDC = sRatedDC; return thisInstance(); } + /** + * Gets storage. + * + * @return the storage + */ public ComparableQuantity geteStorage() { return eStorage; } + /** + * Gets cons. + * + * @return the cons + */ public ComparableQuantity geteCons() { return eCons; } + /** + * Gets rated dc. + * + * @return the rated dc + */ public ComparableQuantity getsRatedDC() { return sRatedDC; } diff --git a/src/main/java/edu/ie3/datamodel/models/input/system/type/HpTypeInput.java b/src/main/java/edu/ie3/datamodel/models/input/system/type/HpTypeInput.java index 9962e9578..64b32228e 100644 --- a/src/main/java/edu/ie3/datamodel/models/input/system/type/HpTypeInput.java +++ b/src/main/java/edu/ie3/datamodel/models/input/system/type/HpTypeInput.java @@ -19,12 +19,14 @@ public class HpTypeInput extends SystemParticipantTypeInput { private final ComparableQuantity pThermal; /** + * Instantiates a new Hp type input. + * * @param uuid of the input entity * @param id of this type of HP * @param capex Captial expense for this type of HP (typically in €) * @param opex Operating expense for this type of HP (typically in €) - * @param cosphiRated Power factor for this type of HP * @param sRated Rated apparent power + * @param cosphiRated Power factor for this type of HP * @param pThermal Thermal output of the heat pump, when sRated * cosphi_rated is consumed * electrically */ @@ -40,6 +42,11 @@ public HpTypeInput( this.pThermal = pThermal.to(StandardUnits.ACTIVE_POWER_IN); } + /** + * Gets thermal. + * + * @return the thermal + */ public ComparableQuantity getpThermal() { return pThermal; } @@ -96,11 +103,22 @@ private HpTypeInputCopyBuilder(HpTypeInput entity) { this.pThermal = entity.getpThermal(); } + /** + * P thermal hp type input copy builder. + * + * @param pThermal the p thermal + * @return the hp type input copy builder + */ public HpTypeInputCopyBuilder pThermal(ComparableQuantity pThermal) { this.pThermal = pThermal; return thisInstance(); } + /** + * Gets thermal. + * + * @return the thermal + */ public ComparableQuantity getpThermal() { return pThermal; } diff --git a/src/main/java/edu/ie3/datamodel/models/input/system/type/StorageTypeInput.java b/src/main/java/edu/ie3/datamodel/models/input/system/type/StorageTypeInput.java index 664df15e1..b5f338fb5 100644 --- a/src/main/java/edu/ie3/datamodel/models/input/system/type/StorageTypeInput.java +++ b/src/main/java/edu/ie3/datamodel/models/input/system/type/StorageTypeInput.java @@ -32,6 +32,8 @@ public class StorageTypeInput extends SystemParticipantTypeInput { private final ComparableQuantity eta; /** + * Instantiates a new Storage type input. + * * @param uuid of the input entity * @param id of this type of Storage * @param capex capital expense for this type of Storage (typically in €) @@ -61,18 +63,38 @@ public StorageTypeInput( this.eta = eta.to(StandardUnits.EFFICIENCY); } + /** + * Gets eta. + * + * @return the eta + */ public ComparableQuantity getEta() { return eta; } + /** + * Gets storage. + * + * @return the storage + */ public ComparableQuantity geteStorage() { return eStorage; } + /** + * Gets max. + * + * @return the max + */ public ComparableQuantity getpMax() { return pMax; } + /** + * Gets active power gradient. + * + * @return the active power gradient + */ public ComparableQuantity getActivePowerGradient() { return activePowerGradient; } @@ -127,7 +149,7 @@ public String toString() { /** * A builder pattern based approach to create copies of {@link StorageTypeInput} entities with * altered field values. For detailed field descriptions refer to java docs of {@link - * StorageTypeInput} + * StorageTypeInput}* */ public static class StorageTypeInputCopyBuilder extends SystemParticipantTypeInputCopyBuilder { @@ -148,66 +170,143 @@ private StorageTypeInputCopyBuilder(StorageTypeInput entity) { this.eta = entity.getEta(); } + /** + * Sets storage. + * + * @param eStorage the e storage + * @return the storage + */ public StorageTypeInputCopyBuilder seteStorage(ComparableQuantity eStorage) { this.eStorage = eStorage; return thisInstance(); } + /** + * Sets max. + * + * @param pMax the p max + * @return the max + */ public StorageTypeInputCopyBuilder setpMax(ComparableQuantity pMax) { this.pMax = pMax; return thisInstance(); } + /** + * Sets active power gradient. + * + * @param activePowerGradient the active power gradient + * @return the active power gradient + */ public StorageTypeInputCopyBuilder setActivePowerGradient( ComparableQuantity activePowerGradient) { this.activePowerGradient = activePowerGradient; return thisInstance(); } + /** + * Sets eta. + * + * @param eta the eta + * @return the eta + */ public StorageTypeInputCopyBuilder setEta(ComparableQuantity eta) { this.eta = eta; return thisInstance(); } + /** + * Sets dod. + * + * @param dod the dod + * @return the dod + */ public StorageTypeInputCopyBuilder setDod(ComparableQuantity dod) { this.dod = dod; return thisInstance(); } + /** + * Sets life time. + * + * @param lifeTime the life time + * @return the life time + */ public StorageTypeInputCopyBuilder setLifeTime(ComparableQuantity

For all available common standard charging point types see {@link - * #commonChargingPointTypes}. + * #commonChargingPointTypes}*. * * @param parsableString the string to be parsed. Either a valid custom string or the id of a * common standard charging point @@ -236,7 +248,7 @@ public static ChargingPointType parse(String parsableString) throws ChargingPoin * Retrieve a common standard charging point type based on its id or one of its synonymous ids * *

For all available common standard charging point types see {@link - * #commonChargingPointTypes}. + * #commonChargingPointTypes}*. * * @param id the id of the common standard charging point type * @return optional containing id matching {@link ChargingPointType} or an empty optional if no diff --git a/src/main/java/edu/ie3/datamodel/models/input/thermal/AbstractStorageInput.java b/src/main/java/edu/ie3/datamodel/models/input/thermal/AbstractStorageInput.java index 9c1c1eea0..694176195 100644 --- a/src/main/java/edu/ie3/datamodel/models/input/thermal/AbstractStorageInput.java +++ b/src/main/java/edu/ie3/datamodel/models/input/thermal/AbstractStorageInput.java @@ -34,6 +34,8 @@ public abstract class AbstractStorageInput extends ThermalStorageInput { private final ComparableQuantity pThermalMax; /** + * Abstract constructor for a cylindrical storage input with specified parameters. + * * @param uuid Unique identifier of a cylindrical storage * @param id Identifier of the thermal unit * @param operator operator of the asset @@ -65,6 +67,8 @@ public AbstractStorageInput( } /** + * Constructor for a cylindrical storage input without an operator or operation time. + * * @param uuid Unique identifier of a cylindrical storage * @param id Identifier of the thermal unit * @param bus Thermal bus, a thermal unit is connected to @@ -91,22 +95,49 @@ public AbstractStorageInput( this.pThermalMax = pThermalMax.to(StandardUnits.ACTIVE_POWER_IN); } + /** + * Returns available storage volume. + * + * @return The available volume as a {@link ComparableQuantity} in cubic meters. + */ public ComparableQuantity getStorageVolumeLvl() { return storageVolumeLvl; } + /** + * Returns temperature at which fluid enters. + * + * @return The temperature at which fluid enters as a {@link ComparableQuantity} in Celsius. + */ public ComparableQuantity getInletTemp() { return inletTemp; } + /** + * Returns temperature at which fluid exits. + * + * @return The temperature at which fluid exits as a {@link ComparableQuantity} in Celsius. + */ public ComparableQuantity getReturnTemp() { return returnTemp; } + /** + * Returns specific heat capacity. + * + * @return The specific heat capacity as a {@link ComparableQuantity} typically measured in + * kWh/K*m³. + */ public ComparableQuantity getC() { return c; } + /** + * Returns maximum permissible thermal power. + * + * @return The maximum permissible thermal power as a {@link ComparableQuantity} typically + * measured in kW. + */ public ComparableQuantity getpThermalMax() { return pThermalMax; } @@ -157,18 +188,35 @@ public String toString() { /** * A builder pattern based approach to create copies of {@link AbstractStorageInput} entities with * altered field values. For detailed field descriptions refer to java docs of {@link - * AbstractStorageInput} + * AbstractStorageInput}* + * + * @param The type of the builder extending from {@link AbstractStorageInputCopyBuilder}. */ protected abstract static class AbstractStorageInputCopyBuilder< B extends AbstractStorageInputCopyBuilder> extends ThermalStorageInputCopyBuilder { private ComparableQuantity storageVolumeLvl; + + /** Temperature of the inlet (typically in °C) */ private ComparableQuantity inletTemp; + + /** Temperature of the outlet (typically in °C) */ private ComparableQuantity returnTemp; + + /** Specific heat capacity of the storage medium (typically in kWh/K*m³) */ private ComparableQuantity c; + + /** Maximum permissible thermal power (typically in kW) */ private ComparableQuantity pThermalMax; + /** + * A builder pattern based approach to create copies of {@link AbstractStorageInput} entities + * with altered field values. For detailed field descriptions refer to java docs for {@link + * AbstractStorageInput}* + * + * @param entity the entity that will be copied. + */ protected AbstractStorageInputCopyBuilder(AbstractStorageInput entity) { super(entity); @@ -179,26 +227,61 @@ protected AbstractStorageInputCopyBuilder(AbstractStorageInput entity) { this.pThermalMax = entity.getpThermalMax(); } + /** + * Sets the available storage volume level for this storage input. + * + * @param storageVolumeLvl The available storage volume as a {@link ComparableQuantity} of type + * {@link Volume}. + * @return This builder instance for method chaining. + */ public B storageVolumeLvl(ComparableQuantity storageVolumeLvl) { this.storageVolumeLvl = storageVolumeLvl; return thisInstance(); } + /** + * Sets the temperature at which fluid enters for this storage input. + * + * @param inletTemp The inlet temperature as a {@link ComparableQuantity} of type {@link + * Temperature}. + * @return This builder instance for method chaining. + */ public B inletTemp(ComparableQuantity inletTemp) { this.inletTemp = inletTemp; return thisInstance(); } + /** + * Sets the temperature at which fluid exits for this storage input. + * + * @param returnTemp The return temperature as a {@link ComparableQuantity} of type {@link + * Temperature}. + * @return This builder instance for method chaining. + */ public B returnTemp(ComparableQuantity returnTemp) { this.returnTemp = returnTemp; return thisInstance(); } + /** + * Sets the specific heat capacity of the fluid for this storage input. + * + * @param c The specific heat capacity as a {@link ComparableQuantity} of type + * SpecificHeatCapacity. + * @return This builder instance for method chaining. + */ public B c(ComparableQuantity c) { this.c = c; return thisInstance(); } + /** + * Sets the thermal power that this this storage input is capable. + * + * @param pThermalMax The maximum thermal power as a {@link ComparableQuantity} of type {@link + * Power}. + * @return This builder instance for method chaining. + */ public B pThermalMax(ComparableQuantity pThermalMax) { this.pThermalMax = pThermalMax; return thisInstance(); @@ -211,22 +294,49 @@ public B scale(Double factor) { return thisInstance(); } + /** + * Returns available storage volume. + * + * @return The available volume as a {@link ComparableQuantity} in cubic meters. + */ public ComparableQuantity getStorageVolumeLvl() { return storageVolumeLvl; } + /** + * Returns temperature at which fluid enters. + * + * @return The temperature at which fluid enters as a {@link ComparableQuantity} in Celsius. + */ public ComparableQuantity getInletTemp() { return inletTemp; } + /** + * Returns temperature at which fluid exits. + * + * @return The temperature at which fluid exits as a {@link ComparableQuantity} in Celsius. + */ public ComparableQuantity getReturnTemp() { return returnTemp; } + /** + * Returns specific heat capacity. + * + * @return The specific heat capacity as a {@link ComparableQuantity} typically measured in + * kWh/K*m³. + */ public ComparableQuantity getC() { return c; } + /** + * Returns maximum permissible thermal power. + * + * @return The maximum permissible thermal power as a {@link ComparableQuantity} typically + * measured in kW. + */ public ComparableQuantity getpThermalMax() { return pThermalMax; } diff --git a/src/main/java/edu/ie3/datamodel/models/input/thermal/CylindricalStorageInput.java b/src/main/java/edu/ie3/datamodel/models/input/thermal/CylindricalStorageInput.java index 9e43ef04b..2e8d62323 100644 --- a/src/main/java/edu/ie3/datamodel/models/input/thermal/CylindricalStorageInput.java +++ b/src/main/java/edu/ie3/datamodel/models/input/thermal/CylindricalStorageInput.java @@ -17,6 +17,8 @@ /** Thermal storage with cylindrical shape */ public class CylindricalStorageInput extends AbstractStorageInput { /** + * Instantiates a new Cylindrical storage input. + * * @param uuid Unique identifier of a cylindrical storage * @param id Identifier of the thermal unit * @param operator operator of the asset @@ -53,6 +55,8 @@ public CylindricalStorageInput( } /** + * Instantiates a new Cylindrical storage input. + * * @param uuid Unique identifier of a cylindrical storage * @param id Identifier of the thermal unit * @param bus Thermal bus, a thermal unit is connected to @@ -108,11 +112,16 @@ public String toString() { /** * A builder pattern based approach to create copies of {@link CylindricalStorageInput} entities * with altered field values. For detailed field descriptions refer to java docs of {@link - * CylindricalStorageInput} + * CylindricalStorageInput}* */ public static class CylindricalStorageInputCopyBuilder extends AbstractStorageInputCopyBuilder { + /** + * Instantiates a new Cylindrical storage input copy builder. + * + * @param entity the entity + */ protected CylindricalStorageInputCopyBuilder(CylindricalStorageInput entity) { super(entity); } diff --git a/src/main/java/edu/ie3/datamodel/models/input/thermal/DomesticHotWaterStorageInput.java b/src/main/java/edu/ie3/datamodel/models/input/thermal/DomesticHotWaterStorageInput.java index b26af2c79..8c8cb5f1e 100644 --- a/src/main/java/edu/ie3/datamodel/models/input/thermal/DomesticHotWaterStorageInput.java +++ b/src/main/java/edu/ie3/datamodel/models/input/thermal/DomesticHotWaterStorageInput.java @@ -14,6 +14,7 @@ import javax.measure.quantity.Volume; import tech.units.indriya.ComparableQuantity; +/** The type Domestic hot water storage input. */ public class DomesticHotWaterStorageInput extends AbstractStorageInput { /** @@ -109,9 +110,15 @@ public String toString() { + '}'; } + /** The type Domestic hot water storage input copy builder. */ public static class DomesticHotWaterStorageInputCopyBuilder extends AbstractStorageInputCopyBuilder { + /** + * Instantiates a new Domestic hot water storage input copy builder. + * + * @param entity the entity + */ protected DomesticHotWaterStorageInputCopyBuilder(DomesticHotWaterStorageInput entity) { super(entity); } diff --git a/src/main/java/edu/ie3/datamodel/models/input/thermal/ThermalBusInput.java b/src/main/java/edu/ie3/datamodel/models/input/thermal/ThermalBusInput.java index b93c261ed..3737513a3 100644 --- a/src/main/java/edu/ie3/datamodel/models/input/thermal/ThermalBusInput.java +++ b/src/main/java/edu/ie3/datamodel/models/input/thermal/ThermalBusInput.java @@ -42,7 +42,7 @@ public ThermalBusInputCopyBuilder copy() { /** * A builder pattern based approach to create copies of {@link ThermalBusInput} entities with * altered field values. For detailed field descriptions refer to java docs of {@link - * ThermalBusInput} + * ThermalBusInput}* */ public static class ThermalBusInputCopyBuilder extends AssetInput.AssetInputCopyBuilder { 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 d119a42c2..7fc034d2b 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 @@ -39,6 +39,8 @@ public class ThermalHouseInput extends ThermalSinkInput { private final double numberInhabitants; /** + * Instantiates a new Thermal house input. + * * @param uuid Unique identifier of a thermal house model * @param id Identifier of the model * @param bus Thermal bus, the model is connected to @@ -72,6 +74,8 @@ public ThermalHouseInput( } /** + * Instantiates a new Thermal house input. + * * @param uuid Unique identifier of a thermal house model * @param id Identifier of the model * @param operator operator of the asset @@ -108,30 +112,65 @@ public ThermalHouseInput( this.numberInhabitants = numberInhabitants; } + /** + * Gets eth losses. + * + * @return the eth losses + */ public ComparableQuantity getEthLosses() { return ethLosses; } + /** + * Gets eth capa. + * + * @return the eth capa + */ public ComparableQuantity getEthCapa() { return ethCapa; } + /** + * Gets target temperature. + * + * @return the target temperature + */ public ComparableQuantity getTargetTemperature() { return targetTemperature; } + /** + * Gets upper temperature limit. + * + * @return the upper temperature limit + */ public ComparableQuantity getUpperTemperatureLimit() { return upperTemperatureLimit; } + /** + * Gets lower temperature limit. + * + * @return the lower temperature limit + */ public ComparableQuantity getLowerTemperatureLimit() { return lowerTemperatureLimit; } + /** + * Gets housing type. + * + * @return the housing type + */ public String getHousingType() { return housingType; } + /** + * Gets number of inhabitants. + * + * @return the number of inhabitants + */ public double getNumberOfInhabitants() { return numberInhabitants; } @@ -201,7 +240,7 @@ public String toString() { /** * A builder pattern based approach to create copies of {@link ThermalHouseInput} entities with * altered field values. For detailed field descriptions refer to java docs of {@link - * ThermalHouseInput} + * ThermalHouseInput}* */ public static class ThermalHouseInputCopyBuilder extends ThermalSinkInputCopyBuilder { @@ -225,40 +264,82 @@ private ThermalHouseInputCopyBuilder(ThermalHouseInput entity) { this.numberInhabitants = entity.getNumberOfInhabitants(); } + /** + * Eth losses thermal house input copy builder. + * + * @param ethLosses the eth losses + * @return the thermal house input copy builder + */ public ThermalHouseInputCopyBuilder ethLosses( ComparableQuantity ethLosses) { this.ethLosses = ethLosses; return thisInstance(); } + /** + * Eth capa thermal house input copy builder. + * + * @param ethCapa the eth capa + * @return the thermal house input copy builder + */ public ThermalHouseInputCopyBuilder ethCapa(ComparableQuantity ethCapa) { this.ethCapa = ethCapa; return thisInstance(); } + /** + * Target temperature thermal house input copy builder. + * + * @param targetTemperature the target temperature + * @return the thermal house input copy builder + */ public ThermalHouseInputCopyBuilder targetTemperature( ComparableQuantity targetTemperature) { this.targetTemperature = targetTemperature; return thisInstance(); } + /** + * Upper temperature limit thermal house input copy builder. + * + * @param upperTemperatureLimit the upper temperature limit + * @return the thermal house input copy builder + */ public ThermalHouseInputCopyBuilder upperTemperatureLimit( ComparableQuantity upperTemperatureLimit) { this.upperTemperatureLimit = upperTemperatureLimit; return thisInstance(); } + /** + * Lower temperature limit thermal house input copy builder. + * + * @param lowerTemperatureLimit the lower temperature limit + * @return the thermal house input copy builder + */ public ThermalHouseInputCopyBuilder lowerTemperatureLimit( ComparableQuantity lowerTemperatureLimit) { this.lowerTemperatureLimit = lowerTemperatureLimit; return thisInstance(); } + /** + * Housing type thermal house input copy builder. + * + * @param housingType the housing type + * @return the thermal house input copy builder + */ public ThermalHouseInputCopyBuilder housingType(String housingType) { this.housingType = housingType; return thisInstance(); } + /** + * Number inhabitants thermal house input copy builder. + * + * @param numberInhabitants the number inhabitants + * @return the thermal house input copy builder + */ public ThermalHouseInputCopyBuilder numberInhabitants(double numberInhabitants) { this.numberInhabitants = numberInhabitants; return thisInstance(); diff --git a/src/main/java/edu/ie3/datamodel/models/input/thermal/ThermalSinkInput.java b/src/main/java/edu/ie3/datamodel/models/input/thermal/ThermalSinkInput.java index 1b28e6b92..22a9d17e3 100644 --- a/src/main/java/edu/ie3/datamodel/models/input/thermal/ThermalSinkInput.java +++ b/src/main/java/edu/ie3/datamodel/models/input/thermal/ThermalSinkInput.java @@ -12,6 +12,8 @@ /** Common properties to all thermal sinks */ public abstract class ThermalSinkInput extends ThermalUnitInput { /** + * Instantiates a new Thermal sink input. + * * @param uuid Unique identifier of a thermal sink input model * @param id Identifier of the thermal unit * @param bus Thermal bus, a thermal unit is connected to @@ -21,6 +23,8 @@ public abstract class ThermalSinkInput extends ThermalUnitInput { } /** + * Instantiates a new Thermal sink input. + * * @param uuid Unique identifier of a thermal sink input model * @param id Identifier of the thermal unit * @param operator operator of the asset @@ -41,11 +45,18 @@ public abstract class ThermalSinkInput extends ThermalUnitInput { /** * Abstract class for all builders that build child entities of abstract class {@link - * ThermalSinkInput} + * ThermalSinkInput}* + * + * @param The builder type extending from {@link ThermalSinkInputCopyBuilder} */ public abstract static class ThermalSinkInputCopyBuilder> extends ThermalUnitInputCopyBuilder { + /** + * Instantiates a new Thermal sink input copy builder. + * + * @param entity the entity + */ protected ThermalSinkInputCopyBuilder(ThermalSinkInput entity) { super(entity); } diff --git a/src/main/java/edu/ie3/datamodel/models/input/thermal/ThermalStorageInput.java b/src/main/java/edu/ie3/datamodel/models/input/thermal/ThermalStorageInput.java index 0fe30d0b5..db2039bdb 100644 --- a/src/main/java/edu/ie3/datamodel/models/input/thermal/ThermalStorageInput.java +++ b/src/main/java/edu/ie3/datamodel/models/input/thermal/ThermalStorageInput.java @@ -12,6 +12,8 @@ /** Common properties to all thermal storage devices */ public abstract class ThermalStorageInput extends ThermalUnitInput { /** + * Instantiates a new Thermal storage input. + * * @param uuid Unique identifier of a certain thermal storage input model * @param id Identifier of the thermal unit * @param bus Thermal bus, a thermal unit is connected to @@ -21,6 +23,8 @@ public abstract class ThermalStorageInput extends ThermalUnitInput { } /** + * Instantiates a new Thermal storage input. + * * @param uuid Unique identifier of a certain thermal storage input model * @param id Identifier of the thermal unit * @param operator operator of the asset @@ -41,12 +45,19 @@ public abstract class ThermalStorageInput extends ThermalUnitInput { /** * Abstract class for all builders that build child entities of abstract class {@link - * ThermalStorageInput} + * ThermalStorageInput}* + * + * @param The builder type extending from {@link ThermalStorageInputCopyBuilder} */ public abstract static class ThermalStorageInputCopyBuilder< B extends ThermalStorageInputCopyBuilder> extends ThermalUnitInputCopyBuilder { + /** + * Instantiates a new Thermal storage input copy builder. + * + * @param entity the entity + */ protected ThermalStorageInputCopyBuilder(ThermalStorageInput entity) { super(entity); } diff --git a/src/main/java/edu/ie3/datamodel/models/input/thermal/ThermalUnitInput.java b/src/main/java/edu/ie3/datamodel/models/input/thermal/ThermalUnitInput.java index c8704bcff..23d83328f 100644 --- a/src/main/java/edu/ie3/datamodel/models/input/thermal/ThermalUnitInput.java +++ b/src/main/java/edu/ie3/datamodel/models/input/thermal/ThermalUnitInput.java @@ -17,6 +17,8 @@ public abstract class ThermalUnitInput extends ThermalInput implements HasTherma private final ThermalBusInput thermalBus; /** + * Instantiates a new Thermal unit input. + * * @param uuid Unique identifier of a certain thermal input * @param id Identifier of the thermal unit * @param thermalBus thermal bus, a thermal unit is connected to @@ -27,6 +29,8 @@ public abstract class ThermalUnitInput extends ThermalInput implements HasTherma } /** + * Instantiates a new Thermal unit input. + * * @param uuid Unique identifier of a certain thermal input * @param id Identifier of the thermal unit * @param operator operator of the asset @@ -82,27 +86,52 @@ public String toString() { /** * Abstract class for all builders that build child entities of abstract class {@link - * ThermalUnitInput} + * ThermalUnitInput}* + * + * @param Type parameter representing the builder type extending from + * ThermalUnitInputCopyBuilder. */ public abstract static class ThermalUnitInputCopyBuilder> extends AssetInputCopyBuilder { private ThermalBusInput thermalBus; + /** + * Instantiates a new Thermal unit input copy builder. + * + * @param entity the entity + */ protected ThermalUnitInputCopyBuilder(ThermalUnitInput entity) { super(entity); this.thermalBus = entity.getThermalBus(); } + /** + * Thermal bus b. + * + * @param thermalBus the thermal bus + * @return the b + */ public B thermalBus(ThermalBusInput thermalBus) { this.thermalBus = thermalBus; return thisInstance(); } + /** + * Gets thermal bus. + * + * @return the thermal bus + */ protected ThermalBusInput getThermalBus() { return thermalBus; } + /** + * Scales properties by given factor. + * + * @param factor Scaling factor + * @return A copy builder with scaled relevant properties + */ public abstract B scale(Double factor); @Override diff --git a/src/main/java/edu/ie3/datamodel/models/profile/BdewStandardLoadProfile.java b/src/main/java/edu/ie3/datamodel/models/profile/BdewStandardLoadProfile.java index cac7ff8a7..c0557c06f 100644 --- a/src/main/java/edu/ie3/datamodel/models/profile/BdewStandardLoadProfile.java +++ b/src/main/java/edu/ie3/datamodel/models/profile/BdewStandardLoadProfile.java @@ -13,22 +13,51 @@ * see here. */ public enum BdewStandardLoadProfile implements StandardLoadProfile { - H0("h0"), // Households - H25("h25"), // household (Updated 2025) - L0("l0"), // Agricultural enterprises without further differentiation - L1("l1"), // Agricultural enterprises with dairy sector - L2("l2"), // Agricultural enterprises without dairy sector - L25("l25"), // Agricultural enterprises without further differentiation (Updated 2025) - G0("g0"), // Businesses without further differentiation - G1("g1"), // Workday businesses from 8 a.m. to 6 p.m. - G2("g2"), // Businesses with high consumption in evening hours - G3("g3"), // Businesses with enduring consumption - G4("g4"), // Vendor or barber shop - G5("g5"), // Bakery - G6("g6"), // Business with main consumption on weekends - G25("g25"), // Businesses without further differentiation (Updated 2025) - P25("p25"), // PV profile - S25("s25"); // Combined PV and storage profile + /** Households. */ + H0("h0"), + + /** Household profile updated in 2025. */ + H25("h25"), + + /** Agricultural enterprises without further differentiation. */ + L0("l0"), + + /** Agricultural enterprises with dairy sector. */ + L1("l1"), + + /** Agricultural enterprises without dairy sector. */ + L2("l2"), + /** Agricultural enterprises without further differentiation (Updated in 2025). */ + L25("l25"), + + /** Businesses without further differentiation. */ + G0("g0"), + + /** Workday businesses operating from 8 a.m. to 6 p.m. */ + G1("g1"), + + /** Businesses with high consumption during evening hours. */ + G2("g2"), + + /** Businesses with enduring consumption throughout the day. */ + G3("g3"), + + /** Vendor or barber shop load profile. */ + G4("g4"), + + /** Bakery load profile. */ + G5("g5"), + + /** Business with main consumption on weekends. */ + G6("g6"), + /** Businesses without further differentiation (Updated in 2025). */ + G25("g25"), + + /** PV profile for photovoltaic systems. */ + P25("p25"), + + /** Combined PV and storage profile for hybrid systems. */ + S25("s25"); private final String key; @@ -42,6 +71,7 @@ public enum BdewStandardLoadProfile implements StandardLoadProfile { * @param key key to check for * @return The corresponding bdew load profile or throw {@link IllegalArgumentException}, if no * matching load profile can be found + * @throws ParsingException the parsing exception */ public static BdewStandardLoadProfile get(String key) throws ParsingException { return LoadProfile.getProfile(BdewStandardLoadProfile.values(), key); diff --git a/src/main/java/edu/ie3/datamodel/models/profile/LoadProfile.java b/src/main/java/edu/ie3/datamodel/models/profile/LoadProfile.java index 116d3389e..381917bfd 100644 --- a/src/main/java/edu/ie3/datamodel/models/profile/LoadProfile.java +++ b/src/main/java/edu/ie3/datamodel/models/profile/LoadProfile.java @@ -11,8 +11,11 @@ import java.util.stream.Collectors; import java.util.stream.Stream; +/** The interface Load profile. */ public interface LoadProfile extends Serializable { /** + * Gets key. + * * @return The identifying String */ String getKey(); @@ -30,6 +33,11 @@ static LoadProfile parse(String key) throws ParsingException { return LoadProfile.getProfile(getAllProfiles(), key); } + /** + * Get all profiles load profile [ ]. + * + * @return the load profile [ ] + */ static LoadProfile[] getAllProfiles() { return Stream.of( BdewStandardLoadProfile.values(), @@ -42,9 +50,11 @@ static LoadProfile[] getAllProfiles() { /** * Looks for load profile with given key and returns it. * + * @param the type parameter * @param profiles we search within * @param key to look for * @return the matching load profile + * @throws ParsingException the parsing exception */ static T getProfile(T[] profiles, String key) throws ParsingException { return Arrays.stream(profiles) @@ -65,7 +75,9 @@ private static String getUniformKey(String key) { return key.toLowerCase().replaceAll("[-_]*", ""); } + /** The enum Default load profiles. */ enum DefaultLoadProfiles implements LoadProfile { + /** No load profile default load profiles. */ NO_LOAD_PROFILE; @Override @@ -74,7 +86,9 @@ public String getKey() { } } + /** The enum Random load profile. */ enum RandomLoadProfile implements LoadProfile { + /** Random load profile random load profile. */ RANDOM_LOAD_PROFILE; @Override diff --git a/src/main/java/edu/ie3/datamodel/models/profile/NbwTemperatureDependantLoadProfile.java b/src/main/java/edu/ie3/datamodel/models/profile/NbwTemperatureDependantLoadProfile.java index 783e164bc..99242b0fc 100644 --- a/src/main/java/edu/ie3/datamodel/models/profile/NbwTemperatureDependantLoadProfile.java +++ b/src/main/java/edu/ie3/datamodel/models/profile/NbwTemperatureDependantLoadProfile.java @@ -9,9 +9,11 @@ /** Temperature dependant determined by NBW (accessed 05/2022) */ public enum NbwTemperatureDependantLoadProfile implements TemperatureDependantLoadProfile { + /** The Ep 1. */ // heat pumps EP1("ep1"), + /** The Ez 2. */ // night storage heating EZ2("ez2"); @@ -27,6 +29,7 @@ public enum NbwTemperatureDependantLoadProfile implements TemperatureDependantLo * @param key key to check for * @return The corresponding nbw load profile or throw {@link IllegalArgumentException}, if no * matching load profile can be found + * @throws ParsingException the parsing exception */ public static NbwTemperatureDependantLoadProfile get(String key) throws ParsingException { return LoadProfile.getProfile(NbwTemperatureDependantLoadProfile.values(), key); diff --git a/src/main/java/edu/ie3/datamodel/models/profile/StandardLoadProfile.java b/src/main/java/edu/ie3/datamodel/models/profile/StandardLoadProfile.java index b2878df09..62e46c354 100644 --- a/src/main/java/edu/ie3/datamodel/models/profile/StandardLoadProfile.java +++ b/src/main/java/edu/ie3/datamodel/models/profile/StandardLoadProfile.java @@ -11,8 +11,8 @@ /** * Giving reference to a known standard load profile to apply to a {@link - * edu.ie3.datamodel.models.input.system.LoadInput}. This interface does nothing more, than giving a - * reference, the values have to be provided by the simulator using the models. + * edu.ie3.datamodel.models.input.system.LoadInput}*. This interface does nothing more, than giving + * a reference, the values have to be provided by the simulator using the models. * *

If you intend to provide distinct values, create either an {@link IndividualTimeSeries} or * {@link RepetitiveTimeSeries} and assign it to the model via mapping to the model. @@ -24,6 +24,7 @@ public interface StandardLoadProfile extends LoadProfile { * * @param key to look for * @return the matching standard load profile + * @throws ParsingException the parsing exception */ static StandardLoadProfile parse(String key) throws ParsingException { return LoadProfile.getProfile(BdewStandardLoadProfile.values(), key); diff --git a/src/main/java/edu/ie3/datamodel/models/profile/TemperatureDependantLoadProfile.java b/src/main/java/edu/ie3/datamodel/models/profile/TemperatureDependantLoadProfile.java index 4b5a94f20..200123687 100644 --- a/src/main/java/edu/ie3/datamodel/models/profile/TemperatureDependantLoadProfile.java +++ b/src/main/java/edu/ie3/datamodel/models/profile/TemperatureDependantLoadProfile.java @@ -19,6 +19,7 @@ public interface TemperatureDependantLoadProfile extends LoadProfile { * * @param key to look for * @return the matching temperature dependant load profile + * @throws ParsingException the parsing exception */ static TemperatureDependantLoadProfile parse(String key) throws ParsingException { return LoadProfile.getProfile(NbwTemperatureDependantLoadProfile.values(), key); diff --git a/src/main/java/edu/ie3/datamodel/models/result/CongestionResult.java b/src/main/java/edu/ie3/datamodel/models/result/CongestionResult.java index a083ef22f..b5263d7fc 100644 --- a/src/main/java/edu/ie3/datamodel/models/result/CongestionResult.java +++ b/src/main/java/edu/ie3/datamodel/models/result/CongestionResult.java @@ -12,6 +12,7 @@ import javax.measure.quantity.Dimensionless; import tech.units.indriya.ComparableQuantity; +/** The type Congestion result. */ public class CongestionResult extends ResultEntity { /** Values */ private final Integer subgrid; @@ -48,22 +49,47 @@ public CongestionResult( this.max = max; } + /** + * Gets type. + * + * @return the type + */ public InputModelType getType() { return type; } + /** + * Gets subgrid. + * + * @return the subgrid + */ public int getSubgrid() { return subgrid; } + /** + * Gets value. + * + * @return the value + */ public ComparableQuantity getValue() { return value; } + /** + * Gets min. + * + * @return the min + */ public ComparableQuantity getMin() { return min; } + /** + * Gets max. + * + * @return the max + */ public ComparableQuantity getMax() { return max; } @@ -106,18 +132,31 @@ public String toString() { + '}'; } + /** The enum Input model type. */ public enum InputModelType { + /** Node input model type. */ NODE("node"), + /** Line input model type. */ LINE("line"), + /** Transformer 2 w input model type. */ TRANSFORMER_2W("transformer_2w"), + /** Transformer 3 w input model type. */ TRANSFORMER_3W("transforerm_3w"); + /** The Type. */ public final String type; InputModelType(String type) { this.type = type; } + /** + * Parse input model type. + * + * @param inputModelType the input model type + * @return the input model type + * @throws ParsingException the parsing exception + */ public static InputModelType parse(String inputModelType) throws ParsingException { return switch (inputModelType) { case "node" -> NODE; diff --git a/src/main/java/edu/ie3/datamodel/models/result/NodeResult.java b/src/main/java/edu/ie3/datamodel/models/result/NodeResult.java index 0724a8344..dccf67778 100644 --- a/src/main/java/edu/ie3/datamodel/models/result/NodeResult.java +++ b/src/main/java/edu/ie3/datamodel/models/result/NodeResult.java @@ -39,18 +39,38 @@ public NodeResult( this.vAng = vAng; } + /** + * Gets mag. + * + * @return the mag + */ public ComparableQuantity getvMag() { return vMag; } + /** + * Sets mag. + * + * @param vMag the v mag + */ public void setvMag(ComparableQuantity vMag) { this.vMag = vMag; } + /** + * Gets ang. + * + * @return the ang + */ public ComparableQuantity getvAng() { return vAng; } + /** + * Sets ang. + * + * @param vAng the v ang + */ public void setvAng(ComparableQuantity vAng) { this.vAng = vAng; } diff --git a/src/main/java/edu/ie3/datamodel/models/result/ResultEntity.java b/src/main/java/edu/ie3/datamodel/models/result/ResultEntity.java index f1ba351d7..076e7cbb5 100644 --- a/src/main/java/edu/ie3/datamodel/models/result/ResultEntity.java +++ b/src/main/java/edu/ie3/datamodel/models/result/ResultEntity.java @@ -30,18 +30,38 @@ protected ResultEntity(ZonedDateTime time, UUID inputModel) { this.inputModel = inputModel; } + /** + * Gets input model. + * + * @return the input model + */ public UUID getInputModel() { return inputModel; } + /** + * Sets input model. + * + * @param inputID the input id + */ public void setInputModel(UUID inputID) { inputModel = inputID; } + /** + * Gets time. + * + * @return the time + */ public ZonedDateTime getTime() { return time; } + /** + * Sets time. + * + * @param time the time + */ public void setTime(ZonedDateTime time) { this.time = time; } diff --git a/src/main/java/edu/ie3/datamodel/models/result/connector/ConnectorResult.java b/src/main/java/edu/ie3/datamodel/models/result/connector/ConnectorResult.java index c5d9b99cd..a2641ddf7 100644 --- a/src/main/java/edu/ie3/datamodel/models/result/connector/ConnectorResult.java +++ b/src/main/java/edu/ie3/datamodel/models/result/connector/ConnectorResult.java @@ -52,34 +52,74 @@ protected ConnectorResult( this.iBAng = iBAng; } + /** + * Gets a mag. + * + * @return the a mag + */ public ComparableQuantity getiAMag() { return iAMag; } + /** + * Sets a mag. + * + * @param iAMag the a mag + */ public void setiAMag(ComparableQuantity iAMag) { this.iAMag = iAMag; } + /** + * Gets a ang. + * + * @return the a ang + */ public ComparableQuantity getiAAng() { return iAAng; } + /** + * Sets a ang. + * + * @param iAAng the a ang + */ public void setiAAng(ComparableQuantity iAAng) { this.iAAng = iAAng; } + /** + * Gets b mag. + * + * @return the b mag + */ public ComparableQuantity getiBMag() { return iBMag; } + /** + * Sets b mag. + * + * @param iBMag the b mag + */ public void setiBMag(ComparableQuantity iBMag) { this.iBMag = iBMag; } + /** + * Gets b ang. + * + * @return the b ang + */ public ComparableQuantity getiBAng() { return iBAng; } + /** + * Sets b ang. + * + * @param iBAng the b ang + */ public void setiBAng(ComparableQuantity iBAng) { this.iBAng = iBAng; } diff --git a/src/main/java/edu/ie3/datamodel/models/result/connector/SwitchResult.java b/src/main/java/edu/ie3/datamodel/models/result/connector/SwitchResult.java index 7b5c15c5b..5edd19f99 100644 --- a/src/main/java/edu/ie3/datamodel/models/result/connector/SwitchResult.java +++ b/src/main/java/edu/ie3/datamodel/models/result/connector/SwitchResult.java @@ -30,10 +30,20 @@ public SwitchResult(ZonedDateTime time, UUID inputModel, boolean closed) { this.closed = closed; } + /** + * Gets closed. + * + * @return the closed + */ public boolean getClosed() { return closed; } + /** + * Sets closed. + * + * @param closed the closed + */ public void setClosed(boolean closed) { this.closed = closed; } diff --git a/src/main/java/edu/ie3/datamodel/models/result/connector/Transformer2WResult.java b/src/main/java/edu/ie3/datamodel/models/result/connector/Transformer2WResult.java index 6332531a0..3261824e2 100644 --- a/src/main/java/edu/ie3/datamodel/models/result/connector/Transformer2WResult.java +++ b/src/main/java/edu/ie3/datamodel/models/result/connector/Transformer2WResult.java @@ -13,7 +13,7 @@ /** * Represents calculation results of a {@link - * edu.ie3.datamodel.models.input.connector.Transformer2WInput} + * edu.ie3.datamodel.models.input.connector.Transformer2WInput}* */ public class Transformer2WResult extends TransformerResult { diff --git a/src/main/java/edu/ie3/datamodel/models/result/connector/Transformer3WResult.java b/src/main/java/edu/ie3/datamodel/models/result/connector/Transformer3WResult.java index 0ad84c373..68ea1c388 100644 --- a/src/main/java/edu/ie3/datamodel/models/result/connector/Transformer3WResult.java +++ b/src/main/java/edu/ie3/datamodel/models/result/connector/Transformer3WResult.java @@ -12,6 +12,7 @@ import javax.measure.quantity.ElectricCurrent; import tech.units.indriya.ComparableQuantity; +/** The type Transformer 3 w result. */ public class Transformer3WResult extends TransformerResult { /** Electric current magnitude @ port C, normally provided in Ampere */ @@ -21,6 +22,8 @@ public class Transformer3WResult extends TransformerResult { private ComparableQuantity iCAng; /** + * Instantiates a new Transformer 3 w result. + * * @param time date and time when the result is produced * @param inputModel uuid of the input model that produces the result * @param iAMag electric current magnitude @ port A, normally provided in Ampere @@ -46,18 +49,38 @@ public Transformer3WResult( this.iCAng = iCAng; } + /** + * Gets c mag. + * + * @return the c mag + */ public ComparableQuantity getiCMag() { return iCMag; } + /** + * Sets c mag. + * + * @param iCMag the c mag + */ public void setiCMag(ComparableQuantity iCMag) { this.iCMag = iCMag; } + /** + * Gets c ang. + * + * @return the c ang + */ public ComparableQuantity getiCAng() { return iCAng; } + /** + * Sets c ang. + * + * @param iCAng the c ang + */ public void setiCAng(ComparableQuantity iCAng) { this.iCAng = iCAng; } diff --git a/src/main/java/edu/ie3/datamodel/models/result/connector/TransformerResult.java b/src/main/java/edu/ie3/datamodel/models/result/connector/TransformerResult.java index c3e651d4b..57243f636 100644 --- a/src/main/java/edu/ie3/datamodel/models/result/connector/TransformerResult.java +++ b/src/main/java/edu/ie3/datamodel/models/result/connector/TransformerResult.java @@ -44,10 +44,20 @@ protected TransformerResult( this.tapPos = tapPos; } + /** + * Gets tap pos. + * + * @return the tap pos + */ public int getTapPos() { return tapPos; } + /** + * Sets tap pos. + * + * @param tapPos the tap pos + */ public void setTapPos(int tapPos) { this.tapPos = tapPos; } diff --git a/src/main/java/edu/ie3/datamodel/models/result/system/ElectricalEnergyStorageResult.java b/src/main/java/edu/ie3/datamodel/models/result/system/ElectricalEnergyStorageResult.java index cd804b36f..6a6d1ca37 100644 --- a/src/main/java/edu/ie3/datamodel/models/result/system/ElectricalEnergyStorageResult.java +++ b/src/main/java/edu/ie3/datamodel/models/result/system/ElectricalEnergyStorageResult.java @@ -19,6 +19,15 @@ public abstract class ElectricalEnergyStorageResult extends SystemParticipantRes /** State of Charge (SoC) in % */ private final ComparableQuantity soc; + /** + * Instantiates a new Electrical energy storage result. + * + * @param time the time + * @param inputModel the input model + * @param p the p + * @param q the q + * @param soc the soc + */ protected ElectricalEnergyStorageResult( ZonedDateTime time, UUID inputModel, @@ -29,6 +38,11 @@ protected ElectricalEnergyStorageResult( this.soc = soc.to(StandardUnits.SOC); } + /** + * Gets soc. + * + * @return the soc + */ public ComparableQuantity getSoc() { return soc; } diff --git a/src/main/java/edu/ie3/datamodel/models/result/system/FixedFeedInResult.java b/src/main/java/edu/ie3/datamodel/models/result/system/FixedFeedInResult.java index 6b6e2b0e7..8076374f3 100644 --- a/src/main/java/edu/ie3/datamodel/models/result/system/FixedFeedInResult.java +++ b/src/main/java/edu/ie3/datamodel/models/result/system/FixedFeedInResult.java @@ -12,7 +12,7 @@ /** * Represents calculation results of a {@link - * edu.ie3.datamodel.models.input.system.FixedFeedInInput} + * edu.ie3.datamodel.models.input.system.FixedFeedInInput}* */ public class FixedFeedInResult extends SystemParticipantResult { diff --git a/src/main/java/edu/ie3/datamodel/models/result/system/FlexOptionsResult.java b/src/main/java/edu/ie3/datamodel/models/result/system/FlexOptionsResult.java index 210bc761b..243a4737c 100644 --- a/src/main/java/edu/ie3/datamodel/models/result/system/FlexOptionsResult.java +++ b/src/main/java/edu/ie3/datamodel/models/result/system/FlexOptionsResult.java @@ -56,14 +56,29 @@ public FlexOptionsResult( this.pMax = pMax; } + /** + * Gets ref. + * + * @return the ref + */ public ComparableQuantity getpRef() { return pRef; } + /** + * Gets min. + * + * @return the min + */ public ComparableQuantity getpMin() { return pMin; } + /** + * Gets max. + * + * @return the max + */ public ComparableQuantity getpMax() { return pMax; } diff --git a/src/main/java/edu/ie3/datamodel/models/result/system/SystemParticipantResult.java b/src/main/java/edu/ie3/datamodel/models/result/system/SystemParticipantResult.java index 4b5067896..8030f70a3 100644 --- a/src/main/java/edu/ie3/datamodel/models/result/system/SystemParticipantResult.java +++ b/src/main/java/edu/ie3/datamodel/models/result/system/SystemParticipantResult.java @@ -22,6 +22,8 @@ public abstract class SystemParticipantResult extends ResultEntity { private ComparableQuantity q; /** + * Instantiates a new System participant result. + * * @param time date and time when the result is produced * @param inputModel uuid of the input model that produces the result * @param p active power output normally provided in MW @@ -47,6 +49,11 @@ public ComparableQuantity getP() { return p; } + /** + * Sets p. + * + * @param p the p + */ public void setP(ComparableQuantity p) { this.p = p; } @@ -61,6 +68,11 @@ public ComparableQuantity getQ() { return q; } + /** + * Sets q. + * + * @param q the q + */ public void setQ(ComparableQuantity q) { this.q = q; } diff --git a/src/main/java/edu/ie3/datamodel/models/result/system/SystemParticipantWithHeatResult.java b/src/main/java/edu/ie3/datamodel/models/result/system/SystemParticipantWithHeatResult.java index 3cd0af029..c1fea4d1d 100644 --- a/src/main/java/edu/ie3/datamodel/models/result/system/SystemParticipantWithHeatResult.java +++ b/src/main/java/edu/ie3/datamodel/models/result/system/SystemParticipantWithHeatResult.java @@ -17,6 +17,8 @@ public abstract class SystemParticipantWithHeatResult extends SystemParticipantR private final ComparableQuantity qDot; /** + * Instantiates a new System participant with heat result. + * * @param time date and time when the result is produced * @param inputModel uuid of the input model that produces the result * @param p active power output normally provided in MW diff --git a/src/main/java/edu/ie3/datamodel/models/result/thermal/AbstractThermalStorageResult.java b/src/main/java/edu/ie3/datamodel/models/result/thermal/AbstractThermalStorageResult.java index 293ab29bf..7c4f7f310 100644 --- a/src/main/java/edu/ie3/datamodel/models/result/thermal/AbstractThermalStorageResult.java +++ b/src/main/java/edu/ie3/datamodel/models/result/thermal/AbstractThermalStorageResult.java @@ -38,10 +38,20 @@ protected AbstractThermalStorageResult( this.fillLevel = fillLevel.to(StandardUnits.FILL_LEVEL); } + /** + * Gets fill level. + * + * @return the fill level + */ public ComparableQuantity getFillLevel() { return fillLevel; } + /** + * Sets fill level. + * + * @param fillLevel the fill level + */ public void setFillLevel(ComparableQuantity fillLevel) { this.fillLevel = fillLevel.to(StandardUnits.FILL_LEVEL); } diff --git a/src/main/java/edu/ie3/datamodel/models/result/thermal/CylindricalStorageResult.java b/src/main/java/edu/ie3/datamodel/models/result/thermal/CylindricalStorageResult.java index eeadc0bb8..8a04781c1 100644 --- a/src/main/java/edu/ie3/datamodel/models/result/thermal/CylindricalStorageResult.java +++ b/src/main/java/edu/ie3/datamodel/models/result/thermal/CylindricalStorageResult.java @@ -15,6 +15,15 @@ /** Represents the results of Cylindrical Storage */ public class CylindricalStorageResult extends AbstractThermalStorageResult { + /** + * Instantiates a new Cylindrical storage result. + * + * @param time the time + * @param inputModel the input model + * @param energy the energy + * @param qDot the q dot + * @param fillLevel the fill level + */ public CylindricalStorageResult( ZonedDateTime time, UUID inputModel, diff --git a/src/main/java/edu/ie3/datamodel/models/result/thermal/DomesticHotWaterStorageResult.java b/src/main/java/edu/ie3/datamodel/models/result/thermal/DomesticHotWaterStorageResult.java index cf604fe0e..8991e3cdb 100644 --- a/src/main/java/edu/ie3/datamodel/models/result/thermal/DomesticHotWaterStorageResult.java +++ b/src/main/java/edu/ie3/datamodel/models/result/thermal/DomesticHotWaterStorageResult.java @@ -15,6 +15,15 @@ /** Represents the results of Domestic Hot Water Storage */ public class DomesticHotWaterStorageResult extends AbstractThermalStorageResult { + /** + * Instantiates a new Domestic hot water storage result. + * + * @param time the time + * @param inputModel the input model + * @param energy the energy + * @param qDot the q dot + * @param fillLevel the fill level + */ public DomesticHotWaterStorageResult( ZonedDateTime time, UUID inputModel, diff --git a/src/main/java/edu/ie3/datamodel/models/result/thermal/ThermalHouseResult.java b/src/main/java/edu/ie3/datamodel/models/result/thermal/ThermalHouseResult.java index 05ef815f8..cc34f89ab 100644 --- a/src/main/java/edu/ie3/datamodel/models/result/thermal/ThermalHouseResult.java +++ b/src/main/java/edu/ie3/datamodel/models/result/thermal/ThermalHouseResult.java @@ -35,10 +35,20 @@ public ThermalHouseResult( this.indoorTemperature = indoorTemperature.to(StandardUnits.TEMPERATURE); } + /** + * Gets indoor temperature. + * + * @return the indoor temperature + */ public ComparableQuantity getIndoorTemperature() { return indoorTemperature; } + /** + * Sets indoor temperature. + * + * @param indoorTemperature the indoor temperature + */ public void setIndoorTemperature(ComparableQuantity indoorTemperature) { this.indoorTemperature = indoorTemperature.to(StandardUnits.TEMPERATURE); } diff --git a/src/main/java/edu/ie3/datamodel/models/result/thermal/ThermalSinkResult.java b/src/main/java/edu/ie3/datamodel/models/result/thermal/ThermalSinkResult.java index cc66acc63..f397cf381 100644 --- a/src/main/java/edu/ie3/datamodel/models/result/thermal/ThermalSinkResult.java +++ b/src/main/java/edu/ie3/datamodel/models/result/thermal/ThermalSinkResult.java @@ -12,7 +12,7 @@ /** * Represents calculation results of a {@link - * edu.ie3.datamodel.models.input.thermal.ThermalSinkInput} + * edu.ie3.datamodel.models.input.thermal.ThermalSinkInput}* */ public abstract class ThermalSinkResult extends ThermalUnitResult { diff --git a/src/main/java/edu/ie3/datamodel/models/result/thermal/ThermalStorageResult.java b/src/main/java/edu/ie3/datamodel/models/result/thermal/ThermalStorageResult.java index a89e01980..9270042d5 100644 --- a/src/main/java/edu/ie3/datamodel/models/result/thermal/ThermalStorageResult.java +++ b/src/main/java/edu/ie3/datamodel/models/result/thermal/ThermalStorageResult.java @@ -15,7 +15,7 @@ /** * Represents calculation results of {@link - * edu.ie3.datamodel.models.input.thermal.ThermalStorageInput} + * edu.ie3.datamodel.models.input.thermal.ThermalStorageInput}* */ public abstract class ThermalStorageResult extends ThermalUnitResult { /** Currently stored energy */ @@ -38,10 +38,20 @@ protected ThermalStorageResult( this.energy = energy.to(StandardUnits.ENERGY_RESULT); } + /** + * Gets energy. + * + * @return the energy + */ public ComparableQuantity getEnergy() { return energy; } + /** + * Sets energy. + * + * @param energy the energy + */ public void setEnergy(ComparableQuantity energy) { this.energy = energy.to(StandardUnits.ENERGY_RESULT); } diff --git a/src/main/java/edu/ie3/datamodel/models/result/thermal/ThermalUnitResult.java b/src/main/java/edu/ie3/datamodel/models/result/thermal/ThermalUnitResult.java index 07ba81913..e0e9a5adb 100644 --- a/src/main/java/edu/ie3/datamodel/models/result/thermal/ThermalUnitResult.java +++ b/src/main/java/edu/ie3/datamodel/models/result/thermal/ThermalUnitResult.java @@ -34,10 +34,20 @@ protected ThermalUnitResult(ZonedDateTime time, UUID inputModel, ComparableQuant this.qDot = qDot; } + /** + * Gets dot. + * + * @return the dot + */ public ComparableQuantity getqDot() { return qDot; } + /** + * Sets dot. + * + * @param qDot the q dot + */ public void setqDot(ComparableQuantity qDot) { this.qDot = qDot.to(StandardUnits.HEAT_DEMAND); } diff --git a/src/main/java/edu/ie3/datamodel/models/timeseries/TimeSeries.java b/src/main/java/edu/ie3/datamodel/models/timeseries/TimeSeries.java index f9fa97891..d554c4932 100644 --- a/src/main/java/edu/ie3/datamodel/models/timeseries/TimeSeries.java +++ b/src/main/java/edu/ie3/datamodel/models/timeseries/TimeSeries.java @@ -20,12 +20,24 @@ */ public abstract class TimeSeries, V extends Value, R extends Value> extends UniqueEntity { + /** A set of entries representing the individual data points in the time series. */ private final Set entries; + /** + * Instantiates a new Time series. + * + * @param entries the entries + */ protected TimeSeries(Set entries) { this.entries = Collections.unmodifiableSet(entries); } + /** + * Instantiates a new Time series. + * + * @param uuid the uuid + * @param entries the entries + */ protected TimeSeries(UUID uuid, Set entries) { super(uuid); this.entries = Collections.unmodifiableSet(entries); diff --git a/src/main/java/edu/ie3/datamodel/models/timeseries/TimeSeriesEntry.java b/src/main/java/edu/ie3/datamodel/models/timeseries/TimeSeriesEntry.java index 30f487e47..4c9340c45 100644 --- a/src/main/java/edu/ie3/datamodel/models/timeseries/TimeSeriesEntry.java +++ b/src/main/java/edu/ie3/datamodel/models/timeseries/TimeSeriesEntry.java @@ -15,12 +15,23 @@ * @param Type of the contained value */ public abstract class TimeSeriesEntry implements Entity { + /** The Value. */ protected final V value; + /** + * Instantiates a new Time series entry. + * + * @param value the value + */ protected TimeSeriesEntry(V value) { this.value = value; } + /** + * Gets value. + * + * @return the value + */ public V getValue() { return value; } diff --git a/src/main/java/edu/ie3/datamodel/models/timeseries/individual/IndividualTimeSeries.java b/src/main/java/edu/ie3/datamodel/models/timeseries/individual/IndividualTimeSeries.java index d3e196a28..e725ad3a5 100644 --- a/src/main/java/edu/ie3/datamodel/models/timeseries/individual/IndividualTimeSeries.java +++ b/src/main/java/edu/ie3/datamodel/models/timeseries/individual/IndividualTimeSeries.java @@ -12,11 +12,20 @@ import java.util.function.Function; import java.util.stream.Collectors; -/** Describes a TimeSeries with individual values per time step */ +/** + * Describes a TimeSeries with individual values per time step + * + * @param the type parameter + */ public class IndividualTimeSeries extends TimeSeries, V, V> { /** Maps a time to its respective value to retrieve faster */ private final Map> timeToValue; + /** + * Instantiates a new Individual time series. + * + * @param values the values + */ public IndividualTimeSeries(Set> values) { super(values); @@ -24,6 +33,12 @@ public IndividualTimeSeries(Set> values) { values.stream().collect(Collectors.toMap(TimeBasedValue::getTime, Function.identity())); } + /** + * Instantiates a new Individual time series. + * + * @param uuid the uuid + * @param values the values + */ public IndividualTimeSeries(UUID uuid, Set> values) { super(uuid, values); diff --git a/src/main/java/edu/ie3/datamodel/models/timeseries/individual/TimeBasedValue.java b/src/main/java/edu/ie3/datamodel/models/timeseries/individual/TimeBasedValue.java index e900d2a77..607f5ef1d 100644 --- a/src/main/java/edu/ie3/datamodel/models/timeseries/individual/TimeBasedValue.java +++ b/src/main/java/edu/ie3/datamodel/models/timeseries/individual/TimeBasedValue.java @@ -19,11 +19,22 @@ public class TimeBasedValue extends TimeSeriesEntry implements Comparable> { private final ZonedDateTime time; + /** + * Instantiates a new Time based value. + * + * @param time the time + * @param value the value + */ public TimeBasedValue(ZonedDateTime time, T value) { super(value); this.time = time; } + /** + * Gets time. + * + * @return the time + */ public ZonedDateTime getTime() { return time; } diff --git a/src/main/java/edu/ie3/datamodel/models/timeseries/repetitive/BdewLoadProfileTimeSeries.java b/src/main/java/edu/ie3/datamodel/models/timeseries/repetitive/BdewLoadProfileTimeSeries.java index 524697166..5c6c379b9 100644 --- a/src/main/java/edu/ie3/datamodel/models/timeseries/repetitive/BdewLoadProfileTimeSeries.java +++ b/src/main/java/edu/ie3/datamodel/models/timeseries/repetitive/BdewLoadProfileTimeSeries.java @@ -20,6 +20,15 @@ */ public class BdewLoadProfileTimeSeries extends LoadProfileTimeSeries { + /** + * Instantiates a new Bdew load profile time series. + * + * @param uuid the uuid + * @param loadProfile the load profile + * @param values the values + * @param maxPower the max power + * @param profileEnergyScaling the profile energy scaling + */ public BdewLoadProfileTimeSeries( UUID uuid, BdewStandardLoadProfile loadProfile, diff --git a/src/main/java/edu/ie3/datamodel/models/timeseries/repetitive/LoadProfileEntry.java b/src/main/java/edu/ie3/datamodel/models/timeseries/repetitive/LoadProfileEntry.java index 10f90d632..34fd054cf 100644 --- a/src/main/java/edu/ie3/datamodel/models/timeseries/repetitive/LoadProfileEntry.java +++ b/src/main/java/edu/ie3/datamodel/models/timeseries/repetitive/LoadProfileEntry.java @@ -9,15 +9,31 @@ import edu.ie3.datamodel.models.value.load.LoadValues; import java.util.Objects; -/** Unique entry to a {@link LoadProfileTimeSeries} */ +/** + * Unique entry to a {@link LoadProfileTimeSeries}. + * + * @param The type of load values associated with this entry, which must extend {@link + * LoadValues}. + */ public class LoadProfileEntry extends TimeSeriesEntry { private final int quarterHour; + /** + * Instantiates a new Load profile entry. + * + * @param values the values + * @param quarterHour the quarter hour + */ public LoadProfileEntry(L values, int quarterHour) { super(values); this.quarterHour = quarterHour; } + /** + * Gets quarter hour. + * + * @return the quarter hour + */ public int getQuarterHour() { return quarterHour; } diff --git a/src/main/java/edu/ie3/datamodel/models/timeseries/repetitive/LoadProfileTimeSeries.java b/src/main/java/edu/ie3/datamodel/models/timeseries/repetitive/LoadProfileTimeSeries.java index 7c896fcbe..67cca93c9 100644 --- a/src/main/java/edu/ie3/datamodel/models/timeseries/repetitive/LoadProfileTimeSeries.java +++ b/src/main/java/edu/ie3/datamodel/models/timeseries/repetitive/LoadProfileTimeSeries.java @@ -18,10 +18,20 @@ /** * Describes a load profile time series with repetitive values that can be calculated from a pattern + * + * @param The type of load values associated with this time series, which must extend {@link + * LoadValues}. */ public class LoadProfileTimeSeries extends RepetitiveTimeSeries, V, PValue> { + + /** The load profile associated with this instance. */ private final LoadProfile loadProfile; + + /** + * A mapping of integer keys to values of type V, representing some form of value mapping related + * to the load profile. + */ private final Map valueMapping; /** @@ -33,6 +43,15 @@ public class LoadProfileTimeSeries /** The profile energy scaling in kWh. */ private final ComparableQuantity profileEnergyScaling; + /** + * Instantiates a new Load profile time series. + * + * @param uuid the uuid + * @param loadProfile the load profile + * @param entries the entries + * @param maxPower the max power + * @param profileEnergyScaling the profile energy scaling + */ public LoadProfileTimeSeries( UUID uuid, LoadProfile loadProfile, @@ -53,17 +72,27 @@ public LoadProfileTimeSeries( /** * Returns the maximum average power consumption per quarter-hour calculated over all seasons and * weekday types of given load profile in Watt. + * + * @return the max power value in kW. */ public Optional> maxPower() { return Optional.ofNullable(maxPower); } - /** Returns the profile energy scaling in kWh. */ + /** + * Returns the profile energy scaling in kWh. + * + * @return the scaled energy of the profile in kWh . + */ public Optional> loadProfileScaling() { return Optional.ofNullable(profileEnergyScaling); } - /** Returns the {@link LoadProfile}. */ + /** + * Returns the {@link LoadProfile}. + * + * @return the load profile name. + */ public LoadProfile getLoadProfile() { return loadProfile; } @@ -92,7 +121,11 @@ public List getTimeKeysAfter(ZonedDateTime time) { return List.of(time.plusMinutes(15)); // dummy value that will return next quarter-hour value } - /** Returns the value mapping. */ + /** + * Returns the value mapping. + * + * @return the value mapping. + */ protected Map getValueMapping() { return valueMapping; } diff --git a/src/main/java/edu/ie3/datamodel/models/timeseries/repetitive/RandomLoadProfileTimeSeries.java b/src/main/java/edu/ie3/datamodel/models/timeseries/repetitive/RandomLoadProfileTimeSeries.java index de9142fd9..03bda3cf0 100644 --- a/src/main/java/edu/ie3/datamodel/models/timeseries/repetitive/RandomLoadProfileTimeSeries.java +++ b/src/main/java/edu/ie3/datamodel/models/timeseries/repetitive/RandomLoadProfileTimeSeries.java @@ -16,10 +16,19 @@ /** * Describes a random load profile time series based on a {@link - * GeneralizedExtremeValueDistribution}. Each value of this# timeseries is given in kW. + * GeneralizedExtremeValueDistribution}*. Each value of this# timeseries is given in kW. */ public class RandomLoadProfileTimeSeries extends LoadProfileTimeSeries { + /** + * Instantiates a new Random load profile time series. + * + * @param uuid the uuid + * @param loadProfile the load profile + * @param entries the entries + * @param maxPower the max power + * @param profileEnergyScaling the profile energy scaling + */ public RandomLoadProfileTimeSeries( UUID uuid, LoadProfile loadProfile, diff --git a/src/main/java/edu/ie3/datamodel/models/timeseries/repetitive/RepetitiveTimeSeries.java b/src/main/java/edu/ie3/datamodel/models/timeseries/repetitive/RepetitiveTimeSeries.java index 9338688bb..852972a5e 100644 --- a/src/main/java/edu/ie3/datamodel/models/timeseries/repetitive/RepetitiveTimeSeries.java +++ b/src/main/java/edu/ie3/datamodel/models/timeseries/repetitive/RepetitiveTimeSeries.java @@ -11,11 +11,24 @@ import java.time.ZonedDateTime; import java.util.*; -/** Describes a TimeSeries with repetitive values that can be calculated from a pattern */ +/** + * Describes a TimeSeries with repetitive values that can be calculated from a pattern. + * + * @param The type of time series entry that extends {@link TimeSeriesEntry}. + * @param The type of value associated with the time series entries, which must extend {@link + * Value}. + * @param The type of result value produced by calculations based on the repetitive pattern. + */ public abstract class RepetitiveTimeSeries< E extends TimeSeriesEntry, V extends Value, R extends Value> extends TimeSeries { + /** + * Instantiates a new Repetitive time series. + * + * @param uuid the uuid + * @param entries the entries + */ protected RepetitiveTimeSeries(UUID uuid, Set entries) { super(uuid, entries); } diff --git a/src/main/java/edu/ie3/datamodel/models/value/CoordinateValue.java b/src/main/java/edu/ie3/datamodel/models/value/CoordinateValue.java index 45721efb3..4a90a37fb 100644 --- a/src/main/java/edu/ie3/datamodel/models/value/CoordinateValue.java +++ b/src/main/java/edu/ie3/datamodel/models/value/CoordinateValue.java @@ -7,10 +7,20 @@ import org.locationtech.jts.geom.Point; +/** The type Coordinate value. */ public class CoordinateValue implements Value { + /** The Id. */ public final Integer id; + + /** The Coordinate. */ public final Point coordinate; + /** + * Instantiates a new Coordinate value. + * + * @param id the id + * @param coordinate the coordinate + */ public CoordinateValue(int id, Point coordinate) { this.id = id; this.coordinate = coordinate; diff --git a/src/main/java/edu/ie3/datamodel/models/value/EnergyPriceValue.java b/src/main/java/edu/ie3/datamodel/models/value/EnergyPriceValue.java index 3cf8dafd8..32c603089 100644 --- a/src/main/java/edu/ie3/datamodel/models/value/EnergyPriceValue.java +++ b/src/main/java/edu/ie3/datamodel/models/value/EnergyPriceValue.java @@ -17,12 +17,19 @@ public class EnergyPriceValue implements Value { private final ComparableQuantity price; /** + * Instantiates a new Energy price value. + * * @param price per MWh */ public EnergyPriceValue(ComparableQuantity price) { this.price = price == null ? null : price.to(StandardUnits.ENERGY_PRICE); } + /** + * Gets price. + * + * @return the price + */ public Optional> getPrice() { return Optional.ofNullable(price); } diff --git a/src/main/java/edu/ie3/datamodel/models/value/HeatAndPValue.java b/src/main/java/edu/ie3/datamodel/models/value/HeatAndPValue.java index d8a9b0052..1970b0084 100644 --- a/src/main/java/edu/ie3/datamodel/models/value/HeatAndPValue.java +++ b/src/main/java/edu/ie3/datamodel/models/value/HeatAndPValue.java @@ -17,6 +17,8 @@ public class HeatAndPValue extends PValue { private final ComparableQuantity heatDemand; /** + * Instantiates a new Heat and p value. + * * @param p Active power * @param heatDemand Heat demand */ @@ -25,6 +27,11 @@ public HeatAndPValue(ComparableQuantity p, ComparableQuantity heat this.heatDemand = heatDemand == null ? null : heatDemand.to(StandardUnits.HEAT_DEMAND_PROFILE); } + /** + * Gets heat demand. + * + * @return the heat demand + */ public Optional> getHeatDemand() { return Optional.ofNullable(heatDemand); } diff --git a/src/main/java/edu/ie3/datamodel/models/value/HeatAndSValue.java b/src/main/java/edu/ie3/datamodel/models/value/HeatAndSValue.java index 545c79153..9349a96ca 100644 --- a/src/main/java/edu/ie3/datamodel/models/value/HeatAndSValue.java +++ b/src/main/java/edu/ie3/datamodel/models/value/HeatAndSValue.java @@ -17,6 +17,8 @@ public class HeatAndSValue extends SValue { private final ComparableQuantity heatDemand; /** + * Instantiates a new Heat and s value. + * * @param p Active power * @param q Reactive power * @param heatDemand Heat demand @@ -29,6 +31,11 @@ public HeatAndSValue( this.heatDemand = heatDemand == null ? null : heatDemand.to(StandardUnits.HEAT_DEMAND_PROFILE); } + /** + * Gets heat demand. + * + * @return the heat demand + */ public Optional> getHeatDemand() { return Optional.ofNullable(heatDemand); } diff --git a/src/main/java/edu/ie3/datamodel/models/value/HeatDemandValue.java b/src/main/java/edu/ie3/datamodel/models/value/HeatDemandValue.java index 132900bb0..750789c26 100644 --- a/src/main/java/edu/ie3/datamodel/models/value/HeatDemandValue.java +++ b/src/main/java/edu/ie3/datamodel/models/value/HeatDemandValue.java @@ -13,12 +13,23 @@ /** Describes as heat demand value */ public class HeatDemandValue implements Value { + /** The amount of heat demand represented as a quantity of power. */ private final ComparableQuantity heatDemand; + /** + * Instantiates a new Heat demand value. + * + * @param heatDemand the heat demand + */ public HeatDemandValue(ComparableQuantity heatDemand) { this.heatDemand = heatDemand == null ? null : heatDemand.to(StandardUnits.HEAT_DEMAND_PROFILE); } + /** + * Gets heat demand. + * + * @return the heat demand + */ public Optional> getHeatDemand() { return Optional.ofNullable(heatDemand); } diff --git a/src/main/java/edu/ie3/datamodel/models/value/PValue.java b/src/main/java/edu/ie3/datamodel/models/value/PValue.java index 978265907..44b550ec3 100644 --- a/src/main/java/edu/ie3/datamodel/models/value/PValue.java +++ b/src/main/java/edu/ie3/datamodel/models/value/PValue.java @@ -18,12 +18,19 @@ public class PValue implements Value { private final ComparableQuantity p; /** + * Instantiates a new P value. + * * @param p Active power */ public PValue(ComparableQuantity p) { this.p = p == null ? null : p.to(StandardUnits.ACTIVE_POWER_IN); } + /** + * Gets p. + * + * @return the p + */ public Optional> getP() { return Optional.ofNullable(p); } diff --git a/src/main/java/edu/ie3/datamodel/models/value/SValue.java b/src/main/java/edu/ie3/datamodel/models/value/SValue.java index ab5a9e1c6..fedbf4632 100644 --- a/src/main/java/edu/ie3/datamodel/models/value/SValue.java +++ b/src/main/java/edu/ie3/datamodel/models/value/SValue.java @@ -28,6 +28,11 @@ public SValue(ComparableQuantity p, ComparableQuantity q) { this.q = q == null ? null : q.to(StandardUnits.REACTIVE_POWER_IN); } + /** + * Gets q. + * + * @return the q + */ public Optional> getQ() { return Optional.ofNullable(q); } diff --git a/src/main/java/edu/ie3/datamodel/models/value/SolarIrradianceValue.java b/src/main/java/edu/ie3/datamodel/models/value/SolarIrradianceValue.java index 45ee1a05a..35b5f2ee3 100644 --- a/src/main/java/edu/ie3/datamodel/models/value/SolarIrradianceValue.java +++ b/src/main/java/edu/ie3/datamodel/models/value/SolarIrradianceValue.java @@ -20,6 +20,8 @@ public class SolarIrradianceValue implements Value { private final ComparableQuantity diffuseIrradiance; /** + * Instantiates a new Solar irradiance value. + * * @param directIrradiance Direct sun radiation (typically in W/m²) * @param diffuseIrradiance Diffuse sun radiation (typically in W/m²) */ @@ -32,10 +34,20 @@ public SolarIrradianceValue( diffuseIrradiance == null ? null : diffuseIrradiance.to(StandardUnits.SOLAR_IRRADIANCE); } + /** + * Gets diffuse irradiance. + * + * @return the diffuse irradiance + */ public Optional> getDiffuseIrradiance() { return Optional.ofNullable(diffuseIrradiance); } + /** + * Gets direct irradiance. + * + * @return the direct irradiance + */ public Optional> getDirectIrradiance() { return Optional.ofNullable(directIrradiance); } diff --git a/src/main/java/edu/ie3/datamodel/models/value/TemperatureValue.java b/src/main/java/edu/ie3/datamodel/models/value/TemperatureValue.java index 6c3a052ae..4930221fe 100644 --- a/src/main/java/edu/ie3/datamodel/models/value/TemperatureValue.java +++ b/src/main/java/edu/ie3/datamodel/models/value/TemperatureValue.java @@ -17,12 +17,19 @@ public class TemperatureValue implements Value { private final ComparableQuantity temperature; /** + * Instantiates a new Temperature value. + * * @param temperature (typically in K) */ public TemperatureValue(ComparableQuantity temperature) { this.temperature = temperature == null ? null : temperature.to(StandardUnits.TEMPERATURE); } + /** + * Gets temperature. + * + * @return the temperature + */ public Optional> getTemperature() { return Optional.ofNullable(temperature); } diff --git a/src/main/java/edu/ie3/datamodel/models/value/VoltageValue.java b/src/main/java/edu/ie3/datamodel/models/value/VoltageValue.java index 0f8cafb7e..2bafc4cbb 100644 --- a/src/main/java/edu/ie3/datamodel/models/value/VoltageValue.java +++ b/src/main/java/edu/ie3/datamodel/models/value/VoltageValue.java @@ -27,6 +27,8 @@ public class VoltageValue implements Value { private final ComparableQuantity angle; /** + * Instantiates a new Voltage value. + * * @param magnitude of the voltage in p.u. * @param angleOption option for the angle of this voltage in degree */ @@ -38,6 +40,8 @@ public VoltageValue( } /** + * Instantiates a new Voltage value. + * * @param magnitude of the voltage in p.u. * @param angle of the voltage in degree */ @@ -47,14 +51,29 @@ public VoltageValue( this.angle = angle; } + /** + * Gets magnitude. + * + * @return the magnitude + */ public Optional> getMagnitude() { return Optional.ofNullable(magnitude); } + /** + * Gets angle. + * + * @return the angle + */ public Optional> getAngle() { return Optional.ofNullable(angle); } + /** + * Gets real part. + * + * @return the real part + */ public Optional> getRealPart() { double mag = magnitude.to(PU).getValue().doubleValue(); double ang = angle.to(DEGREE_GEOM).getValue().doubleValue(); @@ -63,6 +82,11 @@ public Optional> getRealPart() { return Optional.of(Quantities.getQuantity(eInPu, PU)); } + /** + * Gets imag part. + * + * @return the imag part + */ public Optional> getImagPart() { double mag = magnitude.to(PU).getValue().doubleValue(); double ang = angle.to(DEGREE_GEOM).getValue().doubleValue(); diff --git a/src/main/java/edu/ie3/datamodel/models/value/WeatherValue.java b/src/main/java/edu/ie3/datamodel/models/value/WeatherValue.java index e34bfcc63..970f67f5c 100644 --- a/src/main/java/edu/ie3/datamodel/models/value/WeatherValue.java +++ b/src/main/java/edu/ie3/datamodel/models/value/WeatherValue.java @@ -28,6 +28,8 @@ public class WeatherValue implements Value { private final WindValue wind; /** + * Instantiates a new Weather value. + * * @param coordinate of this weather value set * @param solarIrradiance values for this coordinate * @param temperature values for this coordinate @@ -45,6 +47,8 @@ public WeatherValue( } /** + * Instantiates a new Weather value. + * * @param coordinate of this weather value set * @param directSolarIrradiance Direct sun irradiance for this coordinate (typically in W/m²) * @param diffuseSolarIrradiance Diffuse sun irradiance for this coordinate (typically in W/m²) @@ -67,18 +71,38 @@ public WeatherValue( new WindValue(direction, velocity)); } + /** + * Gets coordinate. + * + * @return the coordinate + */ public Point getCoordinate() { return coordinate; } + /** + * Gets solar irradiance. + * + * @return the solar irradiance + */ public SolarIrradianceValue getSolarIrradiance() { return solarIrradiance; } + /** + * Gets temperature. + * + * @return the temperature + */ public TemperatureValue getTemperature() { return temperature; } + /** + * Gets wind. + * + * @return the wind + */ public WindValue getWind() { return wind; } diff --git a/src/main/java/edu/ie3/datamodel/models/value/WindValue.java b/src/main/java/edu/ie3/datamodel/models/value/WindValue.java index a27839cb5..360833a87 100644 --- a/src/main/java/edu/ie3/datamodel/models/value/WindValue.java +++ b/src/main/java/edu/ie3/datamodel/models/value/WindValue.java @@ -21,6 +21,8 @@ public class WindValue implements Value { private final ComparableQuantity velocity; /** + * Instantiates a new Wind value. + * * @param direction Direction, the wind comes from as an angle from north increasing clockwise * (typically in rad) * @param velocity Wind velocity (typically in m/s) @@ -30,10 +32,20 @@ public WindValue(ComparableQuantity direction, ComparableQuantity this.velocity = velocity == null ? null : velocity.to(StandardUnits.WIND_VELOCITY); } + /** + * Gets direction. + * + * @return the direction + */ public Optional> getDirection() { return Optional.ofNullable(direction); } + /** + * Gets velocity. + * + * @return the velocity + */ public Optional> getVelocity() { return Optional.ofNullable(velocity); } diff --git a/src/main/java/edu/ie3/datamodel/models/value/load/BdewLoadValues.java b/src/main/java/edu/ie3/datamodel/models/value/load/BdewLoadValues.java index bd6f5bb73..b14a31969 100644 --- a/src/main/java/edu/ie3/datamodel/models/value/load/BdewLoadValues.java +++ b/src/main/java/edu/ie3/datamodel/models/value/load/BdewLoadValues.java @@ -27,9 +27,17 @@ /** Load values for a {@link BdewStandardLoadProfile} */ public final class BdewLoadValues implements LoadValues { + /** The Scheme. */ public final BdewScheme scheme; + private transient Map values; + /** + * Instantiates a new Bdew load values. + * + * @param scheme the scheme + * @param values the values + */ public BdewLoadValues(BdewScheme scheme, Map values) { this.scheme = scheme; this.values = Collections.unmodifiableMap(values); @@ -165,13 +173,28 @@ public static double dynamization(double load, int t) { } // custom serialization (needed for the values) - + /** + * Serializes the current state of this object to the specified output stream. + * + * @param out the output stream to write the object's state to + * @throws IOException if an I/O error occurs during writing + */ @Serial private void writeObject(ObjectOutputStream out) throws IOException { out.defaultWriteObject(); out.writeObject(values); } + /** + * Deserializes the state of this object from the specified input stream. + * + *

This method reads the object's serialized state from the provided {@link ObjectInputStream} + * and restores its internal fields. + * + * @param in the input stream from which to read the object's state + * @throws IOException if an I/O error occurs during reading + * @throws ClassNotFoundException if the class of a serialized object cannot be found + */ @Serial @SuppressWarnings("unchecked") private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { @@ -179,23 +202,38 @@ private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundE this.values = Collections.unmodifiableMap((Map) in.readObject()); } + /** The interface Bdew key. */ public sealed interface BdewKey extends Serializable { /** * Returns the abbreviation of either a {@link BdewSeason} for {@link BdewScheme#BDEW1999} or * the {@link Month} for {@link BdewScheme#BDEW2025}. + * + * @return the season name */ String getSeasonName(); - /** Returns the name of the {@link DayType}. */ + /** + * Returns the name of the {@link DayType}. + * + * @return the day type name + */ String getDayTypeName(); - /** Returns the name of the key. */ + /** + * Returns the name of the key. + * + * @return the name + */ default String getName() { return getSeasonName() + getDayTypeName(); } - /** Returns the name of the field. */ + /** + * Returns the name of the field. + * + * @return the field name + */ default String getFieldName() { return getSeasonName().toLowerCase() + getDayTypeName(); } @@ -250,8 +288,11 @@ public String getDayTypeName() { /** Season defined for {@link BdewScheme#BDEW1999}. */ public enum BdewSeason { + /** Summer bdew season. */ SUMMER("Summer"), + /** Transition bdew season. */ TRANSITION("Transition"), + /** Winter bdew season. */ WINTER("Winter"); private final String key; @@ -260,6 +301,13 @@ public enum BdewSeason { this.key = key; } + /** + * Parse bdew season. + * + * @param key the key + * @return the bdew season + * @throws ParsingException the parsing exception + */ public static BdewSeason parse(String key) throws ParsingException { return switch (key) { case "Wi", "Winter" -> WINTER; @@ -316,6 +364,11 @@ public static BdewSeason getSeason(ZonedDateTime time) { }; } + /** + * Gets key. + * + * @return the key + */ public String getKey() { return key; } @@ -328,10 +381,14 @@ public String toString() { /** Day type used for {@link BdewLoadValues}. */ public enum DayType { + /** Weekday day type. */ WEEKDAY("Wd"), + /** Saturday day type. */ SATURDAY("Sa"), + /** Sunday day type. */ SUNDAY("Su"); + /** The Abbreviation. */ public final String abbreviation; DayType(String abbreviation) { @@ -341,7 +398,9 @@ public enum DayType { /** Scheme for underlying values of a {@link BdewLoadValues}. */ public enum BdewScheme implements Scheme, Serializable { + /** Bdew 1999 bdew scheme. */ BDEW1999(BdewKey.getKeys(BdewSeason.values(), Bdew1999Key::new)), + /** Bdew 2025 bdew scheme. */ BDEW2025(BdewKey.getKeys(Month.values(), Bdew2025Key::new)); private final Collection keys; @@ -350,10 +409,21 @@ public enum BdewScheme implements Scheme, Serializable { this.keys = keys; } + /** + * Gets keys. + * + * @return the keys + */ public Collection getKeys() { return keys; } + /** + * Is accepted boolean. + * + * @param key the key + * @return the boolean + */ public boolean isAccepted(BdewKey key) { return keys.contains(key); } @@ -367,13 +437,18 @@ public boolean isAccepted(BdewKey key) { public static final class BdewMap { private final Map values; + /** + * Instantiates a new Bdew map. + * + * @param values the values + */ public BdewMap(Map values) { this.values = values; } /** * Returns the number of key-value mappings in this map. If the map contains more than {@code - * Integer.MAX_VALUE} elements, returns {@code Integer.MAX_VALUE}. + * Integer.MAX_VALUE}* elements, returns {@code Integer.MAX_VALUE}. * * @return the number of key-value mappings in this map */ @@ -435,7 +510,7 @@ public V get(BdewKey key) { * an iteration over the set is in progress (except through the iterator's own {@code remove} * operation), the results of the iteration are undefined. The set supports element removal, * which removes the corresponding mapping from the map, via the {@code Iterator.remove}, {@code - * Set.remove}, {@code removeAll}, {@code retainAll}, and {@code clear} operations. It does not + * Set.remove}*, {@code removeAll}, {@code retainAll}, and {@code clear} operations. It does not * support the {@code add} or {@code addAll} operations. * * @return a set view of the keys contained in this map @@ -451,8 +526,8 @@ public Set keySet() { * iterator's own {@code remove} operation), the results of the iteration are undefined. The * collection supports element removal, which removes the corresponding mapping from the map, * via the {@code Iterator.remove}, {@code Collection.remove}, {@code removeAll}, {@code - * retainAll} and {@code clear} operations. It does not support the {@code add} or {@code - * addAll} operations. + * retainAll}* and {@code clear} operations. It does not support the {@code add} or {@code + * addAll}* operations. * * @return a collection view of the values contained in this map */ @@ -463,9 +538,9 @@ public Collection values() { /** * Maps the {@link BdewKey} to a new value. * + * @param type of new values * @param mapper function * @return the new {@link BdewMap} - * @param type of new values */ public Map map(Function mapper) { HashMap map = new HashMap<>(); diff --git a/src/main/java/edu/ie3/datamodel/models/value/load/LoadValues.java b/src/main/java/edu/ie3/datamodel/models/value/load/LoadValues.java index 9c35c7c53..ef79c4b31 100644 --- a/src/main/java/edu/ie3/datamodel/models/value/load/LoadValues.java +++ b/src/main/java/edu/ie3/datamodel/models/value/load/LoadValues.java @@ -11,18 +11,28 @@ import java.time.ZonedDateTime; import java.util.Optional; -/** Interface for load values. */ +/** + * Interface for load values. + * + * @param

The type of load profile associated with these load values, which must extend {@link + * LoadProfile}. + */ public interface LoadValues

extends Value { /** * Method to calculate an actual load power value for the given time. * * @param time given time - * @return a new {@link PValue} + * @param loadProfile load profile name + * @return A new {@link PValue} representing the calculated power at the specified time. */ PValue getValue(ZonedDateTime time, P loadProfile); - /** Returns the {@link Scheme} of the underlying values. */ + /** + * Returns the {@link Scheme} of the underlying values. + * + * @return An Optional containing a {@link Scheme} if available; otherwise, an empty Optional. + */ default Optional getScheme() { return Optional.empty(); } diff --git a/src/main/java/edu/ie3/datamodel/models/value/load/RandomLoadValues.java b/src/main/java/edu/ie3/datamodel/models/value/load/RandomLoadValues.java index 109b175fd..8f8c90cb8 100644 --- a/src/main/java/edu/ie3/datamodel/models/value/load/RandomLoadValues.java +++ b/src/main/java/edu/ie3/datamodel/models/value/load/RandomLoadValues.java @@ -56,6 +56,8 @@ public class RandomLoadValues implements LoadValues { private final transient GeneralizedExtremeValueDistribution gevSu; /** + * Instantiates a new Random load values. + * * @param kSa Shape parameter for a Saturday * @param kSu Shape parameter for a Sunday * @param kWd Shape parameter for a working day @@ -119,38 +121,83 @@ private double getValue(DayOfWeek day) { return randomValue; } + /** + * Gets my wd. + * + * @return the my wd + */ public double getMyWd() { return myWd; } + /** + * Gets my sa. + * + * @return the my sa + */ public double getMySa() { return mySa; } + /** + * Gets my su. + * + * @return the my su + */ public double getMySu() { return mySu; } + /** + * Gets sigma wd. + * + * @return the sigma wd + */ public double getSigmaWd() { return sigmaWd; } + /** + * Gets sigma sa. + * + * @return the sigma sa + */ public double getSigmaSa() { return sigmaSa; } + /** + * Gets sigma su. + * + * @return the sigma su + */ public double getSigmaSu() { return sigmaSu; } + /** + * Gets wd. + * + * @return the wd + */ public double getkWd() { return kWd; } + /** + * Gets sa. + * + * @return the sa + */ public double getkSa() { return kSa; } + /** + * Gets su. + * + * @return the su + */ public double getkSu() { return kSu; } diff --git a/src/main/java/edu/ie3/datamodel/models/voltagelevels/CommonVoltageLevel.java b/src/main/java/edu/ie3/datamodel/models/voltagelevels/CommonVoltageLevel.java index 895dd38ae..ead93a352 100644 --- a/src/main/java/edu/ie3/datamodel/models/voltagelevels/CommonVoltageLevel.java +++ b/src/main/java/edu/ie3/datamodel/models/voltagelevels/CommonVoltageLevel.java @@ -13,7 +13,10 @@ /** Class with extended information to describe common voltage levels in energy systems. */ public class CommonVoltageLevel extends VoltageLevel { + /** A set of synonymous IDs associated with this voltage level. */ private final Set synonymousIds; + + /** The Voltage range. */ protected final RightOpenInterval> voltageRange; /** diff --git a/src/main/java/edu/ie3/datamodel/models/voltagelevels/GermanVoltageLevelUtils.java b/src/main/java/edu/ie3/datamodel/models/voltagelevels/GermanVoltageLevelUtils.java index 440e44409..32c44494e 100644 --- a/src/main/java/edu/ie3/datamodel/models/voltagelevels/GermanVoltageLevelUtils.java +++ b/src/main/java/edu/ie3/datamodel/models/voltagelevels/GermanVoltageLevelUtils.java @@ -18,11 +18,14 @@ import tech.units.indriya.ComparableQuantity; import tech.units.indriya.quantity.Quantities; +/** The type German voltage level utils. */ public class GermanVoltageLevelUtils { + /** The constant logger. */ protected static final Logger logger = LoggerFactory.getLogger(GermanVoltageLevelUtils.class); private static final String MS = "Mittelspannung"; + /** The constant LV. */ public static final CommonVoltageLevel LV = new CommonVoltageLevel( "Niederspannung", @@ -30,6 +33,8 @@ public class GermanVoltageLevelUtils { new HashSet<>(Arrays.asList("lv", "ns", "0.4kV")), new RightOpenInterval<>( Quantities.getQuantity(0d, KILOVOLT), Quantities.getQuantity(10d, KILOVOLT))); + + /** The constant MV_10KV. */ public static final CommonVoltageLevel MV_10KV = new CommonVoltageLevel( MS, @@ -37,6 +42,8 @@ public class GermanVoltageLevelUtils { new HashSet<>(Arrays.asList("ms", "mv", "ms_10kv", "mv_10kV", "10.0kV", "10kV")), new RightOpenInterval<>( Quantities.getQuantity(10d, KILOVOLT), Quantities.getQuantity(20d, KILOVOLT))); + + /** The constant MV_20KV. */ public static final CommonVoltageLevel MV_20KV = new CommonVoltageLevel( MS, @@ -44,6 +51,8 @@ public class GermanVoltageLevelUtils { new HashSet<>(Arrays.asList("ms", "mv", "ms_20kv", "mv_20kV", "20.0kV", "20kV")), new RightOpenInterval<>( Quantities.getQuantity(20d, KILOVOLT), Quantities.getQuantity(30d, KILOVOLT))); + + /** The constant MV_30KV. */ public static final CommonVoltageLevel MV_30KV = new CommonVoltageLevel( MS, @@ -51,6 +60,8 @@ public class GermanVoltageLevelUtils { new HashSet<>(Arrays.asList("ms", "mv", "ms_30kv", "mv_30kV", "30.0kV", "30kV")), new RightOpenInterval<>( Quantities.getQuantity(30d, KILOVOLT), Quantities.getQuantity(110d, KILOVOLT))); + + /** The constant HV. */ public static final CommonVoltageLevel HV = new CommonVoltageLevel( "Hochspannung", @@ -58,6 +69,8 @@ public class GermanVoltageLevelUtils { new HashSet<>(Arrays.asList("hs", "hv")), new RightOpenInterval<>( Quantities.getQuantity(110d, KILOVOLT), Quantities.getQuantity(220d, KILOVOLT))); + + /** The constant EHV_220KV. */ public static final CommonVoltageLevel EHV_220KV = new CommonVoltageLevel( "Höchstspannung", @@ -65,6 +78,8 @@ public class GermanVoltageLevelUtils { new HashSet<>(Arrays.asList("hoes", "ehv", "hoes_220kv", "ehv_220kv")), new RightOpenInterval<>( Quantities.getQuantity(220d, KILOVOLT), Quantities.getQuantity(380d, KILOVOLT))); + + /** The constant EHV_380KV. */ public static final CommonVoltageLevel EHV_380KV = new CommonVoltageLevel( "Höchstspannung", @@ -80,6 +95,11 @@ private GermanVoltageLevelUtils() { throw new IllegalStateException("This is a factory class. Don't try to instantiate it."); } + /** + * Gets german voltage levels. + * + * @return the german voltage levels + */ public static Set getGermanVoltageLevels() { return germanVoltageLevels; } diff --git a/src/main/java/edu/ie3/datamodel/models/voltagelevels/VoltageLevel.java b/src/main/java/edu/ie3/datamodel/models/voltagelevels/VoltageLevel.java index 8a94fc534..62cbffba2 100644 --- a/src/main/java/edu/ie3/datamodel/models/voltagelevels/VoltageLevel.java +++ b/src/main/java/edu/ie3/datamodel/models/voltagelevels/VoltageLevel.java @@ -16,7 +16,10 @@ * levels. */ public class VoltageLevel implements Serializable { + /** The Id. */ protected final String id; + + /** The Nominal voltage. */ protected final ComparableQuantity nominalVoltage; /** diff --git a/src/main/java/edu/ie3/datamodel/utils/ContainerNodeUpdateUtil.java b/src/main/java/edu/ie3/datamodel/utils/ContainerNodeUpdateUtil.java index 4778fabea..f918d4b32 100644 --- a/src/main/java/edu/ie3/datamodel/utils/ContainerNodeUpdateUtil.java +++ b/src/main/java/edu/ie3/datamodel/utils/ContainerNodeUpdateUtil.java @@ -17,6 +17,7 @@ import java.util.stream.Collectors; import org.locationtech.jts.geom.Point; +/** The type Container node update util. */ public class ContainerNodeUpdateUtil { private ContainerNodeUpdateUtil() { @@ -25,20 +26,21 @@ private ContainerNodeUpdateUtil() { /** * Updates the provided {@link GridContainer} with the provided mapping of old to new {@link - * NodeInput} entities. When used, one carefully has to check that the mapping is valid. No + * NodeInput}* entities. When used, one carefully has to check that the mapping is valid. No * further sanity checks are provided and if an invalid mapping is passed in, unexpected behavior * might occur. All entities holding reference to the old nodes are updates with this method. * *

If the geoPosition of one transformer node is altered, all other transformer nodes * geoPositions are updated as well based on the update definition defined in {@link - * #updateTransformers(Set, Set, Map)} as by convention transformer nodes always needs to have the - * same geoPosition. If a chain of transformers is present e.g. nodeA - trafoAtoD - nodeD - + * #updateTransformers(Set, Set, Map)}* as by convention transformer nodes always needs to have + * the same geoPosition. If a chain of transformers is present e.g. nodeA - trafoAtoD - nodeD - * trafoDtoG - nodeG all affected transformer nodes geoPosition is set to the same location as * defined by the update rule defined in {@link #updateTransformers(Set, Set, Map)} * * @param grid the grid that should be updated * @param oldToNewNodes a mapping of old nodes to their corresponding new or updated nodes * @return a copy of the provided grid with updated nodes as provided + * @throws InvalidGridException the invalid grid exception */ public static GridContainer updateGridWithNodes( GridContainer grid, Map oldToNewNodes) throws InvalidGridException { @@ -51,20 +53,21 @@ public static GridContainer updateGridWithNodes( /** * Updates the provided {@link JointGridContainer} with the provided mapping of old to new {@link - * NodeInput} entities. When used, one carefully has to check that the mapping is valid. No + * NodeInput}* entities. When used, one carefully has to check that the mapping is valid. No * further sanity checks are provided and if an invalid mapping is passed in, unexpected behavior * might occur. All entities holding reference to the old nodes are updates with this method. * *

If the geoPosition of one transformer node is altered, all other transformer nodes * geoPositions are updated as well based on the update definition defined in {@link - * #updateTransformers(Set, Set, Map)} as by convention transformer nodes always needs to have the - * same geoPosition. If a chain of transformers is present e.g. nodeA - trafoAtoD - nodeD - + * #updateTransformers(Set, Set, Map)}* as by convention transformer nodes always needs to have + * the same geoPosition. If a chain of transformers is present e.g. nodeA - trafoAtoD - nodeD - * trafoDtoG - nodeG all affected transformer nodes geoPosition is set to the same location as * defined by the update rule defined in {@link #updateTransformers(Set, Set, Map)} * * @param grid the grid that should be updated * @param oldToNewNodes a mapping of old nodes to their corresponding new or updated nodes * @return a copy of the provided grid with updated nodes as provided + * @throws InvalidGridException the invalid grid exception */ public static JointGridContainer updateGridWithNodes( JointGridContainer grid, Map oldToNewNodes) @@ -82,7 +85,7 @@ public static JointGridContainer updateGridWithNodes( /** * Updates the provided {@link SubGridContainer} with the provided mapping of old to new {@link - * NodeInput} entities. When used, one carefully has to check that the mapping is valid. No + * NodeInput}* entities. When used, one carefully has to check that the mapping is valid. No * further sanity checks are provided and if an invalid mapping is passed in, unexpected behavior * might occur. Furthermore, if the subgrid to be updated is part of a {@link JointGridContainer} * it is highly advised NOT to update a single subgrid, but the whole joint grid, because in case @@ -91,14 +94,15 @@ public static JointGridContainer updateGridWithNodes( * *

If the geoPosition of one transformer node is altered, all other transformer nodes * geoPositions are updated as well based on the update definition defined in {@link - * #updateTransformers(Set, Set, Map)} as by convention transformer nodes always needs to have the - * same geoPosition. If a chain of transformers is present e.g. nodeA - trafoAtoD - nodeD - + * #updateTransformers(Set, Set, Map)}* as by convention transformer nodes always needs to have + * the same geoPosition. If a chain of transformers is present e.g. nodeA - trafoAtoD - nodeD - * trafoDtoG - nodeG all affected transformer nodes geoPosition is set to the same location as * defined by the update rule defined in {@link #updateTransformers(Set, Set, Map)} * * @param grid the grid that should be updated * @param oldToNewNodes a mapping of old nodes to their corresponding new or updated nodes * @return a copy of the provided grid with updated nodes as provided + * @throws InvalidGridException the invalid grid exception */ public static SubGridContainer updateGridWithNodes( SubGridContainer grid, Map oldToNewNodes) throws InvalidGridException { diff --git a/src/main/java/edu/ie3/datamodel/utils/ContainerUtils.java b/src/main/java/edu/ie3/datamodel/utils/ContainerUtils.java index 522dfeaa4..3c99d0aa2 100644 --- a/src/main/java/edu/ie3/datamodel/utils/ContainerUtils.java +++ b/src/main/java/edu/ie3/datamodel/utils/ContainerUtils.java @@ -57,7 +57,7 @@ public static Optional getDistanceTopologyGraph(GridConta /** * Returns the topology of the provided {@link RawGridElements} as a {@link - * DistanceWeightedGraph}, if they allow the creation of a valid topology graph or an empty + * DistanceWeightedGraph}*, if they allow the creation of a valid topology graph or an empty * optional otherwise. * * @param rawGridElements raw grids elements as base of the distance weighted topology graph @@ -155,7 +155,7 @@ public static Optional getImpedanceTopologyGraph(GridCon /** * Returns the topology of the provided {@link RawGridElements} as a {@link - * ImpedanceWeightedGraph}, if they allow the creation of a valid topology graph or an empty + * ImpedanceWeightedGraph}*, if they allow the creation of a valid topology graph or an empty * optional otherwise. * * @param rawGridElements raw grids elements as base of the distance weighted topology graph @@ -466,6 +466,7 @@ public static VoltageLevel determinePredominantVoltLvl(RawGridElements rawGrid, * @param systemParticipants Container model of system participants * @param graphics Container element of graphic elements * @return An immutable, directed graph of sub grid topologies. + * @throws InvalidGridException the invalid grid exception */ public static SubGridTopologyGraph buildSubGridTopologyGraph( String gridName, @@ -602,12 +603,25 @@ private static class TransformerSubGridContainers { private final SubGridContainer containerB; private final Optional maybeContainerC; + /** + * Instantiates a new Transformer sub grid containers. + * + * @param containerA the container a + * @param containerB the container b + */ public TransformerSubGridContainers(SubGridContainer containerA, SubGridContainer containerB) { this.containerA = containerA; this.containerB = containerB; this.maybeContainerC = Optional.empty(); } + /** + * Instantiates a new Transformer sub grid containers. + * + * @param containerA the container a + * @param containerB the container b + * @param containerC the container c + */ public TransformerSubGridContainers( SubGridContainer containerA, SubGridContainer containerB, SubGridContainer containerC) { this.containerA = containerA; @@ -666,6 +680,7 @@ private static TransformerSubGridContainers getSubGridContainers( * * @param subGridContainers Collections of already existing sub grid models * @return A joint model + * @throws InvalidGridException the invalid grid exception */ public static JointGridContainer combineToJointGrid( Collection subGridContainers) throws InvalidGridException { @@ -736,12 +751,13 @@ public static JointGridContainer combineToJointGrid( *

  • if node a got unmarked as slack, the {@link RawGridElements#getNodes()} gets * adapted accordingly *
  • in any case the internal node of the transformer is added to the {@link - * RawGridElements#getNodes()} set + * RawGridElements#getNodes()}* set * * * * @param subGridContainer the subgrid container to be altered * @return a copy of the given {@link SubGridContainer} with transformer nodes marked as slack + * @throws InvalidGridException the invalid grid exception */ public static SubGridContainer withTrafoNodeAsSlack(final SubGridContainer subGridContainer) throws InvalidGridException { diff --git a/src/main/java/edu/ie3/datamodel/utils/ExceptionUtils.java b/src/main/java/edu/ie3/datamodel/utils/ExceptionUtils.java index cb4ba7d60..d7fc85d9e 100644 --- a/src/main/java/edu/ie3/datamodel/utils/ExceptionUtils.java +++ b/src/main/java/edu/ie3/datamodel/utils/ExceptionUtils.java @@ -8,6 +8,7 @@ import java.util.List; import java.util.function.Function; +/** The type Exception utils. */ public class ExceptionUtils { private ExceptionUtils() { throw new IllegalStateException("Utility classes cannot be instantiated"); diff --git a/src/main/java/edu/ie3/datamodel/utils/GridAndGeoUtils.java b/src/main/java/edu/ie3/datamodel/utils/GridAndGeoUtils.java index ef7da382c..eb3e4dc51 100644 --- a/src/main/java/edu/ie3/datamodel/utils/GridAndGeoUtils.java +++ b/src/main/java/edu/ie3/datamodel/utils/GridAndGeoUtils.java @@ -33,7 +33,7 @@ public static LineString buildSafeLineStringBetweenNodes(NodeInput a, NodeInput /** * Calculates the distance between two {@link NodeInput} entities using {@link - * #calcHaversine(double, double, double, double)} + * #calcHaversine(double, double, double, double)}* * * @param nodeA start node * @param nodeB end node diff --git a/src/main/java/edu/ie3/datamodel/utils/TimeSeriesUtils.java b/src/main/java/edu/ie3/datamodel/utils/TimeSeriesUtils.java index c7cb56b24..296fc8f7c 100644 --- a/src/main/java/edu/ie3/datamodel/utils/TimeSeriesUtils.java +++ b/src/main/java/edu/ie3/datamodel/utils/TimeSeriesUtils.java @@ -17,6 +17,7 @@ import java.util.Set; import java.util.stream.Collectors; +/** The type Time series utils. */ public class TimeSeriesUtils { private static final Set ACCEPTED_COLUMN_SCHEMES = EnumSet.of( @@ -36,9 +37,9 @@ private TimeSeriesUtils() { /** * Trims a time series to the given time interval * + * @param Type of value carried wit the time series * @param timeSeries the time series to trim * @param timeInterval the interval to trim the data to - * @param Type of value carried wit the time series * @return Trimmed time series */ public static IndividualTimeSeries trimTimeSeriesToInterval( diff --git a/src/main/java/edu/ie3/datamodel/utils/Try.java b/src/main/java/edu/ie3/datamodel/utils/Try.java index c03d0ea5e..8706a7544 100644 --- a/src/main/java/edu/ie3/datamodel/utils/Try.java +++ b/src/main/java/edu/ie3/datamodel/utils/Try.java @@ -16,17 +16,28 @@ import java.util.stream.Stream; import org.apache.commons.lang3.tuple.Pair; +/** + * The type Try. + * + * @param the type parameter for the success value + * @param the type parameter for the exception type + */ public abstract class Try { - // static utility methods + + /** + * Default constructor for Try. This constructor is protected to prevent instantiation of this + * abstract class. + */ + protected Try() {} /** * Method to create a {@link Try} object easily. * + * @param type of data + * @param type of exception that could be thrown * @param supplier that either returns data or throws an exception * @param clazz class of the exception * @return a try object - * @param type of data - * @param type of exception that could be thrown */ @SuppressWarnings("unchecked") public static Try of(TrySupplier supplier, Class clazz) { @@ -45,10 +56,10 @@ public static Try of(TrySupplier supplier, /** * Method to create a {@link Try} object easily. * + * @param type of exception that could be thrown * @param supplier that either returns no data or throws an exception * @param clazz class of the exception * @return a try object - * @param type of exception that could be thrown */ @SuppressWarnings("unchecked") public static Try ofVoid( @@ -69,10 +80,10 @@ public static Try ofVoid( /** * Method to create multiple {@link Try} object easily. * - * @param suppliers that either return no data or throw an exception + * @param type of exception that could be thrown * @param clazz class of the exception + * @param suppliers that either return no data or throw an exception * @return a collection of try objects - * @param type of exception that could be thrown */ @SafeVarargs public static Collection> ofVoids( @@ -83,10 +94,10 @@ public static Collection> ofVoids( /** * Method to create a {@link Try} object easily. * + * @param type of exception * @param failure a {@link Failure} is returned. * @param exception exception that should be wrapped by a {@link Failure} * @return a {@link Try} - * @param type of exception */ public static Try ofVoid( boolean failure, ExceptionSupplier exception) { @@ -100,10 +111,10 @@ public static Try ofVoid( /** * Utility method to check a list of {@link VoidSupplier}'s. * - * @param supplier list of {@link VoidSupplier} + * @param type of the exception * @param clazz class of the exception + * @param supplier list of {@link VoidSupplier} * @return a list of {@link Try} - * @param type of the exception */ @SafeVarargs public static List> ofVoid( @@ -114,11 +125,11 @@ public static List> ofVoid( /** * Method to create a {@link Try} object from Optional. * + * @param type of data + * @param type of exception * @param opt The optional * @param exception Supplier function that supplies an exception if Optional is empty * @return a try object - * @param type of data - * @param type of exception */ public static Try from( Optional opt, ExceptionSupplier exception) { @@ -129,6 +140,8 @@ public static Try from( /** * Method to retrieve the exceptions from all {@link Failure} objects. * + * @param the type parameter + * @param the type parameter * @param tries collection of {@link Try} objects * @return a list of {@link Exception}'s */ @@ -139,6 +152,8 @@ public static List getExceptions(Collection the type parameter + * @param the type parameter * @param tries stream of {@link Try} objects * @return a list of {@link Exception}'s */ @@ -149,6 +164,8 @@ public static List getExceptions(Stream> t /** * Method to retrieve the exceptions from all {@link Failure} objects. * + * @param the type parameter + * @param the type parameter * @param tries array of {@link Try} objects * @return a list of {@link Exception}'s */ @@ -160,12 +177,14 @@ public static List getExceptions(Try /** * Method to scan a collection of {@link Try} objects for {@link Failure}'s. * + * @param type of data + * @param the type parameter + * @param the type parameter * @param c collection of {@link Try} objects * @param typeOfData information added to exception to help identify the place, that needs to be * fixed * @param exceptionBuilder function to build the failure message * @return a {@link Success} if no {@link Failure}'s are found in the collection - * @param type of data */ public static Try, R> scanCollection( Collection> c, Class typeOfData, Function exceptionBuilder) { @@ -176,12 +195,14 @@ public static Try, R> scanC /** * Method to scan a stream of {@link Try} objects for {@link Failure}'s. * + * @param type of data + * @param the type parameter + * @param the type parameter * @param stream of {@link Try} objects * @param typeOfData information added to exception to help identify the place, that needs to be * fixed * @param exceptionBuilder function to build the failure message * @return a {@link Success} if no {@link Failure}'s are found in the stream - * @param type of data */ public static Try, R> scanStream( Stream> stream, String typeOfData, Function exceptionBuilder) { @@ -212,11 +233,15 @@ public static Try, R> sc /** * Returns true if this object is a {@link Success} or false if this object is a {@link Failure}. + * + * @return the boolean */ public abstract boolean isSuccess(); /** * Returns true if this object is a {@link Failure} or false if this object is a {@link Success}. + * + * @return the boolean */ public abstract boolean isFailure(); @@ -228,10 +253,18 @@ public static Try, R> sc */ public abstract T getOrThrow() throws E; - /** Returns an option for data. */ + /** + * Returns an option for data. + * + * @return the data + */ public abstract Optional getData(); - /** Returns an option for an exception. */ + /** + * Returns an option for an exception. + * + * @return the exception + */ public abstract Optional getException(); // functional methods @@ -239,9 +272,9 @@ public static Try, R> sc /** * Method to transform the data if this object is a {@link Success}. * + * @param type of the data * @param mapper that is used to map the data * @return a new {@link Try} object - * @param type of the data */ public Try map(Function mapper) { return transformS(mapper); @@ -250,9 +283,9 @@ public Try map(Function mapper) { /** * Method to transform and flat the data. * + * @param type of the data * @param mapper that is used to map the data * @return a new {@link Try} object - * @param type of the data */ public abstract Try flatMap(Function> mapper); @@ -260,9 +293,9 @@ public Try map(Function mapper) { * Method to transform a {@link Try} object. This method should be used, if processing the * exception is not necessary. * + * @param type of data * @param successFunc that will be used to transform the data * @return a new {@link Try} object - * @param type of data */ public abstract Try transformS(Function successFunc); @@ -270,9 +303,9 @@ public Try map(Function mapper) { * Method to transform a {@link Try} object. This method should be used, if only exception should * be processed. * + * @param type of new exception * @param failureFunc that will be used to transform the exception * @return a new {@link Try} object - * @param type of new exception */ public abstract Try transformF( Function failureFunc); @@ -281,10 +314,11 @@ public abstract Try transformF( * Method to transform a {@link Try} object. This method should be used, if processing the * exception is necessary. * + * @param type of data + * @param the type parameter * @param successFunc that will be used to transform the data * @param failureFunc that will be used to transform the exception * @return a new {@link Try} object - * @param type of data */ public abstract Try transform( Function successFunc, Function failureFunc); @@ -292,9 +326,9 @@ public abstract Try transform( /** * Method for zipping two tries. * + * @param type of others data * @param that other try * @return a try of a pair. - * @param type of others data */ public Try, E> zip(Try that) { return zip(that, Pair::of); @@ -303,9 +337,9 @@ public Try, E> zip(Try that) { /** * Method for zipping two tries, where one is created using the data of this try. * + * @param type of others data * @param extractor function to create the second try * @return a try of a pair. - * @param type of others data */ public Try, E> zip(Function, Try> extractor) { return zip(extractor.apply(this)); @@ -314,21 +348,21 @@ public Try, E> zip(Function, Try> extractor) { /** * Method for zipping two tries. * + * @param type of others data + * @param

    type of zipped data * @param that other try * @param zipper function for zipping the two data types * @return a try of type {@link P}. - * @param type of others data - * @param

    type of zipped data */ public abstract Try zip(Try that, BiFunction zipper); /** * Method to convert a {@link Try} object to a common type. * + * @param new type * @param successFunc that will be used to transform the data to the new type * @param failureFunc that will be used to transform the exception to the new type * @return the new type - * @param new type */ public abstract U convert( Function successFunc, Function failureFunc); @@ -357,12 +391,23 @@ public abstract U convert( */ public abstract Optional toOptional(); - /** Implementation of {@link Try} class. This class is used to present a successful try. */ + /** + * Implementation of {@link Try} class. This class is used to represent a success attempt to + * execute an operation that can result in either success or failure. + * + * @param the type of data that may have been produced if the operation was successful + * @param the type of exception that can be thrown during the operation + */ public static final class Success extends Try { private final T data; private static final Success emptySuccess = new Success<>(null); + /** + * Instantiates a new Success. + * + * @param data the data + */ public Success(T data) { this.data = data; } @@ -377,7 +422,11 @@ public boolean isFailure() { return false; } - /** Returns true if this object is an empty {@link Success}. */ + /** + * Returns true if this object is an empty {@link Success}. + * + * @return the boolean + */ public boolean isEmpty() { return data == null; } @@ -446,7 +495,11 @@ public Optional toOptional() { return Optional.of(data); } - /** Returns the stored data. */ + /** + * Returns the stored data. + * + * @return the t + */ public T get() { return data; } @@ -454,10 +507,10 @@ public T get() { /** * Method to create a {@link Success} by applying data. * - * @param data that should be wrapped by the {@link Success} - * @return a new {@link Success} * @param type of data * @param type of exception + * @param data that should be wrapped by the {@link Success} + * @return a new {@link Success} */ public static Success of(D data) { return new Success<>(data); @@ -467,6 +520,7 @@ public static Success of(D data) { * Returns an empty {@link Success}. * * @param type of exception + * @return the success */ @SuppressWarnings("unchecked") public static Success empty() { @@ -505,10 +559,21 @@ public int hashCode() { } } - /** Implementation of {@link Try} class. This class is used to present a failed try. */ + /** + * Implementation of {@link Try} class. This class is used to represent a failed attempt to + * execute an operation that can result in either success or failure. + * + * @param the type of data that may have been produced if the operation was successful + * @param the type of exception that can be thrown during the operation + */ public static final class Failure extends Try { private final E exception; + /** + * Instantiates a new Failure. + * + * @param e the e + */ public Failure(E e) { this.exception = e; } @@ -586,7 +651,11 @@ public Optional toOptional() { return Optional.empty(); } - /** Returns the thrown exception. */ + /** + * Returns the thrown exception. + * + * @return the e + */ public E get() { return exception; } @@ -594,10 +663,10 @@ public E get() { /** * Method to create a {@link Failure} object, when a non-empty {@link Success} can be returned. * - * @param exception that should be saved - * @return a {@link Failure} * @param type of data * @param type of exception + * @param exception that should be saved + * @return a {@link Failure} */ public static Failure of(E exception) { return new Failure<>(exception); @@ -606,9 +675,9 @@ public static Failure of(E exception) { /** * Method to create a {@link Failure} object, when an empty {@link Success} can be returned. * + * @param type of exception * @param exception that should be saved * @return a {@link Failure} - * @param type of exception */ public static Failure ofVoid(E exception) { return new Failure<>(exception); @@ -654,6 +723,12 @@ public int hashCode() { */ @FunctionalInterface public interface TrySupplier { + /** + * Get t. + * + * @return the t + * @throws E the e + */ T get() throws E; } @@ -664,6 +739,11 @@ public interface TrySupplier { */ @FunctionalInterface public interface VoidSupplier { + /** + * Get. + * + * @throws E the e + */ void get() throws E; } @@ -674,6 +754,11 @@ public interface VoidSupplier { */ @FunctionalInterface public interface ExceptionSupplier { + /** + * Get e. + * + * @return the e + */ E get(); } } diff --git a/src/main/java/edu/ie3/datamodel/utils/validation/ConnectorValidationUtils.java b/src/main/java/edu/ie3/datamodel/utils/validation/ConnectorValidationUtils.java index a2ac685c8..9c24713d4 100644 --- a/src/main/java/edu/ie3/datamodel/utils/validation/ConnectorValidationUtils.java +++ b/src/main/java/edu/ie3/datamodel/utils/validation/ConnectorValidationUtils.java @@ -28,6 +28,7 @@ import tech.units.indriya.quantity.Quantities; import tech.units.indriya.unit.Units; +/** The type Connector validation utils. */ public class ConnectorValidationUtils extends ValidationUtils { // allowed deviation of coordinates in degree for line position check @@ -49,8 +50,8 @@ private ConnectorValidationUtils() { *

  • it is not null * * - * A "distribution" method, that forwards the check request to specific implementations to fulfill - * the checking task, based on the class of the given object. + *

    A "distribution" method, that forwards the check request to specific implementations to + * fulfill the checking task, based on the class of the given object. * * @param connector Connector to validate * @return a list of try objects either containing a {@link InvalidEntityException} or an empty diff --git a/src/main/java/edu/ie3/datamodel/utils/validation/EnergyManagementValidationUtils.java b/src/main/java/edu/ie3/datamodel/utils/validation/EnergyManagementValidationUtils.java index 9b2894cca..5b6a4e120 100644 --- a/src/main/java/edu/ie3/datamodel/utils/validation/EnergyManagementValidationUtils.java +++ b/src/main/java/edu/ie3/datamodel/utils/validation/EnergyManagementValidationUtils.java @@ -12,6 +12,7 @@ import java.util.ArrayList; import java.util.List; +/** The type Energy management validation utils. */ public class EnergyManagementValidationUtils extends ValidationUtils { /** Private Constructor as this class is not meant to be instantiated */ @@ -26,8 +27,8 @@ private EnergyManagementValidationUtils() { *

  • its control strategy is not null * * - * A "distribution" method, that forwards the check request to specific implementations to fulfill - * the checking task, based on the class of the given object. + *

    A "distribution" method, that forwards the check request to specific implementations to + * fulfill the checking task, based on the class of the given object. * * @param energyManagement EmInput to validate * @return a list of try objects either containing an {@link ValidationException} or an empty diff --git a/src/main/java/edu/ie3/datamodel/utils/validation/GraphicValidationUtils.java b/src/main/java/edu/ie3/datamodel/utils/validation/GraphicValidationUtils.java index 845be81d2..fc0216ce9 100644 --- a/src/main/java/edu/ie3/datamodel/utils/validation/GraphicValidationUtils.java +++ b/src/main/java/edu/ie3/datamodel/utils/validation/GraphicValidationUtils.java @@ -13,6 +13,7 @@ import java.util.ArrayList; import java.util.List; +/** The type Graphic validation utils. */ public class GraphicValidationUtils extends ValidationUtils { /** Private Constructor as this class is not meant to be instantiated */ diff --git a/src/main/java/edu/ie3/datamodel/utils/validation/GridContainerValidationUtils.java b/src/main/java/edu/ie3/datamodel/utils/validation/GridContainerValidationUtils.java index 0c4ecac7a..2a0fac7ee 100644 --- a/src/main/java/edu/ie3/datamodel/utils/validation/GridContainerValidationUtils.java +++ b/src/main/java/edu/ie3/datamodel/utils/validation/GridContainerValidationUtils.java @@ -32,6 +32,7 @@ import org.jgrapht.graph.DefaultEdge; import org.jgrapht.graph.SimpleGraph; +/** The type Grid container validation utils. */ public class GridContainerValidationUtils extends ValidationUtils { /** Private Constructor as this class is not meant to be instantiated */ diff --git a/src/main/java/edu/ie3/datamodel/utils/validation/MeasurementUnitValidationUtils.java b/src/main/java/edu/ie3/datamodel/utils/validation/MeasurementUnitValidationUtils.java index dd51e33a7..b817b9b15 100644 --- a/src/main/java/edu/ie3/datamodel/utils/validation/MeasurementUnitValidationUtils.java +++ b/src/main/java/edu/ie3/datamodel/utils/validation/MeasurementUnitValidationUtils.java @@ -11,6 +11,7 @@ import edu.ie3.datamodel.models.input.MeasurementUnitInput; import edu.ie3.datamodel.utils.Try; +/** The type Measurement unit validation utils. */ public class MeasurementUnitValidationUtils extends ValidationUtils { /** Private Constructor as this class is not meant to be instantiated */ diff --git a/src/main/java/edu/ie3/datamodel/utils/validation/NodeValidationUtils.java b/src/main/java/edu/ie3/datamodel/utils/validation/NodeValidationUtils.java index 98a78bc9b..0d9baa698 100644 --- a/src/main/java/edu/ie3/datamodel/utils/validation/NodeValidationUtils.java +++ b/src/main/java/edu/ie3/datamodel/utils/validation/NodeValidationUtils.java @@ -16,6 +16,7 @@ import tech.units.indriya.quantity.Quantities; import tech.units.indriya.unit.Units; +/** The type Node validation utils. */ public class NodeValidationUtils extends ValidationUtils { /** Private Constructor as this class is not meant to be instantiated */ diff --git a/src/main/java/edu/ie3/datamodel/utils/validation/SystemParticipantValidationUtils.java b/src/main/java/edu/ie3/datamodel/utils/validation/SystemParticipantValidationUtils.java index 6a14d0775..d0fd6e5b0 100644 --- a/src/main/java/edu/ie3/datamodel/utils/validation/SystemParticipantValidationUtils.java +++ b/src/main/java/edu/ie3/datamodel/utils/validation/SystemParticipantValidationUtils.java @@ -25,6 +25,7 @@ import tech.units.indriya.quantity.Quantities; import tech.units.indriya.unit.Units; +/** The type System participant validation utils. */ public class SystemParticipantValidationUtils extends ValidationUtils { /** Private Constructor as this class is not meant to be instantiated */ diff --git a/src/main/java/edu/ie3/datamodel/utils/validation/ThermalValidationUtils.java b/src/main/java/edu/ie3/datamodel/utils/validation/ThermalValidationUtils.java index 6b76b1fac..ff8593aa3 100644 --- a/src/main/java/edu/ie3/datamodel/utils/validation/ThermalValidationUtils.java +++ b/src/main/java/edu/ie3/datamodel/utils/validation/ThermalValidationUtils.java @@ -16,6 +16,7 @@ import java.util.Set; import javax.measure.Quantity; +/** The type Thermal validation utils. */ public class ThermalValidationUtils extends ValidationUtils { /** Private Constructor as this class is not meant to be instantiated */ @@ -30,8 +31,8 @@ private ThermalValidationUtils() { *

  • it is not null * * - * A "distribution" method, that forwards the check request to specific implementations to fulfill - * the checking task, based on the class of the given object. + *

    A "distribution" method, that forwards the check request to specific implementations to + * fulfill the checking task, based on the class of the given object. * * @param thermalUnitInput ThermalUnitInput to validate * @return a list of try objects either containing an {@link ValidationException} or an empty @@ -66,8 +67,8 @@ private ThermalValidationUtils() { *

  • it is not null * * - * A "distribution" method, that forwards the check request to specific implementations to fulfill - * the checking task, based on the class of the given object. + *

    A "distribution" method, that forwards the check request to specific implementations to + * fulfill the checking task, based on the class of the given object. * * @param thermalGrid ThermalGrid to validate * @return a list of try objects either containing an {@link ValidationException} or an empty diff --git a/src/main/java/edu/ie3/datamodel/utils/validation/UniquenessValidationUtils.java b/src/main/java/edu/ie3/datamodel/utils/validation/UniquenessValidationUtils.java index 031ee0aad..3f39630d0 100644 --- a/src/main/java/edu/ie3/datamodel/utils/validation/UniquenessValidationUtils.java +++ b/src/main/java/edu/ie3/datamodel/utils/validation/UniquenessValidationUtils.java @@ -23,17 +23,34 @@ /** Validation utils for checking the uniqueness of a given collection of entities. */ public class UniquenessValidationUtils extends ValidationUtils { + /** + * Default constructor for UniquenessValidationUtils. This constructor is private to prevent + * instantiation of this utility class. + */ + private UniquenessValidationUtils() {} + + /** The constant uuidFieldSupplier. */ // default field set supplier protected static final FieldSetSupplier uuidFieldSupplier = entity -> Set.of(entity.getUuid()); + + /** The constant idFieldSupplier. */ protected static final FieldSetSupplier idFieldSupplier = e -> Set.of(e.getId()); + + /** The constant resultFieldSupplier. */ protected static final FieldSetSupplier resultFieldSupplier = entity -> Set.of(entity.getTime(), entity.getInputModel()); + + /** The constant mappingFieldSupplier. */ protected static final FieldSetSupplier mappingFieldSupplier = entity -> Set.of(entity.getAsset()); + + /** The constant idCoordinateSupplier. */ protected static final FieldSetSupplier idCoordinateSupplier = entity -> Set.of(entity.id(), entity.point()); + + /** The constant weatherValueFieldSupplier. */ protected static final FieldSetSupplier> weatherValueFieldSupplier = entity -> Set.of(entity.getTime(), entity.getValue().getCoordinate()); @@ -42,6 +59,7 @@ public class UniquenessValidationUtils extends ValidationUtils { * *

    Caution: Only the field {@code uuid} is checked for uniqueness here * + * @param the type parameter * @param entities to be checked * @throws DuplicateEntitiesException if uniqueness is violated */ @@ -54,6 +72,7 @@ public static void checkUniqueEntities(Collection en /** * Checks the uniqueness of a collection of {@link AssetInput}. * + * @param the type parameter * @param entities to be checked * @throws DuplicateEntitiesException if uniqueness is violated */ @@ -74,6 +93,7 @@ public static void checkAssetUniqueness(Collection ent /** * Checks the uniqueness of a collection of {@link ResultEntity}. * + * @param the type parameter * @param entities to be checked * @throws DuplicateEntitiesException if uniqueness is violated */ @@ -202,6 +222,12 @@ protected static DuplicateEntitiesException buildDuplicationException( */ @FunctionalInterface protected interface FieldSetSupplier { + /** + * Gets field sets. + * + * @param entity the entity + * @return the field sets + */ Set getFieldSets(E entity); } } diff --git a/src/main/java/edu/ie3/datamodel/utils/validation/ValidationUtils.java b/src/main/java/edu/ie3/datamodel/utils/validation/ValidationUtils.java index 28c2eee2a..74474826b 100644 --- a/src/main/java/edu/ie3/datamodel/utils/validation/ValidationUtils.java +++ b/src/main/java/edu/ie3/datamodel/utils/validation/ValidationUtils.java @@ -32,6 +32,7 @@ /** Basic Sanity validation tools for entities */ public class ValidationUtils { + /** The constant logger. */ protected static final Logger logger = LoggerFactory.getLogger(ValidationUtils.class); /** Private Constructor as this class is not meant to be instantiated */ @@ -55,6 +56,7 @@ protected static void logNotImplemented(Object obj) { * fulfill the checking task, based on the class of the given object. * * @param obj Object to check + * @throws ValidationException the validation exception */ public static void check(Object obj) throws ValidationException { checkNonNull(obj, "an object").getOrThrow(); @@ -243,6 +245,7 @@ protected static Try checkNonNull( * * @param quantities Array of quantities to check * @param entity Unique entity holding the malformed quantities + * @throws InvalidEntityException the invalid entity exception */ protected static void detectNegativeQuantities(Quantity[] quantities, UniqueEntity entity) throws InvalidEntityException { @@ -257,6 +260,7 @@ protected static void detectNegativeQuantities(Quantity[] quantities, UniqueE * * @param quantities Array of quantities to check * @param entity Unique entity holding the malformed quantities + * @throws InvalidEntityException the invalid entity exception */ protected static void detectZeroOrNegativeQuantities( Quantity[] quantities, UniqueEntity entity) throws InvalidEntityException { @@ -270,6 +274,7 @@ protected static void detectZeroOrNegativeQuantities( * * @param quantities Array of quantities to check * @param entity Unique entity holding the malformed quantities + * @throws InvalidEntityException the invalid entity exception */ protected static void detectPositiveQuantities(Quantity[] quantities, UniqueEntity entity) throws InvalidEntityException { @@ -286,6 +291,7 @@ protected static void detectPositiveQuantities(Quantity[] quantities, UniqueE * @param entity Unique entity holding the malformed quantities * @param predicate Predicate to detect the malformed quantities * @param msg Message prefix to use for the exception message: [msg]: [malformedQuantities] + * @throws InvalidEntityException the invalid entity exception */ protected static void detectMalformedQuantities( Quantity[] quantities, UniqueEntity entity, Predicate> predicate, String msg)