Class: GeoConcerns::Delivery::Geoserver
- Inherits:
-
Object
- Object
- GeoConcerns::Delivery::Geoserver
- Defined in:
- app/services/geo_concerns/delivery/geoserver.rb
Instance Attribute Summary collapse
-
#config ⇒ Object
readonly
Returns the value of attribute config.
-
#file_path ⇒ Object
readonly
Returns the value of attribute file_path.
-
#file_set ⇒ Object
readonly
Returns the value of attribute file_set.
-
#workspace_name ⇒ Object
readonly
Returns the value of attribute workspace_name.
Instance Method Summary collapse
- #catalog ⇒ Object
-
#initialize(file_set, file_path) ⇒ Geoserver
constructor
A new instance of Geoserver.
- #publish ⇒ Object
Constructor Details
#initialize(file_set, file_path) ⇒ Geoserver
Returns a new instance of Geoserver.
11 12 13 14 15 16 17 |
# File 'app/services/geo_concerns/delivery/geoserver.rb', line 11 def initialize(file_set, file_path) @file_set = file_set @file_path = file_path @config = fetch_config @workspace_name = @config.delete(:workspace) validate! end |
Instance Attribute Details
#config ⇒ Object (readonly)
Returns the value of attribute config.
9 10 11 |
# File 'app/services/geo_concerns/delivery/geoserver.rb', line 9 def config @config end |
#file_path ⇒ Object (readonly)
Returns the value of attribute file_path.
9 10 11 |
# File 'app/services/geo_concerns/delivery/geoserver.rb', line 9 def file_path @file_path end |
#file_set ⇒ Object (readonly)
Returns the value of attribute file_set.
9 10 11 |
# File 'app/services/geo_concerns/delivery/geoserver.rb', line 9 def file_set @file_set end |
#workspace_name ⇒ Object (readonly)
Returns the value of attribute workspace_name.
9 10 11 |
# File 'app/services/geo_concerns/delivery/geoserver.rb', line 9 def workspace_name @workspace_name end |
Instance Method Details
#catalog ⇒ Object
19 20 21 |
# File 'app/services/geo_concerns/delivery/geoserver.rb', line 19 def catalog @catalog ||= RGeoServer.catalog(config) end |
#publish ⇒ Object
23 24 25 26 27 28 29 30 31 32 |
# File 'app/services/geo_concerns/delivery/geoserver.rb', line 23 def publish case type when :vector publish_vector when :raster publish_raster end rescue StandardError => e Rails.logger.error("GeoServer delivery job failed with: #{e}") end |