throw new IllegalArgumentException(
"<resources> must begin with a resource type. Found: " + name);
}
if (PSResource.TYPE_FONT.equals(currentResourceType)) {
String fontname = (String)iter.next();
addResource(new PSResource(name, fontname));
} else if (PSResource.TYPE_FORM.equals(currentResourceType)) {
String formname = (String)iter.next();
addResource(new PSResource(name, formname));
} else if (PSResource.TYPE_PROCSET.equals(currentResourceType)) {
String procname = (String)iter.next();
String version = (String)iter.next();
String revision = (String)iter.next();
addResource(new PSProcSet(procname,
Float.parseFloat(version), Integer.parseInt(revision)));
} else if (PSResource.TYPE_FILE.equals(currentResourceType)) {
String filename = (String)iter.next();
addResource(new PSResource(name, filename));
} else {
throw new IllegalArgumentException("Invalid resource type: " + currentResourceType);
}
}
}