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 classConstraintSpecification.ConstraintSpecificationBuilderStatic 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.StringgetMessageFormat()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.SeveritygetSeverity()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:IConstraintSpecificationReturns the format message of the constraint specification to compose the corresponding message for a particular violation of the constraint.- Specified by:
getMessageFormatin interfaceIConstraintSpecification- Returns:
- The format message.
-
getKeyObjects
public java.util.Map<java.lang.String,java.lang.Object> getKeyObjects(IPatternMatch signature)
Description copied from interface:IConstraintSpecificationReturns the key objects (parameter names with the corresponding EObject objects) of a violation for the given pattern match.- Specified by:
getKeyObjectsin 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:IConstraintSpecificationReturns the key parameter names of the constraint specification.- Specified by:
getKeyNamesin interfaceIConstraintSpecification- Returns:
- A List of the key parameter names.
-
getPropertyNames
public java.util.List<java.lang.String> getPropertyNames()
Description copied from interface:IConstraintSpecificationReturns the property parameter names of the constraint specification.- Specified by:
getPropertyNamesin interfaceIConstraintSpecification- Returns:
- A List of the property parameter names.
-
getSeverity
public Severity getSeverity()
Description copied from interface:IConstraintSpecificationReturns the severity of the violations corresponding to the constraint specified by the constraint specification.- Specified by:
getSeverityin interfaceIConstraintSpecification- Returns:
- The severity.
-
getSymmetricPropertyNames
public java.util.Set<java.util.List<java.lang.String>> getSymmetricPropertyNames()
Description copied from interface:IConstraintSpecificationReturns the lists symmetric parameter names, where the permutation of the same objects for the parameters count as the same match.- Specified by:
getSymmetricPropertyNamesin 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:IConstraintSpecificationReturns 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:
getSymmetricKeyNamesin interfaceIConstraintSpecification- Returns:
- The Set of a symmetric key parameter names lists.
-
getQuerySpecification
public IQuerySpecification<? extends ViatraQueryMatcher<? extends IPatternMatch>> getQuerySpecification()
Description copied from interface:IConstraintSpecificationReturns the VIATRA Query-specific query specification of the constraint specification.- Specified by:
getQuerySpecificationin interfaceIConstraintSpecification- Returns:
- The query specification.
-
-