1 17 18 19 20 package org.apache.fop.pdf; 21 22 23 public final class PDFAMode { 24 25 26 public static final PDFAMode DISABLED = new PDFAMode("PDF/A disabled"); 27 28 public static final PDFAMode PDFA_1A = new PDFAMode("PDF/A-1a"); 29 30 public static final PDFAMode PDFA_1B = new PDFAMode("PDF/A-1b"); 31 32 private String name; 33 34 38 private PDFAMode(String name) { 39 this.name = name; 40 } 41 42 43 public String getName() { 44 return this.name; 45 } 46 47 48 public boolean isPDFA1LevelB() { 49 return (this != DISABLED); 50 } 52 53 58 public static PDFAMode valueOf(String s) { 59 if (PDFA_1A.getName().equalsIgnoreCase(s)) { 60 return PDFA_1A; 61 } else if (PDFA_1B.getName().equalsIgnoreCase(s)) { 62 return PDFA_1B; 63 } else { 64 return DISABLED; 65 } 66 } 67 68 69 public String toString() { 70 return name; 71 } 72 73 } 74 | Popular Tags |