/* file: fixed_constituent_assembly_constraint.swift 	 generated: Mon Jan  3 16:32:52 2022 */

/* This file was generated by the EXPRESS to Swift translator "exp2swift", 
    derived from STEPcode (formerly NIST's SCL).
 exp2swift version: v.1.0.1, derived from stepcode v0.8 as of 2019/11/23 
 WARNING: You probably don't want to edit it since your modifications 
    will be lost if exp2swift is used to regenerate it.
 */

 
import SwiftSDAIcore

extension AP242_MANAGED_MODEL_BASED_3D_ENGINEERING_MIM_LF {
//MARK: -ENTITY DEFINITION in EXPRESS
/*

  ENTITY fixed_constituent_assembly_constraint
    SUBTYPE OF ( assembly_geometric_constraint, fixed_element_geometric_constraint );
      fixed_constituent  : representative_shape_representation;
    WHERE
      wr1: ( SELF\explicit_constraint.constrained_elements[1]\geometric_representation_item.dim = 3 );
      wr2: assembly_leaf( using_product_definition_of_shape_representation( fixed_constituent )[1] );
      wr3: ( ( SIZEOF( SELF\explicit_constraint.constrained_elements ) = 1 ) AND ( SIZEOF( SELF\
               explicit_constraint.reference_elements ) = 0 ) );
      wr4: ( fixed_constituent IN ( using_representations( SELF\explicit_constraint.constrained_elements[1] ) 
               + using_representation_with_mapping( SELF\explicit_constraint.constrained_elements[1] ) ) );
  END_ENTITY; -- fixed_constituent_assembly_constraint (line:15667 file:ap242ed2_mim_lf_v1.101.TY.exp)

*/


//MARK: - ALL DEFINED ATTRIBUTES
/*
  SUPER- ENTITY(1)	representation_item
    ATTR:  name,	TYPE: label -- EXPLICIT


  SUPER- ENTITY(2)	variational_representation_item
    (no local attributes)

  SUPER- ENTITY(3)	explicit_constraint
    ATTR:  description,	TYPE: OPTIONAL text -- EXPLICIT

    ATTR:  constrained_elements,	TYPE: SET [1 : ?] OF representation_item -- EXPLICIT
      -- possibly overriden by
          ENTITY: symmetry_geometric_constraint,	TYPE: SET [2 : 2] OF geometric_representation_item
          ENTITY: swept_point_curve_geometric_constraint,	TYPE: SET [1 : ?] OF curve
          ENTITY: coaxial_geometric_constraint,	TYPE: SET [1 : ?] OF axial_geometry_constraint_element
          ENTITY: curve_smoothness_geometric_constraint,	TYPE: SET [1 : 1] OF curve_segment_set
          ENTITY: incidence_geometric_constraint,	TYPE: SET [1 : ?] OF geometric_constraint_element
          ENTITY: curve_length_geometric_constraint,	TYPE: SET [1 : ?] OF bounded_curve
          ENTITY: equal_parameter_constraint,	TYPE: SET [1 : ?] OF variational_parameter
          ENTITY: free_form_constraint,	TYPE: SET [1 : ?] OF variational_parameter
          ENTITY: surface_smoothness_geometric_constraint,	TYPE: SET [1 : 1] OF surface_patch_set
      *** ENTITY: fixed_element_geometric_constraint,	TYPE: SET [1 : ?] OF geometric_constraint_element
          ENTITY: angle_geometric_constraint,	TYPE: SET [1 : ?] OF linear_geometry_constraint_element
          ENTITY: perpendicular_geometric_constraint,	TYPE: SET [1 : ?] OF linear_geometry_constraint_element
          ENTITY: parallel_offset_geometric_constraint,	TYPE: SET [1 : ?] OF curve_or_surface_constraint_element
          ENTITY: surface_distance_geometric_constraint,	TYPE: SET [1 : 2] OF surface
          ENTITY: parallel_geometric_constraint,	TYPE: SET [1 : ?] OF linear_geometry_constraint_element
          ENTITY: point_distance_geometric_constraint,	TYPE: SET [1 : ?] OF point
          ENTITY: radius_geometric_constraint,	TYPE: SET [1 : ?] OF radial_geometry_constraint_element
          ENTITY: skew_line_distance_geometric_constraint,	TYPE: SET [1 : 2] OF line
          ENTITY: explicit_geometric_constraint,	TYPE: SET [1 : ?] OF geometric_representation_item
          ENTITY: curve_distance_geometric_constraint,	TYPE: SET [1 : 2] OF curve
          ENTITY: swept_curve_surface_geometric_constraint,	TYPE: SET [1 : ?] OF surface
          ENTITY: tangent_geometric_constraint,	TYPE: SET [1 : ?] OF curve_or_surface_constraint_element

    ATTR:  reference_elements,	TYPE: SET [0 : ?] OF representation_item -- EXPLICIT
      -- possibly overriden by
          ENTITY: swept_point_curve_geometric_constraint,	TYPE: SET [1 : 1] OF swept_face_solid
          ENTITY: coaxial_geometric_constraint,	TYPE: SET [0 : 1] OF axial_geometry_constraint_element
          ENTITY: incidence_geometric_constraint,	TYPE: SET [0 : ?] OF geometric_constraint_element
          ENTITY: equal_parameter_constraint,	TYPE: SET [0 : 1] OF variational_parameter
          ENTITY: free_form_constraint,	TYPE: SET [0 : ?] OF variational_parameter
          ENTITY: angle_geometric_constraint,	TYPE: SET [0 : 1] OF linear_geometry_constraint_element
          ENTITY: perpendicular_geometric_constraint,	TYPE: SET [0 : 2] OF linear_geometry_constraint_element
          ENTITY: parallel_offset_geometric_constraint,	TYPE: SET [0 : 1] OF curve_or_surface_constraint_element
          ENTITY: surface_distance_geometric_constraint,	TYPE: SET [0 : 4] OF point_curve_or_surface_constraint_element
          ENTITY: parallel_geometric_constraint,	TYPE: SET [0 : 1] OF linear_geometry_constraint_element
          ENTITY: point_distance_geometric_constraint,	TYPE: SET [0 : 4] OF point_curve_or_surface_constraint_element
          ENTITY: skew_line_distance_geometric_constraint,	TYPE: SET [0 : 1] OF line
          ENTITY: explicit_geometric_constraint,	TYPE: SET [0 : ?] OF geometric_representation_item
          ENTITY: curve_distance_geometric_constraint,	TYPE: SET [0 : 4] OF point_curve_or_surface_constraint_element
          ENTITY: swept_curve_surface_geometric_constraint,	TYPE: SET [1 : 1] OF swept_surface_or_solid
          ENTITY: tangent_geometric_constraint,	TYPE: SET [0 : ?] OF curve_or_surface_constraint_element


  SUPER- ENTITY(4)	assembly_geometric_constraint
    (no local attributes)

  SUPER- ENTITY(5)	defined_constraint
    (no local attributes)

  SUPER- ENTITY(6)	geometric_representation_item
    ATTR:  dim,	TYPE: dimension_count -- DERIVED
      := dimension_of( SELF )


  SUPER- ENTITY(7)	explicit_geometric_constraint
    REDCR: constrained_elements,	TYPE: SET [1 : ?] OF geometric_representation_item -- EXPLICIT
      -- OVERRIDING ENTITY: explicit_constraint

    REDCR: reference_elements,	TYPE: SET [0 : ?] OF geometric_representation_item -- EXPLICIT
      -- OVERRIDING ENTITY: explicit_constraint


  SUPER- ENTITY(8)	fixed_element_geometric_constraint
    REDCR: constrained_elements,	TYPE: SET [1 : ?] OF geometric_constraint_element -- EXPLICIT
      -- OVERRIDING ENTITY: explicit_constraint


  ENTITY(SELF)	fixed_constituent_assembly_constraint
    ATTR:  fixed_constituent,	TYPE: representative_shape_representation -- EXPLICIT


*/


//MARK: - Partial Entity
  public final class _fixed_constituent_assembly_constraint : SDAI.PartialEntity {
    public override class var entityReferenceType: SDAI.EntityReference.Type {
      eFIXED_CONSTITUENT_ASSEMBLY_CONSTRAINT.self
    }

