1. Summary
  2. Files
  3. Support
  4. Report Spam
  5. Create account
  6. Log in

Djatoka OpenURL Services

From djatoka

Jump to: navigation, search

Contents

djatoka OpenURL Service Types

The djatoka OpenURL ContextObject carries information about a Referent and a ServiceType. The Referent is an image resource, unambiguously described by its identifier. Currently, 4 ServiceTypes are defined and identified as follows.

info:lanl-repo/svc/getMetadata

Request

A HTTP GET/POST request containing the following parameters:

  • rft_id - An unique image resource URI
  • svc_id - Service to be performed on specified resource (i.e., info:lanl-repo/svc/getMetadata)
http://african.lanl.gov/adore-djatoka/resolver?
    url_ver=Z39.88-2004&
    rft_id=info:lanl-repo/ds/5aa182c2-c092-4596-af6e-e95d2e263de3&
    svc_id=info:lanl-repo/svc/getMetadata

Response

A JSON object containing the following elements:

  • identifier - a unique image resource URI
  • imagefile - local file to resource
  • width - image width
  • height - image height
  • dwtLevels - number of native JP2 DWT levels in image
  • levels - number of djatoka resolutions, using djatoka Level Logic
  • compositingLayerCount - number of JPX compositing layers (i.e., frames)
{
"identifier": "info:lanl-repo/ds/5aa182c2-c092-4596-af6e-e95d2e263de3",
"imagefile": "/lanl/data/loc/cc5fc4f7-e50a-455f-b3ce-a6a8b54824e/WEJLNXSBWO7LPLC7Z6DITFX7A45XR3GS.jp2",
"width": "5120",
"height": "3372",
"dwtLevels": "6",
"levels": "6",
"compositingLayerCount": "1"
}

Example

Get Metadata

info:lanl-repo/svc/getRegion

Request

A HTTP GET/POST request containing the following parameters:

  • rft_id - An unique image resource URI
  • svc_id - Service to be performed on specified resource (i.e., info:lanl-repo/svc/getRegion)
  • svc.level - djatoka level to extract from resource
    • Level values range from 0 to max level, as specified in getMetadata response
    • Omitting parameter or value will return maximum resolution.
  • svc.rotate - Rotates image by 90/180/270 degrees clockwise. Default: 0
  • svc.region - Y,X,H,W.
    • Y is the down inset value (positive) from 0 on the y axis at the max image resolution.
    • X is the right inset value (positive) from 0 on the x axis at the max image resolution.
    • H is the height of the image provided as response.
    • W is the width of the image provided as response.
    • All values may either be absolute pixel values (e.g. 100,100,256,256), float values (e.g. 0.1,0.1,0.1,0.1), or a combination (e.g. 0.1,0.1,256,256).
  • svc.scale - Request specific output size by scaling extracted resource.
    • Option 1) Define a long-side dimension (e.g., svc.scale=96)
      • Nearest resolution level, rounded up, is used for level parameter
      • Uses the aspect ratio to calculate second value
    • Option 2) Define absolute w,h values (e.g. 1024,768)
      • Images is scaled to the dimensions you specify.
      • Value must be less than 2X current resolution
    • Option 3) Define a single dimension (e.g. 1024,0) with or without Level Parameter
      • Uses the aspect ratio to calculate second value
    • Option 4) Use a single decimal scaling factor (e.g. 0.854)
      • Current resolution = 1.0
      • 50% Resolution = 0.5
      • 150% Resolution = 1.5
      • Value must be greater than 0 and less than 2
  • svc.format - Mimetype of the image format to be provided as response. Default: image/jpeg
  • svc.clayer - Index of the JPX codestream contained in JPEG 2000 resource
    • clayer values range from 0 to max clayer, as specified in getMetadata response
http://african.lanl.gov/adore-djatoka/resolver?
    url_ver=Z39.88-2004&
    rft_id=info:lanl-repo/ds/5aa182c2-c092-4596-af6e-e95d2e263de3&
    svc_id=info:lanl-repo/svc/getRegion&
    svc_val_fmt=info:ofi/fmt:kev:mtx:jpeg2000&
    svc.level=6
    svc.region=500,500,1536,2048&
    svc.format=image/jpeg&
    svc.scale=800,0&
    svc.rotate=180

