Skip to content

Commit

Permalink
WCAG. Update specification string representation
Browse files Browse the repository at this point in the history
  • Loading branch information
MaximPlusov committed May 2, 2024
1 parent 5f0a01b commit 454c517
Showing 1 changed file with 14 additions and 8 deletions.
22 changes: 14 additions & 8 deletions core/src/main/java/org/verapdf/pdfa/flavours/PDFAFlavour.java
Original file line number Diff line number Diff line change
Expand Up @@ -246,17 +246,23 @@ private String calculateID() {
StringBuilder id = new StringBuilder();
if (SpecificationFamily.WTPDF == this.getFamily() || SpecificationFamily.WCAG == this.getFamily()) {
id.append(this.getFamily().getFamily());
if (this.getPartNumber() != null) {
id.append(" ").append(this.getPartNumber());
if (this.getSubpartNumber() != null) {
id.append(".").append(this.getSubpartNumber());
}
}
} else {
id.append(this.getSeries().getName());
}
if (this.getPartNumber() != null) {
id.append("-").append(this.getPartNumber());
if (this.getSubpartNumber() != null) {
id.append(".").append(this.getSubpartNumber());
if (this.getPartNumber() != null) {
id.append("-").append(this.getPartNumber());
if (this.getSubpartNumber() != null) {
id.append(".").append(this.getSubpartNumber());
}
}
if (this.getYear() != null) {
id.append(":").append(this.getYear());
}
}
if (this.getYear() != null) {
id.append(":").append(this.getYear());
}
return id.toString();
}
Expand Down

0 comments on commit 454c517

Please sign in to comment.