public class ImportExportService extends Object
| Constructor and Description |
|---|
ImportExportService() |
| Modifier and Type | Method and Description |
|---|---|
String |
exportToXml(PollExportDTO exportPoll)
Export the given poll to an xml representation.
|
PollExportDTO |
importFromXml(File file)
Import into a
PollExportDTO his xml representation from the
given file. |
protected List<ChoiceDTO> |
toChoices(List<org.jdom.Element> listChoices) |
protected List<CommentDTO> |
toComments(List<org.jdom.Element> listComments) |
protected org.jdom.Element |
toDOM(ChoiceDTO choice) |
protected org.jdom.Element |
toDOM(CommentDTO comment) |
protected org.jdom.Element |
toDOM(PollChoiceDTO pollChoice) |
protected org.jdom.Document |
toDOM(PollExportDTO exportPoll) |
protected org.jdom.Element |
toDOM(VoteCountingResultDTO voteCountingResults) |
protected org.jdom.Element |
toDOM(VotingGroupDTO group) |
protected org.jdom.Element |
toDOM(VotingPersonDTO votingPerson) |
protected PollExportDTO |
toDTO(org.jdom.Element racine) |
protected List<PollChoiceDTO> |
toPollChoices(List<org.jdom.Element> listPollChoices) |
protected List<VoteCountingResultDTO> |
toVoteCountingResults(List<org.jdom.Element> listVoteCountingResults) |
protected List<VoteToChoiceDTO> |
toVoteToChoices(List<org.jdom.Element> listVoteToChoices) |
protected List<VotingGroupDTO> |
toVotingGroups(List<org.jdom.Element> listGroups) |
protected List<VotingPersonDTO> |
toVotingPersons(List<org.jdom.Element> listVotingPersons) |
public static final String POLL
public static final String TITLE1
public static final String TITLE
public static final String CHOICE
public static final String ID_CHOICE
public static final String VALUE
public static final String PERCENTAGE
public static final String NB_VOTES
public static final String IS_BY_GROUP
public static final String CHOICES
public static final String CHOICE_RESULT
public static final String ID_POLL
public static final String VOTE_COUNTING_RESULT
public static final String DESCRIPTION
public static final String NAME
public static final String POLL_CHOICE
public static final String VOTING_PERSON
public static final String VOTING_ID
public static final String WEIGHT
public static final String EMAIL
public static final String COMMENT
public static final String VOTING_PERSONS
public static final String ID_GROUP
public static final String GROUP
public static final String POLL_CHOICES
public static final String VOTE_COUNTING_RESULTS
public static final String GROUPS
public static final String COMMENTS
public static final String CREATOR_ID
public static final String CREATOR_EMAIL
public static final String MAX_CHOICE_NB
public static final String POLL_EXPORT
public static final String POLL_ID
public static final String POLL_TYPE
public static final String CHOICE_TYPE
public static final String VOTE_COUNTING
public static final String CLOSED
public static final String CHOICE_ADD_ALLOWED
public static final String ANONYMOUS_VOTE_ALLOWED
public static final String ANONYMOUS
public static final String PUBLIC_RESULTS
public static final String CONTINUOUS_RESULTS
public static final String VALUE_TRUE
public static final String VALUE_FALSE
public String exportToXml(PollExportDTO exportPoll)
exportPoll - the poll to exportpublic PollExportDTO importFromXml(File file) throws org.jdom.JDOMException, IOException
PollExportDTO his xml representation from the
given file.file - file to loadorg.jdom.JDOMException - if could not load xml from fileIOException - if could not load the fileprotected PollExportDTO toDTO(org.jdom.Element racine)
protected List<CommentDTO> toComments(List<org.jdom.Element> listComments)
protected List<VotingGroupDTO> toVotingGroups(List<org.jdom.Element> listGroups)
protected List<VotingPersonDTO> toVotingPersons(List<org.jdom.Element> listVotingPersons)
protected List<VoteToChoiceDTO> toVoteToChoices(List<org.jdom.Element> listVoteToChoices)
protected List<PollChoiceDTO> toPollChoices(List<org.jdom.Element> listPollChoices)
protected List<VoteCountingResultDTO> toVoteCountingResults(List<org.jdom.Element> listVoteCountingResults)
protected org.jdom.Document toDOM(PollExportDTO exportPoll)
protected org.jdom.Element toDOM(CommentDTO comment)
protected org.jdom.Element toDOM(VotingGroupDTO group)
protected org.jdom.Element toDOM(VotingPersonDTO votingPerson)
protected org.jdom.Element toDOM(PollChoiceDTO pollChoice)
protected org.jdom.Element toDOM(VoteCountingResultDTO voteCountingResults)
protected org.jdom.Element toDOM(ChoiceDTO choice)
Copyright © 2009-2012 CodeLutin. All Rights Reserved.