/// <summary>
 /// Visits the source citation.
 /// </summary>
 /// <param name="citation">The source citation to visit.</param>
 public override void VisitSourceCitation(Gx.Source.SourceCitation citation)
 {
     if (citation.Id != null)
     {
         this.dictionary.Add(citation.Id, citation);
     }
     base.VisitSourceCitation(citation);
 }
示例#2
0
 /**
  * Add a citation.
  *
  * @param citation The citation to be added.
  */
 public void AddCitation(SourceCitation citation)
 {
     if (citation != null)
     {
         if (_citations == null)
         {
             _citations = new List <SourceCitation>();
         }
         _citations.Add(citation);
     }
 }
示例#3
0
 /**
  * Build out this source description with a citation.
  * @param citation The citation.
  * @return this.
  */
 public SourceDescription SetCitation(SourceCitation citation)
 {
     AddCitation(citation);
     return(this);
 }
 public virtual void VisitSourceCitation(SourceCitation citation)
 {
     //no-op.
 }
 /**
  * Add a citation.
  *
  * @param citation The citation to be added.
  */
 public void AddCitation(SourceCitation citation)
 {
     if (citation != null)
     {
         if (_citations == null)
         {
             _citations = new List<SourceCitation>();
         }
         _citations.Add(citation);
     }
 }
 /**
  * Build out this source description with a citation.
  * @param citation The citation.
  * @return this.
  */
 public SourceDescription SetCitation(SourceCitation citation)
 {
     AddCitation(citation);
     return this;
 }
 public override void VisitSourceCitation(SourceCitation citation)
 {
     BindIfNeeded(citation);
     base.VisitSourceCitation(citation);
 }
        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 };
        }