Index: src/edu/ucsb/nceas/metacat/dataone/SystemMetadataFactory.java
===================================================================
--- src/edu/ucsb/nceas/metacat/dataone/SystemMetadataFactory.java	(revision 6910)
+++ src/edu/ucsb/nceas/metacat/dataone/SystemMetadataFactory.java	(revision 6911)
@@ -51,7 +51,13 @@
 import org.dataone.client.ObjectFormatCache;
 import org.dataone.ore.ResourceMapFactory;
 import org.dataone.service.exceptions.BaseException;
+import org.dataone.service.exceptions.InvalidRequest;
+import org.dataone.service.exceptions.InvalidSystemMetadata;
+import org.dataone.service.exceptions.InvalidToken;
+import org.dataone.service.exceptions.NotAuthorized;
 import org.dataone.service.exceptions.NotFound;
+import org.dataone.service.exceptions.NotImplemented;
+import org.dataone.service.exceptions.ServiceFailure;
 import org.dataone.service.types.v1.AccessPolicy;
 import org.dataone.service.types.v1.Checksum;
 import org.dataone.service.types.v1.Identifier;
@@ -288,8 +294,8 @@
 			SystemMetadata obsoletesSysMeta = IdentifierManager.getInstance().getSystemMetadata(obsoletes.getValue());
 			if (obsoletesSysMeta != null) {
 				obsoletesSysMeta.setObsoletedBy(identifier);
-        obsoletesSysMeta.setArchived(true);
-        HazelcastService.getInstance().getSystemMetadataMap().put(obsoletes, obsoletesSysMeta);
+				obsoletesSysMeta.setArchived(true);
+				HazelcastService.getInstance().getSystemMetadataMap().put(obsoletes, obsoletesSysMeta);
 			}
 		}
 		
