Class: Dina::GeoreferenceAssertion

Inherits:
Object
  • Object
show all
Defined in:
lib/dina/components/georeference_assertion.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeGeoreferenceAssertion

Returns a new instance of GeoreferenceAssertion.



17
18
19
# File 'lib/dina/components/georeference_assertion.rb', line 17

def initialize
  @georeferencedBy = []
end

Instance Attribute Details

#createdOnObject

Returns the value of attribute createdOn.



15
16
17
# File 'lib/dina/components/georeference_assertion.rb', line 15

def createdOn
  @createdOn
end

#dwcCoordinateUncertaintyInMetersObject

Returns the value of attribute dwcCoordinateUncertaintyInMeters.



5
6
7
# File 'lib/dina/components/georeference_assertion.rb', line 5

def dwcCoordinateUncertaintyInMeters
  @dwcCoordinateUncertaintyInMeters
end

#dwcDecimalLatitudeObject

Returns the value of attribute dwcDecimalLatitude.



3
4
5
# File 'lib/dina/components/georeference_assertion.rb', line 3

def dwcDecimalLatitude
  @dwcDecimalLatitude
end

#dwcDecimalLongitudeObject

Returns the value of attribute dwcDecimalLongitude.



4
5
6
# File 'lib/dina/components/georeference_assertion.rb', line 4

def dwcDecimalLongitude
  @dwcDecimalLongitude
end

#dwcGeodeticDatumObject

Returns the value of attribute dwcGeodeticDatum.



12
13
14
# File 'lib/dina/components/georeference_assertion.rb', line 12

def dwcGeodeticDatum
  @dwcGeodeticDatum
end

#dwcGeoreferencedDateObject

Returns the value of attribute dwcGeoreferencedDate.



6
7
8
# File 'lib/dina/components/georeference_assertion.rb', line 6

def dwcGeoreferencedDate
  @dwcGeoreferencedDate
end

#dwcGeoreferenceProtocolObject

Returns the value of attribute dwcGeoreferenceProtocol.



9
10
11
# File 'lib/dina/components/georeference_assertion.rb', line 9

def dwcGeoreferenceProtocol
  @dwcGeoreferenceProtocol
end

#dwcGeoreferenceRemarksObject

Returns the value of attribute dwcGeoreferenceRemarks.



11
12
13
# File 'lib/dina/components/georeference_assertion.rb', line 11

def dwcGeoreferenceRemarks
  @dwcGeoreferenceRemarks
end

#dwcGeoreferenceSourcesObject

Returns the value of attribute dwcGeoreferenceSources.



10
11
12
# File 'lib/dina/components/georeference_assertion.rb', line 10

def dwcGeoreferenceSources
  @dwcGeoreferenceSources
end

#dwcGeoreferenceVerificationStatusObject

Returns the value of attribute dwcGeoreferenceVerificationStatus.



14
15
16
# File 'lib/dina/components/georeference_assertion.rb', line 14

def dwcGeoreferenceVerificationStatus
  @dwcGeoreferenceVerificationStatus
end

#georeferencedByObject

Returns the value of attribute georeferencedBy.



7
8
9
# File 'lib/dina/components/georeference_assertion.rb', line 7

def georeferencedBy
  @georeferencedBy
end

#isPrimaryObject

Returns the value of attribute isPrimary.



13
14
15
# File 'lib/dina/components/georeference_assertion.rb', line 13

def isPrimary
  @isPrimary
end

#literalGeoreferencedByObject

Returns the value of attribute literalGeoreferencedBy.



8
9
10
# File 'lib/dina/components/georeference_assertion.rb', line 8

def literalGeoreferencedBy
  @literalGeoreferencedBy
end

Instance Method Details

#add_georeferencedBy(id:) ⇒ Object

Add a georeferencedBy as UUID to the array

Parameters:

  • id (String)

    a UUID for a georeferencedBy

Raises:



24
25
26
27
# File 'lib/dina/components/georeference_assertion.rb', line 24

def add_georeferencedBy(id:)
  raise PropertyValueInvalid, "georeferencedBy must be a UUID." if !id.is_uuid?
  @georeferencedBy << id
end

#to_hashObject



29
30
31
32
33
# File 'lib/dina/components/georeference_assertion.rb', line 29

def to_hash
  hash = {}
  instance_variables.each { |var| hash[var.to_s.delete('@')] = instance_variable_get(var) }
  hash.deep_symbolize_keys
end