| 1 | use strict; | ||
| 2 | use warnings; | ||
| 3 | |||
| 4 | package Neo4j::Types::Relationship; | ||
| 5 | # ABSTRACT: Describes a relationship from a Neo4j graph | ||
| 6 | $Neo4j::Types::Relationship::VERSION = '1.00'; | ||
| 7 | |||
| 8 | |||
| 9 | sub get { | ||
| 10 | my ($self, $property) = @_; | ||
| 11 | |||
| 12 | return unless defined $self->{properties}; | ||
| 13 | return $self->{properties}->{$property}; | ||
| 14 | } | ||
| 15 | |||
| 16 | |||
| 17 | sub id { | ||
| 18 | my ($self) = @_; | ||
| 19 | |||
| 20 | return $self->{id}; | ||
| 21 | } | ||
| 22 | |||
| 23 | |||
| 24 | sub type { | ||
| 25 | my ($self) = @_; | ||
| 26 | |||
| 27 | return $self->{type}; | ||
| 28 | } | ||
| 29 | |||
| 30 | |||
| 31 | sub start_id { | ||
| 32 | my ($self) = @_; | ||
| 33 | |||
| 34 | return $self->{start}; | ||
| 35 | } | ||
| 36 | |||
| 37 | |||
| 38 | sub end_id { | ||
| 39 | my ($self) = @_; | ||
| 40 | |||
| 41 | return $self->{end}; | ||
| 42 | } | ||
| 43 | |||
| 44 | |||
| 45 | sub properties { | ||
| 46 | my ($self) = @_; | ||
| 47 | |||
| 48 | return {} unless defined $self->{properties}; | ||
| 49 | return $self->{properties}; | ||
| 50 | } | ||
| 51 | |||
| 52 | |||
| 53 | 1; | ||
| 54 | |||
| 55 | __END__ |