Example #1
0
 /**
  * Validates the MemberTypes constraint of '<em>UR Ior Safe CURIE</em>'.
  * <!-- begin-user-doc -->
  * <!-- end-user-doc -->
  *
  * @generated
  */
 public boolean validateURIorSafeCURIE_MemberTypes(
     String urIorSafeCURIE, DiagnosticChain diagnostics, Map<Object, Object> context) {
   if (diagnostics != null) {
     BasicDiagnostic tempDiagnostics = new BasicDiagnostic();
     if (XMLTypePackage.Literals.ANY_URI.isInstance(urIorSafeCURIE)) {
       if (xmlTypeValidator.validateAnyURI(urIorSafeCURIE, tempDiagnostics, context)) return true;
     }
     if (DatatypesPackage.Literals.SAFE_CURIE.isInstance(urIorSafeCURIE)) {
       if (validateSafeCURIE(urIorSafeCURIE, tempDiagnostics, context)) return true;
     }
     for (Diagnostic diagnostic : tempDiagnostics.getChildren()) {
       diagnostics.add(diagnostic);
     }
   } else {
     if (XMLTypePackage.Literals.ANY_URI.isInstance(urIorSafeCURIE)) {
       if (xmlTypeValidator.validateAnyURI(urIorSafeCURIE, null, context)) return true;
     }
     if (DatatypesPackage.Literals.SAFE_CURIE.isInstance(urIorSafeCURIE)) {
       if (validateSafeCURIE(urIorSafeCURIE, null, context)) return true;
     }
   }
   return false;
 }
Example #2
0
 /**
  * Validates the ItemType constraint of '<em>Safe CURI Es</em>'.
  * <!-- begin-user-doc -->
  * <!-- end-user-doc -->
  *
  * @generated
  */
 public boolean validateSafeCURIEs_ItemType(
     List<?> safeCURIEs, DiagnosticChain diagnostics, Map<Object, Object> context) {
   boolean result = true;
   for (Iterator<?> i = safeCURIEs.iterator(); i.hasNext() && (result || diagnostics != null); ) {
     Object item = i.next();
     if (DatatypesPackage.Literals.SAFE_CURIE.isInstance(item)) {
       result &= validateSafeCURIE((String) item, diagnostics, context);
     } else {
       result = false;
       reportDataValueTypeViolation(
           DatatypesPackage.Literals.SAFE_CURIE, item, diagnostics, context);
     }
   }
   return result;
 }