Project

General

Profile

« Previous | Next » 

Revision 5365

Added by berkley over 14 years ago

implementing getObjects in CrudService.

View differences:

src/edu/ucsb/nceas/metacat/dataone/CrudService.java
366 366
              //get the document from the results
367 367
              Document d = (Document)docs.get(i);
368 368
              ObjectFormat returnedObjectFormat = ObjectFormat.convert(d.getField("objectFormat"));
369
              if(!objectFormat.toString().trim().equals(returnedObjectFormat.toString().trim()))
369
              if(objectFormat != null && !objectFormat.toString().trim().equals(returnedObjectFormat.toString().trim()))
370 370
              { //make sure the objectFormat is the one specified
371 371
                  continue;
372 372
              }
......
399 399
              id.setValue(d.getField("identifier"));
400 400
              info.setIdentifier(id);
401 401
              info.setObjectFormat(returnedObjectFormat);
402
              info.setSize(d.getField("size"));
402
              info.setSize(new Long(d.getField("size")).longValue());
403 403
              //add the ObjectInfo to the ObjectList
404 404
              ol.addObjectInfo(info);
405 405
              

Also available in: Unified diff