Index: src/edu/ucsb/nceas/metacat/dataone/CrudService.java
===================================================================
--- src/edu/ucsb/nceas/metacat/dataone/CrudService.java	(revision 5363)
+++ src/edu/ucsb/nceas/metacat/dataone/CrudService.java	(revision 5364)
@@ -36,6 +36,7 @@
 import java.util.Hashtable;
 import java.util.Timer;
 import java.util.List;
+import java.text.DateFormat;
 
 import javax.servlet.ServletContext;
 import javax.servlet.http.HttpServletRequest;
@@ -54,14 +55,7 @@
 import org.dataone.service.exceptions.ServiceFailure;
 import org.dataone.service.exceptions.UnsupportedType;
 import org.dataone.service.mn.MemberNodeCrud;
-import org.dataone.service.types.AuthToken;
-import org.dataone.service.types.Checksum;
-import org.dataone.service.types.DescribeResponse;
-import org.dataone.service.types.Identifier;
-import org.dataone.service.types.LogRecordSet;
-import org.dataone.service.types.SystemMetadata;
-import org.dataone.service.types.ObjectList;
-import org.dataone.service.types.ObjectFormat;
+import org.dataone.service.types.*;
 import org.jibx.runtime.BindingDirectory;
 import org.jibx.runtime.IBindingFactory;
 import org.jibx.runtime.IMarshallingContext;
@@ -330,6 +324,8 @@
      *  indicating the starting index of the response (where 0 is the index 
      *  of the first item) and the count of elements to be returned.
      *  
+     *  If startTime or endTime is null, the query is not restricted by that parameter.
+     *  
      * @see http://mule1.dataone.org/ArchitectureDocs/mn_api_replication.html#MN_replication.listObjects
      * @param token
      * @param startTime
@@ -356,8 +352,8 @@
           params.clear();
           params.put("returndoctype", new String[] {"http://dataone.org/service/types/SystemMetadata/0.1"});
           params.put("qformat", new String[] {"xml"});
-          params.put("returnfield", new String[] {"dateUploaded", "originMemberNode", 
-                  "identifier", "objectFormat", "dateSysMetadataModified"});
+          params.put("returnfield", new String[] {"size", "originMemberNode", 
+                  "identifier", "objectFormat", "dateSysMetadataModified", "checksum"});
           params.put("anyfield", new String[] {"%"});
           
           System.out.println("listing objects");
@@ -364,10 +360,49 @@
           MetacatResultSet rs = handler.query(metacatUrl, params, sessionData.getUserName(), 
                   sessionData.getGroupNames(), sessionData.getId());
           List docs = rs.getDocuments();
-          System.out.println("docs size: " + docs.size());
+          
           for(int i=0; i<docs.size(); i++)
           {
+              //get the document from the results
               Document d = (Document)docs.get(i);
+              ObjectFormat returnedObjectFormat = ObjectFormat.convert(d.getField("objectFormat"));
+              if(!objectFormat.toString().trim().equals(returnedObjectFormat.toString().trim()))
+              { //make sure the objectFormat is the one specified
+                  continue;
+              }
+              Date dateSysMetadataModified = DateFormat.getDateTimeInstance().parse(d.getField("dateSysMetadataModified"));
+              int startDateComparison = 0;
+              int endDateComparison = 0;
+              if(startTime != null)
+              {
+                  startDateComparison = dateSysMetadataModified.compareTo(startTime);
+              }
+              
+              if(endTime != null)
+              {
+                  endDateComparison = dateSysMetadataModified.compareTo(endTime);
+              }
+              
+              if(startDateComparison < 0 || endDateComparison > 0)
+              { //this date falls outside of the startTime and endTime params, so
+                //skip it
+                  continue;                  
+              }
+              
+              ObjectInfo info = new ObjectInfo();
+              //add the fields to the info object
+              Checksum cs = new Checksum();
+              cs.setValue(d.getField("checksum"));
+              info.setChecksum(cs);
+              info.setDateSysMetadataModified(dateSysMetadataModified);
+              Identifier id = new Identifier();
+              id.setValue(d.getField("identifier"));
+              info.setIdentifier(id);
+              info.setObjectFormat(returnedObjectFormat);
+              info.setSize(d.getField("size"));
+              //add the ObjectInfo to the ObjectList
+              ol.addObjectInfo(info);
+              
               //System.out.println(d.toString());
           }
           
