source target witness extra relationship/;
sub parse {
- my( $tradition, $graphml_str ) = @_;
+ my( $tradition, $opts ) = @_;
+ my $graph_data = Text::Tradition::Parser::GraphML::parse( $opts );
# TODO this is begging for stream parsing instead of multiple loops.
- my $graph_data = Text::Tradition::Parser::GraphML::parse( $graphml_str );
my $collation = $tradition->collation;
my %witnesses;
my $rank = delete $node_data{$RANK_KEY};
# Create the node. Current valid classes are common and meta.
- # Everything else is a normal reading.
+ # Everything else is a normal reading.
+ ## TODO RATIONALIZE THESE CLASSES
my $gnode = $collation->add_reading( $nodeid );
$gnode->text( $reading );
$gnode->make_common if $class eq 'common';
$gnode->is_meta( 1 ) if $class eq 'meta';
+ # This is a horrible hack.
+ $gnode->is_lacuna( $reading =~ /^\#LACUNA/ );
$gnode->rank( $rank ) if defined $rank;
# Now save the data that we need for post-processing,