Methods
(static) convertCondition(condition) → {string}
Converts character entity references in conditions to < and >
Parameters:
Name | Type | Description |
---|---|---|
condition |
string | in form of a string |
Returns:
- the condition with entity references for < and > being converted
- Type
- string
(static) convertConstraintGroup(constraintGroupObj) → {object}
Converts a copy of a constraintGroup element to the preferred form and returns it
Parameters:
Name | Type | Description |
---|---|---|
constraintGroupObj |
object | the constraintGroup that is to be converted |
Returns:
- the converted copy
- Type
- object
(static) convertConstraintGroupRef(constraintGroupRefObj) → {object}
Adds "_type: 'constraintGroupRef'" to a copy of the given object and returns it
Parameters:
Name | Type | Description |
---|---|---|
constraintGroupRefObj |
object | The constraintGroupRef that should be modified |
Returns:
- a copy of the given object with an added member _type
- Type
- object
(static) convertHardConstraint(hardConstraintObj) → {object}
Converts a copy of a given hardConstraint element into the preferred form and returns it
Parameters:
Name | Type | Description |
---|---|---|
hardConstraintObj |
object | The hardConstraint object that is to be converted |
Returns:
- the converted copy
- Type
- object
(static) convertHardConstraints(hardConstraintsObj) → {array}
Converts a given hardConstraints object to an array containing all children in the preferred form
Parameters:
Name | Type | Description |
---|---|---|
hardConstraintsObj |
object | the hardConstraints object that is to be converted |
Returns:
- an array containing all hardConstraint and constraintsGroup elements
- Type
- array
(static) convertProcessConstraints(processConstraintsObj) → {object}
Converts all children of the given object into the preferred form and return the new object
Parameters:
Name | Type | Description |
---|---|---|
processConstraintsObj |
object | the object that is to be converted |
Returns:
- a new object containing all of the given objects children in the preferred form
- Type
- object
(static) convertSoftConstraints(softConstraintsObj) → {array}
Converts the softConstraints object into an array in the preferred form [{softConstraint},{softConstraint},...]
Parameters:
Name | Type | Description |
---|---|---|
softConstraintsObj |
object | an object containing all of the softConstraints elements softConstraint elements |
Returns:
- an array containing representations of all of the softConstraints elements softConstraint elements
- Type
- array
(static) convertValue(either) → {object}
Converts a value to a value object in the preferred form { value: valueName, _valueAttributes: {...}}
Parameters:
Name | Type | Description |
---|---|---|
either |
string | object | the values name as a string or an object containing the values name and attributes |
Returns:
a value object in the preferred form
- Type
- object
(static) convertValues(object) → {object}
Converts the values entry in the given object to the preferred form { ..., values: [{valueObject},{valueObject}], _valuesAttributes: {...}}
Parameters:
Name | Type | Description |
---|---|---|
object |
object | with values in the form created by fast-xml-parser |
Returns:
- object with values in preferred form
- Type
- object