summaryrefslogtreecommitdiff
path: root/lib/Graph/GEXF/Edge.pm
blob: a116a0168e65be0bd37473688ce6af594a9ec376 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
package Graph::GEXF::Edge;

use Moose;
use Data::UUID::LibUUID;

with
  'Graph::GEXF::Role::Viz::Size'  => { as  => 'thickness' },
  'Graph::GEXF::Role::Viz::Shape' => { for => 'edge' };

has id => (
    is       => 'ro',
    isa      => 'Str',
    required => 1,
    default  => sub { new_uuid_string() }
);

has source => (is => 'ro', isa => 'Str', required => 1);
has target => (is => 'ro', isa => 'Str', required => 1);
has label  => (is => 'rw', isa => 'Str');
has weight => (is => 'rw', isa => 'Num', lazy => 1, default => 1);

no Moose;

1;