1 package net.sourceforge.jarbundler; 2 3 import java.lang.String ; 4 5 import java.io.File ; 6 7 import java.util.List ; 8 import java.util.Arrays ; 9 import java.util.ArrayList ; 10 11 63 64 65 public class DocumentType { 66 67 private static final List EMPTYLIST = new ArrayList (0); 68 69 70 public String name = null; 71 72 76 77 public String [] extensions = null; 78 82 83 public String [] osTypes = null; 84 89 90 public String [] mimeTypes = null; 91 92 95 96 public File iconFile = null; 97 114 115 public String role = null; 116 117 122 123 public boolean isBundle = false; 124 125 public void setName(String name) { 127 this.name = name; 128 } 129 130 public String getName() { 131 return name; 132 } 133 134 public void setExtensions(String extensions) { 136 this.extensions = extensions.split("[\\s,]"); 137 } 138 139 public List getExtensions() { 140 return (extensions == null) ? EMPTYLIST : Arrays.asList(extensions); 141 } 142 143 public void setOSTypes(String osTypes) { 145 this.osTypes = osTypes.split("[\\s,]"); 146 } 147 148 public List getOSTypes() { 149 return (osTypes == null) ? EMPTYLIST : Arrays.asList(osTypes); 150 } 151 152 public void setMimeTypes(String mimeTypes) { 154 this.mimeTypes = mimeTypes.split("[\\s,]"); 155 } 156 157 public List getMimeTypes() { 158 return (mimeTypes == null) ? EMPTYLIST : Arrays.asList(this.mimeTypes); 159 } 160 161 public void setIconFile(File iconFile) { 163 this.iconFile = iconFile; 164 } 165 166 public File getIconFile() { 167 return iconFile; 168 } 169 170 public void setRole(String role) { 172 this.role = role; 173 } 174 175 public String getRole() { 176 return role; 177 } 178 179 public void setBundle(boolean isBundle) { 181 this.isBundle = isBundle; 182 } 183 184 public boolean isBundle() { 185 return isBundle; 186 } 187 188 } 189 | Popular Tags |