NAME
PICA::Schema::Builder - Create Avram Schema from examples
SYNOPSIS
my $builder = PICA::Schema::Builder->new;
while (my $record = get_some_pica_record()) {
$builder->add($record);
}
$schema = $builder->schema;
DESCRIPTION
An Avram Schema can be created automatically from PICA::Data records. The result contains a list of field that have been used in any of the inspected records. The schema can tell which fields occurr in all records (required
), whether a field has been repeated in a record (repeatable
), and the same information for subfields (subfields
). Subfield order is not taken into account.
METHODS
add( $record )
Analyse an additional PICA record.
schema
Return a PICA::Schema that all analyzed records conform to.
SEE ALSO
Catmandu::Breaker can analyze PICA data and create additional statistics.