Response

An image resource of the content type, mimetype, specified in service request.

Examples

Get a 256px x 256px tile starting at offset 1380,2670 at djatoka Level 6

Get Level 3

Get 192px long-side Thumbnail w/out Level Parameter

Get 1024px height, using the aspect ratio for width

Scale cropped region to 800 pixels wide

Get JPX Layer 1/112 for SOHO_EIT_20021025

Get JPX Layer 112/112 for SOHO_EIT_20021025

info:lanl-repo/svc/ping

Request

A HTTP GET/POST request containing the following parameters:

  • rft_id - An unique image resource URI
  • svc_id - Service to be performed on specified resource (i.e., info:lanl-repo/svc/ping)
http://african.lanl.gov/adore-djatoka/resolver?
    url_ver=Z39.88-2004&
    rft_id=info:lanl-repo/ds/5aa182c2-c092-4596-af6e-e95d2e263de3&
    svc_id=info:lanl-repo/svc/ping

Response

A JSON object containing the following elements:

  • identifier - a unique image resource URI
  • status - Indicates whether image is "OK", "PROCESSSING", or not found, as indicated by a 404 response.
{
"identifier": "info:lanl-repo/ds/5aa182c2-c092-4596-af6e-e95d2e263de3",
"status": "OK"
}

Examples

Is Image Available?

info:lanl-repo/svc/getJP2XML

Request

A HTTP GET/POST request containing the following parameters:

  • rft_id - An unique image resource URI
  • svc_id - Service to be performed on specified resource (i.e., info:lanl-repo/svc/getJP2XML)
http://african.lanl.gov/adore-djatoka/resolver?
    url_ver=Z39.88-2004&
    rft_id=info:lanl-repo/ds/969a5ce9-28f8-4683-b070-a9edcb251b76&
    svc_id=info:lanl-repo/svc/getJP2XML

Response

<?xml version="1.0" encoding="UTF-8"?>
<jp2:JP2XML 
    xmlns:jp2="http://library.lanl.gov/2008-11/aDORe/JP2XML/" 
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"  
    xsi:schemaLocation="http://library.lanl.gov/2008-11/aDORe/JP2XML/ 
                        http://purl.lanl.gov/aDORe/schemas/2008-11/JP2XML.xsd" 
    boxCount="1">
  <jp2:XMLBox>
    <didl:DIDL xmlns:didl="urn:mpeg:mpeg21:2002:02-DIDL-NS" 
      ...
    </didl>
  </jp2:XMLBox>
</jp2:JP2XML>

info:lanl-repo/svc/getDatastream

Important

This service endpoint is disabled by default, to enable it, in adore-djatoka/WEB_INF/classes/oomRef.xml, add the following, then restart tomcat.

  <serviceMap>
    <service ID="info:lanl-repo/svc/getDatastream">
      <className>gov.lanl.adore.djatoka.openurl.OpenURLJP2Datastream</className>
      <args>
        <props>djatoka.properties</props>
      </args>
    </service>
  </serviceMap>   

Request

A HTTP GET/POST request containing the following parameters:

  • rft_id - An unique image resource URI
  • svc_id - Service to be performed on specified resource (i.e., info:lanl-repo/svc/getDatastream)
http://african.lanl.gov/adore-djatoka/resolver?
    url_ver=Z39.88-2004&
    rft_id=info:lanl-repo/ds/969a5ce9-28f8-4683-b070-a9edcb251b76&
    svc_id=info:lanl-repo/svc/getDatastream

Response

  • The JP2 datastream.

Examples

Get JP2 Datastream

Why OpenURL?

  • Existing solutions provide URI-addressability of specified regions, but…
    • Offer limited extensibility for identifier resolution / dissemination services
    • Use home grown HTTP URI syntaxes
  • Helpful to have standardized syntax to request Regions or other services.
  • Since URIs serve the purpose of requesting services pertaining to an identified resource (the entire JPEG 2000 image), the OpenURL Framework provides a standardized foundation..
  • OpenURL provides an easily extensible dissemination service framework.
  • Availability and familiarity with OCLC's Java OpenURL package, an open source OpenURL Service Framework.
  • Also, to present an alternate Use Case for the OpenURL Framework.
Personal tools