1 package org.kuali.ole.docstore.model.enums;
2
3
4
5
6
7
8 public enum DocFormat {
9 MARC("marc", "marc"),
10 DUBLIN_CORE("dublin", "dublin_core"),
11 DUBLIN_UNQUALIFIED("dublinunq", "dublin_unqualified"),
12 OLEML("oleml", "oleml"),
13 PDF("pdf", "pdf"),
14 DOC("doc", "doc"),
15 XSLT("xslt", "xslt"),
16 ONIXPL("onixpl", "onixpl");
17
18 private final String code;
19 private final String description;
20
21 private DocFormat(String code, String description) {
22 this.code = code;
23 this.description = description;
24 }
25
26 public String getCode() {
27 return code;
28 }
29
30 public String getDescription() {
31 return description;
32 }
33
34 public boolean isEqualTo(String input) {
35 boolean result = false;
36 if (null == input) {
37 result = false;
38 }
39 else if (input.equalsIgnoreCase(getCode())) {
40 result = true;
41 }
42 else if (input.equalsIgnoreCase(getDescription())) {
43 result = true;
44 }
45 return result;
46 }
47
48 }