ArrayList attrSetsList = new ArrayList();
for (int i = 0; i < catIds.length; i++) {
SiteWideCharacteristicsType[] swAttrSets = categoryCSProvider.getSiteWideCharacteristics(String.valueOf(catIds[i]));
if(swAttrSets != null) {
for(int j = 0; j < swAttrSets.length; j++) {
SiteWideCharacteristicsType swAttrSet = swAttrSets[j];
AttributeSet swAst = new AttributeSet();
swAst.setAttributeSetID(swAttrSet.getCharacteristicsSet().getAttributeSetID().intValue());
swAst.setCategoryID(catIds[i]);
swAst.setCategoryOrdinal(i);
swAst.setName(swAttrSet.getCharacteristicsSet().getName());
attrSetsList.add(swAst);
}
}
}
AttributeSet[] retVal = new AttributeSet[attrSetsList.size()];