Project

General

Profile

« Previous | Next » 

Revision 3721

Added by Matt Jones about 16 years ago

Improved the javadoc documentation for the upload() methods to clarify what upload() does and contrast it to insert() and update().

View differences:

MetacatClient.java
439 439
    }
440 440
    
441 441
    /**
442
     * Upload a data document into the repository.
442
     * Upload a data document into the repository. Data files are stored on 
443
     * metacat and may be in any format (binary or text), but they are all
444
     * treated as if they were binary.  Data files are not searched by the
445
     * query() methods because they are not loaded into the XML store because
446
     * they are not XML documents.  The File parameter is used to determine a
447
     * name for the uploaded document.
443 448
     *
444
     * @param docid the docid to insert the document
445
     * @param document a Reader for accessing the document to be uploaded
449
     * @param docid the identifier to be used for the document
450
     * @param file the File to be uploaded
451
     * @param document a InputStream containing the data to be uploaded
446 452
     * @return the metacat response message
447 453
     * @throws InsufficientKarmaException when the user has insufficent rights
448 454
     *                                    for the operation
......
486 492
    }
487 493
    
488 494
    /**
489
     * Upload a data document into the repository.
495
     * Upload a data document into the repository. Data files are stored on 
496
     * metacat and may be in any format (binary or text), but they are all
497
     * treated as if they were binary.  Data files are not searched by the
498
     * query() methods because they are not loaded into the XML store because
499
     * they are not XML documents. The name for the document is set explicitly
500
     * using the filename parameter.
490 501
     *
491
     * @param docid the docid to insert the document
492
     * @param document a Reader for accessing the document to be uploaded
502
     * @param docid the identifier to be used for the document
503
     * @param filename the name to be used in the MIME description of the uploaded file
504
     * @param document a InputStream containing the data to be uploaded
493 505
     * @return the metacat response message
494 506
     * @throws InsufficientKarmaException when the user has insufficent rights
495 507
     *                                    for the operation
......
498 510
     * @throws MetacatException when the metacat server generates another error
499 511
     * @throws IOException when there is an error reading the xml document
500 512
     */
501
    
502
    
503 513
    public String upload(String docid, String filename, InputStream fileData,
504 514
            int size)
505 515
            throws InsufficientKarmaException, MetacatException, IOException,

Also available in: Unified diff