Module: IiifS3

Defined in:
lib/iiif_s3.rb,
lib/iiif_s3/config.rb,
lib/iiif_s3/errors.rb,
lib/iiif_s3/builder.rb,
lib/iiif_s3/version.rb,
lib/iiif_s3/manifest.rb,
lib/iiif_s3/amazon_s3.rb,
lib/iiif_s3/thumbnail.rb,
lib/iiif_s3/utilities.rb,
lib/iiif_s3/collection.rb,
lib/iiif_s3/full_image.rb,
lib/iiif_s3/image_info.rb,
lib/iiif_s3/image_tile.rb,
lib/iiif_s3/image_record.rb,
lib/iiif_s3/image_variant.rb,
lib/iiif_s3/base_properties.rb,
lib/iiif_s3/utilities/helpers.rb,
lib/iiif_s3/utilities/pdf_splitter.rb

Overview

Module IiifS3 is a tool for generating IIIF resources from a set of files.

It’s designed to support the IIIF level 0 profile, and generates entirely static files.

Author:

Defined Under Namespace

Modules: BaseProperties, Error, Utilities Classes: AmazonS3, Builder, Collection, Config, FakeImageVariant, FakeManifest, FullImage, ImageInfo, ImageRecord, ImageTile, ImageVariant, Manifest, Thumbnail

Constant Summary collapse

PRESENTATION_CONTEXT =

Returns The URI of the presentation context for the IIIF V.2.

Returns:

  • (String)

    The URI of the presentation context for the IIIF V.2

"http://iiif.io/api/presentation/2/context.json"
IMAGE_CONTEXT =

Returns The URI of the image context for the IIIF V.2.

Returns:

  • (String)

    The URI of the image context for the IIIF V.2

"http://iiif.io/api/image/2/context.json"
IMAGE_PROTOCOL =

Returns The URI of the image protocol for IIIF.

Returns:

  • (String)

    The URI of the image protocol for IIIF

"http://iiif.io/api/image"
LEVEL_0 =

Returns The URI of the Level 0 profile for the IIIF V.2.

Returns:

  • (String)

    The URI of the Level 0 profile for the IIIF V.2

"http://iiif.io/api/image/2/level0.json"
SEQUENCE_TYPE =

Returns The IIIF default type for a sequence.

Returns:

  • (String)

    The IIIF default type for a sequence.

"sc:Sequence"
CANVAS_TYPE =

Returns The IIIF default type for a canvas.

Returns:

  • (String)

    The IIIF default type for a canvas

"sc:Canvas"
ANNOTATION_TYPE =

Returns The IIIF default type for a annotation.

Returns:

  • (String)

    The IIIF default type for a annotation.

"oa:Annotation"
IMAGE_TYPE =

Returns The IIIF default type for an image.

Returns:

  • (String)

    The IIIF default type for an image.

"dcterms:Image"
MOTIVATION =

Returns The default label for a canvas without a specified name.

Returns:

  • (String)

    The default label for a canvas without a specified name.

"sc:painting"
DEFAULT_CANVAS_LABEL =

Returns The default label for a canvas without a specified name.

Returns:

  • (String)

    The default label for a canvas without a specified name.

"front"
DEFAULT_SEQUENCE_NAME =

Returns The default name for a sequence without a specified name.

Returns:

  • (String)

    The default name for a sequence without a specified name.

"default"
DEFAULT_VIEWING_DIRECTION =

Returns The default reading direction for this manifest.

Returns:

  • (String)

    The default reading direction for this manifest.

"left-to-right"
MIN_CANVAS_SIZE =

Returns The size in pixels below which the canvas will be doubled.

Returns:

  • (Number)

    The size in pixels below which the canvas will be doubled.

1200
VERSION =

Returns The current library version.

Returns:

  • (String)

    The current library version

"0.1.0"

Class Method Summary collapse

Class Method Details

.is_valid_viewing_direction(direction) ⇒ boolean

Validates a viewing direction string against the IIIF V.2.0 spec.

According to v2 of the IIIF standards, there are only four valid viewing directions: “left-to-right”, “top-to-bottom”, ”bottom-to-top“ , and ”right-to-left“. This

returns true if the provided direction is one of these, and falst for anything else.

Parameters:

  • direction (String)

    A viewing direction string

Returns:

  • (boolean)

    Is the provided string a valid viewing direction?



77
78
79
80
81
82
# File 'lib/iiif_s3.rb', line 77

def self.is_valid_viewing_direction(direction)
  direction == "left-to-right" ||
  direction == "top-to-bottom" ||
  direction == "bottom-to-top" ||
  direction == "right-to-left" 
end