Sha256: c2d0234ce78be5bcc40a908b52bb4d52794cd87245b1308210453eafb2e24482

Contents?: true

Size: 1.75 KB

Versions: 3

Compression:

Stored size: 1.75 KB

Contents

# frozen_string_literal: true

require "lutaml/model"

require_relative "code"
require_relative "code_with_authority"
require_relative "conversion_to_preferred_unit"
require_relative "derivation_unit_term"
require_relative "meta_data_property"
require_relative "reference"
require_relative "string_or_ref"
require_relative "abstract_topology"

module Ogc
  module Gml
    class ConventionalUnit < AbstractTopology
      attribute :remarks, :string
      attribute :quantity_type, StringOrRef
      attribute :quantity_type_reference, Reference
      attribute :catalog_symbol, Code
      attribute :conversion_to_preferred_unit, ConversionToPreferredUnit
      attribute :rough_conversion_to_preferred_unit, ConversionToPreferredUnit
      attribute :derivation_unit_term, DerivationUnitTerm, collection: true

      xml do
        root "ConventionalUnit"
        namespace "http://www.opengis.net/gml/3.2", "gml"

        map_attribute "id", to: :id, prefix: "gml", namespace: "http://www.opengis.net/gml/3.2"
        map_element "metaDataProperty", to: :meta_data_property
        map_element "description", to: :description
        map_element "descriptionReference", to: :description_reference
        map_element "identifier", to: :identifier
        map_element "name", to: :name
        map_element "remarks", to: :remarks
        map_element "quantityType", to: :quantity_type
        map_element "quantityTypeReference", to: :quantity_type_reference
        map_element "catalogSymbol", to: :catalog_symbol
        map_element "conversionToPreferredUnit", to: :conversion_to_preferred_unit
        map_element "roughConversionToPreferredUnit", to: :rough_conversion_to_preferred_unit
        map_element "derivationUnitTerm", to: :derivation_unit_term
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
ogc-gml-1.0.3 lib/ogc/gml/conventional_unit.rb
ogc-gml-1.0.2 lib/ogc/gml/conventional_unit.rb
ogc-gml-1.0.1 lib/ogc/gml/conventional_unit.rb