package ID3FS::PathElement::Tag;

use strict;
use warnings;

sub new
{
    my $proto=shift;
    my $class=ref($proto) || $proto;
    my $self={};
    bless($self,$class);

    $self->{db}=shift;
    $self->{name}=shift;
    $self->{parents_id}=shift;
    $self->{id}=$self->{db}->id("tags", $self->{name});
    return(undef) unless(defined($self->{id}));
    return($self);
}

sub type { return "tag"; }

1;
