BYU TRG
and 1 contributors

NAME

TBX::Min::Entry - Store information from one TBX-Min entry element

VERSION

version 0.06

SYNOPSIS

    use TBX::Min::Entry;
    use TBX::Min::LangGroup;
    my $concept = TBX::Min::Entry->new(
        {id => 'B001'});
    print $concept->id(); # 'B001'
    my $lang_grp = TBX::Min::LangGroup->new({code => 'en'});
    $concept->add_lang_group($lang_grp);
    my $lang_grps = $concept->lang_groups;
    print $#$lang_grps; # '1'

DESCRIPTION

This class represents a single concept entry contained in a TBX-Min file. A concept entry contains several language groups, each containing terms that represent this concept in a given languages.

METHODS

new

Creates a new TBX::Min::Entry instance. Optionally you may pass in a hash reference which is used to initialize the object. The allowed hash fields are id, subject_field and lang_groups, where id and subject_field correspond to methods of the same name, and langGroups is an array reference containing TBX::Min::LangGroup objects.

id

Get or set the concept entry id value.

subject_field

Get or set the concept subject field string.

lang_groups

Returns an array ref containing all of the TBX::Min::LangGroup objects in this concept entry. The array ref is the same one used to store the objects internally, so additions or removals from the array will be reflected in future calls to this method.

add_lang_group

Adds the input TBX::Min::LangGroup object to the list of language groups contained by this object.

SEE ALSO

TBX::Min

AUTHOR

Nathan Glenn <garfieldnate@gmail.com>

COPYRIGHT AND LICENSE

This software is copyright (c) 2013 by Alan Melby.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.