    //ATTRIBUTES
    /// EXPLICIT ATTRIBUTE 
    public internal(set) var _fixed_constituent: eREPRESENTATIVE_SHAPE_REPRESENTATION // PLAIN EXPLICIT ATTRIBUTE

    public override var typeMembers: Set<SDAI.STRING> {
      var members = Set<SDAI.STRING>()
      members.insert(SDAI.STRING(Self.typeName))
      return members
    }


    //VALUE COMPARISON SUPPORT
    public override func hashAsValue(into hasher: inout Hasher, visited complexEntities: inout Set<SDAI.ComplexEntity>) {
      super.hashAsValue(into: &hasher, visited: &complexEntities)
      self._fixed_constituent.value.hashAsValue(into: &hasher, visited: &complexEntities)
    }

    public override func isValueEqual(to rhs: SDAI.PartialEntity, visited comppairs: inout Set<SDAI.ComplexPair>) -> Bool {
      guard let rhs = rhs as? Self else { return false }
      if !super.isValueEqual(to: rhs, visited: &comppairs) { return false }
      if let comp = self._fixed_constituent.value.isValueEqualOptionally(to: rhs._fixed_constituent.value, visited: &comppairs)	{
        if !comp { return false }
      }
      else { return false }
      return true
    }

    public override func isValueEqualOptionally(to rhs: SDAI.PartialEntity, visited comppairs: inout Set<SDAI.ComplexPair>) -> Bool? {
      guard let rhs = rhs as? Self else { return false }
      var result: Bool? = true
      if let comp = super.isValueEqualOptionally(to: rhs, visited: &comppairs) {
        if !comp { return false }
      }
      else { result = nil }
      if let comp = self._fixed_constituent.value.isValueEqualOptionally(to: rhs._fixed_constituent.value, visited: &comppairs) {
        if !comp { return false }
      }
      else { result = nil }
      return result
    }


