Skip to content

Commit 8f703f1

Browse files
committed
Improving javadoc.
1 parent 2ab7d93 commit 8f703f1

File tree

8 files changed

+309
-192
lines changed

8 files changed

+309
-192
lines changed

src/main/java/edu/ie3/datamodel/utils/validation/ConnectorValidationUtils.java

Lines changed: 85 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,12 @@ private ConnectorValidationUtils() {
4343
}
4444

4545
/**
46-
* Validates a connector if: <br>
47-
* - it is not null <br>
46+
* Validates a connector if:
47+
*
48+
* <ul>
49+
* <li>it is not null
50+
* </ul>
51+
*
4852
* A "distribution" method, that forwards the check request to specific implementations to fulfill
4953
* the checking task, based on the class of the given object.
5054
*
@@ -79,15 +83,18 @@ protected static List<Try<Void, InvalidEntityException>> check(ConnectorInput co
7983
}
8084

8185
/**
82-
* Validates a line if: <br>
83-
* - {@link ConnectorValidationUtils#checkLineType(LineTypeInput)} confirms valid type properties
84-
* <br>
85-
* - it does not connect the same node <br>
86-
* - it connects nodes in the same subnet <br>
87-
* - it connects nodes in the same voltage level <br>
88-
* - its line length has a positive value <br>
89-
* - its length equals the sum of calculated distances between points of LineString <br>
90-
* - its coordinates of start and end point equal coordinates of nodes
86+
* Validates a line if:
87+
*
88+
* <ul>
89+
* - {@link ConnectorValidationUtils#checkLineType(LineTypeInput)} confirms valid type
90+
* properties
91+
* <li>it does not connect the same node
92+
* <li>it connects nodes in the same subnet
93+
* <li>it connects nodes in the same voltage level
94+
* <li>its line length has a positive value
95+
* <li>its length equals the sum of calculated distances between points of LineString
96+
* <li>its coordinates of start and end point equal coordinates of nodes
97+
* </ul>
9198
*
9299
* @param line Line to validate
93100
* @return a list of try objects either containing an {@link InvalidEntityException} or an empty
@@ -112,14 +119,17 @@ private static List<Try<Void, InvalidEntityException>> checkLine(LineInput line)
112119
}
113120

114121
/**
115-
* Validates a line type if: <br>
116-
* - it is not null <br>
117-
* - B is greater/equal to 0 (Phase-to-ground susceptance per length) <br>
118-
* - G is greater/equal to 0 (Phase-to-ground conductance per length) <br>
119-
* - R is greater 0 (Phase resistance per length) <br>
120-
* - X is greater 0 (Phase reactance per length) <br>
121-
* - iMax is greater 0 (Maximum permissible current) <br>
122-
* - vRated is greater 0 (Rated voltage)
122+
* Validates a line type if:
123+
*
124+
* <ul>
125+
* <li>it is not null
126+
* <li>B is greater/equal to 0 (Phase-to-ground susceptance per length)
127+
* <li>G is greater/equal to 0 (Phase-to-ground conductance per length)
128+
* <li>R is greater 0 (Phase resistance per length)
129+
* <li>X is greater 0 (Phase reactance per length)
130+
* <li>iMax is greater 0 (Maximum permissible current)
131+
* <li>vRated is greater 0 (Rated voltage)
132+
* </ul>
123133
*
124134
* @param lineType Line type to validate
125135
* @return a list of try objects either containing an {@link InvalidEntityException} or an empty
@@ -146,13 +156,16 @@ protected static List<Try<Void, InvalidEntityException>> checkLineType(LineTypeI
146156
}
147157

148158
/**
149-
* Validates a transformer2W if: <br>
150-
* - {@link ConnectorValidationUtils#checkTransformer2WType(Transformer2WTypeInput)} confirms a
151-
* valid type properties <br>
152-
* - its tap position is within bounds <br>
153-
* - it connects different subnets <br>
154-
* - it connects different voltage levels <br>
155-
* - its rated voltages match the voltages at the nodes
159+
* Validates a transformer2W if:
160+
*
161+
* <ul>
162+
* <li>{@link ConnectorValidationUtils#checkTransformer2WType(Transformer2WTypeInput)} confirms
163+
* a valid type properties
164+
* <li>its tap position is within bounds
165+
* <li>it connects different subnets
166+
* <li>it connects different voltage levels
167+
* <li>its rated voltages match the voltages at the nodes
168+
* </ul>
156169
*
157170
* @param transformer2W Transformer2W to validate
158171
* @return a list of try objects either containing an {@link InvalidEntityException} or an empty
@@ -176,19 +189,22 @@ private static List<Try<Void, InvalidEntityException>> checkTransformer2W(
176189
}
177190

178191
/**
179-
* Validates a transformer2W type if: <br>
180-
* - it is not null <br>
181-
* - rSc is greater 0 (short circuit resistance) <br>
182-
* - xSc is greater 0 (short circuit impedance) <br>
183-
* - gM is greater/equal to 0 (no load conductance) <br>
184-
* - bM is less/equal to 0 (no load susceptance)<br>
185-
* - sRated is greater 0 (rated apparent power) <br>
186-
* - vRatedA is greater 0 (rated voltage at higher voltage terminal) <br>
187-
* - vRatedB is greater 0 (rated voltage at lower voltage terminal) <br>
188-
* - dV is between 0% and 100% (voltage magnitude increase per tap position <br>
189-
* - dPhi is greater/equal to 0 (voltage angle increase per tap position) <br>
190-
* - neutral tap position is between min and max tap position <br>
191-
* - minimum tap position is smaller than maximum tap position
192+
* Validates a transformer2W type if:
193+
*
194+
* <ul>
195+
* <li>it is not null
196+
* <li>rSc is greater 0 (short circuit resistance)
197+
* <li>xSc is greater 0 (short circuit impedance)
198+
* <li>gM is greater/equal to 0 (no load conductance)
199+
* <li>bM is less/equal to 0 (no load susceptance)
200+
* <li>sRated is greater 0 (rated apparent power)
201+
* <li>vRatedA is greater 0 (rated voltage at higher voltage terminal)
202+
* <li>vRatedB is greater 0 (rated voltage at lower voltage terminal)
203+
* <li>dV is between 0% and 100% (voltage magnitude increase per tap position
204+
* <li>dPhi is greater/equal to 0 (voltage angle increase per tap position)
205+
* <li>neutral tap position is between min and max tap position
206+
* <li>minimum tap position is smaller than maximum tap position
207+
* </ul>
192208
*
193209
* @param transformer2WType Transformer2W type to validate
194210
* @return a list of try objects either containing an {@link InvalidEntityException} or an empty
@@ -229,13 +245,16 @@ protected static List<Try<Void, InvalidEntityException>> checkTransformer2WType(
229245
}
230246

231247
/**
232-
* Validates a transformer3W if: <br>
233-
* - {@link ConnectorValidationUtils#checkTransformer3WType(Transformer3WTypeInput)} confirm a
234-
* valid type <br>
235-
* - its tap position is within bounds <br>
236-
* - it connects different subnets <br>
237-
* - it connects different voltage levels <br>
238-
* - its rated voltages match the voltages at the nodes
248+
* Validates a transformer3W if:
249+
*
250+
* <ul>
251+
* <li>{@link ConnectorValidationUtils#checkTransformer3WType(Transformer3WTypeInput)} confirm a
252+
* valid type
253+
* <li>its tap position is within bounds
254+
* <li>it connects different subnets
255+
* <li>it connects different voltage levels
256+
* <li>its rated voltages match the voltages at the nodes
257+
* </ul>
239258
*
240259
* @param transformer3W Transformer3W to validate
241260
* @return a list of try objects either containing an {@link InvalidEntityException} or an empty
@@ -280,18 +299,21 @@ private static List<Try<Void, InvalidEntityException>> checkTransformer3W(
280299
}
281300

282301
/**
283-
* Validates a transformer3W type if: <br>
284-
* - it is not null <br>
285-
* - rScA, rScB, rScC are greater 0 (short circuit resistance in branches A,B,C) <br>
286-
* - xScA, xScB, xScC are greater 0 (short circuit impedance in branches A,B,C) <br>
287-
* - gM is greater/equal to 0 (no load conductance) <br>
288-
* - bM is less/equal to 0 (no load susceptance) <br>
289-
* - sRatedA, sRatedB, sRatedC are greater 0 (rated apparent power in branches A,B,C) <br>
290-
* - vRatedA, vRatedB, vRatedC are greater 0 (rated voltage at higher node A,B,C) <br>
291-
* - dV is between 0% and 100% (voltage magnitude increase per tap position <br>
292-
* - dPhi is greater/equal to 0 (voltage angle increase per tap position) <br>
293-
* - neutral tap position is between min and max tap position <br>
294-
* - minimum tap position is smaller than maximum tap position <br>
302+
* Validates a transformer3W type if:
303+
*
304+
* <ul>
305+
* <li>it is not null
306+
* <li>rScA, rScB, rScC are greater 0 (short circuit resistance in branches A,B,C)
307+
* <li>xScA, xScB, xScC are greater 0 (short circuit impedance in branches A,B,C)
308+
* <li>gM is greater/equal to 0 (no load conductance)
309+
* <li>bM is less/equal to 0 (no load susceptance)
310+
* <li>sRatedA, sRatedB, sRatedC are greater 0 (rated apparent power in branches A,B,C)
311+
* <li>vRatedA, vRatedB, vRatedC are greater 0 (rated voltage at higher node A,B,C)
312+
* <li>dV is between 0% and 100% (voltage magnitude increase per tap position
313+
* <li>dPhi is greater/equal to 0 (voltage angle increase per tap position)
314+
* <li>neutral tap position is between min and max tap position
315+
* <li>minimum tap position is smaller than maximum tap position
316+
* </ul>
295317
*
296318
* @param transformer3WType Transformer type to validate
297319
* @return a list of try objects either containing an {@link InvalidEntityException} or an empty
@@ -338,8 +360,11 @@ protected static List<Try<Void, InvalidEntityException>> checkTransformer3WType(
338360
}
339361

340362
/**
341-
* Validates a switch if: <br>
342-
* - its connected nodes are in the same voltage level
363+
* Validates a switch if:
364+
*
365+
* <ul>
366+
* <li>its connected nodes are in the same voltage level
367+
* </ul>
343368
*
344369
* @param switchInput Switch to validate
345370
* @return a try object either containing an {@link InvalidEntityException} or an empty Success

src/main/java/edu/ie3/datamodel/utils/validation/GraphicValidationUtils.java

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,12 @@ private GraphicValidationUtils() {
2121
}
2222

2323
/**
24-
* Validates a graphic input if: <br>
25-
* - it is not null <br>
26-
* - its graphic layer is not null <br>
24+
* Validates a graphic input if:
25+
*
26+
* <ul>
27+
* <li>it is not null
28+
* <li>its graphic layer is not null
29+
* </ul>
2730
*
2831
* <p>A "distribution" method, that forwards the check request to specific implementations to
2932
* fulfill the checking task, based on the class of the given object.
@@ -59,8 +62,11 @@ protected static List<Try<Void, InvalidEntityException>> check(GraphicInput grap
5962
}
6063

6164
/**
62-
* Validates a line graphic input if: <br>
63-
* - its path is not null
65+
* Validates a line graphic input if:
66+
*
67+
* <ul>
68+
* <li>its path is not null
69+
* </ul>
6470
*
6571
* @param lineGraphicInput LineGraphicInput to validate
6672
*/
@@ -74,9 +80,12 @@ private static Try<Void, InvalidEntityException> checkLineGraphicInput(
7480
}
7581

