Sha256: b54f1fb894502ec59f7d687f04b6e22834a2c5f1fea6c9ce7db6fe27f2a57879

Contents?: true

Size: 1.35 KB

Versions: 1

Compression:

Stored size: 1.35 KB

Contents

# frozen_string_literal: true

module Niso
  module Jats
    class IndexTerm < Lutaml::Model::Serializable
      attribute :content_type, :string
      attribute :id, :string
      attribute :index_type, :string
      attribute :specific_use, :string
      attribute :vocab, :string
      attribute :vocab_identifier, :string
      attribute :vocab_term, :string
      attribute :vocab_term_identifier, :string
      attribute :lang, :string
      attribute :term, Term
      attribute :index_term, IndexTerm
      attribute :see, See, collection: true
      attribute :see_also, SeeAlso, collection: true

      xml do
        root "index-term"

        map_attribute "content-type", to: :content_type
        map_attribute "id", to: :id
        map_attribute "index-type", to: :index_type
        map_attribute "specific-use", to: :specific_use
        map_attribute "vocab", to: :vocab
        map_attribute "vocab-identifier", to: :vocab_identifier
        map_attribute "vocab-term", to: :vocab_term
        map_attribute "vocab-term-identifier", to: :vocab_term_identifier
        map_attribute "lang", to: :lang, namespace: "http://www.w3.org/XML/1998/namespace", prefix: "xml"
        map_element "term", to: :term
        map_element "index-term", to: :index_term
        map_element "see", to: :see
        map_element "see-also", to: :see_also
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
niso-jats-0.1.1 lib/niso/jats/index_term.rb