org.eclipse.incquery.validation.core.api

## Class ConstraintSpecification

- java.lang.Object
- - org.eclipse.incquery.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.
  Author:
    Balint Lorand

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and 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 and 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 IncQueryMatcher<? extends IPatternMatch>>` | `getQuerySpecification()` Returns the IncQuery-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.

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### 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 interface `IConstraintSpecification`
      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 interface `IConstraintSpecification`
      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 interface `IConstraintSpecification`
      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 interface `IConstraintSpecification`
      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 interface `IConstraintSpecification`
      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 interface `IConstraintSpecification`
      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 interface `IConstraintSpecification`
      Returns:
        The Set of a symmetric key parameter names lists.

    - #### getQuerySpecification

          public IQuerySpecification<? extends IncQueryMatcher<? extends IPatternMatch>> getQuerySpecification()

      Description copied from interface: `IConstraintSpecification`
      Returns the IncQuery-specific query specification of the constraint specification.
      Specified by:
        `getQuerySpecification` in interface `IConstraintSpecification`
      Returns:
        The query specification.