Class SclConstructorHelper
java.lang.Object
org.lfenergy.compas.sct.commons.util.SclConstructorHelper
A helper class that provides constructors to easily create instances of Jaxb classes generated by xjc.
xjc only provides NoArgConstructors on generated classes.
This utility class provides constructors with the most relevant attributes.
-
Method Summary
Modifier and TypeMethodDescriptionstatic TAddress
newAddress
(List<TP> listOfP) Create new instance of TAddressstatic TConnectedAP
newConnectedAp
(String iedName, String apName) Create new instance of TConnectedAPstatic TDurationInMilliSec
newDurationInMilliSec
(long value) Create new instance of TDurationInMilliSec with unit SECOND and multiplier MILLI.static TDurationInMilliSec
newDurationInMilliSec
(BigDecimal value, String unit, String multiplier) Create new instance of TDurationInMilliSecstatic TDurationInMilliSec
newDurationInMilliSec
(TDurationInMilliSec tDurationInMilliSec) Clone TDurationInMilliSec.static TFCDA
newFcda
(String ldInst, String lnClass, String lnInst, String prefix, String doName, String daName, TFCEnum fc) static TP
Create new instance of TPstatic TVal
Create new instance of TVal with no sGroupstatic TVal
Create new instance of TVal
-
Method Details
-
newP
Create new instance of TP- Parameters:
type
- type attributevalue
- value attribute- Returns:
- new instance of TP initialized with the given parameters
-
newDurationInMilliSec
public static TDurationInMilliSec newDurationInMilliSec(BigDecimal value, String unit, String multiplier) Create new instance of TDurationInMilliSec- Parameters:
value
- value attributeunit
- unit attributemultiplier
- multiplier attribute- Returns:
- new instance of TDurationInMilliSec initialized with the given parameters
-
newDurationInMilliSec
Create new instance of TDurationInMilliSec with unit SECOND and multiplier MILLI.- Parameters:
value
- value attribute- Returns:
- new instance of TDurationInMilliSec initialized with the given parameters
- See Also:
-
newDurationInMilliSec
Clone TDurationInMilliSec. The clone is independent of the tDurationInMilliSec because all fields are immutable.- Parameters:
tDurationInMilliSec
- TDurationInMilliSec to clone- Returns:
- new instance of TDurationInMilliSec initialized with the given parameters
- See Also:
-
newAddress
Create new instance of TAddress- Parameters:
listOfP
- list of TP for setting the P attribute of the new TAddress- Returns:
- new instance of TAddress initialized with the given parameters. P attribute of TAddress is a new list which contains the elements of listOfP (the given TP are not cloned).
-
newConnectedAp
Create new instance of TConnectedAP- Parameters:
iedName
- iedName attributeapName
- apName attribute- Returns:
- new instance of TConnectedAP initialized with the given parameters
-
newVal
Create new instance of TVal- Parameters:
value
- value attributesGroup
- sGroup attribute (can be null)- Returns:
- new instance of TVal initialized with the given parameters
-
newVal
Create new instance of TVal with no sGroup- Parameters:
value
- value attribute- Returns:
- new instance of TVal initialized with the given parameters
-
newFcda
-