Module: WaxIiif

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

Overview

Module WaxIiif 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: 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'.freeze
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'.freeze
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'.freeze
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'.freeze
SEQUENCE_TYPE =

Returns The IIIF default type for a sequence.

Returns:

  • (String)

    The IIIF default type for a sequence.

'sc:Sequence'.freeze
CANVAS_TYPE =

Returns The IIIF default type for a canvas.

Returns:

  • (String)

    The IIIF default type for a canvas

'sc:Canvas'.freeze
ANNOTATION_TYPE =

Returns The IIIF default type for a annotation.

Returns:

  • (String)

    The IIIF default type for a annotation.

'oa:Annotation'.freeze
IMAGE_TYPE =

Returns The IIIF default type for an image.

Returns:

  • (String)

    The IIIF default type for an image.

'dcterms:Image'.freeze
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'.freeze
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'.freeze
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'.freeze
DEFAULT_VIEWING_DIRECTION =

Returns The default reading direction for this manifest.

Returns:

  • (String)

    The default reading direction for this manifest.

'left-to-right'.freeze
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

Class Method Summary collapse

Class Method Details

.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?



70
71
72
73
# File 'lib/wax_iiif.rb', line 70

def self.valid_viewing_direction?(direction)
  valid = %w[left-to-right top-to-bottom bottom-to-top right-to-left]
  valid.include? direction
end