=item B<parse>
-parse( $graph, $graphml_string );
+parse( $tradition, $init_options );
-Takes an initialized Text::Tradition::Graph object and a string
-containing the GraphML; creates the appropriate nodes and edges on the
-graph.
+Takes an initialized Text::Tradition::Graph object and its initialization
+options, including the data source; creates the appropriate nodes and edges
+on the graph.
=cut
my $TRANSKEY = 'identical';
sub parse {
- my( $tradition, $graphml_str ) = @_;
- my $graph_data = Text::Tradition::Parser::GraphML::parse( $graphml_str );
+ my( $tradition, $opts ) = @_;
+ my $graph_data = Text::Tradition::Parser::GraphML::parse( $opts );
my $collation = $tradition->collation;
my %witnesses; # Keep track of the witnesses we encounter as we
# run through the graph data.
$collation->end( $gnode );
}
}
+
+ # TODO Need to populate $wit->path / uncorrected_path
- # Record for each witness its sequence of readings, and determine
- # the common nodes.
- my @common_nodes = $collation->walk_witness_paths( $end_node );
-
- # Now we have added the witnesses and their paths, so have also
- # implicitly marked the common nodes. Now we can calculate their
- # explicit positions.
- $collation->calculate_positions( @common_nodes );
+ # Now we have added the witnesses and their paths, so we can
+ # calculate their explicit positions.
+ # TODO CollateX does this, and we should just have it exported there.
+ $collation->calculate_ranks();
}
=back