List<Requires> retval = new ArrayList<Requires>(node.size());
for (IdrefListType idrefList : node) {
@SuppressWarnings("unchecked")
List<String> idrefs = idrefList.getIdref();
DefaultRequires requires = new DefaultRequires();
boolean found = false;
for (String id : idrefs) {
SelectableItem item = getDocument().lookupSelectableItem(id);
if (item == null) {
log.error("required item '"+id+"' not found");
} else {
requires.addSelectableItem(item);
found = true;
}
}
if (found) {
retval.add(requires);