Example #1
0
 /**
  *
  * <!-- begin-user-doc -->
  * <!-- end-user-doc -->
  * <!-- begin-model-doc -->
  * The multiplicity of the ConnectorEnd may not be more general than the multiplicity of the
  * corresponding end of the Association typing the owning Connector, if any.
  * self.compatibleWith(definingEnd)
  *
  * @param connectorEnd The receiving '<em><b>Connector End</b></em>' model object.
  * @param diagnostics The chain of diagnostics to which problems are to be appended.
  * @param context The cache of context-specific information.
  *     <!-- end-model-doc -->
  * @generated
  */
 public static boolean validateMultiplicity(
     ConnectorEnd connectorEnd, DiagnosticChain diagnostics, Map<Object, Object> context) {
   // TODO: implement this method
   // -> specify the condition that violates the invariant
   // -> verify the details of the diagnostic, including severity and message
   // Ensure that you remove @generated or mark it @generated NOT
   if (false) {
     if (diagnostics != null) {
       diagnostics.add(
           new BasicDiagnostic(
               Diagnostic.ERROR,
               UMLValidator.DIAGNOSTIC_SOURCE,
               UMLValidator.CONNECTOR_END__MULTIPLICITY,
               org.eclipse.emf.ecore.plugin.EcorePlugin.INSTANCE.getString(
                   "_UI_GenericInvariant_diagnostic",
                   new Object[] {
                     "validateMultiplicity",
                     org.eclipse.emf.ecore.util.EObjectValidator.getObjectLabel(
                         connectorEnd, context)
                   }), //$NON-NLS-1$ //$NON-NLS-2$
               new Object[] {connectorEnd}));
     }
     return false;
   }
   return true;
 }
 /**
  *
  * <!-- begin-user-doc -->
  * <!-- end-user-doc -->
  *
  * @generated
  */
 public boolean ProvidedInterfaceHaveToConformToComponentType(
     DiagnosticChain diagnostics, Map<Object, Object> context) {
   // TODO: implement this method
   // -> specify the condition that violates the invariant
   // -> verify the details of the diagnostic, including severity and message
   // Ensure that you remove @generated or mark it @generated NOT
   if (false) {
     if (diagnostics != null) {
       diagnostics.add(
           new BasicDiagnostic(
               Diagnostic.ERROR,
               Repository_avValidator.DIAGNOSTIC_SOURCE,
               Repository_avValidator
                   .IMPLEMENTATION_COMPONENT_TYPE__PROVIDED_INTERFACE_HAVE_TO_CONFORM_TO_COMPONENT_TYPE,
               EcorePlugin.INSTANCE.getString(
                   "_UI_GenericInvariant_diagnostic",
                   new Object[] {
                     "ProvidedInterfaceHaveToConformToComponentType",
                     EObjectValidator.getObjectLabel(this, context)
                   }),
               new Object[] {this}));
     }
     return false;
   }
   return true;
 }
  /**
   *
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * <!-- begin-model-doc -->
   *
   * @param encounterEntry The receiving '<em><b>Encounter Entry</b></em>' model object.
   * @param diagnostics The chain of diagnostics to which problems are to be appended.
   * @param context The cache of context-specific information.
   *     <!-- end-model-doc -->
   * @generated
   */
  public static boolean validateEncounterEntryText(
      EncounterEntry encounterEntry, DiagnosticChain diagnostics, Map<Object, Object> context) {

    if (VALIDATE_ENCOUNTER_ENTRY_TEXT__DIAGNOSTIC_CHAIN_MAP__EOCL_INV == null) {
      OCL.Helper helper = EOCL_ENV.createOCLHelper();
      helper.setContext(IHEPackage.Literals.ENCOUNTER_ENTRY);
      try {
        VALIDATE_ENCOUNTER_ENTRY_TEXT__DIAGNOSTIC_CHAIN_MAP__EOCL_INV =
            helper.createInvariant(VALIDATE_ENCOUNTER_ENTRY_TEXT__DIAGNOSTIC_CHAIN_MAP__EOCL_EXP);
      } catch (ParserException pe) {
        throw new UnsupportedOperationException(pe.getLocalizedMessage());
      }
    }
    if (!EOCL_ENV
        .createQuery(VALIDATE_ENCOUNTER_ENTRY_TEXT__DIAGNOSTIC_CHAIN_MAP__EOCL_INV)
        .check(encounterEntry)) {
      if (diagnostics != null) {
        diagnostics.add(
            new BasicDiagnostic(
                Diagnostic.ERROR,
                IHEValidator.DIAGNOSTIC_SOURCE,
                IHEValidator.ENCOUNTER_ENTRY__ENCOUNTER_ENTRY_TEXT,
                IHEPlugin.INSTANCE.getString("EncounterEntryText"),
                new Object[] {encounterEntry}));
      }

      return false;
    }
    return true;
  }
 /**
  *
  * <!-- begin-user-doc -->
  * <!-- end-user-doc -->
  *
  * @generated
  */
 public boolean
     RequiringEntityOfOuterRequiredRoleMustBeTheSameAsTheParentOfTheRequiredDelegationConnector(
         DiagnosticChain diagnostics, Map<Object, Object> context) {
   // TODO: implement this method
   // -> specify the condition that violates the invariant
   // -> verify the details of the diagnostic, including severity and message
   // Ensure that you remove @generated or mark it @generated NOT
   if (false) {
     if (diagnostics != null) {
       diagnostics.add(
           new BasicDiagnostic(
               Diagnostic.ERROR,
               Composition_av_avValidator.DIAGNOSTIC_SOURCE,
               Composition_av_avValidator
                   .REQUIRED_DELEGATION_CONNECTOR__REQUIRING_ENTITY_OF_OUTER_REQUIRED_ROLE_MUST_BE_THE_SAME_AS_THE_PARENT_OF_THE_REQUIRED_DELEGATION_CONNECTOR,
               EcorePlugin.INSTANCE.getString(
                   "_UI_GenericInvariant_diagnostic",
                   new Object[] {
                     "RequiringEntityOfOuterRequiredRoleMustBeTheSameAsTheParentOfTheRequiredDelegationConnector",
                     EObjectValidator.getObjectLabel(this, context)
                   }),
               new Object[] {this}));
     }
     return false;
   }
   return true;
 }
 /**
  *
  * <!-- begin-user-doc -->
  * <!-- end-user-doc -->
  *
  * @generated
  */
 public boolean OneAssemblyContextOrOneEventChannelShouldBeReferred(
     DiagnosticChain diagnostics, Map<Object, Object> context) {
   // TODO: implement this method
   // -> specify the condition that violates the invariant
   // -> verify the details of the diagnostic, including severity and message
   // Ensure that you remove @generated or mark it @generated NOT
   if (false) {
     if (diagnostics != null) {
       diagnostics.add(
           new BasicDiagnostic(
               Diagnostic.ERROR,
               Allocation_pcValidator.DIAGNOSTIC_SOURCE,
               Allocation_pcValidator
                   .ALLOCATION_CONTEXT__ONE_ASSEMBLY_CONTEXT_OR_ONE_EVENT_CHANNEL_SHOULD_BE_REFERRED,
               EcorePlugin.INSTANCE.getString(
                   "_UI_GenericInvariant_diagnostic",
                   new Object[] {
                     "OneAssemblyContextOrOneEventChannelShouldBeReferred",
                     EObjectValidator.getObjectLabel(this, context)
                   }),
               new Object[] {this}));
     }
     return false;
   }
   return true;
 }
 /**
  *
  * <!-- begin-user-doc -->
  * <!-- end-user-doc -->
  *
  * @generated
  */
 public boolean MultipleInternalOccurrenceDescriptionsPerFailureTypeNotAllowed(
     DiagnosticChain diagnostics, Map<Object, Object> context) {
   // TODO: implement this method
   // -> specify the condition that violates the invariant
   // -> verify the details of the diagnostic, including severity and message
   // Ensure that you remove @generated or mark it @generated NOT
   if (false) {
     if (diagnostics != null) {
       diagnostics.add(
           new BasicDiagnostic(
               Diagnostic.ERROR,
               Seff_av_pcValidator.DIAGNOSTIC_SOURCE,
               Seff_av_pcValidator
                   .INTERNAL_ACTION__MULTIPLE_INTERNAL_OCCURRENCE_DESCRIPTIONS_PER_FAILURE_TYPE_NOT_ALLOWED,
               EcorePlugin.INSTANCE.getString(
                   "_UI_GenericInvariant_diagnostic",
                   new Object[] {
                     "MultipleInternalOccurrenceDescriptionsPerFailureTypeNotAllowed",
                     EObjectValidator.getObjectLabel(this, context)
                   }),
               new Object[] {this}));
     }
     return false;
   }
   return true;
 }
 /**
  *
  * <!-- begin-user-doc -->
  * <!-- end-user-doc -->
  *
  * @generated
  */
 public boolean
     RequiredDelegationConnectorandtheconnectedComponentmustbepartofthesamecompositestructure(
         DiagnosticChain diagnostics, Map<Object, Object> context) {
   // TODO: implement this method
   // -> specify the condition that violates the invariant
   // -> verify the details of the diagnostic, including severity and message
   // Ensure that you remove @generated or mark it @generated NOT
   if (false) {
     if (diagnostics != null) {
       diagnostics.add(
           new BasicDiagnostic(
               Diagnostic.ERROR,
               Composition_av_avValidator.DIAGNOSTIC_SOURCE,
               Composition_av_avValidator
                   .REQUIRED_DELEGATION_CONNECTOR__REQUIRED_DELEGATION_CONNECTORANDTHECONNECTED_COMPONENTMUSTBEPARTOFTHESAMECOMPOSITESTRUCTURE,
               EcorePlugin.INSTANCE.getString(
                   "_UI_GenericInvariant_diagnostic",
                   new Object[] {
                     "RequiredDelegationConnectorandtheconnectedComponentmustbepartofthesamecompositestructure",
                     EObjectValidator.getObjectLabel(this, context)
                   }),
               new Object[] {this}));
     }
     return false;
   }
   return true;
 }
 /**
  *
  * <!-- begin-user-doc -->
  * <!-- end-user-doc -->
  * <!-- begin-model-doc -->
  * self.templateId->exists(id : datatypes::II | id.root = '1.3.6.1.4.1.19376.1.5.3.1.4.5.2')
  *
  * @param problemConcernEntry The receiving '<em><b>Problem Concern Entry</b></em>' model object.
  * @param diagnostics The chain of diagnostics to which problems are to be appended.
  * @param context The cache of context-specific information.
  *     <!-- end-model-doc -->
  * @generated
  */
 public static boolean validateProblemConcernEntryTemplateId(
     ProblemConcernEntry problemConcernEntry,
     DiagnosticChain diagnostics,
     Map<Object, Object> context) {
   if (VALIDATE_PROBLEM_CONCERN_ENTRY_TEMPLATE_ID__DIAGNOSTIC_CHAIN_MAP__EOCL_INV == null) {
     OCL.Helper helper = EOCL_ENV.createOCLHelper();
     helper.setContext(IHEPackage.Literals.PROBLEM_CONCERN_ENTRY);
     try {
       VALIDATE_PROBLEM_CONCERN_ENTRY_TEMPLATE_ID__DIAGNOSTIC_CHAIN_MAP__EOCL_INV =
           helper.createInvariant(
               VALIDATE_PROBLEM_CONCERN_ENTRY_TEMPLATE_ID__DIAGNOSTIC_CHAIN_MAP__EOCL_EXP);
     } catch (ParserException pe) {
       throw new UnsupportedOperationException(pe.getLocalizedMessage());
     }
   }
   if (!EOCL_ENV
       .createQuery(VALIDATE_PROBLEM_CONCERN_ENTRY_TEMPLATE_ID__DIAGNOSTIC_CHAIN_MAP__EOCL_INV)
       .check(problemConcernEntry)) {
     if (diagnostics != null) {
       diagnostics.add(
           new BasicDiagnostic(
               Diagnostic.ERROR,
               IHEValidator.DIAGNOSTIC_SOURCE,
               IHEValidator.PROBLEM_CONCERN_ENTRY__PROBLEM_CONCERN_ENTRY_TEMPLATE_ID,
               IHEPlugin.INSTANCE.getString("ProblemConcernEntryTemplateId"),
               new Object[] {problemConcernEntry}));
     }
     return false;
   }
   return true;
 }
  /**
   *
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * <!-- begin-model-doc -->
   *
   * @param languageSpoken The receiving '<em><b>Language Spoken</b></em>' model object.
   * @param diagnostics The chain of diagnostics to which problems are to be appended.
   * @param context The cache of context-specific information.
   *     <!-- end-model-doc -->
   * @generated
   */
  public static boolean validateLanguageSpokenModeCode(
      LanguageSpoken languageSpoken, DiagnosticChain diagnostics, Map<Object, Object> context) {

    if (VALIDATE_LANGUAGE_SPOKEN_MODE_CODE__DIAGNOSTIC_CHAIN_MAP__EOCL_INV == null) {
      OCL.Helper helper = EOCL_ENV.createOCLHelper();
      helper.setContext(HITSPPackage.Literals.LANGUAGE_SPOKEN);
      try {
        VALIDATE_LANGUAGE_SPOKEN_MODE_CODE__DIAGNOSTIC_CHAIN_MAP__EOCL_INV =
            helper.createInvariant(
                VALIDATE_LANGUAGE_SPOKEN_MODE_CODE__DIAGNOSTIC_CHAIN_MAP__EOCL_EXP);
      } catch (ParserException pe) {
        throw new UnsupportedOperationException(pe.getLocalizedMessage());
      }
    }
    if (!EOCL_ENV
        .createQuery(VALIDATE_LANGUAGE_SPOKEN_MODE_CODE__DIAGNOSTIC_CHAIN_MAP__EOCL_INV)
        .check(languageSpoken)) {
      if (diagnostics != null) {
        diagnostics.add(
            new BasicDiagnostic(
                Diagnostic.ERROR,
                HITSPValidator.DIAGNOSTIC_SOURCE,
                HITSPValidator.LANGUAGE_SPOKEN__LANGUAGE_SPOKEN_MODE_CODE,
                HITSPPlugin.INSTANCE.getString("LanguageSpokenModeCode"),
                new Object[] {languageSpoken}));
      }

      return false;
    }
    return true;
  }
