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

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

Overview

An Assertion Comment.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#actionObject

The action.



3725
3726
3727
# File 'lib/ruby-fs-stack/enunciate/familytree.rb', line 3725

def action
  @action
end

#assertionObject

assertionId



3737
3738
3739
# File 'lib/ruby-fs-stack/enunciate/familytree.rb', line 3737

def assertion
  @assertion
end

#childObject

The child id for this citation



3735
3736
3737
# File 'lib/ruby-fs-stack/enunciate/familytree.rb', line 3735

def child
  @child
end

#commentObject

The citation comment.



3755
3756
3757
# File 'lib/ruby-fs-stack/enunciate/familytree.rb', line 3755

def comment
  @comment
end

#contributorObject

a reference to the contributor of the change.



3739
3740
3741
# File 'lib/ruby-fs-stack/enunciate/familytree.rb', line 3739

def contributor
  @contributor
end

#directEvidenceObject

(no documentation provided)



3747
3748
3749
# File 'lib/ruby-fs-stack/enunciate/familytree.rb', line 3747

def directEvidence
  @directEvidence
end

#dispositionObject

the assertion assertion.



3743
3744
3745
# File 'lib/ruby-fs-stack/enunciate/familytree.rb', line 3743

def disposition
  @disposition
end

#entryDateObject

(no documentation provided)



3749
3750
3751
# File 'lib/ruby-fs-stack/enunciate/familytree.rb', line 3749

def 
  @entryDate
end

#fieldsObject

citation fields.



3751
3752
3753
# File 'lib/ruby-fs-stack/enunciate/familytree.rb', line 3751

def fields
  @fields
end

#idObject

The id of the citation.



3723
3724
3725
# File 'lib/ruby-fs-stack/enunciate/familytree.rb', line 3723

def id
  @id
end

#parentsObject

The parent ids for this citation



3731
3732
3733
# File 'lib/ruby-fs-stack/enunciate/familytree.rb', line 3731

def parents
  @parents
end

#personObject

The persona id for this citation



3729
3730
3731
# File 'lib/ruby-fs-stack/enunciate/familytree.rb', line 3729

def person
  @person
end

#primarySourceObject

(no documentation provided)



3745
3746
3747
# File 'lib/ruby-fs-stack/enunciate/familytree.rb', line 3745

def primarySource
  @primarySource
end

#requestedIdObject

The requestedId of the citation.



3719
3720
3721
# File 'lib/ruby-fs-stack/enunciate/familytree.rb', line 3719

def requestedId
  @requestedId
end

#sourceObject

The citation source.



3753
3754
3755
# File 'lib/ruby-fs-stack/enunciate/familytree.rb', line 3753

def source
  @source
end

#spousesObject

The spouse ids for this citation



3733
3734
3735
# File 'lib/ruby-fs-stack/enunciate/familytree.rb', line 3733

def spouses
  @spouses
end

#submitterObject

a reference to the submitter.



3741
3742
3743
# File 'lib/ruby-fs-stack/enunciate/familytree.rb', line 3741

def submitter
  @submitter
end

#tempIdObject

A temporary id for this citation (e.g. for a citation not persisted yet).



3727
3728
3729
# File 'lib/ruby-fs-stack/enunciate/familytree.rb', line 3727

def tempId
  @tempId
end

#typeObject

citation type



3721
3722
3723
# File 'lib/ruby-fs-stack/enunciate/familytree.rb', line 3721

def type
  @type
end

Class Method Details

.from_json(o) ⇒ Object

constructs a Citation from a (parsed) JSON hash



3835
3836
3837
3838
3839
3840
3841
3842
3843
# File 'lib/ruby-fs-stack/enunciate/familytree.rb', line 3835

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



3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
# File 'lib/ruby-fs-stack/enunciate/familytree.rb', line 3800

