public void loadProperties(DominoDocument d, Category cat, String name) throws NotesException, IOException {
if(cat==null) {
return;
}
boolean isDefault = StringUtil.isEmpty(name) || StringUtil.equals(name, "0");
PropertyValues pv = isDefault? null : cat.getPropertyValues(name);
Property[] allp = cat.getProperties();
for(int i=0; i<allp.length; i++) {
Property p = allp[i];
if(pv==null) {
String v = p.getDefaultValue();
d.replaceItemValue(p.getName(), v);
} else {
String v = pv.getValues()[i];
d.replaceItemValue(p.getName(), v);
}
}
}