Example #10
0
 /**
  * Validates the MemberTypes constraint of '<em>Length</em>'.
  * <!-- begin-user-doc -->
  * <!-- end-user-doc -->
  *
  * @generated
  */
 public boolean validateLength_MemberTypes(
     Object length, DiagnosticChain diagnostics, Map<Object, Object> context) {
   if (diagnostics != null) {
     BasicDiagnostic tempDiagnostics = new BasicDiagnostic();
     if (XMLTypePackage.Literals.NON_NEGATIVE_INTEGER.isInstance(length)) {
       if (xmlTypeValidator.validateNonNegativeInteger(
           (BigInteger) length, tempDiagnostics, context)) return true;
     }
     if (DatatypesPackage.Literals.LENGTH_MEMBER1.isInstance(length)) {
       if (validateLengthMember1((String) length, tempDiagnostics, context)) return true;
     }
     for (Diagnostic diagnostic : tempDiagnostics.getChildren()) {
       diagnostics.add(diagnostic);
     }
   } else {
     if (XMLTypePackage.Literals.NON_NEGATIVE_INTEGER.isInstance(length)) {
       if (xmlTypeValidator.validateNonNegativeInteger((BigInteger) length, null, context))
         return true;
     }
     if (DatatypesPackage.Literals.LENGTH_MEMBER1.isInstance(length)) {
       if (validateLengthMember1((String) length, null, context)) return true;
     }
   }
   return false;
 }
 /**
  *
  * <!-- begin-user-doc -->
  * <!-- end-user-doc -->
  *
  * @generated
  */
 public boolean ThinkTimeInClosedWorkloadNeedsToBeSpecified(
     DiagnosticChain diagnostics, Map<Object, Object> context) {
   // TODO: implement this method
   // -> specify the condition that violates the invariant
   // -> verify the details of the diagnostic, including severity and message
   // Ensure that you remove @generated or mark it @generated NOT
   if (false) {
     if (diagnostics != null) {
       diagnostics.add(
           new BasicDiagnostic(
               Diagnostic.ERROR,
               Usagemodel_av_avValidator.DIAGNOSTIC_SOURCE,
               Usagemodel_av_avValidator
                   .CLOSED_WORKLOAD__THINK_TIME_IN_CLOSED_WORKLOAD_NEEDS_TO_BE_SPECIFIED,
               EcorePlugin.INSTANCE.getString(
                   "_UI_GenericInvariant_diagnostic",
                   new Object[] {
                     "ThinkTimeInClosedWorkloadNeedsToBeSpecified",
                     EObjectValidator.getObjectLabel(this, context)
                   }),
               new Object[] {this}));
     }
     return false;
   }
   return true;
 }