7682
/**
77-
* Validates a node graphic input if: <br>
78-
* - its node is not null <br>
79-
* - its point is not null
83+
* Validates a node graphic input if:
84+
*
85+
* <ul>
86+
* <li>its node is not null
87+
* <li>its point is not null
88+
* </ul>
8089
*
8190
* @param nodeGraphicInput NodeGraphicInput to validate
8291
*/

src/main/java/edu/ie3/datamodel/utils/validation/MeasurementUnitValidationUtils.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,12 @@ private MeasurementUnitValidationUtils() {
1919
}
2020

2121
/**
22-
* Validates a measurement unit if: <br>
23-
* - it is not null <br>
24-
* - any values are measured
22+
* Validates a measurement unit if:
23+
*
24+
* <ul>
25+
* <li>it is not null
26+
* <li>any values are measured
27+
* </ul>
2528
*
2629
* @param measurementUnit Measurement unit to validate
2730
* @return a try object either containing an {@link ValidationException} or an empty Success

src/main/java/edu/ie3/datamodel/utils/validation/NodeValidationUtils.java

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,15 @@ private NodeValidationUtils() {
2424
}
2525

2626
/**
27-
* Validates a node if: <br>
28-
* - it is not null <br>
29-
* - voltage level is not null and valid <br>
30-
* - target voltage is larger than zero and smaller than two <br>
31-
* - subnet number is larger than zero <br>
32-
* - geoPosition is not null
27+
* Validates a node if:
28+
*
29+
* <ul>
30+
* <li>it is not null
31+
* <li>voltage level is not null and valid
32+
* <li>target voltage is larger than zero and smaller than two
33+
* <li>subnet number is larger than zero
34+
* <li>geoPosition is not null
35+
* </ul>
3336
*
3437
* @param node Node to validate
3538
* @return a list of try objects either containing an {@link ValidationException} or an empty

0 commit comments

Comments
 (0)