List<BackgroundItem> capabilities = new ArrayList<BackgroundItem>(jsonCapabilities.size());
for (Object capability : jsonCapabilities)
{
if (Pattern.matches(REGEXP_PATTERN, (String) capability))
{
capabilities.add(new BackgroundItem((String) capability,
BackgroundItemType.CAPABILITY));
}
else
{
String msg = "Capability: " + (String) capability + " contains invalid characters. "