Example #12
0
 /**
  * Validates the MemberTypes constraint of '<em>Frame Target</em>'.
  * <!-- begin-user-doc -->
  * <!-- end-user-doc -->
  *
  * @generated
  */
 public boolean validateFrameTarget_MemberTypes(
     Object frameTarget, DiagnosticChain diagnostics, Map<Object, Object> context) {
   if (diagnostics != null) {
     BasicDiagnostic tempDiagnostics = new BasicDiagnostic();
     if (DatatypesPackage.Literals.FRAME_TARGET_MEMBER0.isInstance(frameTarget)) {
       if (validateFrameTargetMember0((FrameTargetMember0) frameTarget, tempDiagnostics, context))
         return true;
     }
     if (DatatypesPackage.Literals.FRAME_TARGET_MEMBER1.isInstance(frameTarget)) {
       if (validateFrameTargetMember1((String) frameTarget, tempDiagnostics, context)) return true;
     }
     for (Diagnostic diagnostic : tempDiagnostics.getChildren()) {
       diagnostics.add(diagnostic);
     }
   } else {
     if (DatatypesPackage.Literals.FRAME_TARGET_MEMBER0.isInstance(frameTarget)) {
       if (validateFrameTargetMember0((FrameTargetMember0) frameTarget, null, context))
         return true;
     }
     if (DatatypesPackage.Literals.FRAME_TARGET_MEMBER1.isInstance(frameTarget)) {
       if (validateFrameTargetMember1((String) frameTarget, null, context)) return true;
     }
   }
   return false;
 }
 /**
  *
  * <!-- begin-user-doc -->
  * <!-- end-user-doc -->
  * <!-- begin-model-doc -->
  * self.templateId->exists(id : datatypes::II | id.root = '2.16.840.1.113883.3.88.11.83.107')
  *
  * @param historyOfPresentIllness The receiving '<em><b>History Of Present Illness</b></em>' model
  *     object.
  * @param diagnostics The chain of diagnostics to which problems are to be appended.
  * @param context The cache of context-specific information.
  *     <!-- end-model-doc -->
  * @generated
  */
 public static boolean validateHITSPHistoryOfPresentIllnessTemplateId(
     HistoryOfPresentIllness historyOfPresentIllness,
     DiagnosticChain diagnostics,
     Map<Object, Object> context) {
   if (VALIDATE_HITSP_HISTORY_OF_PRESENT_ILLNESS_TEMPLATE_ID__DIAGNOSTIC_CHAIN_MAP__EOCL_INV
       == null) {
     OCL.Helper helper = EOCL_ENV.createOCLHelper();
     helper.setContext(HITSPPackage.Literals.HISTORY_OF_PRESENT_ILLNESS);
     try {
       VALIDATE_HITSP_HISTORY_OF_PRESENT_ILLNESS_TEMPLATE_ID__DIAGNOSTIC_CHAIN_MAP__EOCL_INV =
           helper.createInvariant(
               VALIDATE_HITSP_HISTORY_OF_PRESENT_ILLNESS_TEMPLATE_ID__DIAGNOSTIC_CHAIN_MAP__EOCL_EXP);
     } catch (ParserException pe) {
       throw new UnsupportedOperationException(pe.getLocalizedMessage());
     }
   }
   if (!EOCL_ENV
       .createQuery(
           VALIDATE_HITSP_HISTORY_OF_PRESENT_ILLNESS_TEMPLATE_ID__DIAGNOSTIC_CHAIN_MAP__EOCL_INV)
       .check(historyOfPresentIllness)) {
     if (diagnostics != null) {
       diagnostics.add(
           new BasicDiagnostic(
               Diagnostic.ERROR,
               HITSPValidator.DIAGNOSTIC_SOURCE,
               HITSPValidator
                   .HISTORY_OF_PRESENT_ILLNESS__HITSP_HISTORY_OF_PRESENT_ILLNESS_TEMPLATE_ID,
               HITSPPlugin.INSTANCE.getString("HITSPHistoryOfPresentIllnessTemplateId"),
               new Object[] {historyOfPresentIllness}));
     }
     return false;
   }
   return true;
 }
 /**
  *
  * <!-- begin-user-doc -->
  * <!-- end-user-doc -->
  *
  * @generated
  */
 public boolean value_specification_no_side_effects(
     DiagnosticChain diagnostics, Map<Object, Object> context) {
   // TODO: implement this method
   // -> specify the condition that violates the invariant
   // -> verify the details of the diagnostic, including severity and message
   // Ensure that you remove @generated or mark it @generated NOT
   if (false) {
     if (diagnostics != null) {
       diagnostics.add(
           new BasicDiagnostic(
               Diagnostic.ERROR,
               UmlValidator.DIAGNOSTIC_SOURCE,
               UmlValidator.MULTIPLICITY_ELEMENT__VALUE_SPECIFICATION_NO_SIDE_EFFECTS,
               EcorePlugin.INSTANCE.getString(
                   "_UI_GenericInvariant_diagnostic",
                   new Object[] {
                     "value_specification_no_side_effects",
                     EObjectValidator.getObjectLabel(this, context)
                   }),
               new Object[] {this}));
     }
     return false;
   }
   return true;
 }
  /**
   *
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * <!-- begin-model-doc -->
   *
   * @param patientOnAnticoagulants The receiving '<em><b>Patient On Anticoagulants</b></em>' model
   *     object.
   * @param diagnostics The chain of diagnostics to which problems are to be appended.
   * @param context The cache of context-specific information.
   *     <!-- end-model-doc -->
   * @generated
   */
  public static boolean validatePatientOnAnticoagulantsValue(
      PatientOnAnticoagulants patientOnAnticoagulants,
      DiagnosticChain diagnostics,
      Map<Object, Object> context) {

    if (VALIDATE_PATIENT_ON_ANTICOAGULANTS_VALUE__DIAGNOSTIC_CHAIN_MAP__EOCL_INV == null) {
      OCL.Helper helper = EOCL_ENV.createOCLHelper();
      helper.setContext(EmspcrPackage.Literals.PATIENT_ON_ANTICOAGULANTS);
      try {
        VALIDATE_PATIENT_ON_ANTICOAGULANTS_VALUE__DIAGNOSTIC_CHAIN_MAP__EOCL_INV =
            helper.createInvariant(
                VALIDATE_PATIENT_ON_ANTICOAGULANTS_VALUE__DIAGNOSTIC_CHAIN_MAP__EOCL_EXP);
      } catch (ParserException pe) {
        throw new UnsupportedOperationException(pe.getLocalizedMessage());
      }
    }
    if (!EOCL_ENV
        .createQuery(VALIDATE_PATIENT_ON_ANTICOAGULANTS_VALUE__DIAGNOSTIC_CHAIN_MAP__EOCL_INV)
        .check(patientOnAnticoagulants)) {
      if (diagnostics != null) {
        diagnostics.add(
            new BasicDiagnostic(
                Diagnostic.ERROR,
                EmspcrValidator.DIAGNOSTIC_SOURCE,
                EmspcrValidator.PATIENT_ON_ANTICOAGULANTS__PATIENT_ON_ANTICOAGULANTS_VALUE,
                EmspcrPlugin.INSTANCE.getString("PatientOnAnticoagulantsValue"),
                new Object[] {patientOnAnticoagulants}));
      }

      return false;
    }
    return true;
  }
 /**
  *
  * <!-- begin-user-doc -->
  * <!-- end-user-doc -->
  * <!-- begin-model-doc -->
  * self.templateId->exists(id : datatypes::II | id.root = '1.3.6.1.4.1.19376.1.5.3.1.3.35')
  *
  * @param codedAdvanceDirectivesSection The receiving '<em><b>Coded Advance Directives
  *     Section</b></em>' model object.
  * @param diagnostics The chain of diagnostics to which problems are to be appended.
  * @param context The cache of context-specific information.
  *     <!-- end-model-doc -->
  * @generated
  */
 public static boolean validateCodedAdvanceDirectivesSectionTemplateId(
     CodedAdvanceDirectivesSection codedAdvanceDirectivesSection,
     DiagnosticChain diagnostics,
     Map<Object, Object> context) {
   if (VALIDATE_CODED_ADVANCE_DIRECTIVES_SECTION_TEMPLATE_ID__DIAGNOSTIC_CHAIN_MAP__EOCL_INV
       == null) {
     OCL.Helper helper = EOCL_ENV.createOCLHelper();
     helper.setContext(IHEPackage.Literals.CODED_ADVANCE_DIRECTIVES_SECTION);
     try {
       VALIDATE_CODED_ADVANCE_DIRECTIVES_SECTION_TEMPLATE_ID__DIAGNOSTIC_CHAIN_MAP__EOCL_INV =
           helper.createInvariant(
               VALIDATE_CODED_ADVANCE_DIRECTIVES_SECTION_TEMPLATE_ID__DIAGNOSTIC_CHAIN_MAP__EOCL_EXP);
     } catch (ParserException pe) {
       throw new UnsupportedOperationException(pe.getLocalizedMessage());
     }
   }
   if (!EOCL_ENV
       .createQuery(
           VALIDATE_CODED_ADVANCE_DIRECTIVES_SECTION_TEMPLATE_ID__DIAGNOSTIC_CHAIN_MAP__EOCL_INV)
       .check(codedAdvanceDirectivesSection)) {
     if (diagnostics != null) {
       diagnostics.add(
           new BasicDiagnostic(
               Diagnostic.ERROR,
               IHEValidator.DIAGNOSTIC_SOURCE,
               IHEValidator
                   .CODED_ADVANCE_DIRECTIVES_SECTION__CODED_ADVANCE_DIRECTIVES_SECTION_TEMPLATE_ID,
               IHEPlugin.INSTANCE.getString("CodedAdvanceDirectivesSectionTemplateId"),
               new Object[] {codedAdvanceDirectivesSection}));
     }
     return false;
   }
   return true;
 }
  /**
   *
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * <!-- begin-model-doc -->
   *
   * @param eyesSection The receiving '<em><b>Eyes Section</b></em>' model object.
   * @param diagnostics The chain of diagnostics to which problems are to be appended.
   * @param context The cache of context-specific information.
   *     <!-- end-model-doc -->
   * @generated
   */
  public static boolean validateEyesSectionProblemEntry(
      EyesSection eyesSection, DiagnosticChain diagnostics, Map<Object, Object> context) {

    if (VALIDATE_EYES_SECTION_PROBLEM_ENTRY__DIAGNOSTIC_CHAIN_MAP__EOCL_INV == null) {
      OCL.Helper helper = EOCL_ENV.createOCLHelper();
      helper.setContext(IHEPackage.Literals.EYES_SECTION);
      try {
        VALIDATE_EYES_SECTION_PROBLEM_ENTRY__DIAGNOSTIC_CHAIN_MAP__EOCL_INV =
            helper.createInvariant(
                VALIDATE_EYES_SECTION_PROBLEM_ENTRY__DIAGNOSTIC_CHAIN_MAP__EOCL_EXP);
      } catch (ParserException pe) {
        throw new UnsupportedOperationException(pe.getLocalizedMessage());
      }
    }
    if (!EOCL_ENV
        .createQuery(VALIDATE_EYES_SECTION_PROBLEM_ENTRY__DIAGNOSTIC_CHAIN_MAP__EOCL_INV)
        .check(eyesSection)) {
      if (diagnostics != null) {
        diagnostics.add(
            new BasicDiagnostic(
                Diagnostic.INFO,
                IHEValidator.DIAGNOSTIC_SOURCE,
                IHEValidator.EYES_SECTION__EYES_SECTION_PROBLEM_ENTRY,
                IHEPlugin.INSTANCE.getString("EyesSectionProblemEntry"),
                new Object[] {eyesSection}));
      }

      return false;
    }
    return true;
  }
  /**
   *
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * <!-- begin-model-doc -->
   *
   * @param emsProtocolSection The receiving '<em><b>EMS Protocol Section</b></em>' model object.
   * @param diagnostics The chain of diagnostics to which problems are to be appended.
   * @param context The cache of context-specific information.
   *     <!-- end-model-doc -->
   * @generated
   */
  public static boolean validateEMSProtocolSectionProtocolObservation(
      EMSProtocolSection emsProtocolSection,
      DiagnosticChain diagnostics,
      Map<Object, Object> context) {

    if (VALIDATE_EMS_PROTOCOL_SECTION_PROTOCOL_OBSERVATION__DIAGNOSTIC_CHAIN_MAP__EOCL_INV
        == null) {
      OCL.Helper helper = EOCL_ENV.createOCLHelper();
      helper.setContext(EmspcrPackage.Literals.EMS_PROTOCOL_SECTION);
      try {
        VALIDATE_EMS_PROTOCOL_SECTION_PROTOCOL_OBSERVATION__DIAGNOSTIC_CHAIN_MAP__EOCL_INV =
            helper.createInvariant(
                VALIDATE_EMS_PROTOCOL_SECTION_PROTOCOL_OBSERVATION__DIAGNOSTIC_CHAIN_MAP__EOCL_EXP);
      } catch (ParserException pe) {
        throw new UnsupportedOperationException(pe.getLocalizedMessage());
      }
    }
    if (!EOCL_ENV
        .createQuery(
            VALIDATE_EMS_PROTOCOL_SECTION_PROTOCOL_OBSERVATION__DIAGNOSTIC_CHAIN_MAP__EOCL_INV)
        .check(emsProtocolSection)) {
      if (diagnostics != null) {
        diagnostics.add(
            new BasicDiagnostic(
                Diagnostic.ERROR,
                EmspcrValidator.DIAGNOSTIC_SOURCE,
                EmspcrValidator.EMS_PROTOCOL_SECTION__EMS_PROTOCOL_SECTION_PROTOCOL_OBSERVATION,
                EmspcrPlugin.INSTANCE.getString("EMSProtocolSectionProtocolObservation"),
                new Object[] {emsProtocolSection}));
      }

      return false;
    }
    return true;
  }
 /**
  *
  * <!-- begin-user-doc -->
  * <!-- end-user-doc -->
  *
  * @generated
  */
 public boolean SumOfInternalActionFailureProbabilitiesMustNotExceed1(
     DiagnosticChain diagnostics, Map<Object, Object> context) {
   // TODO: implement this method
   // -> specify the condition that violates the invariant
   // -> verify the details of the diagnostic, including severity and message
   // Ensure that you remove @generated or mark it @generated NOT
   if (false) {
     if (diagnostics != null) {
       diagnostics.add(
           new BasicDiagnostic(
               Diagnostic.ERROR,
               Seff_av_pcValidator.DIAGNOSTIC_SOURCE,
               Seff_av_pcValidator
                   .INTERNAL_ACTION__SUM_OF_INTERNAL_ACTION_FAILURE_PROBABILITIES_MUST_NOT_EXCEED1,
               EcorePlugin.INSTANCE.getString(
                   "_UI_GenericInvariant_diagnostic",
                   new Object[] {
                     "SumOfInternalActionFailureProbabilitiesMustNotExceed1",
                     EObjectValidator.getObjectLabel(this, context)
                   }),
               new Object[] {this}));
     }
     return false;
   }
   return true;
 }
  /**
   *
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * <!-- begin-model-doc -->
   *
   * @param healthStatusObservation2 The receiving '<em><b>Health Status Observation2</b></em>'
   *     model object.
   * @param diagnostics The chain of diagnostics to which problems are to be appended.
   * @param context The cache of context-specific information.
   *     <!-- end-model-doc -->
   * @generated
   */
  public static boolean validateHealthStatusObservationTemplateId(
      HealthStatusObservation2 healthStatusObservation2,
      DiagnosticChain diagnostics,
      Map<Object, Object> context) {

    if (VALIDATE_HEALTH_STATUS_OBSERVATION_TEMPLATE_ID__DIAGNOSTIC_CHAIN_MAP__EOCL_INV == null) {
      OCL.Helper helper = EOCL_ENV.createOCLHelper();
      helper.setContext(ConsolPackage.Literals.HEALTH_STATUS_OBSERVATION2);
      try {
        VALIDATE_HEALTH_STATUS_OBSERVATION_TEMPLATE_ID__DIAGNOSTIC_CHAIN_MAP__EOCL_INV =
            helper.createInvariant(
                VALIDATE_HEALTH_STATUS_OBSERVATION_TEMPLATE_ID__DIAGNOSTIC_CHAIN_MAP__EOCL_EXP);
      } catch (ParserException pe) {
        throw new UnsupportedOperationException(pe.getLocalizedMessage());
      }
    }
    if (!EOCL_ENV
        .createQuery(VALIDATE_HEALTH_STATUS_OBSERVATION_TEMPLATE_ID__DIAGNOSTIC_CHAIN_MAP__EOCL_INV)
        .check(healthStatusObservation2)) {
      if (diagnostics != null) {
        diagnostics.add(
            new BasicDiagnostic(
                Diagnostic.ERROR,
                ConsolValidator.DIAGNOSTIC_SOURCE,
                ConsolValidator.HEALTH_STATUS_OBSERVATION2__HEALTH_STATUS_OBSERVATION_TEMPLATE_ID,
                ConsolPlugin.INSTANCE.getString("HealthStatusObservationTemplateId"),
                new Object[] {healthStatusObservation2}));
      }

      return false;
    }
    return true;
  }
 /**
  *
  * <!-- begin-user-doc -->
  * <!-- end-user-doc -->
  *
  * @generated
  */
 public boolean ComponentOfAssemblyContextAndInnerRoleRequiringComponentNeedToBeTheSame(
     DiagnosticChain diagnostics, Map<Object, Object> context) {
   // TODO: implement this method
   // -> specify the condition that violates the invariant
   // -> verify the details of the diagnostic, including severity and message
   // Ensure that you remove @generated or mark it @generated NOT
   if (false) {
     if (diagnostics != null) {
       diagnostics.add(
           new BasicDiagnostic(
               Diagnostic.ERROR,
               Composition_av_avValidator.DIAGNOSTIC_SOURCE,
               Composition_av_avValidator
                   .REQUIRED_DELEGATION_CONNECTOR__COMPONENT_OF_ASSEMBLY_CONTEXT_AND_INNER_ROLE_REQUIRING_COMPONENT_NEED_TO_BE_THE_SAME,
               EcorePlugin.INSTANCE.getString(
                   "_UI_GenericInvariant_diagnostic",
                   new Object[] {
                     "ComponentOfAssemblyContextAndInnerRoleRequiringComponentNeedToBeTheSame",
                     EObjectValidator.getObjectLabel(this, context)
                   }),
               new Object[] {this}));
     }
     return false;
   }
   return true;
 }
 /**
  *
  * <!-- begin-user-doc -->
  * <!-- end-user-doc -->
  * <!-- begin-model-doc -->
  * An ExpansionRegion must have one or more argument ExpansionNodes and zero or more result
  * ExpansionNodes. true
  *
  * @param expansionRegion The receiving '<em><b>Expansion Region</b></em>' model object.
  * @param diagnostics The chain of diagnostics to which problems are to be appended.
  * @param context The cache of context-specific information.
  *     <!-- end-model-doc -->
  * @generated
  */
 public static boolean validateExpansionNodes(
     ExpansionRegion expansionRegion, DiagnosticChain diagnostics, Map<Object, Object> context) {
   // TODO: implement this method
   // -> specify the condition that violates the invariant
   // -> verify the details of the diagnostic, including severity and message
   // Ensure that you remove @generated or mark it @generated NOT
   if (false) {
     if (diagnostics != null) {
       diagnostics.add(
           new BasicDiagnostic(
               Diagnostic.ERROR,
               UMLValidator.DIAGNOSTIC_SOURCE,
               UMLValidator.EXPANSION_REGION__EXPANSION_NODES,
               org.eclipse.emf.ecore.plugin.EcorePlugin.INSTANCE.getString(
                   "_UI_GenericInvariant_diagnostic",
                   new Object[] {
                     "validateExpansionNodes",
                     org.eclipse.emf.ecore.util.EObjectValidator.getObjectLabel(
                         expansionRegion, context)
                   }), //$NON-NLS-1$ //$NON-NLS-2$
               new Object[] {expansionRegion}));
     }
     return false;
   }
   return true;
 }
 /**
  *
  * <!-- begin-user-doc -->
  * <!-- end-user-doc -->
  *
  * @generated
  */
 public boolean MessageFlowAssociationouterMessageFlowRef(
     DiagnosticChain diagnostics, Map<Object, Object> context) {
   // TODO: implement this method
   // -> specify the condition that violates the invariant
   // -> verify the details of the diagnostic, including severity and message
   // Ensure that you remove @generated or mark it @generated NOT
   if (false) {
     if (diagnostics != null) {
       diagnostics.add(
           new BasicDiagnostic(
               Diagnostic.ERROR,
               BpmnprofValidator.DIAGNOSTIC_SOURCE,
               BpmnprofValidator
                   .MESSAGE_FLOW_ASSOCIATION__MESSAGE_FLOW_ASSOCIATIONOUTER_MESSAGE_FLOW_REF,
               EcorePlugin.INSTANCE.getString(
                   "_UI_GenericInvariant_diagnostic",
                   new Object[] {
                     "MessageFlowAssociationouterMessageFlowRef",
                     EObjectValidator.getObjectLabel(this, context)
                   }),
               new Object[] {this}));
     }
     return false;
   }
   return true;
 }
 /**
  *
  * <!-- begin-user-doc -->
  * <!-- end-user-doc -->
  *
  * @generated
  */
 public boolean EachActionExceptStartActionandStopActionMustHhaveAPredecessorAndSuccessor(
     DiagnosticChain diagnostics, Map<Object, Object> context) {
   // TODO: implement this method
   // -> specify the condition that violates the invariant
   // -> verify the details of the diagnostic, including severity and message
   // Ensure that you remove @generated or mark it @generated NOT
   if (false) {
     if (diagnostics != null) {
       diagnostics.add(
           new BasicDiagnostic(
               Diagnostic.ERROR,
               Seff_pcValidator.DIAGNOSTIC_SOURCE,
               Seff_pcValidator
                   .RESOURCE_DEMANDING_BEHAVIOUR__EACH_ACTION_EXCEPT_START_ACTIONAND_STOP_ACTION_MUST_HHAVE_APREDECESSOR_AND_SUCCESSOR,
               EcorePlugin.INSTANCE.getString(
                   "_UI_GenericInvariant_diagnostic",
                   new Object[] {
                     "EachActionExceptStartActionandStopActionMustHhaveAPredecessorAndSuccessor",
                     EObjectValidator.getObjectLabel(this, context)
                   }),
               new Object[] {this}));
     }
     return false;
   }
   return true;
 }
  /**
   *
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * <!-- begin-model-doc -->
   *
   * @param nutritionRecommendations The receiving '<em><b>Nutrition Recommendations</b></em>' model
   *     object.
   * @param diagnostics The chain of diagnostics to which problems are to be appended.
   * @param context The cache of context-specific information.
   *     <!-- end-model-doc -->
   * @generated
   */
  public static boolean validateNutritionRecommendationsEffectiveTime(
      NutritionRecommendations nutritionRecommendations,
      DiagnosticChain diagnostics,
      Map<Object, Object> context) {

    if (VALIDATE_NUTRITION_RECOMMENDATIONS_EFFECTIVE_TIME__DIAGNOSTIC_CHAIN_MAP__EOCL_INV == null) {
      OCL.Helper helper = EOCL_ENV.createOCLHelper();
      helper.setContext(ConsolPackage.Literals.NUTRITION_RECOMMENDATIONS);
      try {
        VALIDATE_NUTRITION_RECOMMENDATIONS_EFFECTIVE_TIME__DIAGNOSTIC_CHAIN_MAP__EOCL_INV =
            helper.createInvariant(
                VALIDATE_NUTRITION_RECOMMENDATIONS_EFFECTIVE_TIME__DIAGNOSTIC_CHAIN_MAP__EOCL_EXP);
      } catch (ParserException pe) {
        throw new UnsupportedOperationException(pe.getLocalizedMessage());
      }
    }
    if (!EOCL_ENV
        .createQuery(
            VALIDATE_NUTRITION_RECOMMENDATIONS_EFFECTIVE_TIME__DIAGNOSTIC_CHAIN_MAP__EOCL_INV)
        .check(nutritionRecommendations)) {
      if (diagnostics != null) {
        diagnostics.add(
            new BasicDiagnostic(
                Diagnostic.WARNING,
                ConsolValidator.DIAGNOSTIC_SOURCE,
                ConsolValidator.NUTRITION_RECOMMENDATIONS__NUTRITION_RECOMMENDATIONS_EFFECTIVE_TIME,
                ConsolPlugin.INSTANCE.getString("NutritionRecommendationsEffectiveTime"),
                new Object[] {nutritionRecommendations}));
      }

      return false;
    }
    return true;
  }
  /**
   *
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * <!-- begin-model-doc -->
   *
   * @param selfCareActivities The receiving '<em><b>Self Care Activities</b></em>' model object.
   * @param diagnostics The chain of diagnostics to which problems are to be appended.
   * @param context The cache of context-specific information.
   *     <!-- end-model-doc -->
   * @generated
   */
  public static boolean validateSelfCareActivitiesValueP(
      SelfCareActivities selfCareActivities,
      DiagnosticChain diagnostics,
      Map<Object, Object> context) {

    if (VALIDATE_SELF_CARE_ACTIVITIES_VALUE_P__DIAGNOSTIC_CHAIN_MAP__EOCL_INV == null) {
      OCL.Helper helper = EOCL_ENV.createOCLHelper();
      helper.setContext(ConsolPackage.Literals.SELF_CARE_ACTIVITIES);
      try {
        VALIDATE_SELF_CARE_ACTIVITIES_VALUE_P__DIAGNOSTIC_CHAIN_MAP__EOCL_INV =
            helper.createInvariant(
                VALIDATE_SELF_CARE_ACTIVITIES_VALUE_P__DIAGNOSTIC_CHAIN_MAP__EOCL_EXP);
      } catch (ParserException pe) {
        throw new UnsupportedOperationException(pe.getLocalizedMessage());
      }
    }
    if (!EOCL_ENV
        .createQuery(VALIDATE_SELF_CARE_ACTIVITIES_VALUE_P__DIAGNOSTIC_CHAIN_MAP__EOCL_INV)
        .check(selfCareActivities)) {
      if (diagnostics != null) {
        diagnostics.add(
            new BasicDiagnostic(
                Diagnostic.ERROR,
                ConsolValidator.DIAGNOSTIC_SOURCE,
                ConsolValidator.SELF_CARE_ACTIVITIES__SELF_CARE_ACTIVITIES_VALUE_P,
                ConsolPlugin.INSTANCE.getString("SelfCareActivitiesValueP"),
                new Object[] {selfCareActivities}));
      }

      return false;
    }
    return true;
  }
 /**
  *
  * <!-- begin-user-doc -->
  * <!-- end-user-doc -->
  * <!-- begin-model-doc -->
  * not self.statusCode.oclIsUndefined() and self.statusCode.oclIsKindOf(datatypes::CS) and let
  * value : datatypes::CS = self.statusCode.oclAsType(datatypes::CS) in ( value.code = 'completed')
  *
  * @param familyHistoryObservation The receiving '<em><b>Family History Observation</b></em>'
  *     model object.
  * @param diagnostics The chain of diagnostics to which problems are to be appended.
  * @param context The cache of context-specific information.
  *     <!-- end-model-doc -->
  * @generated
  */
 public static boolean validateFamilyHistoryObservationStatusCode(
     FamilyHistoryObservation familyHistoryObservation,
     DiagnosticChain diagnostics,
     Map<Object, Object> context) {
   if (VALIDATE_FAMILY_HISTORY_OBSERVATION_STATUS_CODE__DIAGNOSTIC_CHAIN_MAP__EOCL_INV == null) {
     OCL.Helper helper = EOCL_ENV.createOCLHelper();
     helper.setContext(CCDPackage.Literals.FAMILY_HISTORY_OBSERVATION);
     try {
       VALIDATE_FAMILY_HISTORY_OBSERVATION_STATUS_CODE__DIAGNOSTIC_CHAIN_MAP__EOCL_INV =
           helper.createInvariant(
               VALIDATE_FAMILY_HISTORY_OBSERVATION_STATUS_CODE__DIAGNOSTIC_CHAIN_MAP__EOCL_EXP);
     } catch (ParserException pe) {
       throw new UnsupportedOperationException(pe.getLocalizedMessage());
     }
   }
   if (!EOCL_ENV
       .createQuery(
           VALIDATE_FAMILY_HISTORY_OBSERVATION_STATUS_CODE__DIAGNOSTIC_CHAIN_MAP__EOCL_INV)
       .check(familyHistoryObservation)) {
     if (diagnostics != null) {
       diagnostics.add(
           new BasicDiagnostic(
               Diagnostic.ERROR,
               CCDValidator.DIAGNOSTIC_SOURCE,
               CCDValidator.FAMILY_HISTORY_OBSERVATION__FAMILY_HISTORY_OBSERVATION_STATUS_CODE,
               CCDPlugin.INSTANCE.getString("FamilyHistoryObservationStatusCode"),
               new Object[] {familyHistoryObservation}));
     }
     return false;
   }
   return true;
 }
  /**
   *
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * <!-- begin-model-doc -->
   *
   * @param infantTransfer The receiving '<em><b>Infant Transfer</b></em>' model object.
   * @param diagnostics The chain of diagnostics to which problems are to be appended.
   * @param context The cache of context-specific information.
   *     <!-- end-model-doc -->
   * @generated
   */
  public static boolean validateInfantTransferParticipant(
      InfantTransfer infantTransfer, DiagnosticChain diagnostics, Map<Object, Object> context) {

    if (VALIDATE_INFANT_TRANSFER_PARTICIPANT__DIAGNOSTIC_CHAIN_MAP__EOCL_INV == null) {
      OCL.Helper helper = EOCL_ENV.createOCLHelper();
      helper.setContext(VsbrPackage.Literals.INFANT_TRANSFER);
      try {
        VALIDATE_INFANT_TRANSFER_PARTICIPANT__DIAGNOSTIC_CHAIN_MAP__EOCL_INV =
            helper.createInvariant(
                VALIDATE_INFANT_TRANSFER_PARTICIPANT__DIAGNOSTIC_CHAIN_MAP__EOCL_EXP);
      } catch (ParserException pe) {
        throw new UnsupportedOperationException(pe.getLocalizedMessage());
      }
    }
    if (!EOCL_ENV
        .createQuery(VALIDATE_INFANT_TRANSFER_PARTICIPANT__DIAGNOSTIC_CHAIN_MAP__EOCL_INV)
        .check(infantTransfer)) {
      if (diagnostics != null) {
        diagnostics.add(
            new BasicDiagnostic(
                Diagnostic.INFO,
                VsbrValidator.DIAGNOSTIC_SOURCE,
                VsbrValidator.INFANT_TRANSFER__INFANT_TRANSFER_PARTICIPANT,
                VsbrPlugin.INSTANCE.getString("InfantTransferParticipant"),
                new Object[] {infantTransfer}));
      }

      return false;
    }
    return true;
  }
  /**
   *
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * <!-- begin-model-doc -->
   *
   * @param reasonForVisitSection The receiving '<em><b>Reason For Visit Section</b></em>' model
   *     object.
   * @param diagnostics The chain of diagnostics to which problems are to be appended.
   * @param context The cache of context-specific information.
   *     <!-- end-model-doc -->
   * @generated
   */
  public static boolean validateReasonForVisitSectionTitle(
      ReasonForVisitSection reasonForVisitSection,
      DiagnosticChain diagnostics,
      Map<Object, Object> context) {

    if (VALIDATE_REASON_FOR_VISIT_SECTION_TITLE__DIAGNOSTIC_CHAIN_MAP__EOCL_INV == null) {
      OCL.Helper helper = EOCL_ENV.createOCLHelper();
      helper.setContext(ConsolPackage.Literals.REASON_FOR_VISIT_SECTION);
      try {
        VALIDATE_REASON_FOR_VISIT_SECTION_TITLE__DIAGNOSTIC_CHAIN_MAP__EOCL_INV =
            helper.createInvariant(
                VALIDATE_REASON_FOR_VISIT_SECTION_TITLE__DIAGNOSTIC_CHAIN_MAP__EOCL_EXP);
      } catch (ParserException pe) {
        throw new UnsupportedOperationException(pe.getLocalizedMessage());
      }
    }
    if (!EOCL_ENV
        .createQuery(VALIDATE_REASON_FOR_VISIT_SECTION_TITLE__DIAGNOSTIC_CHAIN_MAP__EOCL_INV)
        .check(reasonForVisitSection)) {
      if (diagnostics != null) {
        diagnostics.add(
            new BasicDiagnostic(
                Diagnostic.ERROR,
                ConsolValidator.DIAGNOSTIC_SOURCE,
                ConsolValidator.REASON_FOR_VISIT_SECTION__REASON_FOR_VISIT_SECTION_TITLE,
                ConsolPlugin.INSTANCE.getString("ReasonForVisitSectionTitle"),
                new Object[] {reasonForVisitSection}));
      }

      return false;
    }
    return true;
  }
