Skip to content

Commit 67be4d3

Browse files
committed
Update
1 parent 63df977 commit 67be4d3

File tree

13 files changed

+45
-45
lines changed

13 files changed

+45
-45
lines changed

docs/readthedocs/io/csvfiles.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@ Currently we offer two different, pre-defined naming strategies, which you might
1515
An extended version of the EntityPersistenceNamingStrategy. Additionally, the `Default directory hierarchy`_ is taken
1616
into account. Please note, that this directory hierarchy is only meant to be used in conjunction with input models.
1717

18-
However, you can control the behaviour of serialization and de-serialization of models by injecting the desired naming
18+
However, you can control the behaviour of serialization and serialization of models by injecting the desired naming
1919
strategy you like into :code:`CsvDataSource` and :code:`CsvFileSink`.
2020

2121
Default naming strategy
2222
=======================
2323
There is a default mapping from model class to naming of entities in the case you would like to use csv files for
24-
(de-)serialization of models.
24+
serialization of models.
2525
You may extend / alter the naming with pre- or suffix by calling :code:`new EntityPersistenceNamingStrategy("prefix","suffix")`.
2626

2727
Input
@@ -194,7 +194,7 @@ However, note that this hierarchy is only meant to be used in conjunction with i
194194
The class :code:`DefaultInputHierarchy` offers some helpful methods to validate and create a default input file
195195
hierarchy.
196196

