Class: intermediateToFinalJSParser

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

This library transforms the PROCEED process constraints from an intermediate to a final JS Object

Methods

(static) convertCondition(condition) → {string}

Converts character entity references in conditions to < and >

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 constraintGroup element to the preferred form and returns it

Parameters:
Name Type Description
constraintGroupObj object

the constraintGroup that is to be converted

Source:
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

Source:
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

Source:
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

Source:
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

Source:
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

Source:
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

Source:
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

Source:
Returns:
  • object with values in preferred form
Type
object