xref: /webtrees/app/Factories/ElementFactory.php (revision 24f2a3af38709f9bf0a739b30264240d20ba34e8)
1<?php
2
3/**
4 * webtrees: online genealogy
5 * Copyright (C) 2021 webtrees development team
6 * This program is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <https://www.gnu.org/licenses/>.
16 */
17
18declare(strict_types=1);
19
20namespace Fisharebest\Webtrees\Factories;
21
22use Fisharebest\Webtrees\Contracts\ElementFactoryInterface;
23use Fisharebest\Webtrees\Contracts\ElementInterface;
24use Fisharebest\Webtrees\Elements\AddressCity;
25use Fisharebest\Webtrees\Elements\AddressCountry;
26use Fisharebest\Webtrees\Elements\AddressEmail;
27use Fisharebest\Webtrees\Elements\AddressFax;
28use Fisharebest\Webtrees\Elements\AddressLine;
29use Fisharebest\Webtrees\Elements\AddressLine1;
30use Fisharebest\Webtrees\Elements\AddressLine2;
31use Fisharebest\Webtrees\Elements\AddressLine3;
32use Fisharebest\Webtrees\Elements\AddressPostalCode;
33use Fisharebest\Webtrees\Elements\AddressState;
34use Fisharebest\Webtrees\Elements\AddressWebPage;
35use Fisharebest\Webtrees\Elements\AdoptedByWhichParent;
36use Fisharebest\Webtrees\Elements\Adoption;
37use Fisharebest\Webtrees\Elements\AdultChristening;
38use Fisharebest\Webtrees\Elements\AgeAtEvent;
39use Fisharebest\Webtrees\Elements\AncestralFileNumber;
40use Fisharebest\Webtrees\Elements\Annulment;
41use Fisharebest\Webtrees\Elements\ApprovedSystemId;
42use Fisharebest\Webtrees\Elements\AttributeDescriptor;
43use Fisharebest\Webtrees\Elements\AutomatedRecordId;
44use Fisharebest\Webtrees\Elements\Baptism;
45use Fisharebest\Webtrees\Elements\BasMitzvah;
46use Fisharebest\Webtrees\Elements\Birth;
47use Fisharebest\Webtrees\Elements\Blessing;
48use Fisharebest\Webtrees\Elements\Burial;
49use Fisharebest\Webtrees\Elements\CasteName;
50use Fisharebest\Webtrees\Elements\CauseOfEvent;
51use Fisharebest\Webtrees\Elements\Census;
52use Fisharebest\Webtrees\Elements\CertaintyAssessment;
53use Fisharebest\Webtrees\Elements\Change;
54use Fisharebest\Webtrees\Elements\ChangeDate;
55use Fisharebest\Webtrees\Elements\CharacterSet;
56use Fisharebest\Webtrees\Elements\ChildLinkageStatus;
57use Fisharebest\Webtrees\Elements\Christening;
58use Fisharebest\Webtrees\Elements\Confirmation;
59use Fisharebest\Webtrees\Elements\ContentDescription;
60use Fisharebest\Webtrees\Elements\CopyrightFile;
61use Fisharebest\Webtrees\Elements\CopyrightSourceData;
62use Fisharebest\Webtrees\Elements\CountOfChildren;
63use Fisharebest\Webtrees\Elements\CountOfMarriages;
64use Fisharebest\Webtrees\Elements\Cremation;
65use Fisharebest\Webtrees\Elements\DateLdsOrd;
66use Fisharebest\Webtrees\Elements\DateValue;
67use Fisharebest\Webtrees\Elements\Death;
68use Fisharebest\Webtrees\Elements\DescriptiveTitle;
69use Fisharebest\Webtrees\Elements\Divorce;
70use Fisharebest\Webtrees\Elements\DivorceFiled;
71use Fisharebest\Webtrees\Elements\Emigration;
72use Fisharebest\Webtrees\Elements\EmptyElement;
73use Fisharebest\Webtrees\Elements\Engagement;
74use Fisharebest\Webtrees\Elements\EntryRecordingDate;
75use Fisharebest\Webtrees\Elements\EventAttributeType;
76use Fisharebest\Webtrees\Elements\EventDescriptor;
77use Fisharebest\Webtrees\Elements\EventOrFactClassification;
78use Fisharebest\Webtrees\Elements\EventsRecorded;
79use Fisharebest\Webtrees\Elements\EventTypeCitedFrom;
80use Fisharebest\Webtrees\Elements\FamilyRecord;
81use Fisharebest\Webtrees\Elements\FileName;
82use Fisharebest\Webtrees\Elements\FirstCommunion;
83use Fisharebest\Webtrees\Elements\Form;
84use Fisharebest\Webtrees\Elements\Gedcom;
85use Fisharebest\Webtrees\Elements\GenerationsOfAncestors;
86use Fisharebest\Webtrees\Elements\GenerationsOfDescendants;
87use Fisharebest\Webtrees\Elements\Graduation;
88use Fisharebest\Webtrees\Elements\HeaderRecord;
89use Fisharebest\Webtrees\Elements\Immigration;
90use Fisharebest\Webtrees\Elements\IndividualRecord;
91use Fisharebest\Webtrees\Elements\LanguageId;
92use Fisharebest\Webtrees\Elements\LdsBaptism;
93use Fisharebest\Webtrees\Elements\LdsBaptismDateStatus;
94use Fisharebest\Webtrees\Elements\LdsChildSealing;
95use Fisharebest\Webtrees\Elements\LdsChildSealingDateStatus;
96use Fisharebest\Webtrees\Elements\LdsConfirmation;
97use Fisharebest\Webtrees\Elements\LdsEndowment;
98use Fisharebest\Webtrees\Elements\LdsEndowmentDateStatus;
99use Fisharebest\Webtrees\Elements\LdsSpouseSealing;
100use Fisharebest\Webtrees\Elements\LdsSpouseSealingDateStatus;
101use Fisharebest\Webtrees\Elements\Marriage;
102use Fisharebest\Webtrees\Elements\MarriageBanns;
103use Fisharebest\Webtrees\Elements\MarriageContract;
104use Fisharebest\Webtrees\Elements\MarriageLicence;
105use Fisharebest\Webtrees\Elements\MarriageSettlement;
106use Fisharebest\Webtrees\Elements\MarriageType;
107use Fisharebest\Webtrees\Elements\MediaRecord;
108use Fisharebest\Webtrees\Elements\MultimediaFileReference;
109use Fisharebest\Webtrees\Elements\MultimediaFormat;
110use Fisharebest\Webtrees\Elements\NameOfBusiness;
111use Fisharebest\Webtrees\Elements\NameOfFamilyFile;
112use Fisharebest\Webtrees\Elements\NameOfProduct;
113use Fisharebest\Webtrees\Elements\NameOfRepository;
114use Fisharebest\Webtrees\Elements\NameOfSourceData;
115use Fisharebest\Webtrees\Elements\NamePersonal;
116use Fisharebest\Webtrees\Elements\NamePhoneticVariation;
117use Fisharebest\Webtrees\Elements\NamePieceGiven;
118use Fisharebest\Webtrees\Elements\NamePieceNickname;
119use Fisharebest\Webtrees\Elements\NamePiecePrefix;
120use Fisharebest\Webtrees\Elements\NamePieceSuffix;
121use Fisharebest\Webtrees\Elements\NamePieceSurname;
122use Fisharebest\Webtrees\Elements\NamePieceSurnamePrefix;
123use Fisharebest\Webtrees\Elements\NameRomanizedVariation;
124use Fisharebest\Webtrees\Elements\NameType;
125use Fisharebest\Webtrees\Elements\NationalIdNumber;
126use Fisharebest\Webtrees\Elements\NationOrTribalOrigin;
127use Fisharebest\Webtrees\Elements\Naturalization;
128use Fisharebest\Webtrees\Elements\NobilityTypeTitle;
129use Fisharebest\Webtrees\Elements\NoteRecord;
130use Fisharebest\Webtrees\Elements\NoteStructure;
131use Fisharebest\Webtrees\Elements\Occupation;
132use Fisharebest\Webtrees\Elements\OrdinanceProcessFlag;
133use Fisharebest\Webtrees\Elements\Ordination;
134use Fisharebest\Webtrees\Elements\PafUid;
135use Fisharebest\Webtrees\Elements\PedigreeLinkageType;
136use Fisharebest\Webtrees\Elements\PermanentRecordFileNumber;
137use Fisharebest\Webtrees\Elements\PhoneNumber;
138use Fisharebest\Webtrees\Elements\PhoneticType;
139use Fisharebest\Webtrees\Elements\PhysicalDescription;
140use Fisharebest\Webtrees\Elements\PlaceHierarchy;
141use Fisharebest\Webtrees\Elements\PlaceLatitude;
142use Fisharebest\Webtrees\Elements\PlaceLivingOrdinance;
143use Fisharebest\Webtrees\Elements\PlaceLongtitude;
144use Fisharebest\Webtrees\Elements\PlaceName;
145use Fisharebest\Webtrees\Elements\PlacePhoneticVariation;
146use Fisharebest\Webtrees\Elements\PlaceRomanizedVariation;
147use Fisharebest\Webtrees\Elements\Possessions;
148use Fisharebest\Webtrees\Elements\Probate;
149use Fisharebest\Webtrees\Elements\PublicationDate;
150use Fisharebest\Webtrees\Elements\ReceivingSystemName;
151use Fisharebest\Webtrees\Elements\RelationIsDescriptor;
152use Fisharebest\Webtrees\Elements\ReligiousAffiliation;
153use Fisharebest\Webtrees\Elements\RepositoryRecord;
154use Fisharebest\Webtrees\Elements\Residence;
155use Fisharebest\Webtrees\Elements\ResponsibleAgency;
156use Fisharebest\Webtrees\Elements\RestrictionNotice;
157use Fisharebest\Webtrees\Elements\Retirement;
158use Fisharebest\Webtrees\Elements\RoleInEvent;
159use Fisharebest\Webtrees\Elements\RomanizedType;
160use Fisharebest\Webtrees\Elements\ScholasticAchievement;
161use Fisharebest\Webtrees\Elements\SexValue;
162use Fisharebest\Webtrees\Elements\SocialSecurityNumber;
163use Fisharebest\Webtrees\Elements\SourceCallNumber;
164use Fisharebest\Webtrees\Elements\SourceData;
165use Fisharebest\Webtrees\Elements\SourceFiledByEntry;
166use Fisharebest\Webtrees\Elements\SourceJurisdictionPlace;
167use Fisharebest\Webtrees\Elements\SourceMediaType;
168use Fisharebest\Webtrees\Elements\SourceOriginator;
169use Fisharebest\Webtrees\Elements\SourcePublicationFacts;
170use Fisharebest\Webtrees\Elements\SourceRecord;
171use Fisharebest\Webtrees\Elements\SubmissionRecord;
172use Fisharebest\Webtrees\Elements\SubmitterName;
173use Fisharebest\Webtrees\Elements\SubmitterRecord;
174use Fisharebest\Webtrees\Elements\SubmitterRegisteredRfn;
175use Fisharebest\Webtrees\Elements\SubmitterText;
176use Fisharebest\Webtrees\Elements\TempleCode;
177use Fisharebest\Webtrees\Elements\TextFromSource;
178use Fisharebest\Webtrees\Elements\TimeValue;
179use Fisharebest\Webtrees\Elements\TransmissionDate;
180use Fisharebest\Webtrees\Elements\UnknownElement;
181use Fisharebest\Webtrees\Elements\UserReferenceNumber;
182use Fisharebest\Webtrees\Elements\UserReferenceType;
183use Fisharebest\Webtrees\Elements\VersionNumber;
184use Fisharebest\Webtrees\Elements\WebtreesUser;
185use Fisharebest\Webtrees\Elements\WhereWithinSource;
186use Fisharebest\Webtrees\Elements\Will;
187use Fisharebest\Webtrees\Elements\XrefFamily;
188use Fisharebest\Webtrees\Elements\XrefIndividual;
189use Fisharebest\Webtrees\Elements\XrefMedia;
190use Fisharebest\Webtrees\Elements\XrefRepository;
191use Fisharebest\Webtrees\Elements\XrefSource;
192use Fisharebest\Webtrees\Elements\XrefSubmission;
193use Fisharebest\Webtrees\Elements\XrefSubmitter;
194use Fisharebest\Webtrees\I18N;
195
196use function preg_match;
197use function strpos;
198
199/**
200 * Make a GEDCOM element.
201 */
202class ElementFactory implements ElementFactoryInterface
203{
204    /** @var null|array<string,ElementInterface> */
205    private $elements;
206
207    /**
208     * Create a GEDCOM element that corresponds to a GEDCOM tag.
209     * Finds the correct element for all valid tags.
210     * Finds a likely element for custom tags.
211     *
212     * @param string $tag - Colon delimited hierarchy, e.g. 'INDI:BIRT:PLAC'
213     *
214     * @return ElementInterface
215     */
216    public function make(string $tag): ElementInterface
217    {
218        return $this->elements()[$tag] ?? $this->findElementByWildcard($tag) ?? new UnknownElement($tag);
219    }
220
221    /**
222     * @param string $tag
223     *
224     * @return ElementInterface|null
225     */
226    private function findElementByWildcard(string $tag): ?ElementInterface
227    {
228        foreach ($this->elements() as $tags => $element) {
229            if (strpos($tags, '*') !== false) {
230                $regex = '/^' . strtr($tags, ['*' => '[^:]+']) . '$/';
231
232                if (preg_match($regex, $tag)) {
233                    return $element;
234                }
235            }
236        }
237
238        return null;
239    }
240
241    /**
242     * Register more elements.
243     *
244     * @param array<string,ElementInterface> $elements
245     */
246    public function register(array $elements): void
247    {
248        $this->elements = array_merge($this->elements(), $elements);
249    }
250
251    /**
252     * Association between GEDCOM tags and GEDCOM elements.
253     * We can't initialise this in the constructor, as the I18N package isn't available then.
254     *
255     * @return array<string,ElementInterface>
256     */
257    private function elements(): array
258    {
259        if ($this->elements === null) {
260            // Custom tags are indicated with ***
261            $this->elements = [
262                'FAM'                      => new FamilyRecord(I18N::translate('Family')),
263                'FAM:*:ADDR'               => new AddressLine(I18N::translate('Address')),
264                'FAM:*:ADDR:ADR1'          => new AddressLine1(I18N::translate('Address line 1')),
265                'FAM:*:ADDR:ADR2'          => new AddressLine2(I18N::translate('Address line 2')),
266                'FAM:*:ADDR:ADR3'          => new AddressLine3(I18N::translate('Address line 3')),
267                'FAM:*:ADDR:CITY'          => new AddressCity(I18N::translate('City')),
268                'FAM:*:ADDR:CTRY'          => new AddressCountry(I18N::translate('Country')),
269                'FAM:*:ADDR:POST'          => new AddressPostalCode(I18N::translate('Postal code')),
270                'FAM:*:ADDR:STAE'          => new AddressState(I18N::translate('State')),
271                'FAM:*:AGNC'               => new ResponsibleAgency(I18N::translate('Agency')),
272                'FAM:*:CAUS'               => new CauseOfEvent(I18N::translate('Cause')),
273                'FAM:*:DATE'               => new DateValue(I18N::translate('Date')),
274                'FAM:*:EMAIL'              => new AddressEmail(I18N::translate('Email address')),
275                'FAM:*:FAX'                => new AddressFax(I18N::translate('Fax')),
276                'FAM:*:HUSB'               => new EmptyElement(I18N::translate('Husband'), ['AGE' => '0:1']),
277                'FAM:*:HUSB:AGE'           => new AgeAtEvent(I18N::translate('Husband’s age')),
278                'FAM:*:NOTE'               => new NoteStructure(I18N::translate('Note')),
279                'FAM:*:OBJE'               => new XrefMedia(I18N::translate('Media object')),
280                'FAM:*:PHON'               => new PhoneNumber(I18N::translate('Phone')),
281                'FAM:*:PLAC'               => new PlaceName(I18N::translate('Place')),
282                'FAM:*:PLAC:FONE'          => new PlacePhoneticVariation(I18N::translate('Phonetic place')),
283                'FAM:*:PLAC:FONE:TYPE'     => new PhoneticType(I18N::translate('Type')),
284                'FAM:*:PLAC:FORM'          => new PlaceHierarchy(I18N::translate('Format')),
285                'FAM:*:PLAC:MAP'           => new EmptyElement(I18N::translate('Coordinates')),
286                'FAM:*:PLAC:MAP:LATI'      => new PlaceLatitude(I18N::translate('Latitude')),
287                'FAM:*:PLAC:MAP:LONG'      => new PlaceLongtitude(I18N::translate('Longitude')),
288                'FAM:*:PLAC:NOTE'          => new NoteStructure(I18N::translate('Note')),
289                'FAM:*:PLAC:ROMN'          => new PlaceRomanizedVariation(I18N::translate('Romanized place')),
290                'FAM:*:PLAC:ROMN:TYPE'     => new RomanizedType(I18N::translate('Type')),
291                'FAM:*:RELI'               => new ReligiousAffiliation(I18N::translate('Religion')),
292                'FAM:*:RESN'               => new RestrictionNotice(I18N::translate('Restriction')),
293                'FAM:*:SOUR'               => new XrefSource(I18N::translate('Source')),
294                'FAM:*:SOUR:DATA'          => new SourceData(I18N::translate('Data')),
295                'FAM:*:SOUR:DATA:DATE'     => new EntryRecordingDate(I18N::translate('Date of entry in original source')),
296                'FAM:*:SOUR:DATA:TEXT'     => new TextFromSource(I18N::translate('Text')),
297                'FAM:*:SOUR:EVEN'          => new EventTypeCitedFrom(I18N::translate('Event')),
298                'FAM:*:SOUR:EVEN:ROLE'     => new RoleInEvent(I18N::translate('Role')),
299                'FAM:*:SOUR:NOTE'          => new NoteStructure(I18N::translate('Note')),
300                'FAM:*:SOUR:OBJE'          => new XrefMedia(I18N::translate('Media object')),
301                'FAM:*:SOUR:PAGE'          => new WhereWithinSource(I18N::translate('Citation details')),
302                'FAM:*:SOUR:QUAY'          => new CertaintyAssessment(I18N::translate('Quality of data')),
303                'FAM:*:TYPE'               => new EventOrFactClassification(I18N::translate('Type')),
304                'FAM:*:WIFE'               => new EmptyElement(I18N::translate('Wife'), ['AGE' => '0:1']),
305                'FAM:*:WIFE:AGE'           => new AgeAtEvent(I18N::translate('Wife’s age')),
306                'FAM:*:WWW'                => new AddressWebPage(I18N::translate('URL')),
307                'FAM:*:_ASSO'              => new XrefIndividual(I18N::translate('Associate')), // ***
308                'FAM:*:_ASSO:RELA'         => new RelationIsDescriptor(I18N::translate('Relationship')), // ***
309                'FAM:ANUL'                 => new Annulment(I18N::translate('Annulment')),
310                'FAM:CENS'                 => new Census(I18N::translate('Census')),
311                'FAM:CHAN'                 => new Change(I18N::translate('Last change')),
312                'FAM:CHAN:DATE'            => new ChangeDate(I18N::translate('Date of last change')),
313                'FAM:CHAN:DATE:TIME'       => new TimeValue(I18N::translate('Time')),
314                'FAM:CHAN:_WT_USER'        => new WebtreesUser(I18N::translate('Author of last change')), // *** webtrees
315                'FAM:CHIL'                 => new XrefIndividual(I18N::translate('Child')),
316                'FAM:DIV'                  => new Divorce(I18N::translate('Divorce')),
317                'FAM:DIVF'                 => new DivorceFiled(I18N::translate('Divorce filed')),
318                'FAM:ENGA'                 => new Engagement(I18N::translate('Engagement')),
319                'FAM:ENGA:DATE'            => new DateValue(I18N::translate('Date of engagement')),
320                'FAM:ENGA:PLACE'           => new PlaceName(I18N::translate('Place of engagement')),
321                'FAM:EVEN'                 => new EventDescriptor(I18N::translate('Event')),
322                'FAM:EVEN:TYPE'            => new EventAttributeType(I18N::translate('Type of event')),
323                'FAM:HUSB'                 => new XrefIndividual(I18N::translate('Husband')),
324                'FAM:MARB'                 => new MarriageBanns(I18N::translate('Marriage banns')),
325                'FAM:MARB:DATE'            => new DateValue(I18N::translate('Date of marriage banns')),
326                'FAM:MARB:PLAC'            => new PlaceName(I18N::translate('Place of marriage banns')),
327                'FAM:MARC'                 => new MarriageContract(I18N::translate('Marriage contract')),
328                'FAM:MARL'                 => new MarriageLicence(I18N::translate('Marriage license')),
329                'FAM:MARR'                 => new Marriage(I18N::translate('Marriage')),
330                'FAM:MARR:DATE'            => new DateValue(I18N::translate('Date of marriage')),
331                'FAM:MARR:PLAC'            => new PlaceName(I18N::translate('Place of marriage')),
332                'FAM:MARR:TYPE'            => new MarriageType(I18N::translate('Type of marriage')),
333                'FAM:MARS'                 => new MarriageSettlement(I18N::translate('Marriage settlement')),
334                'FAM:NCHI'                 => new CountOfChildren(I18N::translate('Number of children')),
335                'FAM:NOTE'                 => new NoteStructure(I18N::translate('Note')),
336                'FAM:OBJE'                 => new XrefMedia(I18N::translate('Media object')),
337                'FAM:REFN'                 => new UserReferenceNumber(I18N::translate('Reference number')),
338                'FAM:REFN:TYPE'            => new UserReferenceType(I18N::translate('Type')),
339                'FAM:RESI'                 => new Residence(I18N::translate('Residence')),
340                'FAM:RESN'                 => new RestrictionNotice(I18N::translate('Restriction')),
341                'FAM:RIN'                  => new AutomatedRecordId(I18N::translate('Record ID number')),
342                'FAM:SLGS'                 => new LdsSpouseSealing(I18N::translate('LDS spouse sealing')),
343                'FAM:SLGS:DATE'            => new DateLdsOrd(I18N::translate('Date')),
344                'FAM:SLGS:NOTE'            => new NoteStructure(I18N::translate('Note')),
345                'FAM:SLGS:PLAC'            => new PlaceLivingOrdinance(I18N::translate('Place')),
346                'FAM:SLGS:STAT'            => new LdsSpouseSealingDateStatus(I18N::translate('Status')),
347                'FAM:SLGS:STAT:DATE'       => new ChangeDate(I18N::translate('Status change date')),
348                'FAM:SLGS:TEMP'            => new TempleCode(/* I18N: https://en.wikipedia.org/wiki/Temple_(LDS_Church)*/ I18N::translate('Temple')),
349                'FAM:SOUR'                 => new XrefSource(I18N::translate('Source')),
350                'FAM:SOUR:DATA'            => new SourceData(I18N::translate('Data')),
351                'FAM:SOUR:DATA:DATE'       => new EntryRecordingDate(I18N::translate('Date of entry in original source')),
352                'FAM:SOUR:DATA:TEXT'       => new TextFromSource(I18N::translate('Text')),
353                'FAM:SOUR:EVEN'            => new EventTypeCitedFrom(I18N::translate('Event')),
354                'FAM:SOUR:EVEN:ROLE'       => new RoleInEvent(I18N::translate('Role')),
355                'FAM:SOUR:NOTE'            => new NoteStructure(I18N::translate('Note')),
356                'FAM:SOUR:OBJE'            => new XrefMedia(I18N::translate('Media object')),
357                'FAM:SOUR:PAGE'            => new WhereWithinSource(I18N::translate('Citation details')),
358                'FAM:SOUR:QUAY'            => new CertaintyAssessment(I18N::translate('Quality of data')),
359                'FAM:SUBM'                 => new XrefSubmitter(I18N::translate('Submitter')),
360                'FAM:WIFE'                 => new XrefIndividual(I18N::translate('Wife')),
361                'FAM:_UID'                 => new PafUid(I18N::translate('Unique identifier')), // ***
362                'HEAD'                     => new HeaderRecord(I18N::translate('Header')),
363                'HEAD:CHAR'                => new CharacterSet(I18N::translate('Character set')),
364                'HEAD:CHAR:VERS'           => new VersionNumber(I18N::translate('Version')),
365                'HEAD:COPR'                => new CopyrightFile(I18N::translate('Copyright')),
366                'HEAD:DATE'                => new TransmissionDate(I18N::translate('Date')),
367                'HEAD:DATE:TIME'           => new TimeValue(I18N::translate('Time')),
368                'HEAD:DEST'                => new ReceivingSystemName(I18N::translate('Destination')),
369                'HEAD:FILE'                => new FileName(I18N::translate('Filename')),
370                'HEAD:GEDC'                => new Gedcom(I18N::translate('GEDCOM file')),
371                'HEAD:GEDC:FORM'           => new Form(I18N::translate('Format')),
372                'HEAD:GEDC:VERS'           => new VersionNumber(I18N::translate('Version')),
373                'HEAD:LANG'                => new LanguageId(I18N::translate('Language')),
374                'HEAD:NOTE'                => new ContentDescription(I18N::translate('Note')),
375                'HEAD:PLAC'                => new EmptyElement(I18N::translate('Place'), ['FORM' => '1:1']),
376                'HEAD:PLAC:FORM'           => new PlaceHierarchy(I18N::translate('Format')),
377                'HEAD:SOUR'                => new ApprovedSystemId('Genealogy software'),
378                'HEAD:SOUR:CORP'           => new NameOfBusiness(I18N::translate('Corporation')),
379                'HEAD:SOUR:CORP:ADDR'      => new AddressLine(I18N::translate('Address')),
380                'HEAD:SOUR:CORP:ADDR:ADR1' => new AddressLine1(I18N::translate('Address line 1')),
381                'HEAD:SOUR:CORP:ADDR:ADR2' => new AddressLine2(I18N::translate('Address line 2')),
382                'HEAD:SOUR:CORP:ADDR:ADR3' => new AddressLine3(I18N::translate('Address line 3')),
383                'HEAD:SOUR:CORP:ADDR:CITY' => new AddressCity(I18N::translate('City')),
384                'HEAD:SOUR:CORP:ADDR:CTRY' => new AddressCountry(I18N::translate('Country')),
385                'HEAD:SOUR:CORP:ADDR:POST' => new AddressPostalCode(I18N::translate('Postal code')),
386                'HEAD:SOUR:CORP:ADDR:STAE' => new AddressState(I18N::translate('State')),
387                'HEAD:SOUR:CORP:EMAIL'     => new AddressEmail(I18N::translate('Email address')),
388                'HEAD:SOUR:CORP:FAX'       => new AddressFax(I18N::translate('Fax')),
389                'HEAD:SOUR:CORP:PHON'      => new PhoneNumber(I18N::translate('Phone')),
390                'HEAD:SOUR:CORP:WWW'       => new AddressWebPage(I18N::translate('URL')),
391                'HEAD:SOUR:DATA'           => new NameOfSourceData('Data'),
392                'HEAD:SOUR:DATA:COPR'      => new CopyrightSourceData(I18N::translate('Copyright')),
393                'HEAD:SOUR:DATA:DATE'      => new PublicationDate(I18N::translate('Date')),
394                'HEAD:SOUR:NAME'           => new NameOfProduct('Software product'),
395                'HEAD:SOUR:VERS'           => new VersionNumber(I18N::translate('Version')),
396                'HEAD:SUBM'                => new XrefSubmitter(I18N::translate('Submitter')),
397                'HEAD:SUBN'                => new XrefSubmission(I18N::translate('Submission')),
398                'INDI'                     => new IndividualRecord(I18N::translate('Individual')),
399                'INDI:*:ADDR'              => new AddressLine(I18N::translate('Address')),
400                'INDI:*:ADDR:ADR1'         => new AddressLine1(I18N::translate('Address line 1')),
401                'INDI:*:ADDR:ADR2'         => new AddressLine2(I18N::translate('Address line 2')),
402                'INDI:*:ADDR:ADR3'         => new AddressLine3(I18N::translate('Address line 3')),
403                'INDI:*:ADDR:CITY'         => new AddressCity(I18N::translate('City')),
404                'INDI:*:ADDR:CTRY'         => new AddressCountry(I18N::translate('Country')),
405                'INDI:*:ADDR:POST'         => new AddressPostalCode(I18N::translate('Postal code')),
406                'INDI:*:ADDR:STAE'         => new AddressState(I18N::translate('State')),
407                'INDI:*:AGE'               => new AgeAtEvent(I18N::translate('Age')),
408                'INDI:*:AGNC'              => new ResponsibleAgency(I18N::translate('Agency')),
409                'INDI:*:ASSO'              => new XrefIndividual(I18N::translate('Associate')), // ***
410                'INDI:*:ASSO:RELA'         => new RelationIsDescriptor(I18N::translate('Relationship')),
411                'INDI:*:CAUS'              => new CauseOfEvent(I18N::translate('Cause')),
412                'INDI:*:DATE'              => new DateValue(I18N::translate('Date')),
413                'INDI:*:EMAIL'             => new AddressEmail(I18N::translate('Email address')),
414                'INDI:*:FAX'               => new AddressFax(I18N::translate('Fax')),
415                'INDI:*:NOTE'              => new NoteStructure(I18N::translate('Note')),
416                'INDI:*:OBJE'              => new XrefMedia(I18N::translate('Media object')),
417                'INDI:*:PHON'              => new PhoneNumber(I18N::translate('Phone')),
418                'INDI:*:PLAC'              => new PlaceName(I18N::translate('Place')),
419                'INDI:*:PLAC:FONE'         => new PlacePhoneticVariation(I18N::translate('Phonetic place')),
420                'INDI:*:PLAC:FONE:TYPE'    => new PhoneticType(I18N::translate('Type')),
421                'INDI:*:PLAC:FORM'         => new PlaceHierarchy(I18N::translate('Format')),
422                'INDI:*:PLAC:MAP'          => new EmptyElement(I18N::translate('Coordinates')),
423                'INDI:*:PLAC:MAP:LATI'     => new PlaceLatitude(I18N::translate('Latitude')),
424                'INDI:*:PLAC:MAP:LONG'     => new PlaceLongtitude(I18N::translate('Longitude')),
425                'INDI:*:PLAC:NOTE'         => new NoteStructure(I18N::translate('Note')),
426                'INDI:*:PLAC:ROMN'         => new PlaceRomanizedVariation(I18N::translate('Romanized place')),
427                'INDI:*:PLAC:ROMN:TYPE'    => new RomanizedType(I18N::translate('Type')),
428                'INDI:*:PLAC:_HEB'         => new NoteStructure(I18N::translate('Place in Hebrew')), // ***
429                'INDI:*:RELI'              => new ReligiousAffiliation(I18N::translate('Religion')),
430                'INDI:*:RESN'              => new RestrictionNotice(I18N::translate('Restriction')),
431                'INDI:*:SOUR'              => new XrefSource(I18N::translate('Source')),
432                'INDI:*:SOUR:DATA'         => new SourceData(I18N::translate('Data')),
433                'INDI:*:SOUR:DATA:DATE'    => new EntryRecordingDate(I18N::translate('Date of entry in original source')),
434                'INDI:*:SOUR:DATA:TEXT'    => new TextFromSource(I18N::translate('Text')),
435                'INDI:*:SOUR:EVEN'         => new EventTypeCitedFrom(I18N::translate('Event')),
436                'INDI:*:SOUR:EVEN:ROLE'    => new RoleInEvent(I18N::translate('Role')),
437                'INDI:*:SOUR:NOTE'         => new NoteStructure(I18N::translate('Note')),
438                'INDI:*:SOUR:OBJE'         => new XrefMedia(I18N::translate('Media object')),
439                'INDI:*:SOUR:PAGE'         => new WhereWithinSource(I18N::translate('Citation details')),
440                'INDI:*:SOUR:QUAY'         => new CertaintyAssessment(I18N::translate('Quality of data')),
441                'INDI:*:TYPE'              => new EventOrFactClassification(I18N::translate('Type')),
442                'INDI:*:WWW'               => new AddressWebPage(I18N::translate('URL')),
443                'INDI:*:_ASSO'             => new XrefIndividual(I18N::translate('Associate')), // ***
444                'INDI:*:_ASSO:RELA'        => new RelationIsDescriptor(I18N::translate('Relationship')), // ***
445                'INDI:ADOP'                => new Adoption(I18N::translate('Adoption')),
446                'INDI:ADOP:DATE'           => new DateValue(I18N::translate('Date of adoption')),
447                'INDI:ADOP:FAMC'           => new XrefFamily(I18N::translate('Adoptive parents')),
448                'INDI:ADOP:FAMC:ADOP'      => new AdoptedByWhichParent(I18N::translate('Adoption')),
449                'INDI:ADOP:PLAC'           => new PlaceName(I18N::translate('Place of adoption')),
450                'INDI:AFN'                 => new AncestralFileNumber(I18N::translate('Ancestral file number')),
451                'INDI:ALIA'                => new XrefIndividual(I18N::translate('Alias')),
452                'INDI:ANCI'                => new XrefSubmitter(I18N::translate('Ancestors interest')),
453                'INDI:ASSO'                => new XrefIndividual(I18N::translate('Associate')),
454                'INDI:ASSO:NOTE'           => new NoteStructure(I18N::translate('Note')),
455                'INDI:ASSO:RELA'           => new RelationIsDescriptor(I18N::translate('Relationship')),
456                'INDI:BAPL'                => new LdsBaptism(I18N::translate('LDS baptism')),
457                'INDI:BAPL:DATE'           => new DateLdsOrd(I18N::translate('Date of LDS baptism')),
458                'INDI:BAPL:NOTE'           => new NoteStructure(I18N::translate('Note')),
459                'INDI:BAPL:PLAC'           => new PlaceLivingOrdinance(I18N::translate('Place of LDS baptism')),
460                'INDI:BAPL:STAT'           => new LdsBaptismDateStatus(I18N::translate('Status')),
461                'INDI:BAPL:STAT:DATE'      => new ChangeDate(I18N::translate('Status change date')),
462                'INDI:BAPL:TEMP'           => new TempleCode(/* I18N: https://en.wikipedia.org/wiki/Temple_(LDS_Church)*/ I18N::translate('Temple')),
463                'INDI:BAPM'                => new Baptism(I18N::translate('Baptism')),
464                'INDI:BAPM:DATE'           => new DateValue(I18N::translate('Date of baptism')),
465                'INDI:BAPM:PLAC'           => new PlaceName(I18N::translate('Place of baptism')),
466                'INDI:BARM'                => new PlaceName(I18N::translate('Bar mitzvah')),
467                'INDI:BARM:DATE'           => new DateValue(I18N::translate('Date of bar mitzvah')),
468                'INDI:BARM:PLAC'           => new PlaceName(I18N::translate('Place of bar mitzvah')),
469                'INDI:BASM'                => new BasMitzvah(I18N::translate('Bat mitzvah')),
470                'INDI:BASM:DATE'           => new BasMitzvah(I18N::translate('Date of bat mitzvah')),
471                'INDI:BASM:PLAC'           => new DateValue(I18N::translate('Place of bat mitzvah')),
472                'INDI:BIRT'                => new Birth(I18N::translate('Birth')),
473                'INDI:BIRT:DATE'           => new DateValue(I18N::translate('Date of birth')),
474                'INDI:BIRT:FAMC'           => new XrefFamily(I18N::translate('Birth parents')),
475                'INDI:BIRT:PLAC'           => new PlaceName(I18N::translate('Place of birth')),
476                'INDI:BLES'                => new Blessing(I18N::translate('Blessing')),
477                'INDI:BLES:DATE'           => new DateValue(I18N::translate('Date of blessing')),
478                'INDI:BLES:PLAC'           => new PlaceName(I18N::translate('Place of blessing')),
479                'INDI:BURI'                => new Burial(I18N::translate('Burial')),
480                'INDI:BURI:DATE'           => new DateValue(I18N::translate('Date of burial')),
481                'INDI:BURI:PLAC'           => new PlaceName(I18N::translate('Place of burial')),
482                'INDI:CAST'                => new CasteName(I18N::translate('Caste')),
483                'INDI:CENS'                => new Census(I18N::translate('Census')),
484                'INDI:CENS:DATE'           => new DateValue(I18N::translate('Census date')),
485                'INDI:CENS:PLAC'           => new PlaceName(I18N::translate('Census place')),
486                'INDI:CHAN'                => new Change(I18N::translate('Last change')),
487                'INDI:CHAN:DATE'           => new ChangeDate(I18N::translate('Date of last change')),
488                'INDI:CHAN:DATE:TIME'      => new TimeValue(I18N::translate('Time')),
489                'INDI:CHAN:_WT_USER'       => new WebtreesUser(I18N::translate('Author of last change')), // *** webtrees
490                'INDI:CHR'                 => new Christening(I18N::translate('Christening')),
491                'INDI:CHR:DATE'            => new DateValue(I18N::translate('Date of christening')),
492                'INDI:CHR:FAMC'            => new XrefFamily(I18N::translate('Godparents')),
493                'INDI:CHR:PLAC'            => new PlaceName(I18N::translate('Place of christening')),
494                'INDI:CHRA'                => new AdultChristening(I18N::translate('Adult christening')),
495                'INDI:CONF'                => new Confirmation(I18N::translate('Confirmation')),
496                'INDI:CONF:DATE'           => new DateValue(I18N::translate('Date of confirmation')),
497                'INDI:CONF:PLAC'           => new PlaceName(I18N::translate('Place of confirmation')),
498                'INDI:CONL'                => new LdsConfirmation(I18N::translate('LDS confirmation')),
499                'INDI:CONL:DATE'           => new DateLdsOrd(I18N::translate('Date of LDS confirmation')),
500                'INDI:CONL:NOTE'           => new NoteStructure(I18N::translate('Note')),
501                'INDI:CONL:PLAC'           => new PlaceLivingOrdinance(I18N::translate('Place of LDS confirmation')),
502                'INDI:CONL:STAT'           => new LdsSpouseSealingDateStatus(I18N::translate('Status')),
503                'INDI:CONL:STAT:DATE'      => new ChangeDate(I18N::translate('Status change date')),
504                'INDI:CONL:TEMP'           => new TempleCode(/* I18N: https://en.wikipedia.org/wiki/Temple_(LDS_Church)*/ I18N::translate('Temple')),
505                'INDI:CREM'                => new Cremation(I18N::translate('Cremation')),
506                'INDI:CREM:DATE'           => new Cremation(I18N::translate('Date of cremation')),
507                'INDI:CREM:PLAC'           => new Cremation(I18N::translate('Place of cremation')),
508                'INDI:DEAT'                => new Death(I18N::translate('Death')),
509                'INDI:DEAT:CAUS'           => new CauseOfEvent(I18N::translate('Cause of death')),
510                'INDI:DEAT:DATE'           => new DateValue(I18N::translate('Date of death')),
511                'INDI:DEAT:PLAC'           => new PlaceName(I18N::translate('Place of death')),
512                'INDI:DESI'                => new XrefSubmitter(I18N::translate('Descendants interest')),
513                'INDI:DSCR'                => new PhysicalDescription(I18N::translate('Description')),
514                'INDI:EDUC'                => new ScholasticAchievement(I18N::translate('Education')),
515                'INDI:EDUC:AGNC'           => new ResponsibleAgency(I18N::translate('School or college')),
516                'INDI:EMIG'                => new Emigration(I18N::translate('Emigration')),
517                'INDI:EMIG:DATE'           => new DateValue(I18N::translate('Date of emigration')),
518                'INDI:EMIG:PLAC'           => new PlaceName(I18N::translate('Place of emigration')),
519                'INDI:ENDL'                => new LdsEndowment(I18N::translate('LDS endowment')),
520                'INDI:ENDL:DATE'           => new DateLdsOrd(I18N::translate('Date of LDS endowment')),
521                'INDI:ENDL:NOTE'           => new NoteStructure(I18N::translate('Note')),
522                'INDI:ENDL:PLAC'           => new PlaceLivingOrdinance(I18N::translate('Place of LDS endowment')),
523                'INDI:ENDL:STAT'           => new LdsEndowmentDateStatus(I18N::translate('Status')),
524                'INDI:ENDL:STAT:DATE'      => new ChangeDate(I18N::translate('Status change date')),
525                'INDI:ENDL:TEMP'           => new TempleCode(/* I18N: https://en.wikipedia.org/wiki/Temple_(LDS_Church)*/ I18N::translate('Temple')),
526                'INDI:EVEN'                => new EventDescriptor(I18N::translate('Event')),
527                'INDI:EVEN:DATE'           => new DateValue(I18N::translate('Date of event')),
528                'INDI:EVEN:PLAC'           => new PlaceName(I18N::translate('Place of event')),
529                'INDI:EVEN:TYPE'           => new EventAttributeType(I18N::translate('Type of event')),
530                'INDI:FACT'                => new AttributeDescriptor(I18N::translate('Fact')),
531                'INDI:FACT:TYPE'           => new EventAttributeType(I18N::translate('Type of fact')),
532                'INDI:FAMC'                => new XrefFamily(I18N::translate('Family as a child')),
533                'INDI:FAMC:NOTE'           => new NoteStructure(I18N::translate('Note')),
534                'INDI:FAMC:PEDI'           => new PedigreeLinkageType(I18N::translate('Relationship to parents')),
535                'INDI:FAMC:STAT'           => new ChildLinkageStatus(I18N::translate('Status')),
536                'INDI:FAMS'                => new XrefFamily(I18N::translate('Family as a spouse')),
537                'INDI:FCOM'                => new FirstCommunion(I18N::translate('First communion')),
538                'INDI:FCOM:DATE'           => new DateValue(I18N::translate('Date of first communion')),
539                'INDI:FCOM:PLAC'           => new PlaceName(I18N::translate('Place of first communion')),
540                'INDI:GRAD'                => new Graduation(I18N::translate('Graduation')),
541                'INDI:GRAD:AGNC'           => new ResponsibleAgency(I18N::translate('School or college')),
542                'INDI:IDNO'                => new NationalIdNumber(I18N::translate('Identification number')),
543                'INDI:IMMI'                => new Immigration(I18N::translate('Immigration')),
544                'INDI:IMMI:DATE'           => new DateValue(I18N::translate('Date of immigration')),
545                'INDI:IMMI:PLAC'           => new PlaceName(I18N::translate('Place of immigration')),
546                'INDI:NAME'                => new NamePersonal(I18N::translate('Name')),
547                'INDI:NAME:FONE'           => new NamePhoneticVariation(I18N::translate('Phonetic name')),
548                'INDI:NAME:FONE:GIVN'      => new NamePieceGiven(I18N::translate('Given names')),
549                'INDI:NAME:FONE:NICK'      => new NamePieceNickname(I18N::translate('Nickname')),
550                'INDI:NAME:FONE:NPFX'      => new NamePiecePrefix(I18N::translate('Name prefix')),
551                'INDI:NAME:FONE:NSFX'      => new NamePieceSuffix(I18N::translate('Name suffix')),
552                'INDI:NAME:FONE:SPFX'      => new NamePieceSurnamePrefix(I18N::translate('Surname prefix')),
553                'INDI:NAME:FONE:SURN'      => new NamePieceSurname(I18N::translate('Surname')),
554                'INDI:NAME:FONE:TYPE'      => new PhoneticType(I18N::translate('Type of name')),
555                'INDI:NAME:GIVN'           => new NamePieceGiven(I18N::translate('Given names')),
556                'INDI:NAME:NICK'           => new NamePieceNickname(I18N::translate('Nickname')),
557                'INDI:NAME:NOTE'           => new NoteStructure(I18N::translate('Note')),
558                'INDI:NAME:NPFX'           => new NamePiecePrefix(I18N::translate('Name prefix')),
559                'INDI:NAME:NSFX'           => new NamePieceSuffix(I18N::translate('Name suffix')),
560                'INDI:NAME:ROMN'           => new NameRomanizedVariation(I18N::translate('Romanized name')),
561                'INDI:NAME:ROMN:GIVN'      => new NamePieceGiven(I18N::translate('Given names')),
562                'INDI:NAME:ROMN:NICK'      => new NamePieceNickname(I18N::translate('Nickname')),
563                'INDI:NAME:ROMN:NPFX'      => new NamePiecePrefix(I18N::translate('Name prefix')),
564                'INDI:NAME:ROMN:NSFX'      => new NamePieceSuffix(I18N::translate('Name suffix')),
565                'INDI:NAME:ROMN:SPFX'      => new NamePieceSurnamePrefix(I18N::translate('Surname prefix')),
566                'INDI:NAME:ROMN:SURN'      => new NamePieceSurname(I18N::translate('Surname')),
567                'INDI:NAME:ROMN:TYPE'      => new RomanizedType(I18N::translate('Type')),
568                'INDI:NAME:SPFX'           => new NamePieceSurnamePrefix(I18N::translate('Surname prefix')),
569                'INDI:NAME:SURN'           => new NamePieceSurname(I18N::translate('Surname')),
570                'INDI:NAME:TYPE'           => new NameType(I18N::translate('Type of name')),
571                'INDI:NATI'                => new NationOrTribalOrigin(I18N::translate('Nationality')),
572                'INDI:NATU'                => new Naturalization(I18N::translate('Naturalization')),
573                'INDI:NATU:DATE'           => new DateValue(I18N::translate('Date of naturalization')),
574                'INDI:NATU:PLAC'           => new PlaceName(I18N::translate('Place of naturalization')),
575                'INDI:NCHI'                => new CountOfChildren(I18N::translate('Number of children')),
576                'INDI:NMR'                 => new CountOfMarriages(I18N::translate('Number of marriages')),
577                'INDI:NOTE'                => new NoteStructure(I18N::translate('Note')),
578                'INDI:OBJE'                => new XrefMedia(I18N::translate('Media object')),
579                'INDI:OCCU'                => new Occupation(I18N::translate('Occupation')),
580                'INDI:OCCU:AGNC'           => new ResponsibleAgency(I18N::translate('Employer')),
581                'INDI:ORDN'                => new Ordination(I18N::translate('Ordination')),
582                'INDI:ORDN:AGNC'           => new Ordination(I18N::translate('Religious institution')),
583                'INDI:ORDN:DATE'           => new Ordination(I18N::translate('Date of ordination')),
584                'INDI:ORDN:PLAC'           => new Ordination(I18N::translate('Place of ordination')),
585                'INDI:PROB'                => new Probate(I18N::translate('Probate')),
586                'INDI:PROP'                => new Possessions(I18N::translate('Property')),
587                'INDI:REFN'                => new UserReferenceNumber(I18N::translate('Reference number')),
588                'INDI:REFN:TYPE'           => new UserReferenceType(I18N::translate('Type')),
589                'INDI:RELI'                => new ReligiousAffiliation(I18N::translate('Religion')),
590                'INDI:RESI'                => new Residence(I18N::translate('Residence')),
591                'INDI:RESI:DATE'           => new DateValue(I18N::translate('Date of residence')),
592                'INDI:RESI:PLAC'           => new PlaceName(I18N::translate('Place of residence')),
593                'INDI:RESN'                => new RestrictionNotice(I18N::translate('Restriction')),
594                'INDI:RETI'                => new Retirement(I18N::translate('Retirement')),
595                'INDI:RETI:AGNC'           => new ResponsibleAgency(I18N::translate('Employer')),
596                'INDI:RFN'                 => new PermanentRecordFileNumber(I18N::translate('Record file number')),
597                'INDI:RIN'                 => new AutomatedRecordId(I18N::translate('Record ID number')),
598                'INDI:SEX'                 => new SexValue(I18N::translate('Gender')),
599                'INDI:SLGC'                => new LdsChildSealing(I18N::translate('LDS child sealing')),
600                'INDI:SLGC:DATE'           => new DateLdsOrd(I18N::translate('Date of LDS child sealing')),
601                'INDI:SLGC:FAMC'           => new XrefFamily(I18N::translate('Parents')),
602                'INDI:SLGC:NOTE'           => new NoteStructure(I18N::translate('Note')),
603                'INDI:SLGC:PLAC'           => new PlaceLivingOrdinance(I18N::translate('Place of LDS child sealing')),
604                'INDI:SLGC:STAT'           => new LdsChildSealingDateStatus(I18N::translate('Status')),
605                'INDI:SLGC:STAT:DATE'      => new ChangeDate(I18N::translate('Status change date')),
606                'INDI:SLGC:TEMP'           => new TempleCode(/* I18N: https://en.wikipedia.org/wiki/Temple_(LDS_Church)*/ I18N::translate('Temple')),
607                'INDI:SOUR'                => new XrefSource(I18N::translate('Source')),
608                'INDI:SOUR:DATA'           => new SourceData(I18N::translate('Data')),
609                'INDI:SOUR:DATA:DATE'      => new EntryRecordingDate(I18N::translate('Date of entry in original source')),
610                'INDI:SOUR:DATA:TEXT'      => new TextFromSource(I18N::translate('Text')),
611                'INDI:SOUR:EVEN'           => new EventTypeCitedFrom(I18N::translate('Event')),
612                'INDI:SOUR:EVEN:ROLE'      => new RoleInEvent(I18N::translate('Role')),
613                'INDI:SOUR:NOTE'           => new NoteStructure(I18N::translate('Note')),
614                'INDI:SOUR:OBJE'           => new XrefMedia(I18N::translate('Media object')),
615                'INDI:SOUR:PAGE'           => new WhereWithinSource(I18N::translate('Citation details')),
616                'INDI:SOUR:QUAY'           => new CertaintyAssessment(I18N::translate('Quality of data')),
617                'INDI:SSN'                 => new SocialSecurityNumber(I18N::translate('Social security number')),
618                'INDI:SUBM'                => new XrefSubmitter(I18N::translate('Submitter')),
619                'INDI:TITL'                => new NobilityTypeTitle(I18N::translate('Title')),
620                'INDI:WILL'                => new Will(I18N::translate('Will')),
621                'INDI:_TODO'               => new UnknownElement(I18N::translate('Research task')), // *** webtrees
622                'INDI:_TODO:DATE'          => new DateValue(I18N::translate('Date')), // *** webtrees
623                'INDI:_TODO:_WT_USER'      => new WebtreesUser(I18N::translate('User')), // *** webtrees
624                'INDI:_UID'                => new PafUid(I18N::translate('Unique identifier')), // ***
625                'INDI:_WT_OBJE_SORT'       => new XrefMedia(I18N::translate('Re-order media')), // *** webtrees 1.7
626                'NOTE'                     => new NoteRecord(I18N::translate('Note')),
627                'NOTE:CHAN'                => new Change(I18N::translate('Last change')),
628                'NOTE:CHAN:DATE'           => new ChangeDate(I18N::translate('Date of last change')),
629                'NOTE:CHAN:DATE:TIME'      => new TimeValue(I18N::translate('Time')),
630                'NOTE:CHAN:NOTE'           => new NoteStructure(I18N::translate('Note')),
631                'NOTE:CHAN:_WT_USER'       => new WebtreesUser(I18N::translate('Author of last change')), // *** webtrees
632                'NOTE:CONC'                => new SubmitterText(I18N::translate('Note')),
633                'NOTE:CONT'                => new SubmitterText(I18N::translate('Continued')),
634                'NOTE:REFN'                => new UserReferenceNumber(I18N::translate('Reference number')),
635                'NOTE:REFN:TYPE'           => new UserReferenceType(I18N::translate('Type')),
636                'NOTE:RESN'                => new RestrictionNotice(I18N::translate('Restriction')), // *** webtrees
637                'NOTE:RIN'                 => new AutomatedRecordId(I18N::translate('Record ID number')),
638                'NOTE:SOUR'                => new XrefSource(I18N::translate('Source')),
639                'NOTE:SOUR:DATA'           => new SourceData(I18N::translate('Data')),
640                'NOTE:SOUR:DATA:DATE'      => new EntryRecordingDate(I18N::translate('Date of entry in original source')),
641                'NOTE:SOUR:DATA:TEXT'      => new TextFromSource(I18N::translate('Text')),
642                'NOTE:SOUR:EVEN'           => new EventTypeCitedFrom(I18N::translate('Event')),
643                'NOTE:SOUR:EVEN:ROLE'      => new RoleInEvent(I18N::translate('Role')),
644                'NOTE:SOUR:NOTE'           => new NoteStructure(I18N::translate('Note')),
645                'NOTE:SOUR:OBJE'           => new XrefMedia(I18N::translate('Media object')),
646                'NOTE:SOUR:PAGE'           => new WhereWithinSource(I18N::translate('Citation details')),
647                'NOTE:SOUR:QUAY'           => new CertaintyAssessment(I18N::translate('Quality of data')),
648                'NOTE:_UID'                => new PafUid(I18N::translate('Unique identifier')), // ***
649                'OBJE'                     => new MediaRecord(I18N::translate('Media object')),
650                'OBJE:CHAN'                => new Change(I18N::translate('Last change')),
651                'OBJE:CHAN:DATE'           => new ChangeDate(I18N::translate('Date of last change')),
652                'OBJE:CHAN:DATE:TIME'      => new TimeValue(I18N::translate('Time')),
653                'OBJE:CHAN:NOTE'           => new NoteStructure(I18N::translate('Note')),
654                'OBJE:CHAN:_WT_USER'       => new WebtreesUser(I18N::translate('Author of last change')), // *** webtrees
655                'OBJE:FILE'                => new MultimediaFileReference(I18N::translate('Filename')),
656                'OBJE:FILE:FORM'           => new MultimediaFormat(I18N::translate('Format')),
657                'OBJE:FILE:FORM:TYPE'      => new SourceMediaType(I18N::translate('Media type')),
658                'OBJE:FILE:TITL'           => new DescriptiveTitle(I18N::translate('Title')),
659                'OBJE:NOTE'                => new NoteStructure(I18N::translate('Note')),
660                'OBJE:REFN'                => new UserReferenceNumber(I18N::translate('Reference number')),
661                'OBJE:REFN:TYPE'           => new UserReferenceType(I18N::translate('Type')),
662                'OBJE:RESN'                => new RestrictionNotice(I18N::translate('Restriction')), // *** webtrees
663                'OBJE:RIN'                 => new AutomatedRecordId(I18N::translate('Record ID number')),
664                'OBJE:SOUR'                => new XrefSource(I18N::translate('Source')),
665                'OBJE:SOUR:DATA'           => new SourceData(I18N::translate('Data')),
666                'OBJE:SOUR:DATA:DATE'      => new EntryRecordingDate(I18N::translate('Date of entry in original source')),
667                'OBJE:SOUR:DATA:TEXT'      => new TextFromSource(I18N::translate('Text')),
668                'OBJE:SOUR:EVEN'           => new EventTypeCitedFrom(I18N::translate('Event')),
669                'OBJE:SOUR:EVEN:ROLE'      => new RoleInEvent(I18N::translate('Role')),
670                'OBJE:SOUR:NOTE'           => new NoteStructure(I18N::translate('Note')),
671                'OBJE:SOUR:OBJE'           => new XrefMedia(I18N::translate('Media object')),
672                'OBJE:SOUR:PAGE'           => new WhereWithinSource(I18N::translate('Citation details')),
673                'OBJE:SOUR:QUAY'           => new CertaintyAssessment(I18N::translate('Quality of data')),
674                'OBJE:_UID'                => new PafUid(I18N::translate('Unique identifier')), // ***
675                'REPO'                     => new RepositoryRecord(I18N::translate('Repository')),
676                'REPO:ADDR'                => new AddressLine(I18N::translate('Address')),
677                'REPO:ADDR:ADR1'           => new AddressLine1(I18N::translate('Address line 1')),
678                'REPO:ADDR:ADR2'           => new AddressLine2(I18N::translate('Address line 2')),
679                'REPO:ADDR:ADR3'           => new AddressLine3(I18N::translate('Address line 3')),
680                'REPO:ADDR:CITY'           => new AddressCity(I18N::translate('City')),
681                'REPO:ADDR:CTRY'           => new AddressCountry(I18N::translate('Country')),
682                'REPO:ADDR:POST'           => new AddressPostalCode(I18N::translate('Postal code')),
683                'REPO:ADDR:STAE'           => new AddressState(I18N::translate('State')),
684                'REPO:CHAN'                => new Change(I18N::translate('Last change')),
685                'REPO:CHAN:DATE'           => new ChangeDate(I18N::translate('Date of last change')),
686                'REPO:CHAN:DATE:TIME'      => new TimeValue(I18N::translate('Time')),
687                'REPO:CHAN:NOTE'           => new NoteStructure(I18N::translate('Note')),
688                'REPO:CHAN:_WT_USER'       => new WebtreesUser(I18N::translate('Author of last change')), // *** webtrees
689                'REPO:EMAIL'               => new AddressEmail(I18N::translate('Email address')),
690                'REPO:FAX'                 => new AddressFax(I18N::translate('Fax')),
691                'REPO:NAME'                => new NameOfRepository(I18N::translateContext('Repository', 'Name')),
692                'REPO:NOTE'                => new NoteStructure(I18N::translate('Note')),
693                'REPO:PHON'                => new PhoneNumber(I18N::translate('Phone')),
694                'REPO:REFN'                => new UserReferenceNumber(I18N::translate('Reference number')),
695                'REPO:REFN:TYPE'           => new UserReferenceType(I18N::translate('Type')),
696                'REPO:RESN'                => new RestrictionNotice(I18N::translate('Restriction')), // *** webtrees
697                'REPO:RIN'                 => new AutomatedRecordId(I18N::translate('Record ID number')),
698                'REPO:WWW'                 => new AddressWebPage(I18N::translate('URL')),
699                'REPO:_UID'                => new PafUid(I18N::translate('Unique identifier')), // ***
700                'SOUR'                     => new SourceRecord(I18N::translate('Source')),
701                'SOUR:ABBR'                => new SourceFiledByEntry(I18N::translate('Abbreviation')),
702                'SOUR:AUTH'                => new SourceOriginator(I18N::translate('Author')),
703                'SOUR:CHAN'                => new Change(I18N::translate('Last change')),
704                'SOUR:CHAN:DATE'           => new ChangeDate(I18N::translate('Date of last change')),
705                'SOUR:CHAN:DATE:TIME'      => new TimeValue(I18N::translate('Time')),
706                'SOUR:CHAN:NOTE'           => new NoteStructure(I18N::translate('Note')),
707                'SOUR:CHAN:_WT_USER'       => new WebtreesUser(I18N::translate('Author of last change')), // *** webtrees
708                'SOUR:DATA'                => new EmptyElement(I18N::translate('Data'), ['EVEN' => '0:M', 'AGNC' => '0:1', 'NOTE' => '0:M']),
709                'SOUR:DATA:AGNC'           => new ResponsibleAgency(I18N::translate('Agency')),
710                'SOUR:DATA:EVEN'           => new EventsRecorded(I18N::translate('Events')),
711                'SOUR:DATA:EVEN:DATE'      => new DateValue(I18N::translate('Date range')),
712                'SOUR:DATA:EVEN:PLAC'      => new SourceJurisdictionPlace(I18N::translate('Place')),
713                'SOUR:DATA:NOTE'           => new NoteStructure(I18N::translate('Note')),
714                'SOUR:NOTE'                => new NoteStructure(I18N::translate('Note')),
715                'SOUR:OBJE'                => new XrefMedia(I18N::translate('Media object')),
716                'SOUR:PUBL'                => new SourcePublicationFacts(I18N::translate('Publication')),
717                'SOUR:REFN'                => new UserReferenceNumber(I18N::translate('Reference number')),
718                'SOUR:REFN:TYPE'           => new UserReferenceType(I18N::translate('Type')),
719                'SOUR:REPO'                => new XrefRepository(I18N::translate('Repository')),
720                'SOUR:REPO:CALN'           => new SourceCallNumber(I18N::translate('Call number')),
721                'SOUR:REPO:CALN:MEDI'      => new SourceMediaType(I18N::translate('Media type')),
722                'SOUR:REPO:NOTE'           => new NoteStructure(I18N::translate('Note')),
723                'SOUR:RESN'                => new RestrictionNotice(I18N::translate('Restriction')), // *** webtrees
724                'SOUR:RIN'                 => new AutomatedRecordId(I18N::translate('Record ID number')),
725                'SOUR:TEXT'                => new TextFromSource(I18N::translate('Text')),
726                'SOUR:TITL'                => new DescriptiveTitle(I18N::translate('Title')),
727                'SOUR:_UID'                => new PafUid(I18N::translate('Unique identifier')), // ***
728                'SUBM'                     => new SubmitterRecord(I18N::translate('Submitter')),
729                'SUBM:ADDR'                => new AddressLine(I18N::translate('Address')),
730                'SUBM:ADDR:ADR1'           => new AddressLine1(I18N::translate('Address line 1')),
731                'SUBM:ADDR:ADR2'           => new AddressLine2(I18N::translate('Address line 2')),
732                'SUBM:ADDR:ADR3'           => new AddressLine3(I18N::translate('Address line 3')),
733                'SUBM:ADDR:CITY'           => new AddressCity(I18N::translate('City')),
734                'SUBM:ADDR:CTRY'           => new AddressCountry(I18N::translate('Country')),
735                'SUBM:ADDR:POST'           => new AddressPostalCode(I18N::translate('Postal code')),
736                'SUBM:ADDR:STAE'           => new AddressState(I18N::translate('State')),
737                'SUBM:CHAN'                => new Change(I18N::translate('Last change')),
738                'SUBM:CHAN:DATE'           => new ChangeDate(I18N::translate('Date of last change')),
739                'SUBM:CHAN:DATE:TIME'      => new TimeValue(I18N::translate('Time')),
740                'SUBM:CHAN:NOTE'           => new NoteStructure(I18N::translate('Note')),
741                'SUBM:CHAN:_WT_USER'       => new WebtreesUser(I18N::translate('Author of last change')), // *** webtrees
742                'SUBM:EMAIL'               => new AddressEmail(I18N::translate('Email address')),
743                'SUBM:FAX'                 => new AddressFax(I18N::translate('Fax')),
744                'SUBM:LANG'                => new LanguageId(I18N::translate('Language')),
745                'SUBM:NAME'                => new SubmitterName(I18N::translate('Name')),
746                'SUBM:NOTE'                => new NoteStructure(I18N::translate('Note')),
747                'SUBM:OBJE'                => new XrefMedia(I18N::translate('Media object')),
748                'SUBM:PHON'                => new PhoneNumber(I18N::translate('Phone')),
749                'SUBM:RESN'                => new RestrictionNotice(I18N::translate('Restriction')), // *** webtrees
750                'SUBM:RFN'                 => new SubmitterRegisteredRfn(I18N::translate('Record file number')),
751                'SUBM:RIN'                 => new AutomatedRecordId(I18N::translate('Record ID number')),
752                'SUBM:WWW'                 => new AddressWebPage(I18N::translate('URL')),
753                'SUBM:_UID'                => new PafUid(I18N::translate('Unique identifier')), // ***
754                'SUBN'                     => new SubmissionRecord(I18N::translate('Submission')),
755                'SUBN:ANCE'                => new GenerationsOfAncestors(I18N::translate('Generations of ancestors')),
756                'SUBN:CHAN'                => new Change(I18N::translate('Last change')),
757                'SUBN:CHAN:DATE'           => new ChangeDate(I18N::translate('Date of last change')),
758                'SUBN:CHAN:DATE:TIME'      => new TimeValue(I18N::translate('Time')),
759                'SUBN:CHAN:NOTE'           => new NoteStructure(I18N::translate('Note')),
760                'SUBN:CHAN:_WT_USER'       => new WebtreesUser(I18N::translate('Author of last change')), // *** webtrees
761                'SUBN:DESC'                => new GenerationsOfDescendants(I18N::translate('Generations of descendants')),
762                'SUBN:FAMF'                => new NameOfFamilyFile(I18N::translate('Family file')),
763                'SUBN:NOTE'                => new NoteStructure(I18N::translate('Note')),
764                'SUBN:ORDI'                => new OrdinanceProcessFlag(I18N::translate('Ordinance')),
765                'SUBN:RESN'                => new RestrictionNotice(I18N::translate('Restriction')), // *** webtrees
766                'SUBN:RIN'                 => new AutomatedRecordId(I18N::translate('Record ID number')),
767                'SUBN:SUBM'                => new XrefSubmitter(I18N::translate('Submitter')),
768                'SUBN:TEMP'                => new TempleCode(/* I18N: https://en.wikipedia.org/wiki/Temple_(LDS_Church)*/ I18N::translate('Temple')),
769                'SUBN:_UID'                => new PafUid(I18N::translate('Unique identifier')), // ***
770                'TRLR'                     => new EmptyElement(I18N::translate('Trailer')), // Not used in webtrees
771            ];
772        }
773
774        return $this->elements;
775    }
776}
777