197-
De-Serialization (loading models)
197+
Serialization (loading models)
198198
=================================
199199
Having an instance of :ref:`Grid Container<grid_container_model>` is most of the time the target whenever you load your
200200
grid. It consists of the three main blocks:

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ CsvFileDefinition buildFileDefinition(T timeSeries, String[] headLineElements, S
333333
/**
334334
* Builds a new file definition consisting of file name and head line elements
335335
*
336-
* @param clz Class that is meant to be de-serialized into this file
336+
* @param clz Class that is meant to be serialized into this file
337337
* @param headLineElements Array of head line elements
338338
* @param csvSep Separator for csv columns
339339
* @return A suitable file definition

src/main/java/edu/ie3/datamodel/io/processor/EntityProcessor.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
import org.slf4j.LoggerFactory;
1818

1919
/**
20-
* Internal API Interface for EntityProcessors. Main purpose is to 'de-serialize' models into a
20+
* Internal API Interface for EntityProcessors. Main purpose is to 'serialize' models into a
2121
* fieldName to value representation to allow for an easy processing into a database or file sink
2222
* e.g. .csv
2323
*
@@ -47,7 +47,7 @@ protected EntityProcessor(Class<? extends T> registeredClass) {
4747
/**
4848
* Standard call to handle an entity
4949
*
50-
* @param entity the entity that should be 'de-serialized' into a map of fieldName to fieldValue
50+
* @param entity the entity that should be 'serialized' into a map of fieldName to fieldValue
5151
* @return an optional Map with fieldName to fieldValue or an empty optional if an error occurred
5252
* during processing
5353
*/

src/main/java/edu/ie3/datamodel/io/processor/result/ResultEntityProcessor.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
import javax.measure.quantity.Power;
2424

2525
/**
26-
* 'De-serializer' for {@link ResultEntity}s into a fieldName to value representation to allow for
27-
* an easy processing into a database or file sink e.g. .csv It is important that the units used in
26+
* 'Serializer' for {@link ResultEntity}s into a fieldName to value representation to allow for an
27+
* easy processing into a database or file sink e.g. .csv It is important that the units used in
2828
* this class are equal to the units used {@link SystemParticipantResultFactory} to prevent invalid
2929
* interpretation of unit prefixes!
3030
*

src/main/java/edu/ie3/datamodel/io/sink/CsvFileSink.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ public CsvFileSink(
9292
* ProcessorProvider} by calling {@link ProcessorProvider#ProcessorProvider()}
9393
*
9494
* @param baseFolderPath the base folder path where the files should be put into
95-
* @param processorProvider the processor provided that should be used for entity de-serialization
95+
* @param processorProvider the processor provided that should be used for entity serialization
9696
* @param fileNamingStrategy the data sink file naming strategy that should be used
9797
* @param initFiles true if the files should be created during initialization (might create files,
9898
* that only consist of a headline, because no data will be written into them), false

src/main/java/edu/ie3/datamodel/models/input/system/characteristic/CharacteristicInput.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,9 +106,9 @@ public SortedSet<CharacteristicPoint<A, O>> getPoints() {
106106
}
107107

108108
/**
109-
* De-serialize the characteristic to a commonly understood string
109+
* Serialize the characteristic to a commonly understood string
110110
*
111-
* @return the characteristic as de-serialized string
111+
* @return the characteristic as serialized string
112112
*/
113113
public String serialize() {
114114
return characteristicPrefix

src/main/java/edu/ie3/datamodel/models/input/system/characteristic/CharacteristicPoint.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,9 @@ public ComparableQuantity<O> getY() {
9696
}
9797

9898
/**
99-
* De-serializes the given point to a string
99+
* Serializes the given point to a string
100100
*
101-
* @return The de-serialized point
101+
* @return The serialized point
102102
*/
103103
public String serialize() {
104104
return String.format(

src/test/groovy/edu/ie3/datamodel/io/processor/input/InputEntityProcessorTest.groovy

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ import static edu.ie3.util.quantities.PowerSystemUnits.PU
4040
*/
4141
class InputEntityProcessorTest extends Specification {
4242

43-
def "A InputEntityProcessor should de-serialize a provided NodeInput correctly"() {
43+
def "A InputEntityProcessor should serialize a provided NodeInput correctly"() {
4444
given:
4545
def processor = new InputEntityProcessor(NodeInput)
4646
def validResult = GridTestData.nodeA
@@ -67,7 +67,7 @@ class InputEntityProcessorTest extends Specification {
6767
processingResult.get() == expectedResults
6868
}
6969

70-
def "A InputEntityProcessor should de-serialize a provided ConnectorInput correctly"() {
70+
def "A InputEntityProcessor should serialize a provided ConnectorInput correctly"() {
7171
given:
7272
def processor = new InputEntityProcessor(modelClass)
7373
def validInput = modelInstance
@@ -137,7 +137,7 @@ class InputEntityProcessorTest extends Specification {
137137
]
138138
}
139139

140-
def "A InputEntityProcessor should de-serialize a provided SystemParticipantInput correctly"() {
140+
def "A InputEntityProcessor should serialize a provided SystemParticipantInput correctly"() {
141141
given:
142142
def processor = new InputEntityProcessor(modelClass)
143143
def validInput = modelInstance
@@ -283,7 +283,7 @@ class InputEntityProcessorTest extends Specification {
283283
]
284284
}
285285

286-
def "The InputEntityProcessor should de-serialize a provided NodeGraphicInput with point correctly"() {
286+
def "The InputEntityProcessor should serialize a provided NodeGraphicInput with point correctly"() {
287287
given:
288288
InputEntityProcessor processor = new InputEntityProcessor(NodeGraphicInput)
289289
NodeGraphicInput validNode = GridTestData.nodeGraphicC
@@ -303,7 +303,7 @@ class InputEntityProcessorTest extends Specification {
303303
actual.get() == expected
304304
}
305305

306-
def "The InputEntityProcessor should de-serialize a provided NodeGraphicInput with path correctly"() {
306+
def "The InputEntityProcessor should serialize a provided NodeGraphicInput with path correctly"() {
307307
given:
308308
InputEntityProcessor processor = new InputEntityProcessor(NodeGraphicInput)
309309
NodeGraphicInput validNode = GridTestData.nodeGraphicD
@@ -323,7 +323,7 @@ class InputEntityProcessorTest extends Specification {
323323
actual.get() == expected
324324
}
325325

326-
def "The InputEntityProcessor should de-serialize a provided LineGraphicInput correctly"() {
326+
def "The InputEntityProcessor should serialize a provided LineGraphicInput correctly"() {
327327
given:
328328
InputEntityProcessor processor = new InputEntityProcessor(LineGraphicInput)
329329
LineGraphicInput validNode = GridTestData.lineGraphicCtoD
@@ -342,7 +342,7 @@ class InputEntityProcessorTest extends Specification {
342342
actual.get() == expected
343343
}
344344

345-
def "The InputEntityProcessor should de-serialize a provided OperatorInput correctly"() {
345+
def "The InputEntityProcessor should serialize a provided OperatorInput correctly"() {
346346
given:
347347
InputEntityProcessor processor = new InputEntityProcessor(OperatorInput)
348348
OperatorInput operator = new OperatorInput(UUID.fromString("420ee39c-dd5a-4d9c-9156-23dbdef13e5e"), "Prof. Brokkoli")
@@ -359,7 +359,7 @@ class InputEntityProcessorTest extends Specification {
359359
actual.get() == expected
360360
}
361361

362-
def "The InputEntityProcessor should de-serialize a provided RandomLoadParameters correctly"() {
362+
def "The InputEntityProcessor should serialize a provided RandomLoadParameters correctly"() {
363363
given:
364364
InputEntityProcessor processor = new InputEntityProcessor(RandomLoadParameters)
365365
RandomLoadParameters parameters = new RandomLoadParameters(
@@ -397,7 +397,7 @@ class InputEntityProcessorTest extends Specification {
397397
actual.get() == expected
398398
}
399399

400-
def "The InputEntityProcessor should de-serialize a provided WecTypeInput correctly"() {
400+
def "The InputEntityProcessor should serialize a provided WecTypeInput correctly"() {
401401
given:
402402
InputEntityProcessor processor = new InputEntityProcessor(WecTypeInput)
403403
WecTypeInput type = TypeTestData.wecType
@@ -422,7 +422,7 @@ class InputEntityProcessorTest extends Specification {
422422
actual.get() == expected
423423
}
424424

425-
def "The InputEntityProcessor should de-serialize a provided Transformer2WTypeInput correctly"() {
425+
def "The InputEntityProcessor should serialize a provided Transformer2WTypeInput correctly"() {
426426
given:
427427
InputEntityProcessor processor = new InputEntityProcessor(Transformer2WTypeInput)
428428
Transformer2WTypeInput type = GridTestData.transformerTypeBtoD
@@ -452,7 +452,7 @@ class InputEntityProcessorTest extends Specification {
452452
actual.get() == expected
453453
}
454454

455-
def "The InputEntityProcessor should de-serialize a provided Transformer3WTypeInput correctly"() {
455+
def "The InputEntityProcessor should serialize a provided Transformer3WTypeInput correctly"() {
456456
given:
457457
InputEntityProcessor processor = new InputEntityProcessor(Transformer3WTypeInput)
458458
Transformer3WTypeInput type = GridTestData.transformerTypeAtoBtoC
@@ -488,7 +488,7 @@ class InputEntityProcessorTest extends Specification {
488488
actual.get() == expected
489489
}
490490

491-
def "The InputEntityProcessor should de-serialize a provided LineTypeInput correctly"() {
491+
def "The InputEntityProcessor should serialize a provided LineTypeInput correctly"() {
492492
given:
493493
InputEntityProcessor processor = new InputEntityProcessor(LineTypeInput)
494494
LineTypeInput type = GridTestData.lineTypeInputCtoD
@@ -511,7 +511,7 @@ class InputEntityProcessorTest extends Specification {
511511
actual.get() == expected
512512
}
513513

514-
def "The InputEntityProcessor should de-serialize a provided EvTypeInput correctly"() {
514+
def "The InputEntityProcessor should serialize a provided EvTypeInput correctly"() {
515515
given:
516516
InputEntityProcessor processor = new InputEntityProcessor(EvTypeInput)
517517
EvTypeInput type = TypeTestData.evType
@@ -534,7 +534,7 @@ class InputEntityProcessorTest extends Specification {
534534
actual.get() == expected
535535
}
536536

537-
def "The InputEntityProcessor should de-serialize a provided ChpTypeInput correctly"() {
537+
def "The InputEntityProcessor should serialize a provided ChpTypeInput correctly"() {
538538
given:
539539
InputEntityProcessor processor = new InputEntityProcessor(ChpTypeInput)
540540
ChpTypeInput type = TypeTestData.chpType
@@ -559,7 +559,7 @@ class InputEntityProcessorTest extends Specification {
559559
actual.get() == expected
560560
}
561561

562-
def "The InputEntityProcessor should de-serialize a provided HpTypeInput correctly"() {
562+
def "The InputEntityProcessor should serialize a provided HpTypeInput correctly"() {
563563
given:
564564
InputEntityProcessor processor = new InputEntityProcessor(HpTypeInput)
565565
HpTypeInput type = TypeTestData.hpType
@@ -581,7 +581,7 @@ class InputEntityProcessorTest extends Specification {
581581
actual.get() == expected
582582
}
583583

584-
def "The InputEntityProcessor should de-serialize a provided BmTypeInput correctly"() {
584+
def "The InputEntityProcessor should serialize a provided BmTypeInput correctly"() {
585585
given:
586586
InputEntityProcessor processor = new InputEntityProcessor(BmTypeInput)
587587
BmTypeInput type = TypeTestData.bmType
@@ -604,7 +604,7 @@ class InputEntityProcessorTest extends Specification {
604604
actual.get() == expected
605605
}
606606

607-
def "The InputEntityProcessor should de-serialize a provided StorageTypeInput correctly"() {
607+
def "The InputEntityProcessor should serialize a provided StorageTypeInput correctly"() {
608608
given:
609609
InputEntityProcessor processor = new InputEntityProcessor(StorageTypeInput)
610610
StorageTypeInput type = TypeTestData.storageType

src/test/groovy/edu/ie3/datamodel/io/processor/result/ResultEntityProcessorTest.groovy

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ class ResultEntityProcessorTest extends Specification {
6464
qDot : '1.0']
6565

6666

67-
def "A ResultEntityProcessor should de-serialize a provided SystemParticipantResult correctly"() {
67+
def "A ResultEntityProcessor should serialize a provided SystemParticipantResult correctly"() {
6868
given:
6969
def sysPartResProcessor = new ResultEntityProcessor(modelClass)
7070
def validResult = validSystemParticipantResult
@@ -105,7 +105,7 @@ class ResultEntityProcessorTest extends Specification {
105105
ex.message == "Cannot process StorageResult.class with this EntityProcessor. Please either provide an element of LoadResult.class or create a new processor for StorageResult.class!"
106106
}
107107

108-
def "A ResultEntityProcessor should de-serialize a NodeResult correctly"() {
108+
def "A ResultEntityProcessor should serialize a NodeResult correctly"() {
109109
given:
110110
def sysPartResProcessor = new ResultEntityProcessor(NodeResult)
111111

@@ -129,7 +129,7 @@ class ResultEntityProcessorTest extends Specification {
129129

130130
}
131131

132-
def "A ResultEntityProcessor should de-serialize a FlexOptionsResult correctly"() {
132+
def "A ResultEntityProcessor should serialize a FlexOptionsResult correctly"() {
133133
given:
134134
def sysPartResProcessor = new ResultEntityProcessor(FlexOptionsResult)
135135

@@ -219,7 +219,7 @@ class ResultEntityProcessorTest extends Specification {
219219
boolean closed = true
220220

221221

222-
def "A ResultEntityProcessor should de-serialize all ConnectorResults correctly"() {
222+
def "A ResultEntityProcessor should serialize all ConnectorResults correctly"() {
223223
given:
224224
def sysPartResProcessor = new ResultEntityProcessor(modelClass)
225225

@@ -240,7 +240,7 @@ class ResultEntityProcessorTest extends Specification {
240240
Transformer3WResult | new Transformer3WResult(uuid, ZonedDateTime.parse("2020-01-30T17:26:44Z[UTC]"), inputModel, iAMag, iAAng, iBMag, iBAng, iCMag, iCAng, tapPos) || expectedTrafo3WResults
241241
}
242242

243-
def "A ResultEntityProcessor should de-serialize a CylindricalStorageResult correctly"() {
243+
def "A ResultEntityProcessor should serialize a CylindricalStorageResult correctly"() {
244244
given:
245245
def sysPartResProcessor = new ResultEntityProcessor(CylindricalStorageResult)
246246

src/test/groovy/edu/ie3/datamodel/models/system/characteristic/CharacteristicPointTest.groovy

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,14 +58,14 @@ class CharacteristicPointTest extends Specification {
5858
}
5959
}
6060

61-
def "An CharacteristicCoordinate is de-serialized correctly"() {
61+
def "An CharacteristicCoordinate is serialized correctly"() {
6262
given: "A point"
6363
CharacteristicPoint<Power, Dimensionless> point =
6464
new CharacteristicPoint<Power, Dimensionless>(
6565
Quantities.getQuantity(3d, KILOWATT),
6666
Quantities.getQuantity(4d, PERCENT))
6767

68-
when: "de-serialized"
68+
when: "serialized"
6969
String result = point.serialize()
7070

7171
then: "the result is correct"

0 commit comments

Comments
 (0)