1515import  edu .ie3 .datamodel .models .input .connector .type .Transformer3WTypeInput ;
1616import  edu .ie3 .datamodel .models .input .container .SubGridContainer ;
1717import  edu .ie3 .datamodel .utils .Try ;
18- import  edu .ie3 .datamodel .utils .Try .*;
1918import  edu .ie3 .util .geo .GeoUtils ;
2019import  edu .ie3 .util .quantities .QuantityUtil ;
2120import  java .util .ArrayList ;
@@ -44,8 +43,12 @@ private ConnectorValidationUtils() {
4443  }
4544
4645  /** 
47-    * Validates a connector if: <br> 
48-    * - it is not null <br> 
46+    * Validates a connector if: 
47+    * 
48+    * <ul> 
49+    *   <li>it is not null 
50+    * </ul> 
51+    * 
4952   * A "distribution" method, that forwards the check request to specific implementations to fulfill 
5053   * the checking task, based on the class of the given object. 
5154   * 
@@ -73,25 +76,25 @@ protected static List<Try<Void, InvalidEntityException>> check(ConnectorInput co
7376    } else  if  (SwitchInput .class .isAssignableFrom (connector .getClass ())) {
7477      exceptions .add (checkSwitch ((SwitchInput ) connector ));
7578    } else  {
76-       exceptions .add (
77-           new  Failure <>(
78-               new  InvalidEntityException (
79-                   "Validation failed due to: " , buildNotImplementedException (connector ))));
79+       logNotImplemented (connector );
8080    }
8181
8282    return  exceptions ;
8383  }
8484
8585  /** 
86-    * Validates a line if: <br> 
87-    * - {@link ConnectorValidationUtils#checkLineType(LineTypeInput)} confirms valid type properties 
88-    * <br> 
89-    * - it does not connect the same node <br> 
90-    * - it connects nodes in the same subnet <br> 
91-    * - it connects nodes in the same voltage level <br> 
92-    * - its line length has a positive value <br> 
93-    * - its length equals the sum of calculated distances between points of LineString <br> 
94-    * - its coordinates of start and end point equal coordinates of nodes 
86+    * Validates a line if: 
87+    * 
88+    * <ul> 
89+    *   <li>{@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> 
9598   * 
9699   * @param line Line to validate 
97100   * @return a list of try objects either containing an {@link InvalidEntityException} or an empty 
@@ -116,14 +119,17 @@ private static List<Try<Void, InvalidEntityException>> checkLine(LineInput line)
116119  }
117120
118121  /** 
119-    * Validates a line type if: <br> 
120-    * - it is not null <br> 
121-    * - B is greater/equal to 0 (Phase-to-ground susceptance per length) <br> 
122-    * - G is greater/equal to 0 (Phase-to-ground conductance per length) <br> 
123-    * - R is greater 0 (Phase resistance per length) <br> 
124-    * - X is greater 0 (Phase reactance per length) <br> 
125-    * - iMax is greater 0 (Maximum permissible current) <br> 
126-    * - 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> 
127133   * 
128134   * @param lineType Line type to validate 
129135   * @return a list of try objects either containing an {@link InvalidEntityException} or an empty 
@@ -150,13 +156,16 @@ protected static List<Try<Void, InvalidEntityException>> checkLineType(LineTypeI
150156  }
151157
152158  /** 
153-    * Validates a transformer2W if: <br> 
154-    * - {@link ConnectorValidationUtils#checkTransformer2WType(Transformer2WTypeInput)} confirms a 
155-    * valid type properties <br> 
156-    * - its tap position is within bounds <br> 
157-    * - it connects different subnets <br> 
158-    * - it connects different voltage levels <br> 
159-    * - 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> 
160169   * 
161170   * @param transformer2W Transformer2W to validate 
162171   * @return a list of try objects either containing an {@link InvalidEntityException} or an empty 
@@ -180,19 +189,22 @@ private static List<Try<Void, InvalidEntityException>> checkTransformer2W(
180189  }
181190
182191  /** 
183-    * Validates a transformer2W type if: <br> 
184-    * - it is not null <br> 
185-    * - rSc is greater 0 (short circuit resistance) <br> 
186-    * - xSc is greater 0 (short circuit impedance) <br> 
187-    * - gM is greater/equal to 0 (no load conductance) <br> 
188-    * - bM is less/equal to 0 (no load susceptance)<br> 
189-    * - sRated is greater 0 (rated apparent power) <br> 
190-    * - vRatedA is greater 0 (rated voltage at higher voltage terminal) <br> 
191-    * - vRatedB is greater 0 (rated voltage at lower voltage terminal) <br> 
192-    * - dV is between 0% and 100% (voltage magnitude increase per tap position <br> 
193-    * - dPhi is greater/equal to 0 (voltage angle increase per tap position) <br> 
194-    * - neutral tap position is between min and max tap position <br> 
195-    * - 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> 
196208   * 
197209   * @param transformer2WType Transformer2W type to validate 
198210   * @return a list of try objects either containing an {@link InvalidEntityException} or an empty 
@@ -233,13 +245,16 @@ protected static List<Try<Void, InvalidEntityException>> checkTransformer2WType(
233245  }
234246
235247  /** 
236-    * Validates a transformer3W if: <br> 
237-    * - {@link ConnectorValidationUtils#checkTransformer3WType(Transformer3WTypeInput)} confirm a 
238-    * valid type <br> 
239-    * - its tap position is within bounds <br> 
240-    * - it connects different subnets <br> 
241-    * - it connects different voltage levels <br> 
242-    * - 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> 
243258   * 
244259   * @param transformer3W Transformer3W to validate 
245260   * @return a list of try objects either containing an {@link InvalidEntityException} or an empty 
@@ -284,18 +299,21 @@ private static List<Try<Void, InvalidEntityException>> checkTransformer3W(
284299  }
285300
286301  /** 
287-    * Validates a transformer3W type if: <br> 
288-    * - it is not null <br> 
289-    * - rScA, rScB, rScC are greater 0 (short circuit resistance in branches A,B,C) <br> 
290-    * - xScA, xScB, xScC are greater 0 (short circuit impedance in branches A,B,C) <br> 
291-    * - gM is greater/equal to 0 (no load conductance) <br> 
292-    * - bM is less/equal to 0 (no load susceptance) <br> 
293-    * - sRatedA, sRatedB, sRatedC are greater 0 (rated apparent power in branches A,B,C) <br> 
294-    * - vRatedA, vRatedB, vRatedC are greater 0 (rated voltage at higher node A,B,C) <br> 
295-    * - dV is between 0% and 100% (voltage magnitude increase per tap position <br> 
296-    * - dPhi is greater/equal to 0 (voltage angle increase per tap position) <br> 
297-    * - neutral tap position is between min and max tap position <br> 
298-    * - 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> 
299317   * 
300318   * @param transformer3WType Transformer type to validate 
301319   * @return a list of try objects either containing an {@link InvalidEntityException} or an empty 
@@ -342,8 +360,11 @@ protected static List<Try<Void, InvalidEntityException>> checkTransformer3WType(
342360  }
343361
344362  /** 
345-    * Validates a switch if: <br> 
346-    * - 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> 
347368   * 
348369   * @param switchInput Switch to validate 
349370   * @return a try object either containing an {@link InvalidEntityException} or an empty Success 
0 commit comments