Class ConstraintSpecification
- java.lang.Object
-
- org.eclipse.viatra.addon.validation.core.api.ConstraintSpecification
-
- All Implemented Interfaces:
IConstraintSpecification
public class ConstraintSpecification extends java.lang.Object implements IConstraintSpecification
Generic implementation of the IConstraintSpecification interface for code buildable constraint specifications.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ConstraintSpecification.ConstraintSpecificationBuilder
Static builder class provided to construct ConstraintSpecification instances.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<java.lang.String>
getKeyNames()
Returns the key parameter names of the constraint specification.java.util.Map<java.lang.String,java.lang.Object>
getKeyObjects(IPatternMatch signature)
Returns the key objects (parameter names with the corresponding EObject objects) of a violation for the given pattern match.java.lang.String
getMessageFormat()
Returns the format message of the constraint specification to compose the corresponding message for a particular violation of the constraint.java.util.List<java.lang.String>
getPropertyNames()
Returns the property parameter names of the constraint specification.IQuerySpecification<? extends ViatraQueryMatcher<? extends IPatternMatch>>
getQuerySpecification()
Returns the VIATRA Query-specific query specification of the constraint specification.Severity
getSeverity()
Returns the severity of the violations corresponding to the constraint specified by the constraint specification.java.util.Set<java.util.List<java.lang.String>>
getSymmetricKeyNames()
Returns the lists of symmetric key parameter names, where the permutation of the same objects for the parameters count as the same key, thus the same violation.java.util.Set<java.util.List<java.lang.String>>
getSymmetricPropertyNames()
Returns the lists symmetric parameter names, where the permutation of the same objects for the parameters count as the same match.
-
-
-
Method Detail
-
getMessageFormat
public java.lang.String getMessageFormat()
Description copied from interface:IConstraintSpecification
Returns the format message of the constraint specification to compose the corresponding message for a particular violation of the constraint.- Specified by:
getMessageFormat
in interfaceIConstraintSpecification
- Returns:
- The format message.
-
getKeyObjects
public java.util.Map<java.lang.String,java.lang.Object> getKeyObjects(IPatternMatch signature)
Description copied from interface:IConstraintSpecification
Returns the key objects (parameter names with the corresponding EObject objects) of a violation for the given pattern match.- Specified by:
getKeyObjects
in interfaceIConstraintSpecification
- Parameters:
signature
- The pattern match for which the key objects should be retrieved.- Returns:
- A Map with the key parameter name and value pairs.
-
getKeyNames
public java.util.List<java.lang.String> getKeyNames()
Description copied from interface:IConstraintSpecification
Returns the key parameter names of the constraint specification.- Specified by:
getKeyNames
in interfaceIConstraintSpecification
- Returns:
- A List of the key parameter names.
-
getPropertyNames
public java.util.List<java.lang.String> getPropertyNames()
Description copied from interface:IConstraintSpecification
Returns the property parameter names of the constraint specification.- Specified by:
getPropertyNames
in interfaceIConstraintSpecification
- Returns:
- A List of the property parameter names.
-
getSeverity
public Severity getSeverity()
Description copied from interface:IConstraintSpecification
Returns the severity of the violations corresponding to the constraint specified by the constraint specification.- Specified by:
getSeverity
in interfaceIConstraintSpecification
- Returns:
- The severity.
-
getSymmetricPropertyNames
public java.util.Set<java.util.List<java.lang.String>> getSymmetricPropertyNames()
Description copied from interface:IConstraintSpecification
Returns the lists symmetric parameter names, where the permutation of the same objects for the parameters count as the same match.- Specified by:
getSymmetricPropertyNames
in interfaceIConstraintSpecification
- Returns:
- The Set of a symmetric parameter names lists.
-
getSymmetricKeyNames
public java.util.Set<java.util.List<java.lang.String>> getSymmetricKeyNames()
Description copied from interface:IConstraintSpecification
Returns the lists of symmetric key parameter names, where the permutation of the same objects for the parameters count as the same key, thus the same violation.- Specified by:
getSymmetricKeyNames
in interfaceIConstraintSpecification
- Returns:
- The Set of a symmetric key parameter names lists.
-
getQuerySpecification
public IQuerySpecification<? extends ViatraQueryMatcher<? extends IPatternMatch>> getQuerySpecification()
Description copied from interface:IConstraintSpecification
Returns the VIATRA Query-specific query specification of the constraint specification.- Specified by:
getQuerySpecification
in interfaceIConstraintSpecification
- Returns:
- The query specification.
-
-