RecordStorageInterface
in
Interface RecordStorageInterface
Tags
Table of Contents
Methods
- find() : ParsedRecord|null
- store() : ParsedRecord
- Parses the lines of one record and stores what was read. A record already stored under the same format and identifier is updated rather than duplicated.
- storeFile() : int
- Parses every record of one or several data files and stores them in a collection.
Methods
find()
public
find(string $sDbFormat, string $sEntryId) : ParsedRecord|null
Parameters
- $sDbFormat : string
-
Database format, e.g. "GENBANK"
- $sEntryId : string
-
Identifier of the record
Return values
ParsedRecord|nullstore()
Parses the lines of one record and stores what was read. A record already stored under the same format and identifier is updated rather than duplicated.
public
store(string $sDbFormat, array<string|int, mixed> $aLines[, Collection|null $oCollection = null ]) : ParsedRecord
Parameters
- $sDbFormat : string
-
Database format, e.g. "GENBANK"
- $aLines : array<string|int, mixed>
-
The lines of the record
- $oCollection : Collection|null = null
-
The collection the record belongs to
Tags
Return values
ParsedRecordstoreFile()
Parses every record of one or several data files and stores them in a collection.
public
storeFile(string $sDbName, string $sDbFormat, string ...$aDataFiles) : int
Parameters
- $sDbName : string
-
Name of the collection, created when it does not exist
- $sDbFormat : string
-
Database format, e.g. "GENBANK"
- $aDataFiles : string
-
Files to parse
Tags
Return values
int —Number of records stored