Class: GeoConcerns::Discovery::DocumentBuilder::Wxs

Inherits:
Object
  • Object
show all
Defined in:
app/services/geo_concerns/discovery/document_builder/wxs.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(geo_concern) ⇒ Wxs

Returns a new instance of Wxs.



6
7
8
9
# File 'app/services/geo_concerns/discovery/document_builder/wxs.rb', line 6

def initialize(geo_concern)
  @geo_concern = geo_concern
  @config = fetch_config
end

Instance Attribute Details

#geo_concernObject (readonly)

Returns the value of attribute geo_concern.



5
6
7
# File 'app/services/geo_concerns/discovery/document_builder/wxs.rb', line 5

def geo_concern
  @geo_concern
end

Instance Method Details

#identifierString

Returns the identifier to use with WMS/WFS/WCS services.

Returns:

  • (String)

    wxs indentifier



13
14
15
16
17
# File 'app/services/geo_concerns/discovery/document_builder/wxs.rb', line 13

def identifier
  return unless geo_file_set?
  return file_set.id unless @config && visibility
  "#{@config[:workspace]}:#{file_set.id}" if @config[:workspace]
end

#wfs_pathString

Returns the wfs server url.

Returns:

  • (String)

    wfs server url



28
29
30
31
# File 'app/services/geo_concerns/discovery/document_builder/wxs.rb', line 28

def wfs_path
  return unless @config && visibility && geo_file_set?
  "#{path}/#{@config[:workspace]}/wfs"
end

#wms_pathString

Returns the wms server url.

Returns:

  • (String)

    wms server url



21
22
23
24
# File 'app/services/geo_concerns/discovery/document_builder/wxs.rb', line 21

def wms_path
  return unless @config && visibility && geo_file_set?
  "#{path}/#{@config[:workspace]}/wms"
end