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

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

Overview

Created by IntelliJ IDEA. User: kuehneds Date: Jan 26, 2010 Time: 10:36:46 PM To change this template use File | Settings | File Templates.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#distanceObject

(no documentation provided)



1701
1702
1703
# File 'lib/ruby-fs-stack/enunciate/familytree.rb', line 1701

def distance
  @distance
end

#idObject

(no documentation provided)



1697
1698
1699
# File 'lib/ruby-fs-stack/enunciate/familytree.rb', line 1697

def id
  @id
end

#pathsObject

(no documentation provided)



1699
1700
1701
# File 'lib/ruby-fs-stack/enunciate/familytree.rb', line 1699

def paths
  @paths
end

Class Method Details

.from_json(o) ⇒ Object

constructs a RelationshipQueryPerson from a (parsed) JSON hash



1733
1734
1735
1736
1737
1738
1739
1740
1741
# File 'lib/ruby-fs-stack/enunciate/familytree.rb', line 1733

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



1722
1723
1724
1725
1726
1727
1728
1729
1730
# File 'lib/ruby-fs-stack/enunciate/familytree.rb', line 1722

def init_jaxb_json_hash(_o)
  @id = String.from_json(_o['id']) unless _o['id'].nil?
  if !_o['paths'].nil?
    @paths = Array.new
    _oa = _o['paths']
    _oa.each { | _item | @paths.push Org::Familysearch::Ws::Familytree::V2::Schema::RelationshipQueryPath.from_json(_item) }
  end
  @distance = Fixnum.from_json(_o['distance']) unless _o['distance'].nil?
end

#to_jaxb_json_hashObject

the json hash for this RelationshipQueryPerson



1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
# File 'lib/ruby-fs-stack/enunciate/familytree.rb', line 1704

def to_jaxb_json_hash
  _h = {}
  _h['id'] = id.to_jaxb_json_hash unless id.nil?
  if !paths.nil?
    _ha = Array.new
    paths.each { | _item | _ha.push _item.to_jaxb_json_hash }
    _h['paths'] = _ha
  end
  _h['distance'] = distance.to_jaxb_json_hash unless distance.nil?
  return _h
end

#to_jsonObject

the json (string form) for this RelationshipQueryPerson



1717
1718
1719
# File 'lib/ruby-fs-stack/enunciate/familytree.rb', line 1717

def to_json
  to_jaxb_json_hash.to_json
end