app/models/dataset.rb
# Updates the metadata when the provider is feature service
# It connects to the feature service and extracts the description,
# name, and fields
Updates the metadata when the provider is feature service
It connects to the feature service and extracts the description,
name, and fields
Updates the metadata when the provider is feature service It connects to the feature service and extracts the description name and fields
def build_arcgis_metadata
    @metadata = []
    languages.each do |language, _value|
      lang_metadata = {}
      arcgis_metadata = ArcgisService.build_metadata(connector_url)
      lang_metadata[:description] = arcgis_metadata['description']
      lang_metadata[:source] = arcgis_metadata['copyrightText']
      columns = {}
      arcgis_metadata['fields']&.each { |f| columns[f['name']] = {'alias': f['alias']} }
      lang_metadata[:columns] = columns
      lang_metadata[:language] = language
      @metadata.push lang_metadata
    end
  end
def build_arcgis_metadata @metadata = [ ] languages . each do | language , _value | lang_metadata = { } arcgis_metadata = ArcgisService . build_metadata ( connector_url ) lang_metadata [ :description ] = arcgis_metadata [ 'description' ] lang_metadata [ :source ] = arcgis_metadata [ 'copyrightText' ] columns = { } arcgis_metadata [ 'fields' ] &. each { | f | columns [ f [ 'name' ] ] = { 'alias' : f [ 'alias' ] } } lang_metadata [ :columns ] = columns lang_metadata [ :language ] = language @metadata . push lang_metadata end end
Updates the metadata when the provider is feature service
It connects to the feature service and extracts the description,
name, and fields
Updates the metadata when the provider is feature service It connects to the feature service and extracts the description name and fields