Class: GeoConcerns::Discovery::AbstractDocument

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

Direct Known Subclasses

GeoblacklightDocument

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#access_rightsObject

Returns the value of attribute access_rights.



4
5
6
# File 'app/services/geo_concerns/discovery/abstract_document.rb', line 4

def access_rights
  @access_rights
end

#creatorObject

Returns the value of attribute creator.



4
5
6
# File 'app/services/geo_concerns/discovery/abstract_document.rb', line 4

def creator
  @creator
end

#dct_referencesObject

Returns the value of attribute dct_references.



4
5
6
# File 'app/services/geo_concerns/discovery/abstract_document.rb', line 4

def dct_references
  @dct_references
end

#descriptionObject

Returns the value of attribute description.



4
5
6
# File 'app/services/geo_concerns/discovery/abstract_document.rb', line 4

def description
  @description
end

#downloadObject

Returns the value of attribute download.



4
5
6
# File 'app/services/geo_concerns/discovery/abstract_document.rb', line 4

def download
  @download
end

#fgdcObject

Returns the value of attribute fgdc.



4
5
6
# File 'app/services/geo_concerns/discovery/abstract_document.rb', line 4

def fgdc
  @fgdc
end

#formatObject

Returns the value of attribute format.



4
5
6
# File 'app/services/geo_concerns/discovery/abstract_document.rb', line 4

def format
  @format
end

#geom_typeObject

Returns the value of attribute geom_type.



4
5
6
# File 'app/services/geo_concerns/discovery/abstract_document.rb', line 4

def geom_type
  @geom_type
end

#identifierObject

Returns the value of attribute identifier.



4
5
6
# File 'app/services/geo_concerns/discovery/abstract_document.rb', line 4

def identifier
  @identifier
end

#iso19139Object

Returns the value of attribute iso19139.



4
5
6
# File 'app/services/geo_concerns/discovery/abstract_document.rb', line 4

def iso19139
  @iso19139
end

#issuedObject

Returns the value of attribute issued.



4
5
6
# File 'app/services/geo_concerns/discovery/abstract_document.rb', line 4

def issued
  @issued
end

#languageObject

Returns the value of attribute language.



4
5
6
# File 'app/services/geo_concerns/discovery/abstract_document.rb', line 4

def language
  @language
end

#layer_modifiedObject

Returns the value of attribute layer_modified.



4
5
6
# File 'app/services/geo_concerns/discovery/abstract_document.rb', line 4

def layer_modified
  @layer_modified
end

#layer_yearObject

Returns the value of attribute layer_year.



4
5
6
# File 'app/services/geo_concerns/discovery/abstract_document.rb', line 4

def layer_year
  @layer_year
end

#modsObject

Returns the value of attribute mods.



4
5
6
# File 'app/services/geo_concerns/discovery/abstract_document.rb', line 4

def mods
  @mods
end

#provenanceObject

Returns the value of attribute provenance.



4
5
6
# File 'app/services/geo_concerns/discovery/abstract_document.rb', line 4

def provenance
  @provenance
end

#publisherObject

Returns the value of attribute publisher.



4
5
6
# File 'app/services/geo_concerns/discovery/abstract_document.rb', line 4

def publisher
  @publisher
end

#resource_typeObject

Returns the value of attribute resource_type.



4
5
6
# File 'app/services/geo_concerns/discovery/abstract_document.rb', line 4

def resource_type
  @resource_type
end

#slugObject

Returns the value of attribute slug.



4
5
6
# File 'app/services/geo_concerns/discovery/abstract_document.rb', line 4

def slug
  @slug
end

#solr_coverageObject

Returns the value of attribute solr_coverage.



4
5
6
# File 'app/services/geo_concerns/discovery/abstract_document.rb', line 4

def solr_coverage
  @solr_coverage
end

#spatialObject

Returns the value of attribute spatial.



4
5
6
# File 'app/services/geo_concerns/discovery/abstract_document.rb', line 4

def spatial
  @spatial
end

#subjectObject

Returns the value of attribute subject.



4
5
6
# File 'app/services/geo_concerns/discovery/abstract_document.rb', line 4

def subject
  @subject
end

#temporalObject

Returns the value of attribute temporal.



4
5
6
# File 'app/services/geo_concerns/discovery/abstract_document.rb', line 4

def temporal
  @temporal
end

#thumbnailObject

Returns the value of attribute thumbnail.



4
5
6
# File 'app/services/geo_concerns/discovery/abstract_document.rb', line 4

def thumbnail
  @thumbnail
end

#titleObject

Returns the value of attribute title.



4
5
6
# File 'app/services/geo_concerns/discovery/abstract_document.rb', line 4

def title
  @title
end

#urlObject

Returns the value of attribute url.



4
5
6
# File 'app/services/geo_concerns/discovery/abstract_document.rb', line 4

def url
  @url
end

#wfs_pathObject

Returns the value of attribute wfs_path.



4
5
6
# File 'app/services/geo_concerns/discovery/abstract_document.rb', line 4

def wfs_path
  @wfs_path
end

#wms_pathObject

Returns the value of attribute wms_path.



4
5
6
# File 'app/services/geo_concerns/discovery/abstract_document.rb', line 4

def wms_path
  @wms_path
end

#wxs_identifierObject

Returns the value of attribute wxs_identifier.



4
5
6
# File 'app/services/geo_concerns/discovery/abstract_document.rb', line 4

def wxs_identifier
  @wxs_identifier
end

Instance Method Details

#clean_document(hash) ⇒ Hash

Cleans the document hash by removing unused fields.

Parameters:

  • document (Hash)

    hash

Returns:

  • (Hash)

    cleaned document hash



14
15
16
17
18
19
20
21
22
# File 'app/services/geo_concerns/discovery/abstract_document.rb', line 14

def clean_document(hash)
  hash.delete_if do |_k, v|
    begin
      v.nil? || v.empty?
    rescue
      false
    end
  end
end

#to_hash(_arg) ⇒ Object



24
25
26
# File 'app/services/geo_concerns/discovery/abstract_document.rb', line 24

def to_hash(_arg)
  raise 'this method should be overriden and return the document as a hash'
end

#to_json(_arg) ⇒ Object



28
29
30
# File 'app/services/geo_concerns/discovery/abstract_document.rb', line 28

def to_json(_arg)
  raise 'this method should be overriden and return the document as json'
end

#to_xml(_arg) ⇒ Object



32
33
34
# File 'app/services/geo_concerns/discovery/abstract_document.rb', line 32

def to_xml(_arg)
  raise 'this method should be overriden and return the document as xml'
end