ImageService

com.j0h1.contour.server.rest

## Class ImageService

- java.lang.Object
- - com.j0h1.contour.server.rest.ImageService

-     public class ImageService
      extends java.lang.Object

  The methods of this service class are invoked by requesting the defined URL paths. The response of this service is either a single Image object or a List of Image objects.
  Author:
    Johannes Riedmann

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ImageService()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `ImageResponseList` | `findEdgeImagesByTrackId(int trackId, java.lang.String language)` This method responds to it's specified path by generating a XML document containing all edge images for a given trackId in a specified language.
    `Image` | `getImageByType(int imageId, int sessionId, int type)` This method responds to it's specified path by generating a XML document containing image data for a given imageId, sessionId and type.
    `ImageResponseList` | `getSessionDetails(int sessionId, java.lang.String language)` This method responds to it's specified path by generating a XML document containing image meta data for a given sessionId in a specified language.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ImageService

          public ImageService()

  - ### Method Detail

    - #### findEdgeImagesByTrackId

          public ImageResponseList findEdgeImagesByTrackId(int trackId,
                                                           java.lang.String language)

      This method responds to it's specified path by generating a XML document containing all edge images for a given trackId in a specified language.
      Parameters:
        `trackId` - ID of track to find edge images from.
        `language` - Language code ("en"/"de") to retrieve the image names in the correct language.
      Returns:
        ImageResponseList that contains all edge images for the current track in the specified language. If no edge images are found, a empty list is returned.

    - #### getSessionDetails

          public ImageResponseList getSessionDetails(int sessionId,
                                                     java.lang.String language)

      This method responds to it's specified path by generating a XML document containing image meta data for a given sessionId in a specified language.
      Parameters:
        `sessionId` - ID of session to get the image meta data from.
        `language` - Language code ("en"/"de") to retrieve the image names in the correct language.
      Returns:
        ImageResponseList that contains image meta data for the specified session in the given language. If no images are found, a empty list is returned.

    - #### getImageByType

          public Image getImageByType(int imageId,
                                      int sessionId,
                                      int type)

      This method responds to it's specified path by generating a XML document containing image data for a given imageId, sessionId and type.
      Parameters:
        `imageId` - ID of image.
        `sessionId` - ID of session the image is associated with.
        `type` - 0 = original image data requested 1 = edge image data requested 2 = user drawing data requested 3 = score image data requested
      Returns:
        Responds with an Image object, mapped to a XML document, that contains image data for the requested image. If no image was found, an empty Image object is returned.