// user
else if ("user".equals(raw)) {
String login = (String) clipboard.remove("user");
String realm = (String) clipboard.remove("realm");
String name = getCharacters();
User user = new UserImpl(login, realm, name);
clipboard.put("user", user);
}
// date
else if ("date".equals(raw)) {
try {
Date d = dateFormat.parse(getCharacters());
clipboard.put("date", d);
} catch (ParseException e) {
throw new IllegalStateException("Reading date failed: '" + getCharacters() + "'");
}
}
// created
else if ("created".equals(raw)) {
User owner = (User) clipboard.remove("user");
Date date = (Date) clipboard.remove("date");
if (date == null)
throw new IllegalStateException("Creation date not found");
content.setCreationDate(date);
if (owner != null)