19 package org.turro.dossier.entity;
21 import java.util.EnumMap;
23 import org.turro.elephant.util.Images;
38 private final boolean individuals, votes,
secret;
39 private static final Map<DossierType, String> name;
41 name =
new EnumMap<DossierType, String>(
DossierType.class);
42 name.put(TYPE_DOSSIER,
"Dossier");
43 name.put(TYPE_PROPOSAL,
"Proposal");
44 name.put(TYPE_SECRET_PROPOSAL,
"Secret proposal");
45 name.put(TYPE_ELECTION,
"Election");
46 name.put(TYPE_SECRET_ELECTION,
"Secret election");
47 name.put(TYPE_PROJECT,
"Project");
49 private static final Map<DossierType, String> participant;
51 participant =
new EnumMap<DossierType, String>(
DossierType.class);
52 participant.put(TYPE_DOSSIER,
"Participant");
53 participant.put(TYPE_PROPOSAL,
"Participant");
54 participant.put(TYPE_SECRET_PROPOSAL,
"Participant");
55 participant.put(TYPE_ELECTION,
"Participant");
56 participant.put(TYPE_SECRET_ELECTION,
"Participant");
57 participant.put(TYPE_PROJECT,
"Participant");
59 private static final Map<DossierType, String> issue;
61 issue =
new EnumMap<DossierType, String>(
DossierType.class);
62 issue.put(TYPE_DOSSIER,
"Issue");
63 issue.put(TYPE_PROPOSAL,
"lObjective");
64 issue.put(TYPE_SECRET_PROPOSAL,
"lObjective");
65 issue.put(TYPE_ELECTION,
"lOpposition");
66 issue.put(TYPE_SECRET_ELECTION,
"lOpposition");
67 issue.put(TYPE_PROJECT,
"lObjective");
69 private static final Map<DossierType, String> image;
71 image =
new EnumMap<DossierType, String>(
DossierType.class);
72 image.put(TYPE_DOSSIER,
"dossier");
73 image.put(TYPE_PROPOSAL,
"dossier");
74 image.put(TYPE_SECRET_PROPOSAL,
"dossier");
75 image.put(TYPE_ELECTION,
"dossier");
76 image.put(TYPE_SECRET_ELECTION,
"dossier");
77 image.put(TYPE_PROJECT,
"dossier");
80 private DossierType(
boolean individuals,
boolean votes,
boolean secret) {
81 this.individuals = individuals;
87 return name.get(
this);
91 return participant.get(
this);
95 return issue.get(
this);
static String get64Image(String image)
static String getImage(String image)