From: Mark Addison Date: Mon, 8 Sep 2003 12:27:29 +0000 (+0000) Subject: + Added visability arg. X-Git-Tag: v0.04~191 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=ef2d779897b8260887910a97cdcbc39d4fd7b760;p=dbsrgits%2FSQL-Translator.git + Added visability arg. - Removed all the ... stuff from the file to speed the test up. --- diff --git a/lib/SQL/Translator/Parser/XML/XMI.pm b/lib/SQL/Translator/Parser/XML/XMI.pm index 695e0c4..11ac3a1 100644 --- a/lib/SQL/Translator/Parser/XML/XMI.pm +++ b/lib/SQL/Translator/Parser/XML/XMI.pm @@ -1,7 +1,7 @@ package SQL::Translator::Parser::XML::XMI; # ------------------------------------------------------------------- -# $Id: XMI.pm,v 1.1 2003-09-04 15:55:47 grommit Exp $ +# $Id: XMI.pm,v 1.2 2003-09-08 12:27:29 grommit Exp $ # ------------------------------------------------------------------- # Copyright (C) 2003 Mark Addison , # @@ -32,7 +32,7 @@ Class diagrams stored in XMI format. use strict; use vars qw[ $DEBUG $VERSION @EXPORT_OK ]; -$VERSION = sprintf "%d.%02d", q$Revision: 1.1 $ =~ /(\d+)\.(\d+)/; +$VERSION = sprintf "%d.%02d", q$Revision: 1.2 $ =~ /(\d+)\.(\d+)/; $DEBUG = 0 unless defined $DEBUG; use Data::Dumper; @@ -66,7 +66,7 @@ sub XML::XPath::Function::xmideref { } die "xmideref() needs an Element node." unless $node->isa("XML::XPath::Node::Element"); - + my $id = $node->getAttribute("xmi.idref") or return $node; return $node->getRootNode->find('//*[@xmi.id="'.$id.'"]'); } @@ -80,53 +80,88 @@ sub XML::XPath::Function::hello { # Parser #----------------------------------------------------------------------------- +# +# is_visible( {ELEMENT|VIS_OF_THING}, VISLEVEL) +# +# Returns true or false for whether the visibility of something e.g. Class, +# Attribute, is visible at the level given. +# +{ + my %vislevel = ( + public => 1, + protected => 2, + private => 3, + ); + + sub is_visible { + my ($arg, $vis) = @_; + return 1 unless $vis; + my $foo; + die "is_visible : Needs something to test" unless $arg; + if ( $arg->isa("XML::XPath::Node::Element") ) { + $foo = $arg->getAttribute("visibility"); + } + else { + $foo = $arg; + } + return 1 if $vislevel{$vis} >= $vislevel{$foo}; + return 0; + } +} + sub parse { my ( $translator, $data ) = @_; local $DEBUG = $translator->debug; my $schema = $translator->schema; - my $pargs = $translator->parser_args; - - my $xp = XML::XPath->new(xml => $data); + my $pargs = $translator->parser_args; + debug "Visibility Level:$pargs->{visibility}" if $DEBUG; + + my $xp = XML::XPath->new(xml => $data); $xp->set_namespace("UML", "org.omg.xmi.namespace.UML"); # # TODO # - Options to set the initial context node so we don't just # blindly do all the classes. e.g. Select a diag name to do. - # - + # # Work our way through the classes, creating tables. We only # want class with xmi.id attributes and not the refs to them, # which will have xmi.idref attributes. # my @nodes = $xp->findnodes('//UML:Class[@xmi.id]'); - + debug "Found ".scalar(@nodes)." Classes: ".join(", ", - map {$_->getAttribute("name")} @nodes); - + map {$_->getAttribute("name")} @nodes) if $DEBUG; + for my $classnode (@nodes) { # Only process classes with <> and name next unless my $classname = $classnode->getAttribute("name"); + next unless !$pargs->{visibility} + or is_visible($classnode, $pargs->{visibility}); + my $stereotype = "".$classnode->find( 'xmideref(UML:ModelElement.stereotype/UML:Stereotype)/@name'); next unless $stereotype eq "Table"; - + # Add the table - debug "Adding class: $classname as table:$classname"; + debug "Adding class: $classname as table:$classname" if $DEBUG; my $table = $schema->add_table(name=>$classname) or die "Schema Error: ".$schema->error; # # Fields from Class attributes # - # name data_type size default_value is_nullable + # name data_type size default_value is_nullable # is_auto_increment is_primary_key is_foreign_key comments # foreach my $attrnode ( $classnode->findnodes( - 'UML:Classifier.feature/UML:Attribute[@xmi.id]',) + 'UML:Classifier.feature/UML:Attribute[@xmi.id]',) ) { next unless my $fieldname = $attrnode->getAttribute("name"); + next unless !$pargs->{visibility} + or is_visible($attrnode, $pargs->{visibility}); + my $stereotype = "".$attrnode->findvalue( 'xmideref(UML:ModelElement.stereotype/UML:Stereotype)/@name'); my %data = ( @@ -148,7 +183,7 @@ sub parse { $table->primary_key( $field->name ) if $data{'is_primary_key'}; # # TODO: - # - We should be able to make the table obj spot this when + # - We should be able to make the table obj spot this when # we use add_field. # } @@ -201,32 +236,32 @@ of XMI! =over 4 -=item visibility TODO +=item visibility - visibilty=public|private|protected|package + visibilty=public|protected|private What visibilty of stuff to translate. e.g when set to 'public' any private -Classes will be ignored and not turned into tables. - -=item table_visibility TODO +and package Classes will be ignored and not turned into tables. Applies +to Classes and Attributes. -=item field_visibility TODO - -=item table_stereotype Def:Table TODO - -What stereotype a class must have to turned into a table. - -=item pkey_stereotype Def:PK TODO +If not set or false (the default) no checks will be made and everything is +translated. =back =head1 BUGS +Seems to be slow. I think this is because the XMI files can get pretty +big and complex, especially all the diagram info. + =head1 TODO -Deal with field sizes. Don't think UML does this directly so may need to include +B Don't think UML does this directly so may need to include it in the datatype names. +B Seperate control over what is +parsed, setting visibility arg will set both. + Everything else! Relations, fkeys, constraints, indexes, etc... =head1 AUTHOR diff --git a/t/21xml-xmi-parser.t b/t/21xml-xmi-parser.t index c0bdab2..2f07ec0 100644 --- a/t/21xml-xmi-parser.t +++ b/t/21xml-xmi-parser.t @@ -79,55 +79,85 @@ sub test_table { # Testing 1,2,3,.. #============================================================================= -plan tests => 85; +plan tests => 111; use SQL::Translator; use SQL::Translator::Schema::Constants; my $testschema = "$Bin/data/xmi/Foo.poseidon2.xmi"; -# Parse the test XML schema -my $obj; -$obj = SQL::Translator->new( +die "Can't find test schema $testschema" unless -e $testschema; +my %base_translator_args = ( + filename => $testschema, + from => 'XML-XMI', + to => 'MySQL', debug => DEBUG, show_warnings => 1, add_drop_table => 1, ); -die "Can't find test schema $testschema" unless -e $testschema; -my $sql = $obj->translate( + +# +# Basic tests +# +{ + +my $obj; +$obj = SQL::Translator->new( + filename => $testschema, from => 'XML-XMI', to => 'MySQL', - filename => $testschema, + debug => DEBUG, + show_warnings => 1, + add_drop_table => 1, ); +my $sql = $obj->translate; print $sql if DEBUG; #print "Debug: translator", Dumper($obj) if DEBUG; #print "Debug: schema", Dumper($obj->schema) if DEBUG; # -# Test the schema objs generted from the XML +# Test the schema # my $scma = $obj->schema; my @tblnames = map {$_->name} $scma->get_tables; -is_deeply( \@tblnames, [qw/Foo PrivateFoo Recording Track/], "tables"); - +is_deeply( \@tblnames, [qw/Foo PrivateFoo Recording Track ProtectedFoo/] + ,"tables"); + +# + +# +# Tables # # Foo # test_table( $scma->get_table("Foo"), name => "Foo", fields => [ - { - name => "fooid", - data_type => "int", - default_value => undef, - is_nullable => 1, - is_primary_key => 1, - }, - { - name => "name", - data_type => "varchar", - default_value => "", - is_nullable => 1, - } ], + { + name => "fooid", + data_type => "int", + default_value => undef, + is_nullable => 1, + is_primary_key => 1, + }, + { + name => "name", + data_type => "varchar", + default_value => "", + is_nullable => 1, + }, + { + name => "protectedname", + data_type => "varchar", + default_value => undef, + is_nullable => 1, + }, + { + name => "privatename", + data_type => "varchar", + default_value => undef, + is_nullable => 1, + }, + ], ); # @@ -190,3 +220,78 @@ test_table( $scma->get_table("Track"), }, ], ); + +} # end basic tests + +# +# Visibility tests +# +{ + +# Classes +my @testd = ( + "" => [qw/Foo PrivateFoo Recording Track ProtectedFoo/], + [qw/fooid name protectedname privatename/], + "public" => [qw/Foo Recording Track/], + [qw/fooid name /], + "protected" => [qw/Foo Recording Track ProtectedFoo/], + [qw/fooid name protectedname/], + "private" => [qw/Foo PrivateFoo Recording Track ProtectedFoo/], + [qw/fooid name protectedname privatename/], +); + while ( my ($vis,$tables,$foofields) = splice @testd,0,3 ) { + my $obj; + $obj = SQL::Translator->new( + filename => $testschema, + from => 'XML-XMI', + to => 'MySQL', + debug => DEBUG, + show_warnings => 1, + add_drop_table => 1, + parser_args => { + visibility => $vis, + }, + ); + my $sql = $obj->translate; + my $scma = $obj->schema; + + my @tblnames = map {$_->name} $scma->get_tables; + is_deeply( \@tblnames, $tables, "Tables with visibility => '$vis'"); + + my @fldnames = map {$_->name} $scma->get_table("Foo")->get_fields; + is_deeply( \@fldnames, $foofields, "Foo fields with visibility => '$vis'"); + + #print "Debug: translator", Dumper($obj) if DEBUG; + #print "Debug: schema", Dumper($obj->schema) if DEBUG; +} + +# # Classes +# %testd = ( +# "" => [qw/fooid name protectedname privatename/], +# "public" => [qw/fooid name /], +# "protected" => [qw/fooid name protectedname/], +# "private" => [qw/fooid name protectedname privatename/], +# ); +# while ( my ($vis,$ans) = each %testd ) { +# my $obj; +# $obj = SQL::Translator->new( +# filename => $testschema, +# from => 'XML-XMI', +# to => 'MySQL', +# debug => DEBUG, +# show_warnings => 1, +# add_drop_table => 1, +# parser_args => { +# visibility => $vis, +# }, +# ); +# my $sql = $obj->translate; +# my $scma = $obj->schema; +# my @names = map {$_->name} $scma->get_table("Foo")->get_fields; +# is_deeply( \@names, $ans, "Foo fields with visibility => '$vis'"); +# +# #print "Debug: translator", Dumper($obj) if DEBUG; +# #print "Debug: schema", Dumper($obj->schema) if DEBUG; +# } +# +} # end visibility tests diff --git a/t/data/xmi/Foo.poseidon2.xmi b/t/data/xmi/Foo.poseidon2.xmi index 82c6aed..c4694e9 100644 --- a/t/data/xmi/Foo.poseidon2.xmi +++ b/t/data/xmi/Foo.poseidon2.xmi @@ -1,5 +1,5 @@ - + Netbeans XMI Writer @@ -51,6 +51,18 @@ + + + + + + + + + + Attribute + + + + + - - - 0.0 - 0.0 - - - 670.0 - 401.0 - - - 0.0 - 0.0 - - - - - - - - 50.0 - 120.0 - - - 130.0 - 103.0 - - - - - - - - - - - - - - - - - 1.0 - 1.0 - - - 128.0 - 36.0 - - - - - - - - 28.8809 - 2.0 - - - 70.2383 - 15.0 - - - - - - - - 0.0 - 0.0 - - - 17.4883 - 15.0 - - - - - - - - 20.4883 - 0.0 - - - 29.2617 - 15.0 - - - - - - - - - - - - 0.0 - 0.0 - - - 29.2617 - 15.0 - - - - - - - - - - 52.75 - 0.0 - - - 17.4883 - 15.0 - - - - - - - - - - 53.8164 - 19.0 - - - 20.3672 - 15.0 - - - - - - - - - - 1.0 - 37.0 - - - 128.0 - 1.0 - - - - - - - - 1.0 - 38.0 - - - 128.0 - 39.0 - - - - - - - - 2.0 - 2.0 - - - 124.0 - 35.0 - - - - - - - - 2.0 - 2.0 - - - 120.0 - 15.0 - - - - - - - - - - - - 0.0 - 0.0 - - - 54.2378 - 15.0 - - - - - - - - 0.0 - 0.0 - - - 17.4883 - 15.0 - - - - - - - - 20.4883 - 0.0 - - - 13.2612 - 15.0 - - - - - - - - - - - - 0.0 - 0.0 - - - 13.2612 - 15.0 - - - - - - - - - - 36.7495 - 0.0 - - - 17.4883 - 15.0 - - - - - - - - - - 54.2378 - 0.0 - - - 8.7441 - 15.0 - - - - - - - - 62.9819 - 0.0 - - - 27.6611 - 15.0 - - - - - - - - 90.6431 - 0.0 - - - 3.4805 - 15.0 - - - - - - - - 94.1235 - 0.0 - - - 14.1206 - 15.0 - - - - - - - - 0.0 - 0.0 - - - 14.1206 - 15.0 - - - - - - - - - - - - 0.0 - 0.0 - - - 14.1206 - 15.0 - - - - - - - - - - - - - - 2.0 - 18.0 - - - 120.0 - 15.0 - - - - - - - - - - - - 0.0 - 0.0 - - - 8.7441 - 15.0 - - - - - - - - 8.7441 - 0.0 - - - 29.2993 - 15.0 - - - - - - - - 38.0435 - 0.0 - - - 3.4805 - 15.0 - - - - - - - - 41.5239 - 0.0 - - - 39.3057 - 15.0 - - - - - - - - 0.0 - 0.0 - - - 39.3057 - 15.0 - - - - - - - - - - - - 0.0 - 0.0 - - - 39.3057 - 15.0 - - - - - - - - - - - - - - - - - - 1.0 - 77.0 - - - 128.0 - 1.0 - - - - - - - - 1.0 - 78.0 - - - 128.0 - 24.0 - - - - - - - - 2.0 - 2.0 - - - 124.0 - 20.0 - - - - - - - - - - - - 50.0 - 390.0 - - - 100.0 - 71.0 - - - - - - - - - - - - - - - 1.0 - 1.0 - - - 98.0 - 19.0 - - - - - - - - 30.8162 - 2.0 - - - 36.3677 - 15.0 - - - - - - - - - - 1.0 - 20.0 - - - 98.0 - 1.0 - - - - - - - - 1.0 - 21.0 - - - 98.0 - 24.0 - - - - - - - - 2.0 - 2.0 - - - 94.0 - 20.0 - - - - - - - - - - 1.0 - 45.0 - - - 98.0 - 1.0 - - - - - - - - 1.0 - 46.0 - - - 98.0 - 24.0 - - - - - - - - 2.0 - 2.0 - - - 94.0 - 20.0 - - - - - - - - - - - - 50.0 - 260.0 - - - 100.0 - 88.0 - - - - - - - - - - - - - - - 1.0 - 1.0 - - - 98.0 - 36.0 - - - - - - - - 13.8809 - 2.0 - - - 70.2383 - 15.0 - - - - - - - - 0.0 - 0.0 - - - 17.4883 - 15.0 - - - - - - - - 20.4883 - 0.0 - - - 29.2617 - 15.0 - - - - - - - - - - - - 0.0 - 0.0 - - - 29.2617 - 15.0 - - - - - - - - - - 52.75 - 0.0 - - - 17.4883 - 15.0 - - - - - - - - - - 19.2065 - 19.0 - - - 59.5869 - 15.0 - - - - - - - - - - 1.0 - 37.0 - - - 98.0 - 1.0 - - - - - - - - 1.0 - 38.0 - - - 98.0 - 24.0 - - - - - - - - 2.0 - 2.0 - - - 94.0 - 20.0 - - - - - - - - - - 1.0 - 62.0 - - - 98.0 - 1.0 - - - - - - - - 1.0 - 63.0 - - - 98.0 - 24.0 - - - - - - - - 2.0 - 2.0 - - - 94.0 - 20.0 - - - - - - - - - - - - 220.0 - 160.0 - - - 171.9961 - 129.0 - - - - - - - - - - - - - - - - 1.0 - 1.0 - - - 169.9961 - 36.0 - - - - - - - - 49.8789 - 2.0 - - - 70.2383 - 15.0 - - - - - - - - 0.0 - 0.0 - - - 17.4883 - 15.0 - - - - - - - - 20.4883 - 0.0 - - - 29.2617 - 15.0 - - - - - - - - - - - - 0.0 - 0.0 - - - 29.2617 - 15.0 - - - - - - - - - - 52.75 - 0.0 - - - 17.4883 - 15.0 - - - - - - - - - - 56.3674 - 19.0 - - - 57.2612 - 15.0 - - - - - - - - - - 1.0 - 37.0 - - - 169.9961 - 1.0 - - - - - - - - 1.0 - 38.0 - - - 169.9961 - 55.0 - - - - - - - - 2.0 - 2.0 - - - 165.9961 - 51.0 - - - - - - - - 2.0 - 2.0 - - - 161.9961 - 15.0 - - - - - - - - - - - - 0.0 - 0.0 - - - 54.2378 - 15.0 - - - - - - - - 0.0 - 0.0 - - - 17.4883 - 15.0 - - - - - - - - 20.4883 - 0.0 - - - 13.2612 - 15.0 - - - - - - - - - - - - 0.0 - 0.0 - - - 13.2612 - 15.0 - - - - - - - - - - 36.7495 - 0.0 - - - 17.4883 - 15.0 - - - - - - - - - - 54.2378 - 0.0 - - - 8.7441 - 15.0 - - - - - - - - 62.9819 - 0.0 - - - 61.4131 - 15.0 - - - - - - - - 124.395 - 0.0 - - - 3.4805 - 15.0 - - - - - - - - 127.8755 - 0.0 - - - 14.1206 - 15.0 - - - - - - - - 0.0 - 0.0 - - - 14.1206 - 15.0 - - - - - - - - - - - - 0.0 - 0.0 - - - 14.1206 - 15.0 - - - - - - - - - - - - - - 2.0 - 18.0 - - - 161.9961 - 15.0 - - - - - - - - - - - - 0.0 - 0.0 - - - 8.7441 - 15.0 - - - - - - - - 8.7441 - 0.0 - - - 20.7163 - 15.0 - - - - - - - - 29.4604 - 0.0 - - - 3.4805 - 15.0 - - - - - - - - 32.9409 - 0.0 - - - 39.3057 - 15.0 - - - - - - - - 0.0 - 0.0 - - - 39.3057 - 15.0 - - - - - - - - - - - - 0.0 - 0.0 - - - 39.3057 - 15.0 - - - - - - - - - - - - - - 2.0 - 34.0 - - - 161.9961 - 15.0 - - - - - - - - - - - - 0.0 - 0.0 - - - 8.7441 - 15.0 - - - - - - - - 8.7441 - 0.0 - - - 22.9131 - 15.0 - - - - - - - - 31.6572 - 0.0 - - - 3.4805 - 15.0 - - - - - - - - 35.1377 - 0.0 - - - 39.3057 - 15.0 - - - - - - - - 0.0 - 0.0 - - - 39.3057 - 15.0 - - - - - - - - - - - - 0.0 - 0.0 - - - 39.3057 - 15.0 - - - - - - - - - - - - - - - - - - 1.0 - 93.0 - - - 169.9961 - 1.0 - - - - - - - - 1.0 - 94.0 - - - 169.9961 - 24.0 - - - - - - - - 2.0 - 2.0 - - - 165.9961 - 20.0 - - - - - - - - - - - - 60.0 - 129.0 - - - - - - - - 171.9961 - 90.0 - - - - - - - - - - 220.0 - 320.0 - - - 100.0 - 71.0 - - - - - - - - - - - - 1.0 - 1.0 - - - 98.0 - 19.0 - - - - - - - - 40.7205 - 2.0 - - - 16.5591 - 15.0 - - - - - - - - - - 1.0 - 20.0 - - - 98.0 - 1.0 - - - - - - - - 1.0 - 21.0 - - - 98.0 - 24.0 - - - - - - - - 2.0 - 2.0 - - - 94.0 - 20.0 - - - - - - - - - - 1.0 - 45.0 - - - 98.0 - 1.0 - - - - - - - - 1.0 - 46.0 - - - 98.0 - 24.0 - - - - - - - - 2.0 - 2.0 - - - 94.0 - 20.0 - - - - - - - - - - - - 60.0 - 0.0 - - - - - - - - - - 0.0 - 0.0 - - - - 280.0 - 320.0 - - - 0.0 - 0.0 - - - 0.0 - 0.0 - - - 280.0 - 289.0 - - - 0.0 - 0.0 - - - 0.0 - 0.0 - - - - - - - - - - - - - 0.0 - 0.0 - - - 0.0 - 0.0 - - - - - - - - - - - - - - 480.0 - 220.0 - - - 180.0 - 140.0 - - - - - - - - - - - - - - - - 1.0 - 1.0 - - - 178.0 - 36.0 - - - - - - - - 53.8809 - 2.0 - - - 70.2383 - 15.0 - - - - - - - - 0.0 - 0.0 - - - 17.4883 - 15.0 - - - - - - - - 20.4883 - 0.0 - - - 29.2617 - 15.0 - - - - - - - - - - - - 0.0 - 0.0 - - - 29.2617 - 15.0 - - - - - - - - - - 52.75 - 0.0 - - - 17.4883 - 15.0 - - - - - - - - - - 73.064 - 19.0 - - - 31.8721 - 15.0 - - - - - - - - - - 1.0 - 37.0 - - - 178.0 - 1.0 - - - - - - - - 1.0 - 38.0 - - - 178.0 - 71.0 - - - - - - - - 2.0 - 2.0 - - - 174.0 - 67.0 - - - - - - - - 2.0 - 2.0 - - - 170.0 - 15.0 - - - - - - - - - - - - 0.0 - 0.0 - - - 54.2378 - 15.0 - - - - - - - - 0.0 - 0.0 - - - 17.4883 - 15.0 - - - - - - - - 20.4883 - 0.0 - - - 13.2612 - 15.0 - - - - - - - - - - - - 0.0 - 0.0 - - - 13.2612 - 15.0 - - - - - - - - - - 36.7495 - 0.0 - - - 17.4883 - 15.0 - - - - - - - - - - 54.2378 - 0.0 - - - 8.7441 - 15.0 - - - - - - - - 62.9819 - 0.0 - - - 36.8564 - 15.0 - - - - - - - - 99.8384 - 0.0 - - - 3.4805 - 15.0 - - - - - - - - 103.3188 - 0.0 - - - 14.1206 - 15.0 - - - - - - - - 0.0 - 0.0 - - - 14.1206 - 15.0 - - - - - - - - - - - - 0.0 - 0.0 - - - 14.1206 - 15.0 - - - - - - - - - - - - - - 2.0 - 18.0 - - - 170.0 - 15.0 - - - - - - - - - - - - 0.0 - 0.0 - - - 54.0552 - 15.0 - - - - - - - - 0.0 - 0.0 - - - 17.4883 - 15.0 - - - - - - - - 20.4883 - 0.0 - - - 13.0786 - 15.0 - - - - - - - - - - - - 0.0 - 0.0 - - - 13.0786 - 15.0 - - - - - - - - - - 36.5669 - 0.0 - - - 17.4883 - 15.0 - - - - - - - - - - 54.0552 - 0.0 - - - 8.7441 - 15.0 - - - - - - - - 62.7993 - 0.0 - - - 61.4131 - 15.0 - - - - - - - - 124.2124 - 0.0 - - - 3.4805 - 15.0 - - - - - - - - 127.6929 - 0.0 - - - 14.1206 - 15.0 - - - - - - - - 0.0 - 0.0 - - - 14.1206 - 15.0 - - - - - - - - - - - - 0.0 - 0.0 - - - 14.1206 - 15.0 - - - - - - - - - - - - - - 2.0 - 34.0 - - - 170.0 - 15.0 - - - - - - - - - - - - 0.0 - 0.0 - - - 8.7441 - 15.0 - - - - - - - - 8.7441 - 0.0 - - - 41.4756 - 15.0 - - - - - - - - 50.2197 - 0.0 - - - 3.4805 - 15.0 - - - - - - - - 53.7002 - 0.0 - - - 14.1206 - 15.0 - - - - - - - - 0.0 - 0.0 - - - 14.1206 - 15.0 - - - - - - - - - - - - 0.0 - 0.0 - - - 14.1206 - 15.0 - - - - - - - - - - - - 67.8208 - 0.0 - - - 8.7441 - 15.0 - - - - - - - - 76.5649 - 0.0 - - - 6.9556 - 15.0 - - - - - - - - - - 2.0 - 50.0 - - - 170.0 - 15.0 - - - - - - - - - - - - 0.0 - 0.0 - - - 8.7441 - 15.0 - - - - - - - - 8.7441 - 0.0 - - - 29.2993 - 15.0 - - - - - - - - 38.0435 - 0.0 - - - 3.4805 - 15.0 - - - - - - - - 41.5239 - 0.0 - - - 39.3057 - 15.0 - - - - - - - - 0.0 - 0.0 - - - 39.3057 - 15.0 - - - - - - - - - - - - 0.0 - 0.0 - - - 39.3057 - 15.0 - - - - - - - - - - - - - - - - - - 1.0 - 109.0 - - - 178.0 - 1.0 - - - - - - - - 1.0 - 110.0 - - - 178.0 - 24.0 - - - - - - - - 2.0 - 2.0 - - - 174.0 - 20.0 - - - - - - - - - - - - 0.0 - 30.0 - - - - - - - - - - 0.0 - 0.0 - - - - 391.9961 - 250.0 - - - 0.0 - 0.0 - - - 0.0 - 0.0 - - - 480.0 - 250.0 - - - 0.0 - 0.0 - - - 0.0 - 0.0 - - - - - - - - - - - - - 391.9961 - 250.0 - - - 0.0 - 0.0 - - - - - - - - - - - - 12.9904 - 3.5305 - - - 51.3101 - 15.0 - - - - - - - - 12.9904 - -22.5 - - - 6.9556 - 15.0 - - - - - - - - - - 480.0 - 250.0 - - - 0.0 - 0.0 - - - - - - - - - - - - -39.7438 - -21.5331 - - - 26.7534 - 15.0 - - - - - - - - -32.2082 - 7.5 - - - 19.2178 - 15.0 - - - - - - - - - - 398.0808 - 260.0 - - - 75.8345 - 15.0 - - - - - - - - 0.0 - 0.0 - - - 75.8345 - 15.0 - - - - - - - - - - - - - - - - - - - - - - + + + + + diff --git a/t/data/xmi/Foo.poseidon2.zuml b/t/data/xmi/Foo.poseidon2.zuml index af8cc3f..3431cbc 100644 Binary files a/t/data/xmi/Foo.poseidon2.zuml and b/t/data/xmi/Foo.poseidon2.zuml differ