Package org.eclipse.emf.ecore

Examples of org.eclipse.emf.ecore.EValidator.validate()


        if (entryFeature instanceof EAttribute &&
              ExtendedMetaData.INSTANCE.getAffiliation(eClass, entryFeature) == eAttribute)
        {
          EDataType entryType = (EDataType)entryFeature.getEType();
          Object entryValue = entry.getValue();
          boolean entryIsValid = rootValidator.validate(entryType, entryValue, null, context);
          if (!entryIsValid)
          {
            result = false;
            if (diagnostics != null)
            {
View Full Code Here


              if (entryFeatureDiagnostic == null)
              {
                entryFeatureDiagnostic = createBadDataValueDiagnostic(eObject, (EAttribute)entryFeature, diagnostics, context);
                entryFeatureToDiagnosticChainMap.put(entryFeature, entryFeatureDiagnostic);
              }
              rootValidator.validate(entryType, entryValue, entryFeatureDiagnostic, context);
            }
          }
        }
      }
    }
View Full Code Here

    }
    else if (eAttribute.isMany())
    {
      for (Iterator<?> i = ((List<?>)value).iterator(); i.hasNext() && result; )
      {
        result &= rootValidator.validate(eDataType, i.next(), null, context);
      }

      if (!result && diagnostics != null)
      {
        DiagnosticChain diagnostic = createBadDataValueDiagnostic(eObject, eAttribute, diagnostics, context);
View Full Code Here

      if (!result && diagnostics != null)
      {
        DiagnosticChain diagnostic = createBadDataValueDiagnostic(eObject, eAttribute, diagnostics, context);
        for (Iterator<?> i = ((List<?>)value).iterator(); i.hasNext(); )
        {
          rootValidator.validate(eDataType, i.next(), diagnostic, context);
        }
      }
    }
    else if (value != null)
    {
View Full Code Here

        }
      }
    }
    else if (value != null)
    {
      result = rootValidator.validate(eDataType, value, null, context);
      if (!result && diagnostics != null)
      {
        DiagnosticChain diagnostic = createBadDataValueDiagnostic(eObject, eAttribute, diagnostics, context);
        rootValidator.validate(eDataType, value, diagnostic, context);
      }
View Full Code Here

    {
      result = rootValidator.validate(eDataType, value, null, context);
      if (!result && diagnostics != null)
      {
        DiagnosticChain diagnostic = createBadDataValueDiagnostic(eObject, eAttribute, diagnostics, context);
        rootValidator.validate(eDataType, value, diagnostic, context);
      }
    }

    return result;
  }
View Full Code Here

      }
     
      if (builtinType != null)
      {
        EValidator rootValidator = getRootEValidator(context);
        result &= rootValidator.validate(builtinType, value, diagnostics, context);
      }

      return result;
    }
View Full Code Here

        if (itemType != null)
        {
          EValidator rootValidator = getRootEValidator(context);
          for (Iterator< ? > i = ((List< ? >)value).iterator(); i.hasNext() && (result || diagnostics != null);)
          {
            result &= rootValidator.validate(itemType, i.next(), diagnostics, context);
          }
          return result;
        }
        else if (!memberTypes.isEmpty())
        {
View Full Code Here

        {
          EValidator rootValidator = getRootEValidator(context);

          for (EDataType memberType : memberTypes)
          {
            if (rootValidator.validate(memberType, value, null, context))
            {
              return true;
            }
          }
          for (EDataType memberType : memberTypes)
View Full Code Here

          }
          for (EDataType memberType : memberTypes)
          {
            if (memberType.isInstance(value))
            {
              return rootValidator.validate(memberType, value, diagnostics, context);
            }
          }
          return false;
        }
        else
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.