    //MARK: WHERE RULES (ENTITY)
    public static func WHERE_wr1(SELF: eFIXED_CONSTITUENT_ASSEMBLY_CONSTRAINT?) -> SDAI.LOGICAL {
      guard let SELF = SELF else { return SDAI.UNKNOWN }

      let _TEMP1 = SELF.GROUP_REF(eEXPLICIT_CONSTRAINT.self)
      let _TEMP2 = _TEMP1?.CONSTRAINED_ELEMENTS
      let _TEMP3 = _TEMP2?[1]
      let _TEMP4 = _TEMP3?.GROUP_REF(eGEOMETRIC_REPRESENTATION_ITEM.self)
      let _TEMP5 = _TEMP4?.DIM
      let _TEMP6 = _TEMP5 .==. SDAI.FORCE_OPTIONAL(SDAI.INTEGER(3))
      return _TEMP6
    }
    public static func WHERE_wr2(SELF: eFIXED_CONSTITUENT_ASSEMBLY_CONSTRAINT?) -> SDAI.LOGICAL {
      guard let SELF = SELF else { return SDAI.UNKNOWN }

      let _TEMP1 = USING_PRODUCT_DEFINITION_OF_SHAPE_REPRESENTATION(eSHAPE_REPRESENTATION(/*
        eREPRESENTATIVE_SHAPE_REPRESENTATION*/SELF.FIXED_CONSTITUENT))
      let _TEMP2 = _TEMP1?[1]
      let _TEMP3 = ASSEMBLY_LEAF(_TEMP2)
      return SDAI.LOGICAL(_TEMP3)
    }
    public static func WHERE_wr3(SELF: eFIXED_CONSTITUENT_ASSEMBLY_CONSTRAINT?) -> SDAI.LOGICAL {
      guard let SELF = SELF else { return SDAI.UNKNOWN }

      let _TEMP1 = SELF.GROUP_REF(eEXPLICIT_CONSTRAINT.self)
      let _TEMP2 = _TEMP1?.CONSTRAINED_ELEMENTS
      let _TEMP3 = SDAI.SIZEOF(_TEMP2)
      let _TEMP4 = _TEMP3 .==. SDAI.FORCE_OPTIONAL(SDAI.INTEGER(1))
      let _TEMP5 = SELF.GROUP_REF(eEXPLICIT_CONSTRAINT.self)
      let _TEMP6 = _TEMP5?.REFERENCE_ELEMENTS
      let _TEMP7 = SDAI.SIZEOF(_TEMP6)
      let _TEMP8 = _TEMP7 .==. SDAI.FORCE_OPTIONAL(SDAI.INTEGER(0))
      let _TEMP9 = _TEMP4 && _TEMP8
      return _TEMP9
    }
    public static func WHERE_wr4(SELF: eFIXED_CONSTITUENT_ASSEMBLY_CONSTRAINT?) -> SDAI.LOGICAL {
      guard let SELF = SELF else { return SDAI.UNKNOWN }

      let _TEMP1 = SELF.GROUP_REF(eEXPLICIT_CONSTRAINT.self)
      let _TEMP2 = _TEMP1?.CONSTRAINED_ELEMENTS
      let _TEMP3 = _TEMP2?[1]
      let _TEMP4 = USING_REPRESENTATIONS(sFOUNDED_ITEM_SELECT(/*eREPRESENTATION_ITEM*/_TEMP3))
      let _TEMP5 = SELF.GROUP_REF(eEXPLICIT_CONSTRAINT.self)
      let _TEMP6 = _TEMP5?.CONSTRAINED_ELEMENTS
      let _TEMP7 = _TEMP6?[1]
      let _TEMP8 = USING_REPRESENTATION_WITH_MAPPING(_TEMP7)
      let _TEMP9 = _TEMP4 + _TEMP8
      let _TEMP10 = SDAI.aggregate(_TEMP9, contains: eREPRESENTATION(/*eREPRESENTATIVE_SHAPE_REPRESENTATION*/
        SELF.FIXED_CONSTITUENT))
      return _TEMP10
    }

