lib/psulib_traject/processors/format.rb
def resolve_formats
      formats = field949t
      preferred_format = PreferredFormat.call(record: record, local_formats: formats)
      return [preferred_format] unless preferred_format.nil?

      formats = government_docs_or_instructional_materials if formats.empty?
      formats = RecordType.call(record: record, current_formats: formats)
      formats = physical_description if formats.empty?

      # If no other values are present, use the default value "Other"
      formats << 'Other' if formats.empty?

      formats
        .compact
        .uniq
    end
# Check 949t, leader6 and 007 formats
Check 949t, leader6 and 007 formats
Check 949t leader6 and 007 formats
def resolve_formats
      formats = field949t
      preferred_format = PreferredFormat.call(record: record, local_formats: formats)
      return [preferred_format] unless preferred_format.nil?
      formats = government_docs_or_instructional_materials if formats.empty?
      formats = RecordType.call(record: record, current_formats: formats)
      formats = physical_description if formats.empty?
      formats << 'Other' if formats.empty?
      formats
        .compact
        .uniq
    end
def resolve_formats formats = field949t preferred_format = PreferredFormat . call ( record : record , local_formats : formats ) return [ preferred_format ] unless preferred_format . nil? formats = government_docs_or_instructional_materials if formats . empty? formats = RecordType . call ( record : record , current_formats : formats ) formats = physical_description if formats . empty? formats << 'Other' if formats . empty? formats . compact . uniq end
Check 949t, leader6 and 007 formats
Check 949t leader6 and 007 formats
# If no other values are present, use the default value "Other"