// Parser public static CSourceCallNumber Parse( CGedcom gedcom, int nLevel ) { CGedcomLine gedcomLine; // Temporary holders for class members. Saves constructing a class early. string sSourceCallNumber; string sSourceMediaType = ""; // There must be one of these, it defines the object. if ((gedcomLine = gedcom.GetLine(nLevel, "CALN")) == null) { // Not one of us return null; } gedcom.IncrementLineIndex(1); sSourceCallNumber = gedcomLine.LineItem; if( (gedcomLine = gedcom.GetLine(nLevel+1, "MEDI")) != null ) { sSourceMediaType = gedcomLine.LineItem; gedcom.IncrementLineIndex(1); } else if( ( gedcomLine = gedcom.GetLine()).Level > nLevel ) { LogFile.TheLogFile.WriteLine( LogFile.DT_GEDCOM, LogFile.EDebugLevel.Warning, "Unknown tag :" ); LogFile.TheLogFile.WriteLine( LogFile.DT_GEDCOM, LogFile.EDebugLevel.Warning, gedcomLine.ToString() ); gedcom.IncrementLineIndex(1); } // Parsing went ok. Construct a new object and return it. CSourceCallNumber scn = new CSourceCallNumber( gedcom ); scn.m_sSourceCallNumber = sSourceCallNumber; scn.m_sSourceMediaType = sSourceMediaType; return scn; }
// Constructor public CSubmitterRecord( CGedcom gedcom ) : base(gedcom) { m_alMultimediaLinks = new ArrayList(); m_alLanguagePreferences = new ArrayList(); m_alNoteStructures = new ArrayList(); }
// Parser public bool ParseRecord( CGedcom gedcom, int level ) { CGedcomLine line; CUserReferenceNumber urn; CChangeDate cd; bool bParsingFinished; bool bGotSomething = false; do { bParsingFinished = true; if( (line = gedcom.GetLine( level+1, "RIN" )) != null ) { m_sAutomatedRecordId = line.LineItem; gedcom.IncrementLineIndex(1); bParsingFinished = false; bGotSomething = true; } else if( (urn = CUserReferenceNumber.Parse( gedcom, level+1 )) != null ) { m_alUserReferenceNumbers.Add( urn ); bParsingFinished = false; bGotSomething = true; } else if( (cd = CChangeDate.Parse( gedcom, level+1 )) != null ) { m_changeDate = cd; bParsingFinished = false; bGotSomething = true; } } while( !bParsingFinished ); return bGotSomething; }
// Parser public static CRepositoryRecord Parse( CGedcom gedcom, int nLevel ) { CGedcomLine gedcomLine; bool bParsingFinished; // Temporary holders for class members. CNoteStructure ns; CAddressStructure ads; // Without an xref header, we can't continue if ((gedcomLine = gedcom.GetLine(nLevel, "REPO")) == null) { // Not one of us return null; } CRepositoryRecord rr = new CRepositoryRecord( gedcom ); rr.m_xref = gedcomLine.XrefID; gedcom.IncrementLineIndex(1); do { bParsingFinished = true; // Let Record have a go at parsing the rest if( rr.ParseRecord( gedcom, nLevel ) ) { bParsingFinished = false; continue; } else if( (gedcomLine = gedcom.GetLine(nLevel+1, "NAME")) != null ) { rr.m_sNameOfRepository = gedcomLine.LineItem; gedcom.IncrementLineIndex(1); bParsingFinished = false; } else if( (ads = CAddressStructure.Parse( gedcom, nLevel+1)) != null ) { rr.m_addressStructure = ads; bParsingFinished = false; } else if( (ns = CNoteStructure.Parse( gedcom, nLevel+1 )) != null ) { rr.m_alNoteStructures.Add( ns ); bParsingFinished = false; } else if( ( gedcomLine = gedcom.GetLine()).Level > nLevel ) { LogFile.TheLogFile.WriteLine( LogFile.DT_GEDCOM, LogFile.EDebugLevel.Warning, "Unknown tag :" ); LogFile.TheLogFile.WriteLine( LogFile.DT_GEDCOM, LogFile.EDebugLevel.Warning, gedcomLine.ToString() ); gedcom.IncrementLineIndex(1); bParsingFinished = false; } } while( !bParsingFinished ); return rr; }
// Constructor public CMultimediaRecord( CGedcom gedcom ) : base(gedcom) { m_alMultimediaFileReferences = new ArrayList(); m_alNoteStructures = new ArrayList(); m_alSourceCitations = new ArrayList(); m_htAsidPairs = new Hashtable(); }
// Constructor public CISRecord( CGedcom gedcom ) : base(gedcom) { m_alNoteStructures = new ArrayList(); m_alMultimediaLinks = new ArrayList(); m_bRestricted = false; m_alUniqueFileRefs = new ArrayList(); }
// Constructor public CSourceRecord( CGedcom gedcom ) : base(gedcom) { m_alEventsRecorded = new ArrayList(); m_alSourceRepositoryCitations = new ArrayList(); m_alDataNoteStructures = new ArrayList(); m_bRequiredInHTML = false; m_alBackreferences = new ArrayList(); }
// Constructor public CMultimediaFileReference( CGedcom gedcom ) : base(gedcom) { m_bFromGEDCOM = true; m_bVisible = true; m_nOrderIndex = 0; m_mfrOriginal = null; m_asidPair = null; m_xrefEmbedded = ""; m_sMultimediaFileReference = ""; }
// Constructor public CFamilyRecord( CGedcom gedcom ) : base(gedcom) { m_alFamilyEventStructures = new ArrayList(); m_alXrefsChildren = new ArrayList(); m_alXrefSubms = new ArrayList(); m_alLdsSpouseSealings = new ArrayList(); m_alNoteStructures = new ArrayList(); m_alSourceCitations = new ArrayList(); m_alMultimediaLinks = new ArrayList(); }
// Constructor public CPersonalNamePieces( CGedcom gedcom ) : base(gedcom) { m_sNamePiecePrefix = ""; m_sNamePieceGiven = ""; m_sNamePieceNickname = ""; m_sNamePieceSurnamePrefix = ""; m_sNamePieceSurname = ""; m_sNamePieceSuffix = ""; m_alNoteStructures = new ArrayList(); m_alSourceCitations = new ArrayList(); }
// Parser public static CSourceRepositoryCitation Parse( CGedcom gedcom, int nLevel ) { CGedcomLine gedcomLine; // Temporary holders for class members. Saves constructing a class early. string xrefRepo; ArrayList alSourceCallNumbers = new ArrayList(); CSourceCallNumber sourceCallNumber = null; ArrayList alNoteStructures = new ArrayList(); CNoteStructure noteStructure = null; // There must be one of these, it defines the object. if ((gedcomLine = gedcom.GetLine(nLevel, "REPO")) == null) { // Not one of us return null; } xrefRepo = gedcomLine.LinePointer; gedcom.IncrementLineIndex(1); bool bParsingFinished; do { bParsingFinished = true; if( (noteStructure = CNoteStructure.Parse( gedcom, nLevel+1 )) != null ) { alNoteStructures.Add( noteStructure ); bParsingFinished = false; } else if( (sourceCallNumber = CSourceCallNumber.Parse( gedcom, nLevel+1 )) != null ) { alSourceCallNumbers.Add( sourceCallNumber ); bParsingFinished = false; } else if( ( gedcomLine = gedcom.GetLine()).Level > nLevel ) { LogFile.TheLogFile.WriteLine( LogFile.DT_GEDCOM, LogFile.EDebugLevel.Warning, "Unknown tag :" ); LogFile.TheLogFile.WriteLine( LogFile.DT_GEDCOM, LogFile.EDebugLevel.Warning, gedcomLine.ToString() ); gedcom.IncrementLineIndex(1); bParsingFinished = false; } } while( !bParsingFinished ); // Parsing went ok. Construct a new object and return it. CSourceRepositoryCitation src = new CSourceRepositoryCitation( gedcom ); src.m_xrefRepo = xrefRepo; src.m_alSourceCallNumbers = alSourceCallNumbers; src.m_alNoteStructures = alNoteStructures; return src; }
// Parser public static CEventRecorded Parse( CGedcom gedcom, int nLevel ) { CGedcomLine gedcomLine; // Temporary holders for class members. Saves constructing a class early. string eventRecorded; string datePeriod = ""; string sourceJurisdictionPlace = ""; // There must be one of these, it defines the object. if ((gedcomLine = gedcom.GetLine(nLevel, "EVEN")) == null) { // Not one of us return null; } gedcom.IncrementLineIndex(1); eventRecorded = gedcomLine.LineItem; bool bParsingFinished; do { bParsingFinished = true; if( (gedcomLine = gedcom.GetLine(nLevel+1, "DATE")) != null ) { datePeriod = gedcomLine.LineItem; gedcom.IncrementLineIndex(1); bParsingFinished = false; } else if( (gedcomLine = gedcom.GetLine(nLevel+1, "PLAC")) != null ) { sourceJurisdictionPlace = gedcomLine.LineItem; gedcom.IncrementLineIndex(1); bParsingFinished = false; } else if( ( gedcomLine = gedcom.GetLine()).Level > nLevel ) { LogFile.TheLogFile.WriteLine( LogFile.DT_GEDCOM, LogFile.EDebugLevel.Warning, "Unknown tag :" ); LogFile.TheLogFile.WriteLine( LogFile.DT_GEDCOM, LogFile.EDebugLevel.Warning, gedcomLine.ToString() ); gedcom.IncrementLineIndex(1); bParsingFinished = false; } } while( !bParsingFinished ); // Parsing went ok. Construct a new object and return it. CEventRecorded er = new CEventRecorded( gedcom ); er.m_sEventRecorded = eventRecorded; er.m_sDatePeriod = datePeriod; er.m_sSourceJurisdictionPlace = sourceJurisdictionPlace; return er; }
public static CNameRomanizedVariation Parse( CGedcom gedcom, int nLevel ) { CGedcomLine gedcomLIne; // Temporary holders for class members. Saves constructing a class early. string sNameRomanizedVariation; string sRomanizedType = ""; CPersonalNamePieces pnp, personalNamePieces=null; // There must be one of these, it defines the object. if ((gedcomLIne = gedcom.GetLine(nLevel, "ROMN")) == null) { // Not one of us return null; } sNameRomanizedVariation = gedcomLIne.LineItem; gedcom.IncrementLineIndex(1); bool bParsingFinished; do { bParsingFinished = true; if( (gedcomLIne = gedcom.GetLine(nLevel+1, "TYPE")) != null ) { sRomanizedType = gedcomLIne.LineItem; gedcom.IncrementLineIndex(1); bParsingFinished = false; } else if( (pnp = CPersonalNamePieces.Parse( gedcom, nLevel+1 )) != null ) { personalNamePieces = pnp; bParsingFinished = false; } else if( ( gedcomLIne = gedcom.GetLine()).Level > nLevel ) { LogFile.TheLogFile.WriteLine( LogFile.DT_GEDCOM, LogFile.EDebugLevel.Warning, "Unknown tag :" ); LogFile.TheLogFile.WriteLine( LogFile.DT_GEDCOM, LogFile.EDebugLevel.Warning, gedcomLIne.ToString() ); gedcom.IncrementLineIndex(1); bParsingFinished = false; } } while( !bParsingFinished ); // Parsing went ok. Construct a new object and return it. CNameRomanizedVariation nrv = new CNameRomanizedVariation( gedcom ); nrv.m_sNameRomanizedVariation = sNameRomanizedVariation; nrv.m_sRomanizedType = sRomanizedType; nrv.m_personalNamePieces = personalNamePieces; return nrv; }
// Constructor public CIndividualRecord( CGedcom gedcom ) : base(gedcom) { m_alPersonalNameStructures = new ArrayList(); m_alIndividualEventStructures = new ArrayList(); m_alLdsIndividualOrdinances = new ArrayList(); m_alChildToFamilyLinks = new ArrayList(); m_alSpouseToFamilyLinks = new ArrayList(); m_alXrefSubms = new ArrayList(); m_alAssociationStructures = new ArrayList(); m_alXrefAlias = new ArrayList(); m_alXrefAncis = new ArrayList(); m_alXrefDesis = new ArrayList(); m_alSourceCitations = new ArrayList(); }
// Parser public static CSpouseToFamilyLink Parse( CGedcom gedcom, int nLevel ) { CGedcomLine gedcomLine; // Temporary holders for class members. Saves constructing a class early. string xrefFam; CNoteStructure noteStructure; ArrayList noteStructures = new ArrayList(); // There must be one of these, it defines the object. if ((gedcomLine = gedcom.GetLine(nLevel, "FAMS")) == null) { // Not one of us return null; } xrefFam = gedcomLine.LinePointer; // Parsing is going well enough to say that we definitely have one of these, // so we can adjust the gedcom now. gedcom.IncrementLineIndex(1); bool bParsingFinished; do { bParsingFinished = true; if( (noteStructure = CNoteStructure.Parse( gedcom, nLevel+1 )) != null ) { noteStructures.Add( noteStructure ); bParsingFinished = false; } else if( ( gedcomLine = gedcom.GetLine()).Level > nLevel ) { LogFile.TheLogFile.WriteLine( LogFile.DT_GEDCOM, LogFile.EDebugLevel.Warning, "Unknown tag :" ); LogFile.TheLogFile.WriteLine( LogFile.DT_GEDCOM, LogFile.EDebugLevel.Warning, gedcomLine.ToString() ); gedcom.IncrementLineIndex(1); bParsingFinished = false; } } while( !bParsingFinished ); // Parsing went ok. Construct a new object and return it. CSpouseToFamilyLink sfl = new CSpouseToFamilyLink( gedcom ); sfl.m_xrefFam = xrefFam; sfl.m_alNoteStructures = noteStructures; return sfl; }
// Parser public static new CNoteStructureXref Parse( CGedcom gedcom, int nLevel ) { CGedcomLine gedcomLine; // Temporary holders for class members. Saves constructing a class early. string xref; ArrayList sourceCitations = new ArrayList(); CSourceCitation sourceCitation; // There must be one of these, it defines the object. if ((gedcomLine = gedcom.GetLine(nLevel, "NOTE")) == null) { // Not one of us return null; } xref = gedcomLine.LinePointer; // Parsing is going well enough to say that we definitely have one of these, // so we can adjust the gedcom now. gedcom.IncrementLineIndex(1); bool bParsingFinished; do { bParsingFinished = true; if( (sourceCitation = CSourceCitation.Parse( gedcom, nLevel+1 )) != null ) { sourceCitations.Add( sourceCitation ); bParsingFinished = false; } else if( ( gedcomLine = gedcom.GetLine()).Level > nLevel ) { LogFile.TheLogFile.WriteLine( LogFile.DT_GEDCOM, LogFile.EDebugLevel.Warning, "Unknown tag :" ); LogFile.TheLogFile.WriteLine( LogFile.DT_GEDCOM, LogFile.EDebugLevel.Warning, gedcomLine.ToString() ); gedcom.IncrementLineIndex(1); bParsingFinished = false; } } while( !bParsingFinished ); // Parsing went ok. Construct a new object and return it. CNoteStructureXref ns = new CNoteStructureXref( gedcom ); ns.m_xref = xref; ns.m_alSourceCitations = sourceCitations; return ns; }
// Parser public static CNoteStructure Parse( CGedcom gedcom, int level ) { CGedcomLine line; // There must be one of these, it defines the object. if ((line = gedcom.GetLine(level, "NOTE")) == null) { return null; // Not one of us } // If bit after tag contains a pointer, it must be a reference sType of note if( line.LinePointer != null ) //TODO { return CNoteStructureXref.Parse( gedcom, level ); } // Must be the inline version return CNoteStructureInLine.Parse( gedcom, level ); }
// Parser public static CSourceCitation Parse( CGedcom gedcom, int nLevel ) { CGedcomLine gedcomLine; // There must be one of these, it defines the object. if ((gedcomLine = gedcom.GetLine(nLevel, "SOUR")) == null) { // Not one of us return null; } // If bit after tag contains a pointer, it must be a reference sType of note if( gedcomLine.LinePointer != null ) //TODO { return CSourceCitationXref.Parse( gedcom, nLevel ); } // Must be the inline version return CSourceCitationInLine.Parse( gedcom, nLevel ); }
// Parser public static CUserReferenceNumber Parse( CGedcom gedcom, int nLevel ) { CGedcomLine gedcomLine; // Temporary holders for class members. Saves constructing a class early. string sUserReferenceNumber = ""; string sUserReferenceType = ""; // There must be one of these, it defines the object. if ((gedcomLine = gedcom.GetLine(nLevel, "REFN")) == null) { // Not one of us return null; } sUserReferenceNumber = gedcomLine.LineItem; // Parsing is going well enough to say that we definitely have one of these, // so we can adjust the gedcom now. gedcom.IncrementLineIndex(1); // There may be one of these, standard specifies {0:1} if( (gedcomLine = gedcom.GetLine(nLevel+1, "TYPE")) != null ) { sUserReferenceType = gedcomLine.LineItem; gedcom.IncrementLineIndex(1); } else if( ( gedcomLine = gedcom.GetLine()).Level > nLevel ) { LogFile.TheLogFile.WriteLine( LogFile.DT_GEDCOM, LogFile.EDebugLevel.Warning, "Unknown tag :" ); LogFile.TheLogFile.WriteLine( LogFile.DT_GEDCOM, LogFile.EDebugLevel.Warning, gedcomLine.ToString() ); gedcom.IncrementLineIndex(1); } // Parsing went ok. Construct a new object and return it. CUserReferenceNumber urn = new CUserReferenceNumber( gedcom ); urn.m_sUserReferenceNumber = sUserReferenceNumber; urn.m_sUserReferenceType = sUserReferenceType; return urn; }
// Parser public static new CMultimediaLinkXref Parse( CGedcom gedcom, int level ) { CGedcomLine line; // Temporary holders for class members. Saves constructing a class early. string xref; string asid = ""; // There must be one of these, it defines the object. if ((line = gedcom.GetLine(level, "OBJE")) == null) { // Not one of us return null; } xref = line.LinePointer; // Parsing is going well enough to say that we definitely have one of these, // so we can adjust the gedcom now. gedcom.IncrementLineIndex(1); if( (line = gedcom.GetLine(level+1, "_ASID")) != null ) { asid = line.LineItem; gedcom.IncrementLineIndex(1); } else if( ( line = gedcom.GetLine()).Level > level ) { LogFile.TheLogFile.WriteLine( LogFile.DT_GEDCOM, LogFile.EDebugLevel.Warning, "Unknown tag :" ); LogFile.TheLogFile.WriteLine( LogFile.DT_GEDCOM, LogFile.EDebugLevel.Warning, line.ToString() ); gedcom.IncrementLineIndex(1); } // Parsing went ok. Construct a new object and return it. CMultimediaLinkXref ml = new CMultimediaLinkXref( gedcom ); ml.m_xref = xref; ml.m_sAsid = asid; return ml; }
// Parser public static CChildToFamilyLink Parse( CGedcom gedcom, int nLevel ) { CGedcomLine gedcomLine; // Temporary holders for class members. Saves constructing a class early. string xrefFam; string sPedigreeLinkageType = ""; string sChildLinkageStatus = ""; CNoteStructure noteStructure; ArrayList alNoteStructures = new ArrayList(); // There must be one of these, it defines the object. if ((gedcomLine = gedcom.GetLine(nLevel, "FAMC")) == null) { // Not one of us return null; } xrefFam = gedcomLine.LinePointer; // Parsing is going well enough to say that we definitely have one of these, // so we can adjust the gedcom now. gedcom.IncrementLineIndex(1); bool bParsingFinished; do { bParsingFinished = true; // There may be one of these, standard specifies {0:1} if( (gedcomLine = gedcom.GetLine(nLevel+1, "PEDI")) != null ) { sPedigreeLinkageType = gedcomLine.LineItem; gedcom.IncrementLineIndex(1); bParsingFinished = false; } else if( (gedcomLine = gedcom.GetLine(nLevel+1, "STAT")) != null ) { sChildLinkageStatus = gedcomLine.LineItem; gedcom.IncrementLineIndex(1); bParsingFinished = false; } else if( (noteStructure = CNoteStructure.Parse( gedcom, nLevel+1 )) != null ) { alNoteStructures.Add( noteStructure ); bParsingFinished = false; } else if( ( gedcomLine = gedcom.GetLine()).Level > nLevel ) { LogFile.TheLogFile.WriteLine( LogFile.DT_GEDCOM, LogFile.EDebugLevel.Warning, "Unknown tag :" ); LogFile.TheLogFile.WriteLine( LogFile.DT_GEDCOM, LogFile.EDebugLevel.Warning, gedcomLine.ToString() ); gedcom.IncrementLineIndex(1); bParsingFinished = false; } } while( !bParsingFinished ); // Parsing went ok. Construct a new object and return it. CChildToFamilyLink cfl = new CChildToFamilyLink( gedcom ); cfl.m_xrefFam = xrefFam; cfl.m_sPedigreeLinkageType = sPedigreeLinkageType; cfl.m_sChildLinkageStatus = sChildLinkageStatus; cfl.m_alNoteStructures = alNoteStructures; return cfl; }
// Constructor public CChildToFamilyLink( CGedcom gedcom ) : base(gedcom) { }
// Parser public static CAssociationStructure Parse( CGedcom gedcom, int nLevel ) { CGedcomLine gedcomLine; // Temporary holders for class members. Saves constructing a class early. string xrefIndi; string sRelationIsDescriptor = ""; CSourceCitation sourceCitation; ArrayList alSourceCitations = new ArrayList(); CNoteStructure noteStructure; ArrayList alNoteStructures = new ArrayList(); string sRecordType = ""; // There must be one of these, it defines the object. if ((gedcomLine = gedcom.GetLine(nLevel, "ASSO")) == null) { // Not one of us return null; } xrefIndi = gedcomLine.LinePointer; // Parsing is going well enough to say that we definitely have one of these, // so we can adjust the gedcom now. gedcom.IncrementLineIndex(1); bool bParsingFinished; do { bParsingFinished = true; // There may be one of these, standard specifies {0:1} if( (gedcomLine = gedcom.GetLine(nLevel+1, "RELA")) != null ) { sRelationIsDescriptor = gedcomLine.LineItem; gedcom.IncrementLineIndex(1); bParsingFinished = false; } else if( (sourceCitation = CSourceCitation.Parse( gedcom, nLevel+1 )) != null ) { alSourceCitations.Add( sourceCitation ); bParsingFinished = false; } else if( (noteStructure = CNoteStructure.Parse( gedcom, nLevel+1 )) != null ) { alNoteStructures.Add( noteStructure ); bParsingFinished = false; } else if( (gedcomLine = gedcom.GetLine(nLevel+1, "TYPE")) != null ) { sRecordType = gedcomLine.LineItem; gedcom.IncrementLineIndex(1); bParsingFinished = false; } else if( ( gedcomLine = gedcom.GetLine()).Level > nLevel ) { LogFile.TheLogFile.WriteLine( LogFile.DT_GEDCOM, LogFile.EDebugLevel.Warning, "Unknown tag :" ); LogFile.TheLogFile.WriteLine( LogFile.DT_GEDCOM, LogFile.EDebugLevel.Warning, gedcomLine.ToString() ); gedcom.IncrementLineIndex(1); bParsingFinished = false; } } while( !bParsingFinished ); // Parsing went ok. Construct a new object and return it. CAssociationStructure ass = new CAssociationStructure( gedcom ); ass.m_xrefIndi = xrefIndi; ass.m_sRelationIsDescriptor = sRelationIsDescriptor; ass.m_alSourceCitations = alSourceCitations; ass.m_alNoteStructures = alNoteStructures; ass.m_sRecordType = sRecordType; return ass; }
// Constructor public CAssociationStructure( CGedcom gedcom ) : base(gedcom) { }
// Constructor public CEventRecorded( CGedcom gedcom ) : base(gedcom) { }
// Constructor public CLdsOrdinance( CGedcom gedcom ) : base(gedcom) { }
// Constructor public CTreeDrawer(CGedcom gedcom) { m_gedcom = gedcom; }
public CCreatorStylesheet( CGedcom gedcom, IProgressCallback progress, string sW3cfile, string sCssFilename, string sBackgroundImageFilename ) : base(gedcom, progress, sW3cfile) { m_sCssFilename = sCssFilename; m_sBackgroundImageFilename = sBackgroundImageFilename; }
// Constructor public CCreatorRecordSource( CGedcom gedcom, IProgressCallback progress, string w3cfile, CSourceRecord sr ) : base(gedcom, progress, w3cfile) { m_sr = sr; }
// Parser public static CLdsOrdinance Parse( CGedcom gedcom, int level ) { CGedcomLine gedcomLine; // Temporary holders for class members. Saves constructing a class early. string sType; string sDateLdsOrd = ""; string sTempleCode = ""; string sPlaceLivingOrdinance = ""; string xrefFam = ""; string sLdsDateStatus = ""; string sChangeDate = ""; ArrayList noteStructures = new ArrayList(); ArrayList sourceCitations = new ArrayList(); CSourceCitation sourceCitation; CNoteStructure noteStructure; // There must be one of these, it defines the object. if ((gedcomLine = gedcom.GetLine(level, "BAPL")) == null || (gedcomLine = gedcom.GetLine(level, "ENDL")) == null || (gedcomLine = gedcom.GetLine(level, "SLGC")) == null || (gedcomLine = gedcom.GetLine(level, "CONL")) == null || (gedcomLine = gedcom.GetLine(level, "SLGS")) == null) { // Not one of us return null; } sType = gedcomLine.Tag; gedcom.IncrementLineIndex(1); bool bParsingFinished; do { bParsingFinished = true; if( (gedcomLine = gedcom.GetLine(level+1, "DATE")) != null ) { sDateLdsOrd = gedcomLine.LineItem; gedcom.IncrementLineIndex(1); bParsingFinished = false; } else if( (gedcomLine = gedcom.GetLine(level+1, "TEMP")) != null ) { sTempleCode = gedcomLine.LineItem; gedcom.IncrementLineIndex(1); bParsingFinished = false; } else if( (gedcomLine = gedcom.GetLine(level+1, "PLAC")) != null ) { sPlaceLivingOrdinance = gedcomLine.LineItem; gedcom.IncrementLineIndex(1); bParsingFinished = false; } else if( (gedcomLine = gedcom.GetLine(level+1, "FAMC")) != null ) { xrefFam = gedcomLine.LinePointer; gedcom.IncrementLineIndex(1); bParsingFinished = false; } else if( (gedcomLine = gedcom.GetLine(level+1, "STAT")) != null ) { sLdsDateStatus = gedcomLine.LineItem; gedcom.IncrementLineIndex(1); if( (gedcomLine = gedcom.GetLine(level+2, "DATE")) != null ) { sChangeDate = gedcomLine.LineItem; gedcom.IncrementLineIndex(1); } bParsingFinished = false; } else if( (sourceCitation = CSourceCitation.Parse( gedcom, level+1 )) != null ) { sourceCitations.Add( sourceCitation ); bParsingFinished = false; } else if( (noteStructure = CNoteStructure.Parse( gedcom, level+1 )) != null ) { noteStructures.Add( noteStructure ); bParsingFinished = false; } else if( ( gedcomLine = gedcom.GetLine()).Level > level ) { LogFile.TheLogFile.WriteLine( LogFile.DT_GEDCOM, LogFile.EDebugLevel.Warning, "Unknown tag :" ); LogFile.TheLogFile.WriteLine( LogFile.DT_GEDCOM, LogFile.EDebugLevel.Warning, gedcomLine.ToString() ); gedcom.IncrementLineIndex(1); bParsingFinished = false; } } while( !bParsingFinished ); // Parsing went ok. Construct a new object and return it. CLdsOrdinance lss = new CLdsOrdinance( gedcom ); lss.Type = sType; lss.m_sDateLdsOrd = sDateLdsOrd; lss.m_sTempleCode = sTempleCode; lss.m_sPlaceLivingOrdinance = sPlaceLivingOrdinance; lss.m_xrefFam = xrefFam; lss.m_sLdsDateStatus = sLdsDateStatus; lss.m_sChangeDate = sChangeDate; lss.m_alNoteStructures = noteStructures; lss.m_alSourceCitations = sourceCitations; return lss; }