    //EXPRESS IMPLICIT PARTIAL ENTITY CONSTRUCTOR
    public init(FIXED_CONSTITUENT: eREPRESENTATIVE_SHAPE_REPRESENTATION) {
      self._fixed_constituent = FIXED_CONSTITUENT
      super.init(asAbstructSuperclass:())

    }

    //p21 PARTIAL ENTITY CONSTRUCTOR
    public required convenience init?(parameters: [P21Decode.ExchangeStructure.Parameter], exchangeStructure: P21Decode.ExchangeStructure) {
      let numParams = 1
      guard parameters.count == numParams
      else { exchangeStructure.error = "number of p21 parameters(\(parameters.count)) are different from expected(\(numParams)) for entity(\(Self.entityName)) constructor"; return nil }

      guard case .success(let p0) = exchangeStructure.recoverRequiredParameter(as: 
        eREPRESENTATIVE_SHAPE_REPRESENTATION.self, from: parameters[0])
      else { exchangeStructure.add(errorContext: "while recovering parameter #0 for entity(\(Self.entityName)) constructor"); return nil }

      self.init( FIXED_CONSTITUENT: p0 )
    }
  }


//MARK: - Entity Reference

/** ENTITY reference
- EXPRESS:
```express
  ENTITY fixed_constituent_assembly_constraint
    SUBTYPE OF ( assembly_geometric_constraint, fixed_element_geometric_constraint );
      fixed_constituent  : representative_shape_representation;
    WHERE
      wr1: ( SELF\explicit_constraint.constrained_elements[1]\geometric_representation_item.dim = 3 );
      wr2: assembly_leaf( using_product_definition_of_shape_representation( fixed_constituent )[1] );
      wr3: ( ( SIZEOF( SELF\explicit_constraint.constrained_elements ) = 1 ) AND ( SIZEOF( SELF\
               explicit_constraint.reference_elements ) = 0 ) );
      wr4: ( fixed_constituent IN ( using_representations( SELF\explicit_constraint.constrained_elements[1] ) 
               + using_representation_with_mapping( SELF\explicit_constraint.constrained_elements[1] ) ) );
  END_ENTITY; -- fixed_constituent_assembly_constraint (line:15667 file:ap242ed2_mim_lf_v1.101.TY.exp)

```
*/
  public final class eFIXED_CONSTITUENT_ASSEMBLY_CONSTRAINT : SDAI.EntityReference {

