return null;
}
Iterator designsIt = designObjects.iterator();
Set<String> addedNames = new HashSet<String>();
WGDocumentCore core;
List<WGDocumentCore> newList = new ArrayList<WGDocumentCore>();
while (designsIt.hasNext()) {
core = wrapVariantCore((WGDocumentCore) designsIt.next());
// Filter out base versions of variants
if (_lookupVariants) {
String coreName = (String) core.getMetaData(WGDesignDocument.META_NAME);
// If we try to add a doc that already has been added and is NO variant, we know that this is the base version which was
// overwritten by a variant. So we skip it.
if (addedNames.contains(coreName) && !Boolean.TRUE.equals(core.getMetaData(WGDesignDocument.META_VARIANT))) {
continue;
}
else {
addedNames.add(coreName);
}