Class: finalToIntermediateJsParser

@proceed/constraint-parser-xml-json.ConstraintParser.finalToIntermediateJsParser

This library transforms the PROCEED process constraints from JS to DOM

Methods

(static) convertCondition(condition) → {string}

Converts < and > in conditions to entity references

Parameters:
Name Type Description
condition string

in form of a string

Source:
Returns:
  • the condition with entity references for < and > being converted
Type
string

(static) convertConstraintGroup(constraintGroupObj) → {object}

Converts a copy of a given constraintGroup to the layout needed by fast-xml-parser and returns it

Parameters:
Name Type Description
constraintGroupObj object

the object that has to be converted

Source:
Returns:
  • the converted copy
Type
object

(static) convertConstraintGroupRef(constraintGroupRefObj)

Converts given constraintGroupRef to layout needed by fast-xml-parser

Parameters:
Name Type Description
constraintGroupRefObj object
Source:

(static) convertHardConstraint(hardConstraintObj) → {object}

Converts a copy of a given hardConstraint to the layout needed by fast-xml-parser and returns it

Parameters:
Name Type Description
hardConstraintObj object

the object that has to be converted

Source:
Returns:
  • the converted copy
Type
object

(static) convertHardConstraints(hardConstraintsArray) → {object}

Converts a copy of a given hardConstraints element to the layout needed by fast-xml-parser and returns it

Parameters:
Name Type Description
hardConstraintsArray array

array containing all hardConstraints of the constraint

Source:
Returns:
  • the converted copy
Type
object

(static) convertProcessConstraints(processConstraintObj)

converts a copy of a given processConstraints element and it's children to the layout needed by fast-xml-parser

Parameters:
Name Type Description
processConstraintObj object
Source:

(static) convertSoftConstraint(softConstraintObj) → {object}

Converts a copy of a softconstraint object to the layout needed for faster-xml-parser and returns it

Parameters:
Name Type Description
softConstraintObj object

the object that has to be converted

Source:
Returns:
  • the copy with the converted elements
Type
object

(static) convertSoftConstraints(softConstraintsArray, object)

Converts given softConstraintsArray to layout needed by fast-xml-parser

Parameters:
Name Type Description
softConstraintsArray array

array containing all softConstraint elements

object object

containing all softConstraints in the required form

Source:

(static) convertValue(valueObj) → {string|number|object}

Converts a given value object to a representation that can be serialized by fast-xml-parser

Parameters:
Name Type Description
valueObj object

an object containing the value and its attributes

Source:
Returns:
  • returns a string or number for a value without attributes else it returns an object
Type
string | number | object

(static) convertValues(object) → {object}

Converts the values entry in the given object back to the layout needed for fast-xml-parser

Parameters:
Name Type Description
object object

object which contains the values entry that has to be converted

Source:
Returns:
  • copy of the given object with converted values entry
Type
object

(static) filterAttributes(attrObject) → {object|null}

Filters all attributes from the given object that have a value of null

Parameters:
Name Type Description
attrObject object

an object with _attributes, _valueAttributes or _valuesAttributes that have to be filtered

Source:
Returns:

the filtered attributes object or null if it is empty

Type
object | null