Project

General

Profile

« Previous | Next » 

Revision 3721

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

View differences:

src/edu/ucsb/nceas/metacat/client/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,
src/edu/ucsb/nceas/metacat/client/Metacat.java
117 117
            IOException;
118 118

  
119 119
    /**
120
     * Insert an XML document into the repository.
120
     * Insert an XML document into the repository, making it available for 
121
     * searching using the query() methods.
121 122
     *
122 123
     * @param docid the docid to insert the document
123 124
     * @param xmlDocument a Reader for accessing the XML document to be inserted
......
136 137
        MetacatInaccessibleException;
137 138

  
138 139
    /**
139
     * Update an XML document in the repository.
140
     * Update an XML document in the repository by providing a new version of
141
     * the XML document.  The new version is placed in the search index, 
142
     * and older versions are archived (accessible by read(), but not in the 
143
     * search index).
140 144
     *
141 145
     * @param docid the docid to update
142 146
     * @param xmlDocument a Reader for accessing the XML text to be updated
......
155 159
        MetacatInaccessibleException;
156 160

  
157 161
    /**
158
     * Upload an XML document into the repository.
162
     * Upload a data document into the repository. Data files are stored on 
163
     * metacat and may be in any format (binary or text), but they are all
164
     * treated as if they were binary.  Data files are not searched by the
165
     * query() methods because they are not loaded into the XML store because
166
     * they are not XML documents.  The File parameter is used to determine a
167
     * name for the uploaded document.
159 168
     *
160
     * @param docid the docid to insert the document
161
     * @param xmlDocument a Reader for accessing the document to be inserted
169
     * @param docid the identifier to be used for the document
170
     * @param file the File to be uploaded
171
     * @param document a InputStream containing the data to be uploaded
162 172
     * @return the metacat response message
163 173
     * @throws InsufficientKarmaException when the user has insufficent rights
164 174
     *                                    for the operation
......
172 182
        MetacatInaccessibleException;
173 183

  
174 184
    /**
175
     * Upload an XML document into the repository.
185
     * Upload a data document into the repository. Data files are stored on 
186
     * metacat and may be in any format (binary or text), but they are all
187
     * treated as if they were binary.  Data files are not searched by the
188
     * query() methods because they are not loaded into the XML store because
189
     * they are not XML documents. The name for the document is set explicitly
190
     * using the filename parameter.
176 191
     *
177
     * @param docid the docid to insert the document
178
     * @param fileName the name of the document
179
     * @param fileData InputStream of the document that has to be inserted
180
     * @param size size of the data being sent. If more data is
181
     *             found in the InputStream, an error would be reported.
192
     * @param docid the identifier to be used for the document
193
     * @param filename the name to be used in the MIME description of the uploaded file
194
     * @param document a InputStream containing the data to be uploaded
182 195
     * @return the metacat response message
183 196
     * @throws InsufficientKarmaException when the user has insufficent rights
184 197
     *                                    for the operation

Also available in: Unified diff