// dups are 1-based. I am aware that this is horrible.
String name = itemNode.getAttribute("name");
boolean duplicate = node.selectNodes("./item[@name='" + name + "']").size() > 1;
int dupItemId = duplicate ? (getItems(name).size() + 1) : 0;
NSFItem item = DXLItemFactory.create(itemNode, dupItemId);
if (item != null) {
items_.add(item);
if (!itemsByName_.containsKey(name)) {
itemsByName_.put(name, new ArrayList<NSFItem>());
}
itemsByName_.get(name).add(item);
if (DEBUG) {
System.out.print("\t\t[" + item.getType());
System.out.print(", Class: " + item.getClass().getSimpleName());
System.out.print(", Dup ID: " + item.getDupItemId());
System.out.print(", Value: " + item.getValue());
System.out.println("]");
// Output composite data
if (item instanceof DXLItemComposite) {
CData cdata = ((DXLItemComposite) item).getValue();