}
return status;
}
private static PublicationDate getPublicationDate(ModelObject nodeModel, PublicationDate previous) {
ModelString startModel = get(nodeModel, ModelString.class, "visibility", "publication-date", "start");
Date start = (previous == null) ? null : previous.getStart();
if (startModel.isDefined()) {
start = getDate(nodeModel, "visibility", "publication-date", "start");
}
ModelString endModel = get(nodeModel, ModelString.class, "visibility", "publication-date", "end");
Date end = (previous == null) ? null : previous.getEnd();
if (endModel.isDefined()) {
end = getDate(nodeModel, "visibility", "publication-date", "end");
}
if (start != null && end != null) {
return PublicationDate.between(start, end);