def init_jaxb_json_hash(_o)
  @requestedId = String.from_json(_o['requestedId']) unless _o['requestedId'].nil?
  @type = String.from_json(_o['type']) unless _o['type'].nil?
  @id = String.from_json(_o['id']) unless _o['id'].nil?
  @action = String.from_json(_o['action']) unless _o['action'].nil?
  @tempId = String.from_json(_o['tempId']) unless _o['tempId'].nil?
  @person = Org::Familysearch::Ws::Familytree::V2::Schema::EntityReference.from_json(_o['person']) unless _o['person'].nil?
  if !_o['parents'].nil?
    @parents = Array.new
    _oa = _o['parents']
    _oa.each { | _item | @parents.push Org::Familysearch::Ws::Familytree::V2::Schema::EntityReference.from_json(_item) }
  end
  if !_o['spouses'].nil?
    @spouses = Array.new
    _oa = _o['spouses']
    _oa.each { | _item | @spouses.push Org::Familysearch::Ws::Familytree::V2::Schema::EntityReference.from_json(_item) }
  end
  @child = Org::Familysearch::Ws::Familytree::V2::Schema::EntityReference.from_json(_o['child']) unless _o['child'].nil?
  @assertion = Org::Familysearch::Ws::Familytree::V2::Schema::EntityReference.from_json(_o['assertion']) unless _o['assertion'].nil?
  @contributor = Org::Familysearch::Ws::Familytree::V2::Schema::EntityReference.from_json(_o['contributor']) unless _o['contributor'].nil?
  @submitter = Org::Familysearch::Ws::Familytree::V2::Schema::EntityReference.from_json(_o['submitter']) unless _o['submitter'].nil?
  @disposition = String.from_json(_o['disposition']) unless _o['disposition'].nil?
  @primarySource = Boolean.from_json(_o['primarySource']) unless _o['primarySource'].nil?
  @directEvidence = Boolean.from_json(_o['directEvidence']) unless _o['directEvidence'].nil?
  @entryDate = String.from_json(_o['entryDate']) unless _o['entryDate'].nil?
  if !_o['fields'].nil?
    @fields = Array.new
    _oa = _o['fields']
    _oa.each { | _item | @fields.push Org::Familysearch::Ws::Familytree::V2::Schema::CitationField.from_json(_item) }
  end
  @source = Org::Familysearch::Ws::Familytree::V2::Schema::Source.from_json(_o['source']) unless _o['source'].nil?
  @comment = String.from_json(_o['comment']) unless _o['comment'].nil?
end

#to_jaxb_json_hashObject

the json hash for this Citation



3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
# File 'lib/ruby-fs-stack/enunciate/familytree.rb', line 3758

def to_jaxb_json_hash
  _h = {}
  _h['requestedId'] = requestedId.to_jaxb_json_hash unless requestedId.nil?
  _h['type'] = type.to_jaxb_json_hash unless type.nil?
  _h['id'] = id.to_jaxb_json_hash unless id.nil?
  _h['action'] = action.to_jaxb_json_hash unless action.nil?
  _h['tempId'] = tempId.to_jaxb_json_hash unless tempId.nil?
  _h['person'] = person.to_jaxb_json_hash unless person.nil?
  if !parents.nil?
    _ha = Array.new
    parents.each { | _item | _ha.push _item.to_jaxb_json_hash }
    _h['parents'] = _ha
  end
  if !spouses.nil?
    _ha = Array.new
    spouses.each { | _item | _ha.push _item.to_jaxb_json_hash }
    _h['spouses'] = _ha
  end
  _h['child'] = child.to_jaxb_json_hash unless child.nil?
  _h['assertion'] = assertion.to_jaxb_json_hash unless assertion.nil?
  _h['contributor'] = contributor.to_jaxb_json_hash unless contributor.nil?
  _h['submitter'] = submitter.to_jaxb_json_hash unless submitter.nil?
  _h['disposition'] = disposition.to_jaxb_json_hash unless disposition.nil?
  _h['primarySource'] = primarySource.to_jaxb_json_hash unless primarySource.nil?
  _h['directEvidence'] = directEvidence.to_jaxb_json_hash unless directEvidence.nil?
  _h['entryDate'] = .to_jaxb_json_hash unless .nil?
  if !fields.nil?
    _ha = Array.new
    fields.each { | _item | _ha.push _item.to_jaxb_json_hash }
    _h['fields'] = _ha
  end
  _h['source'] = source.to_jaxb_json_hash unless source.nil?
  _h['comment'] = comment.to_jaxb_json_hash unless comment.nil?
  return _h
end

#to_jsonObject

the json (string form) for this Citation



3795
3796
3797
# File 'lib/ruby-fs-stack/enunciate/familytree.rb', line 3795

def to_json
  to_jaxb_json_hash.to_json
end