コード例 #1
0
 /// <summary>
 /// Visits the source reference.
 /// </summary>
 /// <param name="sourceReference">The source reference to visit.</param>
 public override void VisitSourceReference(Gx.Source.SourceReference sourceReference)
 {
     if (sourceReference.Id != null)
     {
         this.dictionary.Add(sourceReference.Id, sourceReference);
     }
     base.VisitSourceReference(sourceReference);
 }
コード例 #2
0
 /**
  * Build out this source description by adding a source reference.
  * @param source The source reference.
  * @return this.
  */
 public SourceDescription SetSource(SourceReference source)
 {
     if (this._sources == null)
     {
         this._sources = new List <SourceReference>();
     }
     this._sources.Add(source);
     return(this);
 }
コード例 #3
0
 /**
  * Build out this source description with a component of.
  * @param componentOf The component of.
  * @return this.
  */
 public SourceDescription SetComponentOf(SourceDescription componentOf)
 {
     ComponentOf = new SourceReference().SetDescription(componentOf);
     return(this);
 }
コード例 #4
0
 /**
  * Build out this source description with a component of.
  * @param componentOf The component of.
  * @return this.
  */
 public SourceDescription SetComponentOf(SourceReference componentOf)
 {
     ComponentOf = componentOf;
     return(this);
 }
コード例 #5
0
 public virtual void VisitSourceReference(SourceReference sourceReference)
 {
     //no-op
 }
コード例 #6
0
 /**
  * Build out this source description with a component of.
  * @param componentOf The component of.
  * @return this.
  */
 public SourceDescription SetComponentOf(SourceDescription componentOf)
 {
     ComponentOf = new SourceReference().SetDescription(componentOf);
     return this;
 }
コード例 #7
0
 /**
  * Build out this source description with a component of.
  * @param componentOf The component of.
  * @return this.
  */
 public SourceDescription SetComponentOf(SourceReference componentOf)
 {
     ComponentOf = componentOf;
     return this;
 }
コード例 #8
0
 /**
  * Build out this source description by adding a source reference.
  * @param source The source reference.
  * @return this.
  */
 public SourceDescription SetSource(SourceReference source)
 {
     if (this._sources == null)
     {
         this._sources = new List<SourceReference>();
     }
     this._sources.Add(source);
     return this;
 }
コード例 #9
0
ファイル: Subject.cs プロジェクト: Herbert42/gedcomx-csharp
 /**
  * Add an media reference associated with this subject.
  *
  * @param mediaRef The reference to the media to be added.
  */
 public void AddMedia(SourceReference mediaRef)
 {
     if (mediaRef != null)
     {
         if (_media == null)
         {
             _media = new List<SourceReference>();
         }
         _media.Add(mediaRef);
     }
 }
コード例 #10
0
ファイル: Subject.cs プロジェクト: Herbert42/gedcomx-csharp
 /**
  * Build up this subject with a media reference.
  *
  * @param media The media reference.
  * @return this.
  */
 public Subject SetMedia(SourceReference media)
 {
     AddMedia(media);
     return this;
 }
コード例 #11
0
 public override void VisitSourceReference(SourceReference sourceReference)
 {
     BindIfNeeded(sourceReference);
     base.VisitSourceReference(sourceReference);
 }
コード例 #12
0
 /**
  * Add a source reference.
  *
  * @param source The source reference to be added.
  */
 public void AddSource(SourceReference source)
 {
     if (source != null)
     {
         if (_sources == null)
         {
             _sources = new List<SourceReference>();
         }
         _sources.Add(source);
     }
 }
コード例 #13
0
 /**
  * Build up this conclusion with a source reference.
  *
  * @param sourceReference The source reference.
  * @return this.
  */
 public Conclusion SetSource(SourceReference sourceReference)
 {
     AddSource(sourceReference);
     return this;
 }
コード例 #14
0
        private List<SourceDescription> CiteGeorgeMarthaAndMarriage(Person george, Person martha, Relationship relationship)
        {
            SourceDescription georgeSource = new SourceDescription();
            georgeSource.SetId("EEE-EEEE");
            georgeSource.SetAbout("http://en.wikipedia.org/wiki/George_washington");
            SourceCitation georgeCitation = new SourceCitation();
            georgeCitation.SetValue("\"George Washington.\" Wikipedia, The Free Encyclopedia. Wikimedia Foundation, Inc. 24 October 2012.");
            georgeSource.SetCitation(georgeCitation);

            SourceDescription marthaSource = new SourceDescription();
            marthaSource.SetId("FFF-FFFF");
            marthaSource.SetAbout("http://en.wikipedia.org/wiki/Martha_washington");
            SourceCitation marthaCitation = new SourceCitation();
            marthaCitation.SetValue("\"Martha Washington.\" Wikipedia, The Free Encyclopedia. Wikimedia Foundation, Inc. 24 October 2012.");
            marthaSource.SetCitation(marthaCitation);

            SourceReference reference = new SourceReference();
            reference.SetDescriptionRef("#" + georgeSource.Id);
            george.SetSource(reference);

            reference = new SourceReference();
            reference.SetDescriptionRef("#" + marthaSource.Id);
            martha.SetSource(reference);

            relationship.SetSource(reference);

            return new List<SourceDescription>() { georgeSource, marthaSource };
        }