Subversion Repositories eFlore/Applications.del

Rev

Rev 352 | Rev 361 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 352 Rev 360
Line 36... Line 36...
36
 
36
 
Line 37... Line 37...
37
	public void chargerImagePrincipale(org.tela_botanica.del.client.modeles.Image image) {
37
	public void chargerImagePrincipale(org.tela_botanica.del.client.modeles.Image image) {
38
 
38
 
-
 
39
		// mots clefs
39
		// mots clefs
40
		String motsClefsConcatenes = "";
40
		String motsClefsConcatenes = "";
41
		try {
-
 
42
			for (String motClef : image.getObservation().getMotsClefs()) {
-
 
43
				motsClefsConcatenes += motClef + ",";
-
 
44
			}
-
 
45
			motsClefsConcatenes = motsClefsConcatenes.subSequence(0, motsClefsConcatenes.lastIndexOf(",")).toString();
41
		for (String motClef : image.getObservation().getMotsClefs()) {
46
		} catch (Exception e) {
42
			motsClefsConcatenes += motClef + ",";
-
 
Line 43... Line 47...
43
		}
47
			// TODO: handle exception
44
		motsClefsConcatenes = motsClefsConcatenes.subSequence(0, motsClefsConcatenes.lastIndexOf(",")).toString();
48
		}
45
 
-
 
46
		// validateurs
-
 
47
		String validateursConcatenes = "";
-
 
48
		for (VoteProtocole observationValidation : image.getVoteProtocoles()) {
49
 
-
 
50
		// validateurs
-
 
51
		String validateursConcatenes = "";
-
 
52
		try {
49
			validateursConcatenes += observationValidation.getContributeur() + ", ";
53
			for (VoteProtocole observationValidation : image.getVoteProtocoles()) {
50
		}
54
				validateursConcatenes += observationValidation.getContributeur() + ", ";
Line 51... Line 55...
51
		try {
55
			}
Line 52... Line 56...
52
			validateursConcatenes = validateursConcatenes.subSequence(0, validateursConcatenes.lastIndexOf(",")).toString();
56
			validateursConcatenes = validateursConcatenes.subSequence(0, validateursConcatenes.lastIndexOf(",")).toString();
53
		} catch (Exception e) {
57
		} catch (Exception e) {
-
 
58
 
54
 
59
		}
55
		}
60
 
56
 
61
		// date derniere validation
57
		// date derniere validation
62
		Date dateDerniereValidation = null;
58
		Date dateDerniereValidation = null;
63
		try {
-
 
64
			for (VoteProtocole observationValidation : image.getVoteProtocoles()) {
59
		for (VoteProtocole observationValidation : image.getVoteProtocoles()) {
65
				if (dateDerniereValidation == null) {
-
 
66
					dateDerniereValidation = observationValidation.getDate();
60
			if (dateDerniereValidation == null) {
67
				} else if (dateDerniereValidation.before(observationValidation.getDate())) {
Line 61... Line 68...
61
				dateDerniereValidation = observationValidation.getDate();
68
					dateDerniereValidation = observationValidation.getDate();
62
			} else if (dateDerniereValidation.before(observationValidation.getDate())) {
69
				}
63
				dateDerniereValidation = observationValidation.getDate();
70
			}