if ((capabilities != null) && (capabilities.size() > 0))
{
Iterator capabilityIterator = capabilities.iterator();
while (capabilityIterator.hasNext())
{
JSCapability jsCapability = (JSCapability) capabilityIterator.next();
// create a new Capability
try
{
Capability capability = caps.createCapability(jsCapability.getName());
/**
* THE KEY_OVERWRITE_EXISTING test is not required for
* capabilites, since they carry no other information than
* the name Used here for consistency, though
*/