1 40 package org.dspace.content; 41 42 48 public class DCSeriesNumber 49 { 50 51 private String series; 52 53 54 private String number; 55 56 57 public DCSeriesNumber() 58 { 59 series = null; 60 number = null; 61 } 62 63 69 public DCSeriesNumber(String value) 70 { 71 this(); 72 73 int semicolon = -1; 74 75 if (value != null) 76 { 77 semicolon = value.indexOf(';'); 78 } 79 80 if (semicolon >= 0) 81 { 82 series = value.substring(0, semicolon); 83 number = value.substring(semicolon + 1); 84 } 85 else 86 { 87 series = value; 88 } 89 } 90 91 99 public DCSeriesNumber(String s, String n) 100 { 101 series = s; 102 number = n; 103 } 104 105 110 public String toString() 111 { 112 if (series == null) 113 { 114 return (null); 115 } 116 else if (number == null) 117 { 118 return (series); 119 } 120 else 121 { 122 return (series + ";" + number); 123 } 124 } 125 126 129 public String getSeries() 130 { 131 return ((series == null) ? "" : series); 132 } 133 134 137 public String getNumber() 138 { 139 return ((number == null) ? "" : number); 140 } 141 } 142 | Popular Tags |