List params = splitParams(value);
Iterator iter = params.iterator();
String name = (String)iter.next();
if (PSResource.TYPE_FONT.equals(name)) {
String fontname = (String)iter.next();
this.resource = new PSResource(name, fontname);
} else if (PSResource.TYPE_PROCSET.equals(name)) {
String procname = (String)iter.next();
String version = (String)iter.next();
String revision = (String)iter.next();
this.resource = new PSProcSet(procname,
Float.parseFloat(version), Integer.parseInt(revision));
} else if (PSResource.TYPE_FILE.equals(name)) {
String filename = (String)iter.next();
this.resource = new PSResource(name, filename);
} else if (PSResource.TYPE_FORM.equals(name)) {
String formname = (String)iter.next();
this.resource = new PSResource(name, formname);
} else if (PSResource.TYPE_PATTERN.equals(name)) {
String patternname = (String)iter.next();
this.resource = new PSResource(name, patternname);
} else if (PSResource.TYPE_ENCODING.equals(name)) {
String encodingname = (String)iter.next();
this.resource = new PSResource(name, encodingname);
} else {
throw new IllegalArgumentException("Invalid resource type: " + name);
}
}