Projekt

Obecné

Profil

Akce

MetadataExporter

The class MetadataExporter (contained in the file MetadataExporter.php) is used for export of metadata from the database. This document only describes the basic aspects of the public functions in the class. Further documentation and explanation can be found in the relevant source file.

warning. Note: depending on the amount of data in the database for each relevant system, these functions might take a long time to finish (~tens of seconds up to tens of minutes).

MetadataExporter::downloadCorpusMetadata(integer $corpusId)

This function generates and sends a .csv file resembling the original summary.csv file found in the corpus release directory for the corpus release with the specified ID.

warning. Note: In order to resemble the original summary.csv files, some strings are hard-coded in the function's code. These should be changed as necessary.

MetadataExporter::downloadSystemVersionMetadataSeparate(array[integer] $systemVersionIds)

This function generates and sends a .csv file resembling the original contents.csv file found in the system version's metadata directory for the system versions with specified IDs. For each system version, a separate CSV file is generated, the resulting files packed in a ZIP archive and sent to the user.

warning. Note: In order to resemble the original contents.csv files, some strings are hard-coded in the function's code. These should be changed as necessary.

MetadataExporter::downloadSystemVersionMetadataSingle(array[integer] $systemVersionIds)

Works the same as the previous function, except all metadata are merged into a single CSV file, which is then sent to the user. The beginning and end of specific system versions are delimited by:

# Start of system version: <sysver>

and

# End of system version: <sysver>

warning. Note: In order to resemble the original contents.csv files, some strings are hard-coded in the function's code. These should be changed as necessary.

MetadataExporter::downloadSystemMetadataSeparate(array[integer] $systemIds)

Similar to the MetadataExporter::downloadSystemVersionMetadataSeparate() function, but generates CSV files for all versions of the specified systems. Metadata of all versions of one system are then stored in one CSV file (i.e. for each system, one CSV file is generated, containing metadata of all versions of that system). All files are then packed in a ZIP archive and sent to the user.

warning. Note: In order to resemble the original contents.csv files, some strings are hard-coded in the function's code. These should be changed as necessary.

Aktualizováno uživatelem Martin Berka před více než 8 roky(ů) · 3 revizí