parquet_maml_base Module

Base-library MAML fixtures: embeds every .maml file under schemas/ bundled with this library as a compiled-in string array, addressable by filename via get_parquet_maml, plus the shared parquet_maml_file type and its add_col_qc/set_col_qc qc-maml builders.


Used by


Derived Types

type, public ::  parquet_maml_missing_column

One schema field the base MAML declares but a user-supplied MAML omits; populated by parquet_validate_user_maml, one entry per missing field.

Components

Type Visibility Attributes Name Initial
character(len=:), public, allocatable :: name

The name of the field [required].

character(len=:), public, allocatable :: unit

The unit of measurement for the field.

character(len=:), public, allocatable :: info

A short description of the field.

character(len=:), public, allocatable :: ucd

Unified Content Descriptor for IVOA (can have many).

character(len=:), public, allocatable :: data_type

The data type of the field [required]; base token only for a temporal column (unit/utc are in time_unit/is_utc).

integer, public :: time_unit = 0

time/timestamp stored unit (a parquet_unit_* selector; 0 if not temporal).

logical, public :: is_utc = .false.

timestamp UTC-adjusted flag.

integer, public :: array_size = 1

Maximum length of character strings.

integer, public :: col_size = 1

The number of elements in the vector column.

type, public ::  parquet_maml_col_map_entry

One col_map: entry: - <internal_name>: <output_name>, i.e. the field declared as output_name in this MAML fields: actually corresponds to the internal/canonical column named internal_name.

Components

Type Visibility Attributes Name Initial
character(len=:), public, allocatable :: internal_name

Canonical (internal) column name.

character(len=:), public, allocatable :: output_name

Renamed name as declared in fields:.

type, public ::  parquet_maml_file

One embedded or user-supplied MAML file: its raw source lines plus, once parsed/validated, the columns missing relative to the base schema and any col_map: renames it declares. add_col_qc/set_col_qc build a qc-maml incrementally (see parquet_maml_base_add_col_qc.f90).

Components

Type Visibility Attributes Name Initial
logical, public :: user_maml = .false.

true if this is a user defined MAML file

character(len=:), public, allocatable :: name

This MAML file name (embedded fixture name or path).

character(len=:), public, allocatable :: lines(:)

Raw MAML source, one array element per line.

type(parquet_maml_missing_column), public, allocatable :: missing_columns(:)

Columns present in the base MAML but missing from this (user) MAML; populated by parquet_validate_user_maml, consumed by parquet_read_maml.

type(parquet_maml_col_map_entry), public, allocatable :: col_map(:)

Parsed col_map: section (see parquet_maml_col_map_entry): exposes the renames this MAML declares, for inspection; populated by parquet_validate_user_maml. Renames are applied automatically whenever this MAML lines are parsed, independent of whether this is set.

Type-Bound Procedures

procedure, public :: add_col_qc => parquet_maml_add_col_qc

Appends one qc: field entry.

procedure, public :: set_col_qc => parquet_maml_set_col_qc

In-place form; parses the name into its argument.


Functions

public function get_parquet_maml(name) result(maml)

Returns the named embedded .maml fixture from schemas/ as a raw parquet_maml_file (unparsed lines only); error stops on an unknown name. A fixture is matched by its filename, with or without the .maml extension; one held in a subdirectory is also matched by its full relative path.

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: name

embedded fixture name, with or without .maml.

Return Value type(parquet_maml_file)

the matching MAML, unparsed (raw lines only).

public function parquet_maml_maml_example() result(maml)

Returns the embedded maml_example.maml MAML fixture, unparsed (raw lines only).

Arguments

None

Return Value type(parquet_maml_file)

the maml_example.maml MAML, unparsed.

public function parquet_maml_maml_example2() result(maml)

Returns the embedded maml_example2.maml MAML fixture, unparsed (raw lines only).

Arguments

None

Return Value type(parquet_maml_file)

the maml_example2.maml MAML, unparsed.

public function parquet_maml_maml_example3() result(maml)

Returns the embedded maml_example3.maml MAML fixture, unparsed (raw lines only).

Arguments

None

Return Value type(parquet_maml_file)

the maml_example3.maml MAML, unparsed.