read-gedcom
Version:
Gedcom file reader
38 lines • 2.04 kB
JavaScript
import { SelectionAny, SelectionFamilyRecord, SelectionHeader, SelectionIndividualRecord, SelectionMultimediaRecord, SelectionNoteRecord, SelectionRepositoryRecord, SelectionSourceRecord, SelectionSubmitterRecord } from './internal';
/**
* The root of a Gedcom file.
* Remark that the actual root is a pseudo node, and hence will store <code>null</code> for the attributes {@link tag}, {@link pointer} and {@link value}.
*/
export class SelectionGedcom extends SelectionAny {
getHeader() {
return this.get("HEAD" /* Tag.Header */, null, SelectionHeader);
}
/**
* @deprecated This method does the same thing as {@link get}; use that one instead
*/
getRecord(tag, pointer, SelectionAdapter) {
return this.get(tag, pointer, SelectionAdapter);
}
getSubmitterRecord(pointer) {
return this.get("SUBM" /* Tag.Submitter */, pointer !== null && pointer !== void 0 ? pointer : null, SelectionSubmitterRecord);
}
getIndividualRecord(pointer) {
return this.get("INDI" /* Tag.Individual */, pointer !== null && pointer !== void 0 ? pointer : null, SelectionIndividualRecord);
}
getFamilyRecord(pointer) {
return this.get("FAM" /* Tag.Family */, pointer !== null && pointer !== void 0 ? pointer : null, SelectionFamilyRecord);
}
getMultimediaRecord(pointer) {
return this.get("OBJE" /* Tag.Object */, pointer !== null && pointer !== void 0 ? pointer : null, SelectionMultimediaRecord);
}
getNoteRecord(pointer) {
return this.get("NOTE" /* Tag.Note */, pointer !== null && pointer !== void 0 ? pointer : null, SelectionNoteRecord);
}
getSourceRecord(pointer) {
return this.get("SOUR" /* Tag.Source */, pointer !== null && pointer !== void 0 ? pointer : null, SelectionSourceRecord);
}
getRepositoryRecord(pointer) {
return this.get("REPO" /* Tag.Repository */, pointer !== null && pointer !== void 0 ? pointer : null, SelectionRepositoryRecord);
}
}
//# sourceMappingURL=SelectionGedcom.js.map