}
// find the capabilities
Iterator iterator = mediaType.getCapabilities().iterator();
while (iterator.hasNext())
{
Capability capability = (Capability) iterator.next();
JSCapability jsCapability = (JSCapability) refs.capabilityMap.get(capability
.getName());
if (jsCapability != null) jsMediaType.getCapabilities().add(jsCapability);
}
refs.mediaMap.put(jsMediaType.getName(), jsMediaType);
snapshot.getMediaTypes().add(jsMediaType);