Project

General

Profile

« Previous | Next » 

Revision 8948

Added by Jing Tao over 9 years ago

Write the input stream into the file system without alteration in dataone create and update methods.

View differences:

MNodeService.java
359 359
                // update the science metadata XML document
360 360
                // TODO: handle non-XML metadata/data documents (like netCDF)
361 361
                // TODO: don't put objects into memory using stream to string
362
                String objectAsXML = "";
362
                //String objectAsXML = "";
363 363
                try {
364
                    objectAsXML = IOUtils.toString(object, "UTF-8");
364
                    //objectAsXML = IOUtils.toString(object, "UTF-8");
365 365
                    // give the old pid so we can calculate the new local id 
366
                    localId = insertOrUpdateDocument(objectAsXML, pid, session, "update");
366
                    localId = insertOrUpdateDocument(object, "UTF-8", pid, session, "update");
367 367
                    // register the newPid and the generated localId
368 368
                    if (newPid != null) {
369 369
                        IdentifierManager.getInstance().createMapping(newPid.getValue(), localId);

Also available in: Unified diff