Class: Org::Familysearch::Ws::Familytree::V2::Schema::GenDate

Inherits:
Object
  • Object
show all
Defined in:
lib/ruby-fs-stack/enunciate/familytree.rb

Overview

A standardized date.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#astroObject

The astro date.



646
647
648
# File 'lib/ruby-fs-stack/enunciate/familytree.rb', line 646

def astro
  @astro
end

#gedcomObject

The gedcom value.



642
643
644
# File 'lib/ruby-fs-stack/enunciate/familytree.rb', line 642

def gedcom
  @gedcom
end

#normalizedObject

The normalized value.



640
641
642
# File 'lib/ruby-fs-stack/enunciate/familytree.rb', line 640

def normalized
  @normalized
end

#numericObject

The numeric value.



644
645
646
# File 'lib/ruby-fs-stack/enunciate/familytree.rb', line 644

def numeric
  @numeric
end

#originalObject

The date value.



638
639
640
# File 'lib/ruby-fs-stack/enunciate/familytree.rb', line 638

def original
  @original
end

#selectedObject

true, if the normalization is user selected.



648
649
650
# File 'lib/ruby-fs-stack/enunciate/familytree.rb', line 648

def selected
  @selected
end

Class Method Details

.from_json(o) ⇒ Object

constructs a GenDate from a (parsed) JSON hash



678
679
680
681
682
683
684
685
686
# File 'lib/ruby-fs-stack/enunciate/familytree.rb', line 678

def self.from_json(o)
  if o.nil?
    return nil
  else
    inst = new
    inst.init_jaxb_json_hash o
    return inst
  end
end

Instance Method Details

#init_jaxb_json_hash(_o) ⇒ Object

initializes this GenDate with a json hash



668
669
670
671
672
673
674
675
# File 'lib/ruby-fs-stack/enunciate/familytree.rb', line 668

def init_jaxb_json_hash(_o)
  @original = String.from_json(_o['original']) unless _o['original'].nil?
  @normalized = String.from_json(_o['normalized']) unless _o['normalized'].nil?
  @gedcom = String.from_json(_o['gedcom']) unless _o['gedcom'].nil?
  @numeric = String.from_json(_o['numeric']) unless _o['numeric'].nil?
  @astro = Org::Familysearch::Ws::Familytree::V2::Schema::DateAstro.from_json(_o['astro']) unless _o['astro'].nil?
  @selected = Boolean.from_json(_o['selected']) unless _o['selected'].nil?
end

#to_jaxb_json_hashObject

the json hash for this GenDate



651
652
653
654
655
656
657
658
659
660
# File 'lib/ruby-fs-stack/enunciate/familytree.rb', line 651

def to_jaxb_json_hash
  _h = {}
  _h['original'] = original.to_jaxb_json_hash unless original.nil?
  _h['normalized'] = normalized.to_jaxb_json_hash unless normalized.nil?
  _h['gedcom'] = gedcom.to_jaxb_json_hash unless gedcom.nil?
  _h['numeric'] = numeric.to_jaxb_json_hash unless numeric.nil?
  _h['astro'] = astro.to_jaxb_json_hash unless astro.nil?
  _h['selected'] = selected.to_jaxb_json_hash unless selected.nil?
  return _h
end

#to_jsonObject

the json (string form) for this GenDate



663
664
665
# File 'lib/ruby-fs-stack/enunciate/familytree.rb', line 663

def to_json
  to_jaxb_json_hash.to_json
end