Mercurial > hg > AnnotationManagerN4J
comparison src/main/java/de/mpiwg/itgroup/annotations/restlet/AnnotatorResourceImpl.java @ 95:acd44dfec9c8
added last update field for annotations in database.
author | casties |
---|---|
date | Tue, 10 Feb 2015 18:11:17 +0100 |
parents | cf44d9e1a4a7 |
children | 9140017e8962 |
comparison
equal
deleted
inserted
replaced
94:fcb6fe10e08c | 95:acd44dfec9c8 |
---|---|
608 } | 608 } |
609 /* | 609 /* |
610 * creation date | 610 * creation date |
611 */ | 611 */ |
612 if (annot.getCreated() == null) { | 612 if (annot.getCreated() == null) { |
613 // set creation date | 613 // new - set creation date |
614 SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'"); | 614 SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'"); |
615 String ct = format.format(Calendar.getInstance().getTime()); | 615 String ct = format.format(Calendar.getInstance().getTime()); |
616 annot.setCreated(ct); | 616 annot.setCreated(ct); |
617 } else { | |
618 /* | |
619 * update date | |
620 */ | |
621 // not new - set last update date | |
622 SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'"); | |
623 String ct = format.format(Calendar.getInstance().getTime()); | |
624 annot.setUpdated(ct); | |
617 } | 625 } |
618 | 626 |
619 /* | 627 /* |
620 * create fragment from the first range/area | 628 * create fragment from the first range/area |
621 */ | 629 */ |