    //MARK: PARTIAL ENTITY
    public override class var partialEntityType: SDAI.PartialEntity.Type {
      _fixed_constituent_assembly_constraint.self
    }
    public let partialEntity: _fixed_constituent_assembly_constraint

    //MARK: SUPERTYPES
    public let super_eREPRESENTATION_ITEM: eREPRESENTATION_ITEM 	// [1]
    public let super_eVARIATIONAL_REPRESENTATION_ITEM: eVARIATIONAL_REPRESENTATION_ITEM 	// [2]
    public let super_eEXPLICIT_CONSTRAINT: eEXPLICIT_CONSTRAINT 	// [3]
    public let super_eASSEMBLY_GEOMETRIC_CONSTRAINT: eASSEMBLY_GEOMETRIC_CONSTRAINT 	// [4]
    public let super_eDEFINED_CONSTRAINT: eDEFINED_CONSTRAINT 	// [5]
    public let super_eGEOMETRIC_REPRESENTATION_ITEM: eGEOMETRIC_REPRESENTATION_ITEM 	// [6]
    public let super_eEXPLICIT_GEOMETRIC_CONSTRAINT: eEXPLICIT_GEOMETRIC_CONSTRAINT 	// [7]
    public let super_eFIXED_ELEMENT_GEOMETRIC_CONSTRAINT: eFIXED_ELEMENT_GEOMETRIC_CONSTRAINT 	// [8]
    public var super_eFIXED_CONSTITUENT_ASSEMBLY_CONSTRAINT: eFIXED_CONSTITUENT_ASSEMBLY_CONSTRAINT { return self } 	// [9]

    //MARK: SUBTYPES

    //MARK: ATTRIBUTES
    /// __EXPLICIT__ attribute
    /// - origin: SUPER( ``eEXPLICIT_CONSTRAINT`` )
    public var DESCRIPTION: tTEXT?  {
      get {
        return super_eEXPLICIT_CONSTRAINT.partialEntity._description
      }
      set(newValue) {
        let partial = super_eEXPLICIT_CONSTRAINT.partialEntity
        partial._description = newValue
      }
    }

    /// __EXPLICIT REDEF__ attribute
    /// - origin: SUPER( ``eFIXED_ELEMENT_GEOMETRIC_CONSTRAINT`` )
    public var CONSTRAINED_ELEMENTS: SDAI.SET<sGEOMETRIC_CONSTRAINT_ELEMENT>/*[1:nil]*/  {
      get {
        return SDAI.UNWRAP( SDAI.SET<sGEOMETRIC_CONSTRAINT_ELEMENT>( super_eEXPLICIT_CONSTRAINT.partialEntity
          ._constrained_elements ) )
      }
      set(newValue) {
        let partial = super_eEXPLICIT_CONSTRAINT.partialEntity
        partial._constrained_elements = SDAI.UNWRAP(
          SDAI.SET<eREPRESENTATION_ITEM>(newValue))
      }
    }

    /// __EXPLICIT__ attribute
    /// - origin: SUPER( ``eEXPLICIT_CONSTRAINT`` )
    public var REFERENCE_ELEMENTS: SDAI.SET<eREPRESENTATION_ITEM>/*[0:nil]*/  {
      get {
        return SDAI.UNWRAP( super_eEXPLICIT_CONSTRAINT.partialEntity._reference_elements )
      }
      set(newValue) {
        let partial = super_eEXPLICIT_CONSTRAINT.partialEntity
        partial._reference_elements = SDAI.UNWRAP(newValue)
      }
    }

