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