Class: Dina::Determination
- Inherits:
-
Object
- Object
- Dina::Determination
- Defined in:
- lib/dina/components/determination.rb
Instance Attribute Summary collapse
-
#classification ⇒ Object
Returns the value of attribute classification.
-
#determinationRemarks ⇒ Object
Returns the value of attribute determinationRemarks.
-
#determinedOn ⇒ Object
Returns the value of attribute determinedOn.
-
#determiner ⇒ Object
An array of known UUIDs for Person.
-
#isFiledAs ⇒ Object
boolean.
-
#isPrimary ⇒ Object
boolean.
-
#managedAttributes ⇒ Object
array.
-
#qualifier ⇒ Object
Returns the value of attribute qualifier.
-
#ranks ⇒ Object
Returns the value of attribute ranks.
-
#scientificName ⇒ Object
Returns the value of attribute scientificName.
-
#scientificNameDetails ⇒ Object
in the form { classificationPath: “”, classificationRanks: “” }.
-
#scientificNameSource ⇒ Object
Returns the value of attribute scientificNameSource.
-
#transcriberRemarks ⇒ Object
Returns the value of attribute transcriberRemarks.
-
#typeStatus ⇒ Object
Returns the value of attribute typeStatus.
-
#typeStatusEvidence ⇒ Object
Returns the value of attribute typeStatusEvidence.
-
#verbatimDate ⇒ Object
Returns the value of attribute verbatimDate.
-
#verbatimDeterminer ⇒ Object
Returns the value of attribute verbatimDeterminer.
-
#verbatimRemarks ⇒ Object
Returns the value of attribute verbatimRemarks.
-
#verbatimScientificName ⇒ Object
Returns the value of attribute verbatimScientificName.
Instance Method Summary collapse
-
#add_determiner(id:) ⇒ Object
Add a determiner as UUID to the array of determiner.
-
#initialize ⇒ Determination
constructor
A new instance of Determination.
-
#to_hash ⇒ Object
Produce a hash with symbolized keys.
Constructor Details
#initialize ⇒ Determination
Returns a new instance of Determination.
24 25 26 27 |
# File 'lib/dina/components/determination.rb', line 24 def initialize @scientificNameDetails = {} @determiner = [] end |
Instance Attribute Details
#classification ⇒ Object
Returns the value of attribute classification.
21 22 23 |
# File 'lib/dina/components/determination.rb', line 21 def classification @classification end |
#determinationRemarks ⇒ Object
Returns the value of attribute determinationRemarks.
9 10 11 |
# File 'lib/dina/components/determination.rb', line 9 def determinationRemarks @determinationRemarks end |
#determinedOn ⇒ Object
Returns the value of attribute determinedOn.
13 14 15 |
# File 'lib/dina/components/determination.rb', line 13 def determinedOn @determinedOn end |
#determiner ⇒ Object
An array of known UUIDs for Person
12 13 14 |
# File 'lib/dina/components/determination.rb', line 12 def determiner @determiner end |
#isFiledAs ⇒ Object
boolean
18 19 20 |
# File 'lib/dina/components/determination.rb', line 18 def isFiledAs @isFiledAs end |
#isPrimary ⇒ Object
boolean
17 18 19 |
# File 'lib/dina/components/determination.rb', line 17 def isPrimary @isPrimary end |
#managedAttributes ⇒ Object
array
19 20 21 |
# File 'lib/dina/components/determination.rb', line 19 def managedAttributes @managedAttributes end |
#qualifier ⇒ Object
Returns the value of attribute qualifier.
14 15 16 |
# File 'lib/dina/components/determination.rb', line 14 def qualifier @qualifier end |
#ranks ⇒ Object
Returns the value of attribute ranks.
22 23 24 |
# File 'lib/dina/components/determination.rb', line 22 def ranks @ranks end |
#scientificName ⇒ Object
Returns the value of attribute scientificName.
6 7 8 |
# File 'lib/dina/components/determination.rb', line 6 def scientificName @scientificName end |
#scientificNameDetails ⇒ Object
in the form { classificationPath: “”, classificationRanks: “” }
16 17 18 |
# File 'lib/dina/components/determination.rb', line 16 def scientificNameDetails @scientificNameDetails end |
#scientificNameSource ⇒ Object
Returns the value of attribute scientificNameSource.
15 16 17 |
# File 'lib/dina/components/determination.rb', line 15 def scientificNameSource @scientificNameSource end |
#transcriberRemarks ⇒ Object
Returns the value of attribute transcriberRemarks.
7 8 9 |
# File 'lib/dina/components/determination.rb', line 7 def transcriberRemarks @transcriberRemarks end |
#typeStatus ⇒ Object
Returns the value of attribute typeStatus.
10 11 12 |
# File 'lib/dina/components/determination.rb', line 10 def typeStatus @typeStatus end |
#typeStatusEvidence ⇒ Object
Returns the value of attribute typeStatusEvidence.
11 12 13 |
# File 'lib/dina/components/determination.rb', line 11 def typeStatusEvidence @typeStatusEvidence end |
#verbatimDate ⇒ Object
Returns the value of attribute verbatimDate.
5 6 7 |
# File 'lib/dina/components/determination.rb', line 5 def verbatimDate @verbatimDate end |
#verbatimDeterminer ⇒ Object
Returns the value of attribute verbatimDeterminer.
4 5 6 |
# File 'lib/dina/components/determination.rb', line 4 def verbatimDeterminer @verbatimDeterminer end |
#verbatimRemarks ⇒ Object
Returns the value of attribute verbatimRemarks.
8 9 10 |
# File 'lib/dina/components/determination.rb', line 8 def verbatimRemarks @verbatimRemarks end |
#verbatimScientificName ⇒ Object
Returns the value of attribute verbatimScientificName.
3 4 5 |
# File 'lib/dina/components/determination.rb', line 3 def verbatimScientificName @verbatimScientificName end |
Instance Method Details
#add_determiner(id:) ⇒ Object
Add a determiner as UUID to the array of determiner
56 57 58 59 |
# File 'lib/dina/components/determination.rb', line 56 def add_determiner(id:) raise PropertyValueInvalid, "Determiner must be a UUID." if !id.is_uuid? @determiner << id end |
#to_hash ⇒ Object
Produce a hash with symbolized keys
62 63 64 65 66 67 68 |
# File 'lib/dina/components/determination.rb', line 62 def to_hash hash = {} remove_instance_variable(:@classification) if @classification remove_instance_variable(:@ranks) if @ranks instance_variables.each { |var| hash[var.to_s.delete('@')] = instance_variable_get(var) } hash.deep_symbolize_keys end |