    /// __EXPLICIT__ attribute
    /// - origin: SELF( ``eFIXED_CONSTITUENT_ASSEMBLY_CONSTRAINT`` )
    public var FIXED_CONSTITUENT: eREPRESENTATIVE_SHAPE_REPRESENTATION {
      get {
        return SDAI.UNWRAP( self.partialEntity._fixed_constituent )
      }
      set(newValue) {
        let partial = self.partialEntity
        partial._fixed_constituent = SDAI.UNWRAP(newValue)
      }
    }

    /// __EXPLICIT__ attribute
    /// - origin: SUPER( ``eREPRESENTATION_ITEM`` )
    public var NAME: tLABEL {
      get {
        return SDAI.UNWRAP( super_eREPRESENTATION_ITEM.partialEntity._name )
      }
      set(newValue) {
        let partial = super_eREPRESENTATION_ITEM.partialEntity
        partial._name = SDAI.UNWRAP(newValue)
      }
    }

    /// __DERIVE__ attribute
    /// - origin: SUPER( ``eGEOMETRIC_REPRESENTATION_ITEM`` )
    public var DIM: tDIMENSION_COUNT?  {
      get {
        if let cached = cachedValue(derivedAttributeName:"DIM") {
          return cached.value as! tDIMENSION_COUNT? 
        }
        let origin = super_eGEOMETRIC_REPRESENTATION_ITEM
        let value = tDIMENSION_COUNT(origin.partialEntity._dim__getter(SELF: origin))
        updateCache(derivedAttributeName:"DIM", value:value)
        return value
      }
    }


    //MARK: INITIALIZERS
    public convenience init?(_ entityRef: SDAI.EntityReference?) {
      let complex = entityRef?.complexEntity
      self.init(complex: complex)
    }

    public required init?(complex complexEntity: SDAI.ComplexEntity?) {
      guard let partial = complexEntity?.partialEntityInstance(_fixed_constituent_assembly_constraint.self) else { return nil }
      self.partialEntity = partial

      guard let super1 = complexEntity?.entityReference(eREPRESENTATION_ITEM.self) else { return nil }
      self.super_eREPRESENTATION_ITEM = super1

      guard let super2 = complexEntity?.entityReference(eVARIATIONAL_REPRESENTATION_ITEM.self) else { return nil }
      self.super_eVARIATIONAL_REPRESENTATION_ITEM = super2

      guard let super3 = complexEntity?.entityReference(eEXPLICIT_CONSTRAINT.self) else { return nil }
      self.super_eEXPLICIT_CONSTRAINT = super3

      guard let super4 = complexEntity?.entityReference(eASSEMBLY_GEOMETRIC_CONSTRAINT.self) else { return nil }
      self.super_eASSEMBLY_GEOMETRIC_CONSTRAINT = super4

      guard let super5 = complexEntity?.entityReference(eDEFINED_CONSTRAINT.self) else { return nil }
      self.super_eDEFINED_CONSTRAINT = super5

      guard let super6 = complexEntity?.entityReference(eGEOMETRIC_REPRESENTATION_ITEM.self) else { return nil }
      self.super_eGEOMETRIC_REPRESENTATION_ITEM = super6

      guard let super7 = complexEntity?.entityReference(eEXPLICIT_GEOMETRIC_CONSTRAINT.self) else { return nil }
      self.super_eEXPLICIT_GEOMETRIC_CONSTRAINT = super7

      guard let super8 = complexEntity?.entityReference(eFIXED_ELEMENT_GEOMETRIC_CONSTRAINT.self) else { return nil }
      self.super_eFIXED_ELEMENT_GEOMETRIC_CONSTRAINT = super8

      super.init(complex: complexEntity)
    }

    public required convenience init?<G: SDAIGenericType>(fromGeneric generic: G?) {
      guard let entityRef = generic?.entityReference else { return nil }
      self.init(complex: entityRef.complexEntity)
    }

    public convenience init?<S: SDAISelectType>(_ select: S?) { self.init(possiblyFrom: select) }
    public convenience init?(_ complex: SDAI.ComplexEntity?) { self.init(complex: complex) }


