public class ConstraintParserAndValidator extends Object implements Transformer
This can be useful if the model has been modified - especially through the Profiler transformation - and in case that constraints have not been parsed and validated yet. The latter is the case for profile constraints and FOL constraints.
Via the ConstraintParserAndValidator, the functionality to parse/validate constraints is available in a single piece of code that can be executed at any place in the transformation process of ShapeChange.
By default, the transformation parses and valdiates all types of constraints. If a profile constraint is encountered, it is converted according to its type before parsing and validating it. The transformation parameters named xxxConstraintTypeRegex influence to which type the constraint is converted.
NOTE: profile constraints have not been implemented yet
Modifier and Type | Class and Description |
---|---|
static class |
ConstraintParserAndValidator.ConstraintComparators |
Constructor and Description |
---|
ConstraintParserAndValidator() |
Modifier and Type | Method and Description |
---|---|
static Constraint |
parse(FolConstraint con,
Sbvr2FolParser parser,
GenericClassInfo genCi,
ShapeChangeResult r) |
static Constraint |
parse(OclConstraint con,
GenericClassInfo genCi) |
static Constraint |
parse(OclConstraint con,
GenericPropertyInfo genPi) |
void |
process(GenericModel m,
Options o,
TransformerConfiguration trfConfig,
ShapeChangeResult r)
Processes the model.
|
public void process(GenericModel m, Options o, TransformerConfiguration trfConfig, ShapeChangeResult r) throws ShapeChangeAbortException
Transformer
process
in interface Transformer
m
- The model to process.o
- Options to control the process execution.r
- Logging target.ShapeChangeAbortException
public static Constraint parse(FolConstraint con, Sbvr2FolParser parser, GenericClassInfo genCi, ShapeChangeResult r)
public static Constraint parse(OclConstraint con, GenericClassInfo genCi)
public static Constraint parse(OclConstraint con, GenericPropertyInfo genPi)
Copyright © 2017. All rights reserved.