Example #30
0
 /**
  *
  * <!-- begin-user-doc -->
  * <!-- end-user-doc -->
  * <!-- begin-model-doc -->
  *
  * @param cr The receiving '<em><b>CR</b></em>' model object.
  * @param diagnostics The chain of diagnostics to which problems are to be appended.
  * @param context The cache of context-specific information.
  *     <!-- end-model-doc -->
  * @generated
  */
 public static boolean validateCR(
     CR cr, DiagnosticChain diagnostics, Map<Object, Object> context) {
   if (VALIDATE_CR__DIAGNOSTIC_CHAIN_MAP__EOCL_INV == null) {
     OCL.Helper helper = EOCL_ENV.createOCLHelper();
     helper.setContext(DatatypesPackage.Literals.CR);
     try {
       VALIDATE_CR__DIAGNOSTIC_CHAIN_MAP__EOCL_INV =
           helper.createInvariant(VALIDATE_CR__DIAGNOSTIC_CHAIN_MAP__EOCL_EXP);
     } catch (ParserException pe) {
       throw new UnsupportedOperationException(pe.getLocalizedMessage());
     }
   }
   if (!EOCL_ENV.createQuery(VALIDATE_CR__DIAGNOSTIC_CHAIN_MAP__EOCL_INV).check(cr)) {
     if (diagnostics != null) {
       diagnostics.add(
           new BasicDiagnostic(
               Diagnostic.ERROR,
               DatatypesValidator.DIAGNOSTIC_SOURCE,
               DatatypesValidator.CR__CR,
               org.eclipse.emf.ecore.plugin.EcorePlugin.INSTANCE.getString(
                   "_UI_GenericInvariant_diagnostic",
                   new Object[] {
                     "validateCR",
                     org.eclipse.emf.ecore.util.EObjectValidator.getObjectLabel(cr, context)
                   }),
               new Object[] {cr}));
     }
     return false;
   }
   return true;
 }