    //MARK: WHERE RULE VALIDATION (ENTITY)
    public override class func validateWhereRules(instance:SDAI.EntityReference?, prefix:SDAI.WhereLabel) -> [SDAI.WhereLabel:SDAI.LOGICAL] {
      guard let instance = instance as? Self else { return [:] }

      let prefix2 = prefix + " \(instance)"

      var result = super.validateWhereRules(instance:instance, prefix:prefix2)
      result[prefix2 + " .WHERE_wr1"] = _fixed_constituent_assembly_constraint.WHERE_wr1(SELF: instance)
      result[prefix2 + " .WHERE_wr2"] = _fixed_constituent_assembly_constraint.WHERE_wr2(SELF: instance)
      result[prefix2 + " .WHERE_wr3"] = _fixed_constituent_assembly_constraint.WHERE_wr3(SELF: instance)
      result[prefix2 + " .WHERE_wr4"] = _fixed_constituent_assembly_constraint.WHERE_wr4(SELF: instance)
      return result
    }


    //MARK: DICTIONARY DEFINITION
    public class override var entityDefinition: SDAIDictionarySchema.EntityDefinition { _entityDefinition }
    private static let _entityDefinition: SDAIDictionarySchema.EntityDefinition = createEntityDefinition()

    private static func createEntityDefinition() -> SDAIDictionarySchema.EntityDefinition {
      let entityDef = SDAIDictionarySchema.EntityDefinition(name: "FIXED_CONSTITUENT_ASSEMBLY_CONSTRAINT", type: self, explicitAttributeCount: 1)

      //MARK: SUPERTYPE REGISTRATIONS
      entityDef.add(supertype: eREPRESENTATION_ITEM.self)
      entityDef.add(supertype: eVARIATIONAL_REPRESENTATION_ITEM.self)
      entityDef.add(supertype: eEXPLICIT_CONSTRAINT.self)
      entityDef.add(supertype: eASSEMBLY_GEOMETRIC_CONSTRAINT.self)
      entityDef.add(supertype: eDEFINED_CONSTRAINT.self)
      entityDef.add(supertype: eGEOMETRIC_REPRESENTATION_ITEM.self)
      entityDef.add(supertype: eEXPLICIT_GEOMETRIC_CONSTRAINT.self)
      entityDef.add(supertype: eFIXED_ELEMENT_GEOMETRIC_CONSTRAINT.self)
      entityDef.add(supertype: eFIXED_CONSTITUENT_ASSEMBLY_CONSTRAINT.self)

      //MARK: ATTRIBUTE REGISTRATIONS
      entityDef.addAttribute(name: "DESCRIPTION", keyPath: \eFIXED_CONSTITUENT_ASSEMBLY_CONSTRAINT.DESCRIPTION, 
        kind: .explicitOptional, source: .superEntity, mayYieldEntityReference: false)
      entityDef.addAttribute(name: "CONSTRAINED_ELEMENTS", keyPath: \eFIXED_CONSTITUENT_ASSEMBLY_CONSTRAINT.CONSTRAINED_ELEMENTS, 
        kind: .explicitRedeclaring, source: .superEntity, mayYieldEntityReference: true)
      entityDef.addAttribute(name: "REFERENCE_ELEMENTS", keyPath: \eFIXED_CONSTITUENT_ASSEMBLY_CONSTRAINT.REFERENCE_ELEMENTS, 
        kind: .explicit, source: .superEntity, mayYieldEntityReference: true)
      entityDef.addAttribute(name: "FIXED_CONSTITUENT", keyPath: \eFIXED_CONSTITUENT_ASSEMBLY_CONSTRAINT.FIXED_CONSTITUENT, 
        kind: .explicit, source: .thisEntity, mayYieldEntityReference: true)
      entityDef.addAttribute(name: "NAME", keyPath: \eFIXED_CONSTITUENT_ASSEMBLY_CONSTRAINT.NAME, 
        kind: .explicit, source: .superEntity, mayYieldEntityReference: false)
      entityDef.addAttribute(name: "DIM", keyPath: \eFIXED_CONSTITUENT_ASSEMBLY_CONSTRAINT.DIM, 
        kind: .derived, source: .superEntity, mayYieldEntityReference: false)

      return entityDef
    }

  }
}
