Skip to content

cybertaxonomy/MediaInfoService

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Media Information Service

A simple and lightweight service to make media information and metadata accessible as REST service.

It can for example be used to complement image servers like digilib.

Includes a 3 tier cache for snappy responsiveness.

Web service

There is one REST service end point by now:

/info?file=${filePath}

Optional query parameters:

  • refresh=true: update the cache with the media metadata for the file specified.

Example response:

{
    "bitPerPixel": 24,
    "colorType": "YCbCr",
    "formatName": "JPEG (Joint Photographic Experts Group) Format",
    "height": 1024,
    "metaData": {
        "Copyright Notice": "A. Charalambous",
        "DateTime": "'2020:03:07 10:59:29'",
        "ExifOffset": "2242",
        "Keywords": null,
        "Orientation": "1",
        "Padding": null,
        "ProcessingSoftware": "'Windows Photo Editor 10.0.10011.16384'",
        "Software": "'Windows Photo Editor 10.0.10011.16384'"
    },
    "mimeType": "image/jpeg",
    "width": 576
}

Limitations

Currently only image files are supported.

Setup

The service expects one mandatory configuration parameter

  • mediaHome: The root folder where the media files are found.

Optional configuration parameter

  • cacheExpirationMinutes or cacheExpirationHours: These are exclusive options, cacheExpirationHours is set to 24 hours per default. In order to set one of these values to NULL the string "@null" can be used in configurations.

For more details on the principle options of how to set the configuration property see https://docs.spring.io/spring-boot/docs/current/reference/html/spring-boot-features.html#boot-features-external-config

Tomcat

in

... ...

Test run with maven

start the serverf with maven

mvn jetty:run-war

test the web service

with curl & jq

curl http://localhost:8080/info\?file=Orobanche_aegyptiaca.jpg  

with httpie

http :8080/info file==Orobanche_aegyptiaca.jpg   

Build Tools Reference Documentation

For further reference, please consider the following sections:

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages