{
    boolean result = gYear.isValid() && "gYear".equals(gYear.getXMLSchemaType().getLocalPart());
    if (!result && diagnostics != null)
    {
      reportXMLGregorianCalendarViolation(XMLTypePackage.Literals.GYEAR, gYear, diagnostics, context);
    }
    return result;
  }