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

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

Overview

A standardized place.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#normalizedObject

The normalized form of the place.



2872
2873
2874
# File 'lib/ruby-fs-stack/enunciate/familytree.rb', line 2872

def normalized
  @normalized
end

#originalObject

The place value.



2870
2871
2872
# File 'lib/ruby-fs-stack/enunciate/familytree.rb', line 2870

def original
  @original
end

#selectedObject

true, if the normalization is user selected.



2874
2875
2876
# File 'lib/ruby-fs-stack/enunciate/familytree.rb', line 2874

def selected
  @selected
end

Class Method Details

.from_json(o) ⇒ Object

constructs a Place from a (parsed) JSON hash



2898
2899
2900
2901
2902
2903
2904
2905
2906
# File 'lib/ruby-fs-stack/enunciate/familytree.rb', line 2898

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 Place with a json hash



2891
2892
2893
2894
2895
# File 'lib/ruby-fs-stack/enunciate/familytree.rb', line 2891

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

#to_jaxb_json_hashObject

the json hash for this Place



2877
2878
2879
2880
2881
2882
2883
# File 'lib/ruby-fs-stack/enunciate/familytree.rb', line 2877

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['selected'] = selected.to_jaxb_json_hash unless selected.nil?
  return _h
end

#to_jsonObject

the json (string form) for this Place



2886
2887
2888
# File 'lib/ruby-fs-stack/enunciate/familytree.rb', line 2886

def to_json
  to_jaxb_json_hash.to_json
end