Module: NEU::MODS

Defined in:
lib/neu-mods.rb,
lib/neu/mods/version.rb,
lib/neu/mods/builders.rb,
lib/neu/mods/document.rb,
lib/neu/mods/selectors.rb,
lib/neu/mods/namespaces.rb,
lib/neu/mods/projection.rb,
lib/neu/mods/canonicalize.rb,
lib/neu/mods/language_codes.rb,
lib/neu/mods/text_normalizer.rb,
lib/neu/mods/projection/dates.rb,
lib/neu/mods/projection/names.rb,
lib/neu/mods/projection/access.rb,
lib/neu/mods/projection/titles.rb,
lib/neu/mods/projection/support.rb,
lib/neu/mods/projection/subjects.rb,
lib/neu/mods/projection/languages.rb,
lib/neu/mods/projection/identifiers.rb,
lib/neu/mods/projection/origin_info.rb,
lib/neu/mods/projection/name_display.rb,
lib/neu/mods/projection/related_items.rb,
lib/neu/mods/projection/physical_description.rb

Defined Under Namespace

Modules: Builders, Canonicalize, LanguageCodes, Projection, Selectors, TextNormalizer Classes: Document

Constant Summary collapse

FIELDS =

The projected field set and its cardinality (docs/fields.md), on the top-level module so a consumer deriving its schema from it does not reach into a mixin.

Projection::FIELDS
VERSION =

Current gem version, read from the .version file at the repo root at load time (mirrors the atlas_rb convention so a single .version bump drives the gem version + bundler/gem_tasks release).

File.read(File.expand_path("../../../.version", __dir__)).strip
NAMESPACE =

The MODS v3 namespace, as a Nokogiri xpath namespace hash.

{ "mods" => "http://www.loc.gov/mods/v3" }.freeze
"http://www.w3.org/1999/xlink"

Class Method Summary collapse

Class Method Details

.canonical_lines(str) ⇒ Object



37
# File 'lib/neu-mods.rb', line 37

def canonical_lines(str) = Canonicalize.canonical_lines(str)

.canonical_ws(str) ⇒ Object

Whitespace no-op guard (see Canonicalize).



36
# File 'lib/neu-mods.rb', line 36

def canonical_ws(str) = Canonicalize.canonical_ws(str)

.compose_title(parts) ⇒ Object

Pure display-title composition over a primary-title parts hash (see Projection.compose_title). Lets a caller that already holds the parts -- e.g. Atlas's access-copy model -- compose the title without parsing XML.



47
# File 'lib/neu-mods.rb', line 47

def compose_title(parts) = Projection.compose_title(parts)

.normalize(str) ⇒ Object

Curator-freetext normalization for the access copy (see TextNormalizer).



41
# File 'lib/neu-mods.rb', line 41

def normalize(str) = TextNormalizer.normalize(str)

.normalize_paragraphs(str) ⇒ Object



42
# File 'lib/neu-mods.rb', line 42

def normalize_paragraphs(str) = TextNormalizer.normalize_paragraphs(str)

.whitespace_equivalent?(current, incoming) ⇒ Boolean

Returns:

  • (Boolean)


38
# File 'lib/neu-mods.rb', line 38

def whitespace_equivalent?(current, incoming) = Canonicalize.whitespace_equivalent?(current, incoming)