Class: Pubid::Csa::CompositeIdentifier

Inherits:
Lutaml::Model::Serializable
  • Object
show all
Defined in:
lib/pubid/csa/composite_identifier.rb

Overview

CompositeIdentifier is the base class for identifiers that contain collections of other identifiers or package materials.

Examples:

- PackageIdentifier: Base + package materials
- Future: BundleIdentifier refactor to use composite

This follows the Composite pattern where an identifier can contain other identifiers or additional metadata as a collection.

Direct Known Subclasses

Identifiers::Package

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#base_identifierObject

The primary/base identifier Use attr_accessor since it can be any identifier object



19
20
21
# File 'lib/pubid/csa/composite_identifier.rb', line 19

def base_identifier
  @base_identifier
end

Instance Method Details

#to_sObject

Subclasses MUST implement to_s to define how they render

Raises:

  • (NotImplementedError)


22
23
24
# File 'lib/pubid/csa/composite_identifier.rb', line 22

def to_s
  raise NotImplementedError, "Subclasses must implement to_s method"
end