- Timestamp:
- 02/23/15 12:17:33 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
DASISH/t5.6/backend/annotator-backend/trunk/annotator-backend/src/main/java/eu/dasish/annotation/backend/rest/CachedRepresentationResource.java
r5892 r6014 59 59 @Transactional(rollbackFor = {Exception.class, SQLException.class, IOException.class, ParserConfigurationException.class}) 60 60 public class CachedRepresentationResource extends ResourceResource { 61 61 62 /** 63 * 64 * @param request a {@link HttpServletRequest} object representing request; the set parameter is used in unit tests. 65 */ 62 66 public void setHttpRequest(HttpServletRequest request) { 63 67 this.httpServletRequest = request; 64 68 } 65 69 70 /** 71 * 72 * @param externalId the external UUID of a cached representations. 73 * @return a {@link CachedRepresentationInfo} representing the metadata for the cached representation with the "externalId". 74 * @throws IOException if sending the error fails. 75 */ 66 76 @GET 67 77 @Produces(MediaType.TEXT_XML) … … 95 105 } 96 106 97 //////////////////////////////////////////// 107 /** 108 * 109 * @param externalId the external UUID of a cached representation. 110 * @return the image-blob if the cached-representation's blob is an image file. 111 * @throws IOException if logging the error fails (should be changed to sending httpResponse error message). 112 */ 98 113 @GET 99 114 @Produces({"image/jpeg", "image/png"}) … … 128 143 } 129 144 145 /** 146 * 147 * @param externalId the external UUID of a cached representation. 148 * @return the cached-representation's blob. 149 * @throws IOException is sending the error fails. 150 */ 130 151 @GET 131 152 //@Produces({"text/plain", "text/html", "text/xml", "application/zip", "image/png", "image/jpg"}) … … 154 175 } 155 176 156 /////////////////////////////////////////////////////////////////// 177 /** 178 * 179 * @param cachedIdentifier the external uuid of a cached representation. 180 * @param multiPart a {@link MultiPart} object containing two parts: a {@linkCachedRepresentationInfo} object for the cached-representation's metadata, and its blob. 181 * @return a message about how many rows in "cached_representation" table have been update; "1" if updated, and "0" otherwisee. 182 * @throws IOException if sending the error fails. 183 */ 157 184 @PUT 158 185 @Consumes("multipart/mixed") … … 231 258 } 232 259 233 /////////////////////////////////////////////////////////// 260 /** 261 * 262 * @param cachedInfo a {@link CachedRepresentationInfo} representing the new metadata. 263 * @return a message about how many rows in "cached_representation" table, "1" if updated, "0" otherwise. 264 * @throws IOException if sending the error fails. 265 */ 234 266 @PUT 235 267 @Consumes(MediaType.TEXT_XML)
Note: See TracChangeset
for help on using the changeset viewer.