Class: Org::Familysearch::Ws::Familytree::V2::Schema::Source
- Defined in:
- lib/ruby-fs-stack/enunciate/familytree.rb
Overview
Citation Source
Instance Attribute Summary collapse
-
#detail ⇒ Object
source detail.
-
#fields ⇒ Object
source fields.
-
#media ⇒ Object
source media type.
-
#original ⇒ Object
(no documentation provided).
-
#repository ⇒ Object
The source repository.
-
#type ⇒ Object
source type.
Class Method Summary collapse
-
.from_json(o) ⇒ Object
constructs a Source from a (parsed) JSON hash.
Instance Method Summary collapse
-
#init_jaxb_json_hash(_o) ⇒ Object
initializes this Source with a json hash.
-
#to_jaxb_json_hash ⇒ Object
the json hash for this Source.
-
#to_json ⇒ Object
the json (string form) for this Source.
Instance Attribute Details
#detail ⇒ Object
source detail
4242 4243 4244 |
# File 'lib/ruby-fs-stack/enunciate/familytree.rb', line 4242 def detail @detail end |
#fields ⇒ Object
source fields.
4248 4249 4250 |
# File 'lib/ruby-fs-stack/enunciate/familytree.rb', line 4248 def fields @fields end |
#media ⇒ Object
source media type
4244 4245 4246 |
# File 'lib/ruby-fs-stack/enunciate/familytree.rb', line 4244 def media @media end |
#original ⇒ Object
(no documentation provided)
4240 4241 4242 |
# File 'lib/ruby-fs-stack/enunciate/familytree.rb', line 4240 def original @original end |
#repository ⇒ Object
The source repository.
4246 4247 4248 |
# File 'lib/ruby-fs-stack/enunciate/familytree.rb', line 4246 def repository @repository end |
#type ⇒ Object
source type
4238 4239 4240 |
# File 'lib/ruby-fs-stack/enunciate/familytree.rb', line 4238 def type @type end |
Class Method Details
.from_json(o) ⇒ Object
constructs a Source from a (parsed) JSON hash
4286 4287 4288 4289 4290 4291 4292 4293 4294 |
# File 'lib/ruby-fs-stack/enunciate/familytree.rb', line 4286 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 Source with a json hash
4272 4273 4274 4275 4276 4277 4278 4279 4280 4281 4282 4283 |
# File 'lib/ruby-fs-stack/enunciate/familytree.rb', line 4272 def init_jaxb_json_hash(_o) @type = String.from_json(_o['type']) unless _o['type'].nil? @original = Boolean.from_json(_o['original']) unless _o['original'].nil? @detail = String.from_json(_o['detail']) unless _o['detail'].nil? @media = String.from_json(_o['media']) unless _o['media'].nil? @repository = Org::Familysearch::Ws::Familytree::V2::Schema::Repository.from_json(_o['repository']) unless _o['repository'].nil? if !_o['fields'].nil? @fields = Array.new _oa = _o['fields'] _oa.each { | _item | @fields.push Org::Familysearch::Ws::Familytree::V2::Schema::SourceField.from_json(_item) } end end |
#to_jaxb_json_hash ⇒ Object
the json hash for this Source
4251 4252 4253 4254 4255 4256 4257 4258 4259 4260 4261 4262 4263 4264 |
# File 'lib/ruby-fs-stack/enunciate/familytree.rb', line 4251 def to_jaxb_json_hash _h = {} _h['type'] = type.to_jaxb_json_hash unless type.nil? _h['original'] = original.to_jaxb_json_hash unless original.nil? _h['detail'] = detail.to_jaxb_json_hash unless detail.nil? _h['media'] = media.to_jaxb_json_hash unless media.nil? _h['repository'] = repository.to_jaxb_json_hash unless repository.nil? if !fields.nil? _ha = Array.new fields.each { | _item | _ha.push _item.to_jaxb_json_hash } _h['fields'] = _ha end return _h end |
#to_json ⇒ Object
the json (string form) for this Source
4267 4268 4269 |
# File 'lib/ruby-fs-stack/enunciate/familytree.rb', line 4267 def to_json to_jaxb_json_hash.to_json end |