Revision 53034
Added by Tsampikos Livisianos over 5 years ago
Serializer.java | ||
---|---|---|
503 | 503 |
} |
504 | 504 |
|
505 | 505 |
|
506 |
/* |
|
506 | 507 |
private static String getBestLicense(Result result) { |
507 | 508 |
Qualifier bestLicense = null; |
508 | 509 |
LicenseComparator lc = new LicenseComparator(); |
509 | 510 |
for (Instance instance : (result.getInstanceList())) { |
511 |
if (lc.compare(bestLicense, instance.getLicence()) > 0) { |
|
512 |
bestLicense = instance.getLicence(); |
|
513 |
} |
|
514 |
} |
|
515 |
if (bestLicense != null) { |
|
516 |
return bestLicense.getClassname(); |
|
517 |
} else { |
|
518 |
return null; |
|
519 |
} |
|
520 |
} |
|
521 |
|
|
522 |
// TODO here iterate over all values |
|
523 |
private static String getAccessMode(Result result) { |
|
524 |
String accessMode = " "; |
|
525 |
for (Instance instance : (result.getInstanceList())) { |
|
526 |
if (instance.getLicence().getClassname() != null && !instance.getLicence().getClassname().isEmpty()) { |
|
527 |
accessMode = instance.getLicence().getClassname(); |
|
528 |
break; |
|
529 |
} |
|
530 |
|
|
531 |
} |
|
532 |
|
|
533 |
return accessMode; |
|
534 |
} |
|
535 |
*/ |
|
536 |
|
|
537 |
private static String getBestLicense(Result result) { |
|
538 |
Qualifier bestLicense = null; |
|
539 |
LicenseComparator lc = new LicenseComparator(); |
|
540 |
for (Instance instance : (result.getInstanceList())) { |
|
510 | 541 |
if (lc.compare(bestLicense, instance.getAccessright()) > 0) { |
511 | 542 |
bestLicense = instance.getAccessright(); |
512 | 543 |
} |
... | ... | |
777 | 808 |
} else { |
778 | 809 |
data = data.replace(DELIM, " "); |
779 | 810 |
data = data.replace(ENCLOSING, " "); |
811 |
data = data.replaceAll("\\r\\n|\\r|\\n", ""); |
|
780 | 812 |
return ENCLOSING + data + ENCLOSING + DELIM; |
781 | 813 |
} |
782 | 814 |
} |
Also available in: Unified diff
fix accessmode/license