@Test public void testDateStringValidation() throws IllegalArgumentException { String dateString = "2012-01-01T12:00:00-05:00"; assertTrue("DateTime entity validation failed", schema.validate(dateString)); }
@Override protected boolean validate(String fieldName, Object entity, List<ValidationError> errors, Repository<Entity> repo) { boolean isValid; try { javax.xml.bind.DatatypeConverter.parseDate((String) entity); isValid = true; } catch (IllegalArgumentException e2) { isValid = false; } return addError(isValid, fieldName, entity, "RFC 3339 Date", ErrorType.INVALID_DATE_FORMAT, errors); }
DateSchema extends NeutralSchema { @Override protected boolean validate(String fieldName, Object entity, List<ValidationError> errors, Repository<Entity> repo) { boolean isValid; try { javax.xml.bind.DatatypeConverter.parseDate((String) entity); isValid = true; } catch (IllegalArgumentException e2) { isValid = false; } return addError(isValid, fieldName, entity, "RFC 3339 Date", ErrorType.INVALID_DATE_FORMAT, errors); } }
DateSchema extends NeutralSchema { @Override protected boolean validate(String fieldName, Object entity, List<ValidationError> errors, Repository<Entity> repo) { boolean isValid; try { javax.xml.bind.DatatypeConverter.parseDate((String) entity); isValid = true; } catch (IllegalArgumentException e2) { isValid = false; } return addError(isValid, fieldName, entity, "RFC 3339 Date", ErrorType.INVALID_DATE_FORMAT, errors); } DateSchema();  DateSchema(String xsdType); }
DateSchema extends NeutralSchema { @Override protected boolean validate(String fieldName, Object entity, List<ValidationError> errors, Repository<Entity> repo) { boolean isValid; try { javax.xml.bind.DatatypeConverter.parseDate((String) entity); isValid = true; } catch (IllegalArgumentException e2) { isValid = false; } return addError(isValid, fieldName, entity, "RFC 3339 Date", ErrorType.INVALID_DATE_FORMAT, errors); } DateSchema();  DateSchema(String xsdType); @Override NeutralSchemaType getSchemaType(); @Override Object convert(Object value); }
DateSchema extends NeutralSchema { @Override protected boolean validate(String fieldName, Object entity, List<ValidationError> errors, Repository<Entity> repo) { boolean isValid; try { javax.xml.bind.DatatypeConverter.parseDate((String) entity); isValid = true; } catch (IllegalArgumentException e2) { isValid = false; } return addError(isValid, fieldName, entity, "RFC 3339 Date", ErrorType.INVALID_DATE_FORMAT, errors); } DateSchema();  DateSchema(String xsdType); @Override NeutralSchemaType getSchemaType(); @Override Object convert(Object value);  }