Index: gs3-extensions/iiif-servlet/trunk/src/gsdl-src/java/org/greenstone/gsdl3/service/IIIFPMH.java
===================================================================
--- gs3-extensions/iiif-servlet/trunk/src/gsdl-src/java/org/greenstone/gsdl3/service/IIIFPMH.java	(revision 32874)
+++ gs3-extensions/iiif-servlet/trunk/src/gsdl-src/java/org/greenstone/gsdl3/service/IIIFPMH.java	(revision 32883)
@@ -23,5 +23,4 @@
 import org.greenstone.gsdl3.util.GSXML;
 import org.greenstone.gsdl3.util.IIIFXML;
-//import org.greenstone.gsdl3.util.OAIXML; // ****
 import org.greenstone.gsdl3.util.OID;
 import org.greenstone.gsdl3.util.GSFile;
@@ -67,10 +66,6 @@
   // set this up during configure
   protected Element list_sets_response = null;
-  
-  protected Element meta_formats_definition = null;
-  protected HashMap<String, HashSet<String>> format_elements_map = null;
-  protected HashMap<String, Element> format_meta_elem_map = null;
-  
-  protected String index_stem = "";
+      
+  protected String index_stem = ""; // ****
   protected String infodb_type = "";
   
@@ -214,41 +209,11 @@
     Element metadata_message = doc.createElement(IIIFXML.METADATA);
 
-    // the <oai:dc namespace...> element
-    //Element prfx_str_elem = (Element)doc.importNode(this.format_meta_elem_map.get(prefix), true); 
-    //metadata.appendChild(prfx_str_elem);
-    
-    //Element meta_format_element = GSXML.getNamedElement(this.meta_formats_definition, OAIXML.METADATA_FORMAT, GSXML.NAME_ATT, prefix);
-    //NodeList elements = meta_format_element.getElementsByTagName(OAIXML.ELEMENT);
-    // for each element in the definition
-
     addFirstMetadata(metadata_message, "assocfilepath", info);
     addFirstMetadata(metadata_message, "Image", info);
-
-    /*	    
-    Set<String> keys = info.getKeys();
-    if (keys != null && keys.size()!=0) {
-	for (String metaname: keys) {
-	    addMetadata(metadata_message, metaname, info);
-	}
-    }
-    */
-    
-    /*
-    for (int i=0; i<elements.getLength(); i++) {
-      Element e = (Element)elements.item(i);
-
-      // look up the element name
-      //addMetadata(prfx_str_elem, e.getAttribute(GSXML.NAME_ATT), info);
-      addMetadata(metadata, e.getAttribute(GSXML.NAME_ATT), info);
-    }
-    */
-    
-    // output any metadata that is not just a simple mapping
-    //addCustomMetadata(prfx_str_elem, prefix, info); // ****
+    
     return metadata_message;
   }
 
   /** a simple addMetadata where we look for meta_name metadata, and add as that name*/
-
     
   protected void addFirstMetadata(Element meta_list_elem, String meta_name, DBInfo info) {
@@ -261,58 +226,4 @@
     
     
-  /** more complicated addMetadata - can add multiple items. */
-    /*
-  protected void addMetadata(Element meta_list_elem, String new_meta_name, String select_type, String name_list, DBInfo info) {
-    String[] names = name_list.split(",");
-    for (int i=0; i<names.length; i++) {
-      Vector<String> values;
-      // some special words
-      if (names[i].startsWith(OAIXML.GSF_LINK_PREFIX)) {
-	values = new Vector<String>();
-	String base_url = OAIXML.getBaseURL(); // e.g. e.g. http://host:port/greenstone3/oaiserver
-	String link_url = null;
-	if (names[i].equals(OAIXML.GSF_LINK_PREFIX+OAIXML.LINK_TYPE_DOCUMENT)) {
-	  link_url =  base_url.replace("oaiserver", "library") + "/collection/" + this.coll_name + "/document/" + info.getInfo("Identifier");
-	} else if (names[i].equals(OAIXML.GSF_LINK_PREFIX+OAIXML.LINK_TYPE_SOURCE)) {
-	  String srcfile = info.getInfo("srclinkFile");
-	  if (!srcfile.equals("")) {
-	    link_url = base_url.replace("oaiserver", "") + "sites/"
-		     + this.site_name 
-		     + "/collect/" + this.coll_name + "/index/assoc/" 
-		     + info.getInfo("assocfilepath") + "/" + srcfile;
-	  }
-	}
-	if (link_url !=null) {
-	  values.add(link_url);
-	}
-      } else {
-	values = info.getMultiInfo(names[i]);
-      }
-      if (values == null || values.size()==0) {
-	continue;
-      }
-      for (int j=0; j<values.size(); j++) {
-	addMetadataElement(meta_list_elem, new_meta_name, values.get(j));
-	if (select_type.equals(OAIXML.SELECT_SINGLE_VALUE)) {
-	  return; // only want to add one value
-	}
-      }
-      if (select_type.equals(OAIXML.SELECT_FIRST_VALID_META)) {
-	return; // we have added all values of this meta elem
-      }
-      // otherwise, we will keep going through the list and add them all.
-    }
-  }
-    */
-    
-  // specific metadata formats might need to do some custom metadata that is not
-  //just a standard mapping.
-    /*
-  protected void addCustomMetadata(Element meta_list_elem, String prefix, DBInfo info) {
-    
-
-  }
-    */
-    
   /** create the actual metadata element for the list */
 
@@ -331,5 +242,5 @@
 	
         Element identifier = doc.createElement(IIIFXML.IDENTIFIER);
-	GSXML.setNodeText(identifier, coll_name + ":" + oid);
+	GSXML.setNodeText(identifier, coll_name + ":" + oid); // **** OID
         header.appendChild(identifier);
 