@@ -604,6 +610,94 @@
 	}
 	
 	/**
+     * Generate SystemMetadata for any object in the object store that does
+     * not already have it.  SystemMetadata documents themselves, are, of course,
+     * exempt.  This is a utility method for migration of existing object 
+     * stores to DataONE where SystemMetadata is required for all objects.
+     * @param idList
+     * @param includeOre
+     * @param downloadData
+     * @throws ServiceFailure
+     * @throws McdbDocNotFoundException
+     * @throws PropertyNotFoundException
+     * @throws InvalidToken
+     * @throws NotAuthorized
+     * @throws NotFound
+     * @throws NotImplemented
+     * @throws InvalidRequest
+     * @throws NoSuchAlgorithmException
+     * @throws AccessionNumberException
+     * @throws SQLException
+     */
+    public static void generateSystemMetadata(List<String> idList, boolean includeOre, boolean downloadData) 
+    throws ServiceFailure, McdbDocNotFoundException, PropertyNotFoundException, InvalidToken, NotAuthorized, 
+    NotFound, NotImplemented, InvalidRequest, NoSuchAlgorithmException, AccessionNumberException, SQLException 
+    {
+        
+        for (String localId : idList) { 
+            //for each id, add a system metadata doc
+        	try {
+        		logMetacat.debug("generating system metadata for " + localId);
+        		generateSystemMetadata(localId, includeOre, downloadData);
+        	} catch (Exception e) {
+        		logMetacat.error("Error generating system metadata for: " + localId, e);
+			}
+        }
+        logMetacat.info("done generating system metadata");
+    }
+    
+
+    /**
+     * Generate SystemMetadata for a particular object with identifier localId.
+     * This is a utility method for migration of existing objects 
+     * to DataONE where SystemMetadata is required for all objects.
+     * @param localId
+     * @param includeOre
+     * @param downloadData
+     * @throws ServiceFailure
+     * @throws McdbDocNotFoundException
+     * @throws PropertyNotFoundException
+     * @throws InvalidToken
+     * @throws NotAuthorized
+     * @throws NotFound
+     * @throws NotImplemented
+     * @throws InvalidRequest
+     * @throws NoSuchAlgorithmException
+     * @throws AccessionNumberException
+     * @throws SQLException
+     * @throws InvalidSystemMetadata
+     */
+    protected static void generateSystemMetadata(String localId, boolean includeOre, boolean downloadData) 
+    throws ServiceFailure, McdbDocNotFoundException, PropertyNotFoundException, InvalidToken, NotAuthorized,
+    NotFound, NotImplemented, InvalidRequest, NoSuchAlgorithmException, AccessionNumberException, SQLException, InvalidSystemMetadata 
+    {
+    	logMetacat.debug("generateSystemMetadata() called.");
+    	logMetacat.debug("Creating SystemMetadata for localId " + localId);
+        SystemMetadata sm = null;
+
+        //generate required system metadata fields from the document
+        try {
+        	sm = SystemMetadataFactory.createSystemMetadata(localId, includeOre, downloadData);
+        } catch (Exception e1) {
+        	e1.printStackTrace();
+        	ServiceFailure sf = new ServiceFailure("00","Exception in generateSystemMetadata: " +
+        			e1.getMessage());
+        	sf.setStackTrace(e1.getStackTrace());
+        	throw sf;
+        }
+        
+        //insert the systemmetadata object or just update it as needed
+        boolean exists = IdentifierManager.getInstance().systemMetadataExists(sm.getIdentifier().getValue());
+        if (!exists) {
+        	IdentifierManager.getInstance().createSystemMetadata(sm);
+        	logMetacat.info("Generated SystemMetadata for " + localId);
+        } else {
+        	IdentifierManager.getInstance().updateSystemMetadata(sm);
+        	logMetacat.info("Updated SystemMetadata for " + localId);
+        }
+    }
+	
+	/**
 	 * Determines if we already have registered an ORE map for this package
 	 * @param guid of the EML/packaging object
 	 * @return true if there is an ORE map for the given package
Index: src/edu/ucsb/nceas/metacat/admin/upgrade/GenerateSystemMetadata.java
===================================================================
--- src/edu/ucsb/nceas/metacat/admin/upgrade/GenerateSystemMetadata.java	(revision 6910)
+++ src/edu/ucsb/nceas/metacat/admin/upgrade/GenerateSystemMetadata.java	(revision 6911)
@@ -26,30 +26,16 @@
  */
 
 
-import java.security.NoSuchAlgorithmException;
-import java.sql.SQLException;
 import java.util.List;
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import org.dataone.service.exceptions.InvalidRequest;
-import org.dataone.service.exceptions.InvalidSystemMetadata;
-import org.dataone.service.exceptions.InvalidToken;
-import org.dataone.service.exceptions.NotAuthorized;
-import org.dataone.service.exceptions.NotFound;
-import org.dataone.service.exceptions.NotImplemented;
-import org.dataone.service.exceptions.ServiceFailure;
-import org.dataone.service.types.v1.SystemMetadata;
 
 import edu.emory.mathcs.backport.java.util.Collections;
-import edu.ucsb.nceas.metacat.AccessionNumberException;
 import edu.ucsb.nceas.metacat.DBUtil;
-import edu.ucsb.nceas.metacat.IdentifierManager;
-import edu.ucsb.nceas.metacat.McdbDocNotFoundException;
 import edu.ucsb.nceas.metacat.admin.AdminException;
 import edu.ucsb.nceas.metacat.dataone.SystemMetadataFactory;
 import edu.ucsb.nceas.metacat.properties.PropertyService;
-import edu.ucsb.nceas.utilities.PropertyNotFoundException;
 import edu.ucsb.nceas.utilities.SortedProperties;
 
 public class GenerateSystemMetadata implements UpgradeUtilityInterface {
@@ -69,7 +55,7 @@
             Collections.sort(idList);
 
             // generate based on this list
-			generateSystemMetadata(idList, includeOre, downloadData);
+            SystemMetadataFactory.generateSystemMetadata(idList, includeOre, downloadData);
 		} catch (Exception e) {
 			String msg = "Problem generating missing system metadata: " + e.getMessage();
 			log.error(msg, e);
@@ -79,95 +65,6 @@
     	return success;
     }
     
