1 package SQL::Translator::XMI::Parser::V10;
3 # -------------------------------------------------------------------
4 # $Id: V10.pm,v 1.1 2003-09-29 12:02:36 grommit Exp $
5 # -------------------------------------------------------------------
6 # Copyright (C) 2003 Mark Addison <mark.addison@itn.co.uk>,
8 # This program is free software; you can redistribute it and/or
9 # modify it under the terms of the GNU General Public License as
10 # published by the Free Software Foundation; version 2.
12 # This program is distributed in the hope that it will be useful, but
13 # WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 # General Public License for more details.
17 # You should have received a copy of the GNU General Public License
18 # along with this program; if not, write to the Free Software
19 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
21 # -------------------------------------------------------------------
27 SQL::Translator::XMI::Parser::V10 - Version 1.0 parser.
33 use vars qw/$VERSION/;
34 $VERSION = sprintf "%d.%02d", q$Revision: 1.1 $ =~ /(\d+)\.(\d+)/;
36 use base qw(SQL::Translator::XMI::Parser);
44 default_path => '//Foundation.Core.Class[@xmi.id]',
49 path => 'Foundation.Core.ModelElement.name/text()',
53 path => 'Foundation.Core.ModelElement.visibility/@xmi.value',
56 name => "isSpecification",
57 path => 'Foundation.Core.ModelElement.isSpecification/@xmi.value',
61 path => 'Foundation.Core.GeneralizableElement.isRoot/@xmi.value',
65 path => 'Foundation.Core.GeneralizableElement.isLeaf/@xmi.value',
69 path => 'Foundation.Core.GeneralizableElement.isAbstract/@xmi.value',
73 path => 'Foundation.Core.Class.isActive/@xmi.value',
80 'Foundation.Core.Classifier.feature/Foundation.Core.Attribute',
85 # name => "operations",
86 # path => "UML:Classifier.feature/UML:Operation",
87 # class => "operation",
88 # multiplicity => "*",
93 $spec10->{attribute} = {
95 plural => "attributes",
96 default_path => '//Foundation.Core.Attribute[@xmi.id]',
100 path => 'Foundation.Core.ModelElement.name/text()',
103 name => "visibility",
104 path => 'Foundation.Core.ModelElement.visibility/@xmi.value',
107 name => "isSpecification",
108 path => 'Foundation.Core.ModelElement.isSpecification/@xmi.value',
111 name => "ownerScope",
112 path => 'Foundation.Core.Feature.ownerScope/@xmi.value',
115 name => "initialValue",
116 path => 'Foundation.Core.Attribute.initialValue/Foundation.Data_Types.Expression/Foundation.Data_Types.Expression.body/text()',
119 # name => "datatype",
120 # path => 'xmiDeref(Foundation.Core.StructuralFeature.type/Foundation.Core.Classifier)/Foundation.Core.DataType/Foundation.Core.ModelElement.name/text()',
125 __PACKAGE__->XmiSpec($spec10);
127 #-----------------------------------------------------------------------------
130 print "******************* HELLO 1.0 ********************\n";
131 shift->_get_classes(@_);
134 1; #===========================================================================
150 =head1 VERSION HISTORY
154 grommit <mark.addison@itn.co.uk>
158 This package is free software and is provided "as is" without express or
159 implied warranty. It may be used, redistributed and/or modified under the
162 a) the Perl Artistic License.
164 See F<http://www.perl.com/perl/misc/Artistic.html>
166 b) the terms of the GNU General Public License as published by the Free Software
167 Foundation; either version 1, or (at your option) any later version.