Record Class CompiledConstraintContext

java.lang.Object
java.lang.Record
ch.so.agi.mcp.constraint.CompiledConstraintContext

public record CompiledConstraintContext(String modelText, @Nullable String modelRepositories, IliCompilerService.CompilationResult compilation, ch.interlis.ili2c.metamodel.TransferDescription transferDescription, ch.interlis.ili2c.metamodel.Constraint constraint, SemanticConstraint semantics) extends Record
One successfully compiled model plus one resolved constraint and its typed semantic IR.

The context is deliberately immutable so review, proof planning, XTF synthesis and validator verification can share the same ili2c metamodel without recompiling the unchanged model.

  • Constructor Details

    • CompiledConstraintContext

      public CompiledConstraintContext(String modelText, @Nullable String modelRepositories, IliCompilerService.CompilationResult compilation, ch.interlis.ili2c.metamodel.TransferDescription transferDescription, ch.interlis.ili2c.metamodel.Constraint constraint, SemanticConstraint semantics)
      Creates an instance of a CompiledConstraintContext record class.
      Parameters:
      modelText - the value for the modelText record component
      modelRepositories - the value for the modelRepositories record component
      compilation - the value for the compilation record component
      transferDescription - the value for the transferDescription record component
      constraint - the value for the constraint record component
      semantics - the value for the semantics record component
  • Method Details

    • contextFqn

      public String contextFqn()
    • constraintFqn

      public String constraintFqn()
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • modelText

      public String modelText()
      Returns the value of the modelText record component.
      Returns:
      the value of the modelText record component
    • modelRepositories

      public @Nullable String modelRepositories()
      Returns the value of the modelRepositories record component.
      Returns:
      the value of the modelRepositories record component
    • compilation

      Returns the value of the compilation record component.
      Returns:
      the value of the compilation record component
    • transferDescription

      public ch.interlis.ili2c.metamodel.TransferDescription transferDescription()
      Returns the value of the transferDescription record component.
      Returns:
      the value of the transferDescription record component
    • constraint

      public ch.interlis.ili2c.metamodel.Constraint constraint()
      Returns the value of the constraint record component.
      Returns:
      the value of the constraint record component
    • semantics

      public SemanticConstraint semantics()
      Returns the value of the semantics record component.
      Returns:
      the value of the semantics record component