-    /**
-     * Generate SystemMetadata for any object in the object store that does
-     * not already have it.  SystemMetadata documents themselves, are, of course,
-     * exempt.  This is a utility method for migration of existing object 
-     * stores to DataONE where SystemMetadata is required for all objects.
-     * @param idList
-     * @param includeOre
-     * @param downloadData
-     * @throws ServiceFailure
-     * @throws McdbDocNotFoundException
-     * @throws PropertyNotFoundException
-     * @throws InvalidToken
-     * @throws NotAuthorized
-     * @throws NotFound
-     * @throws NotImplemented
-     * @throws InvalidRequest
-     * @throws NoSuchAlgorithmException
-     * @throws AccessionNumberException
-     * @throws SQLException
-     */
-    public void generateSystemMetadata(List<String> idList, boolean includeOre, boolean downloadData) 
-    throws ServiceFailure, McdbDocNotFoundException, PropertyNotFoundException, InvalidToken, NotAuthorized, 
-    NotFound, NotImplemented, InvalidRequest, NoSuchAlgorithmException, AccessionNumberException, SQLException 
-    {
-        
-        for (String localId : idList) { 
-            //for each id, add a system metadata doc
-        	try {
-        		log.debug("generating system metadata for " + localId);
-        		generateSystemMetadata(localId, includeOre, downloadData);
-        	} catch (Exception e) {
-				log.error("Error generating system metadata for: " + localId, e);
-			}
-        }
-        log.info("done generating system metadata");
-    }
-    
-
-    /**
-     * Generate SystemMetadata for a particular object with identifier localId.
-     * This is a utility method for migration of existing objects 
-     * to DataONE where SystemMetadata is required for all objects.
-     * @param localId
-     * @param includeOre
-     * @param downloadData
-     * @throws ServiceFailure
-     * @throws McdbDocNotFoundException
-     * @throws PropertyNotFoundException
-     * @throws InvalidToken
-     * @throws NotAuthorized
-     * @throws NotFound
-     * @throws NotImplemented
-     * @throws InvalidRequest
-     * @throws NoSuchAlgorithmException
-     * @throws AccessionNumberException
-     * @throws SQLException
-     * @throws InvalidSystemMetadata
-     */
-    protected void generateSystemMetadata(String localId, boolean includeOre, boolean downloadData) 
-    throws ServiceFailure, McdbDocNotFoundException, PropertyNotFoundException, InvalidToken, NotAuthorized,
-    NotFound, NotImplemented, InvalidRequest, NoSuchAlgorithmException, AccessionNumberException, SQLException, InvalidSystemMetadata 
-    {
-    	log.debug("generateSystemMetadata() called.");
-    	log.debug("Creating SystemMetadata for localId " + localId);
-        SystemMetadata sm = null;
-
-        //generate required system metadata fields from the document
-        try {
-        	sm = SystemMetadataFactory.createSystemMetadata(localId, includeOre, downloadData);
-        } catch (Exception e1) {
-        	e1.printStackTrace();
-        	ServiceFailure sf = new ServiceFailure("00","Exception in generateSystemMetadata: " +
-        			e1.getMessage());
-        	sf.setStackTrace(e1.getStackTrace());
-        	throw sf;
-        }
-        
-        //insert the systemmetadata object or just update it as needed
-        boolean exists = IdentifierManager.getInstance().systemMetadataExists(sm.getIdentifier().getValue());
-        if (!exists) {
-        	IdentifierManager.getInstance().createSystemMetadata(sm);
-            log.info("Generated SystemMetadata for " + localId);
-        } else {
-        	IdentifierManager.getInstance().updateSystemMetadata(sm);
-            log.info("Updated SystemMetadata for " + localId);
-        }
-    }
-    
-    
     public static void main(String [] ags){
 
         try {
