Fixing naming for csv

This commit is contained in:
Ioannis Diplas 2019-07-23 09:47:20 +00:00
parent be2b3f15fb
commit 5f23a071f0
1 changed files with 5 additions and 4 deletions

View File

@ -102,11 +102,13 @@ public class PiWikController {
try (PrintWriter writer = new PrintWriter(p.toFile())) {
StringBuilder sb = new StringBuilder();
sb.append(" repositoryid, siteid, authenticationtoken, creationdate, requestorname, requestoremail, validated, validationdate, comment, repositoryname, country \n");
sb.append(" Repository ID , Repository name, Country, Site ID, Authentication token, Creation date, Requestor full name, Requestor email, Validated, Validation date, Comment \n");
for(PiwikInfo piwikInfo : returning){
sb.append(
(piwikInfo.getRepositoryId() == null ? "," : piwikInfo.getRepositoryId()+ ",")+
(piwikInfo.getRepositoryName() == null ? "," : piwikInfo.getRepositoryName()+ ",")+
(piwikInfo.getCountry() == null ? "," : piwikInfo.getCountry()+ ",")+
(piwikInfo.getSiteId() == null ? "," : piwikInfo.getSiteId()+ ",") +
(piwikInfo.getAuthenticationToken() == null ? "," : piwikInfo.getAuthenticationToken()+ ",")+
(piwikInfo.getCreationDate() == null ? "," : piwikInfo.getCreationDate().toString()+ ",") +
@ -114,9 +116,8 @@ public class PiWikController {
(piwikInfo.getRequestorEmail() == null ? "," : piwikInfo.getRequestorEmail()+ ",")+
piwikInfo.isValidated() + "," +
(piwikInfo.getValidationDate() == null ? "," : piwikInfo.getValidationDate().toString()+ ",") +
(piwikInfo.getComment() == null ? "," : piwikInfo.getComment()+ ",") +
(piwikInfo.getRepositoryName() == null ? "," : piwikInfo.getRepositoryName()+ ",")+
(piwikInfo.getCountry() == null ? "\n" : piwikInfo.getCountry()+ "\n")
(piwikInfo.getComment() == null ? "\n" : piwikInfo.getComment()+ "\n")
);
}
writer.write(sb.toString());