if (doc == null) {
return;
}
MetaDataRegistry registry = null;
try {
boolean canChange = WorkflowUtil.canInvoke(this.manager, getSession(), getLogger(), doc, "edit");
if (!canChange) {
addInfoMessage("cannot-change-metadata");
}
registry = (MetaDataRegistry) this.manager.lookup(MetaDataRegistry.ROLE);
List numbers = new ArrayList();
Map num2namespace = new HashMap();
List keyList = new ArrayList();
String[] namespaces = registry.getNamespaceUris();
for (int nsIndex = 0; nsIndex < namespaces.length; nsIndex++) {
MetaData meta = doc.getMetaData(namespaces[nsIndex]);
String[] keys = meta.getPossibleKeys();
for (int keyIndex = 0; keyIndex < keys.length; keyIndex++) {