Project

General

Profile

« Previous | Next » 

Revision 3375

Added by barteau over 17 years ago

Uncommented metacat client upload commands.

View differences:

src/edu/ucsb/nceas/metacat/clientview/ClientViewHelper.java
349 349
                        newDocId = nextVersion(lastDocId, xPathQuery);
350 350
                        ClientFgdcHelper.updateFileNameAndType(getMetadataDoc().getDocumentElement(), newDocId, fileInfo);
351 351
                        //*** Upload the data file to metacat.
352
                        //result = getMetacatClient().upload(newDocId, fNm, inputStream, Integer.MAX_VALUE);
352
                        result = getMetacatClient().upload(newDocId, fNm, inputStream, Integer.MAX_VALUE);
353 353
                        result = "Updated " + lastDocId + " with " + fNm + " (" + newDocId + ") ";
354 354
                        
355 355
                        //*** Upload the metadata file to metacat.
356
                        xPathQuery = ClientFgdcHelper.XPATH_QUERY_TEMPLATE.replaceFirst("%1s", lastDocId);
356
                        xPathQuery = ClientFgdcHelper.XPATH_QUERY_TEMPLATE.replaceFirst("%1s", metadataDocId);
357 357
                        newDocId = updateMetadataDoc(metadataDocId, xPathQuery, null);
358 358
                        System.out.println("ClientViewHelper.handleFileUpdate:\n" + XMLUtilities.getDOMTreeAsString(getMetadataDoc().getDocumentElement()));
359 359
                    } else {
......
386 386
                    ; //TODO EML, etc.
387 387
            }
388 388
            //*** Upload the metadata file to metacat.
389
            //reader = XMLUtilities.getDOMTreeAsReader(getMetadataDoc().getDocumentElement(), false);
390
            //getMetacatClient().update(newDocId, reader, null);
391
            //reader.close();
389
            reader = XMLUtilities.getDOMTreeAsReader(getMetadataDoc().getDocumentElement(), false);
390
            getMetacatClient().update(newDocId, reader, null);
391
            reader.close();
392 392
        } catch (Exception ex) {
393 393
            ex.printStackTrace();
394 394
        }

Also available in: Unified diff