├── .gitignore
├── README.md
├── build.xml
├── manifest.mf
├── nbproject
├── build-impl.xml
├── genfiles.properties
├── private
│ ├── config.properties
│ ├── private.properties
│ └── private.xml
├── project.properties
└── project.xml
└── src
└── edu
└── ua
├── fortran
├── FortranLexer.g
├── FortranLexer.java
├── FortranParser03.g
├── FortranParser08.g
├── FortranParser08.java
├── FortranParserExtras.g
├── FortranParserExtras.java
├── FortranParserExtras_FortranParser08.java
├── FortranParserRiceCAF.g
├── FortranParserRiceCAF.java
└── FortranParserRiceCAF_FortranParser08.java
├── front
├── 1380762678_001_01.png
├── 1380762803_001_05.png
├── 1380762935_001_39.png
├── 1380763165_001_52.gif
├── 1380763299_001_37.gif
├── 1hqic.png
├── About.form
├── About.java
├── DragListener.java
├── ExtensionFileFilter.java
├── Filewalker.java
├── FrontUI.form
├── FrontUI.java
├── Gear.png
├── Generator.java
├── ParserProcessor.java
├── add1.png
├── add2.png
├── add3.png
├── file.png
├── frameGUI.png
├── gear-logo 2.png
├── gear-logo.png
├── generate1.png
├── generate2.png
├── generate3.png
├── remove1.png
├── remove2.png
├── remove3.png
├── reset1.png
├── reset2.png
├── reset3.png
├── save1.png
├── save2.png
├── save3.png
├── view1.png
├── view2.png
└── view3.png
├── meta
├── ClassMeta.java
├── FunctionMeta.java
├── ParameterMeta.java
├── SubroutineMeta.java
├── VariableMeta.java
├── ViewFactory.java
└── ViewMeta.java
├── node
├── AbstractionNode.java
├── AssociationConnection.java
├── AssociationConnectionNode.java
├── AssociationEndNodeComposite.java
├── AssociationEndNodeNone.java
├── AssociationEndParticipant.java
├── AttributeNode.java
├── BehavioralFeatureNode.java
├── ClassNode.java
├── ClassRefNode.java
├── ClassifierFeatureNode.java
├── ContentNode.java
├── DataTypeNode.java
├── DependencyClientNode.java
├── DependencySupplierNode.java
├── FunctionNode.java
├── GeneralizableElementNode.java
├── GeneralizationChildNode.java
├── GeneralizationEntryNode.java
├── GeneralizationNode.java
├── GeneralizationParentNode.java
├── InterfaceNode.java
├── InterfaceRefNode.java
├── ModelNode.java
├── ModelStereotype.java
├── MultiplicityNode.java
├── MultiplicityRange.java
├── MultiplicityRangeNode.java
├── NamespaceNode.java
├── ParameterDataTypeNode.java
├── ParameterNode.java
├── ParameterTypeNode.java
├── StereoBaseClassNode.java
├── StereotypeNode.java
├── StereotypeRefNode.java
├── StructuralFeatureMultiNode.java
├── StructuralFeatureTypeNode.java
├── SubroutineNode.java
└── UMLNode.java
└── util
├── DataWriter.java
├── Fortran2XMI.java
├── FortranLexicalPrepass.java
├── FortranParser.java
├── FortranParserActionFactory.java
├── FortranParserActionNull.java
├── FortranParserActionPrint.java
├── FortranStream.java
├── FortranToken.java
├── FortranTokenStream.java
├── GlobalErrorException.java
├── IActionEnums.java
├── IFortranParser.java
├── IFortranParserAction.java
├── TypeConverter.java
├── UIDGenerator.java
├── XMLWriter.java
└── typeconfig.properties
/.gitignore:
--------------------------------------------------------------------------------
1 | /build/
2 | /dist/
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | [This document is formatted with GitHub-Flavored Markdown. ]:#
2 | [For better viewing, including hyperlinks, read it online at ]:#
3 | [https://github.com/time2time/ForUML/blob/master/README.md ]:#
4 |
5 |
6 |
7 | ForUML
8 | ======
9 |
10 | * [Overview](#overview)
11 | * [Getting Started](#getting-started)
12 | * [Developer Instructions](#developer-instructions)
13 | - [Build Instructions](#build-instructions)
14 | - [Execution Instructions](#execution-instructions)
15 | * [Publications](#publications)
16 |
17 | Overview
18 | ========
19 | ForUML is a reverse engineering tool that generates Unified Modeling Language (UML) class
20 | diagrams from object-oriented Fortran programs. ForUML understands and diagrams Fortran
21 | class relationships, including inheritance and aggregation. ForUML also detects and
22 | depicts operator overloading, constructors, and parallel data structures (coarrays).
23 |
24 | ForUML generates a formal description of each diagram in the XML Metadata Interchange (XMI)
25 | format and launches [ArgoUML] to display the resulting class diagrams. Launching
26 | ArgoUML gives users the option to edit ForUML diagrams and to export the diagrams
27 | to a graphics file format for inclusion in other documents.
28 |
29 | Getting Started
30 | ===============
31 | Users not wishing to contribute code to the ForUML project may download our
32 | end-user distribution from the [ForUML project page] and view an
33 | [online video demonstration] of using ForUML.
34 |
35 | Developer Instructions
36 | ======================
37 | Prior to work on the project, please download and install the following:
38 |
39 | 1. [Java SE Development Kit] version 1.7.0 or higher -
40 | 2. [NetBeans IDE] v.8.0.0 or higher
41 | 3. [Additional libraries] \(lib.zip) available on the project web site.
42 |
43 | Extract the lib.zip file on your machine.
44 |
45 | After installing the above packages, open the ForUML project in NetBeans as follows:
46 |
47 | 1. Launch NetBean
48 | 2. Go the the menu File > Open Project, then select the project that you cloned from the repository.
49 | 3. On the project, right click on the project and select Properties. In the popup window, select Libraries and select buttons 'Add Library' and 'Create' respectively. You must provide the library name as "LibForUML".
50 | You have to select the button "Add Jar/Folder..." that will ask you to add Jar files. You should select all Jar files contained in the extracted lib folder.
51 | 4. Now you can work on the project!
52 |
53 | You only need to do steps #2 and #3 above once.
54 |
55 | Build Instructions
56 | ------------------
57 | To build the project from the command line, use 'Ant', an automation tool, to build the Java application.
58 | You can download Ant [here](http://ant.apache.org/bindownload.cgi). Once you have Ant, following these steps:
59 |
60 | 1. Go to the project directory and type the following:
61 | ```
62 | ant -f build.xml
63 | ```
64 | 2. If you built successfully, you will see the 2 new folders, including `build` and `dist`. The build folder contains all compiled classes and the `dist` folder contains the ForUML application and its required libraries.
65 |
66 | Notes:
67 |
68 | * DO not push those 2 directories (`build` and `dist`) into the remote repository. We intend to keep only source code and configuration files in the repository.
69 |
70 | Execution Instructions
71 | ------------------
72 |
73 | To run the application from the command line, go to the dist folder and type the following:
74 | ```
75 | java -jar "ForUML.jar"
76 | ```
77 | To distribute this project, zip up the `dist` folder (including the `lib` folder) and distribute the ZIP file.
78 |
79 | Publications
80 | ============
81 | If you find ForUML useful, please cite the following paper in publications that employ ForUML-generated diagrams:
82 |
83 | Nanthaamornphong, Aziz, Jeffrey Carver, Karla Morris, and Salvatore Filippone.
84 | "Extracting uml class diagrams from object-oriented fortran: Foruml."
85 | [Scientific Programming 2015 (2015): 1.](http://dl.acm.org/citation.cfm?id=2814697)
86 |
87 | For other releated publications, please visit the [publications page] of Prof. Aziz Nanthaamornphong.
88 |
89 | [Java SE Development Kit]: http://www.oracle.com/technetwork/java/javase/downloads/index.html
90 | [publications page]: http://research.te.psu.ac.th/aziz/pub.htm
91 | [online video demonstration]: http://research.te.psu.ac.th/aziz/VDO.htm
92 | [ForUML project page]: http://research.te.psu.ac.th/aziz/foruml.htm
93 | [ArgoUML]: http://argouml.tigris.org/
94 | [NetBeans IDE]: https://netbeans.org/
95 | [Additional libraries]: http://research.te.psu.ac.th/aziz/foruml/lib.zip
96 |
--------------------------------------------------------------------------------
/build.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 | Builds, tests, and runs the project ForUML.
12 |
13 |
73 |
74 |
--------------------------------------------------------------------------------
/manifest.mf:
--------------------------------------------------------------------------------
1 | Manifest-Version: 1.0
2 | X-COMMENT: Main-Class will be added automatically by build
3 |
4 |
--------------------------------------------------------------------------------
/nbproject/genfiles.properties:
--------------------------------------------------------------------------------
1 | build.xml.data.CRC32=2827b76e
2 | build.xml.script.CRC32=e0252b44
3 | build.xml.stylesheet.CRC32=8064a381@1.79.1.48
4 | # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
5 | # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
6 | nbproject/build-impl.xml.data.CRC32=2827b76e
7 | nbproject/build-impl.xml.script.CRC32=d543ba21
8 | nbproject/build-impl.xml.stylesheet.CRC32=05530350@1.79.1.48
9 |
--------------------------------------------------------------------------------
/nbproject/private/config.properties:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/t2time/ForUML/bb00f19dd33bf4dd9e3629054926d3e623dcc080/nbproject/private/config.properties
--------------------------------------------------------------------------------
/nbproject/private/private.properties:
--------------------------------------------------------------------------------
1 | compile.on.save=true
2 | do.depend=false
3 | do.jar=true
4 | javac.debug=true
5 | javadoc.preview=true
6 | user.properties.file=C:\\Users\\t2time\\AppData\\Roaming\\NetBeans\\8.1\\build.properties
7 |
--------------------------------------------------------------------------------
/nbproject/private/private.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | file:/C:/Users/t2tim/Desktop/ForUML/src/edu/ua/front/FrontUI.java
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/nbproject/project.properties:
--------------------------------------------------------------------------------
1 | annotation.processing.enabled=true
2 | annotation.processing.enabled.in.editor=false
3 | annotation.processing.processors.list=
4 | annotation.processing.run.all.processors=true
5 | annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output
6 | application.title=ForUML
7 | application.vendor=t2tim
8 | build.classes.dir=${build.dir}/classes
9 | build.classes.excludes=**/*.java,**/*.form
10 | # This directory is removed when the project is cleaned:
11 | build.dir=build
12 | build.generated.dir=${build.dir}/generated
13 | build.generated.sources.dir=${build.dir}/generated-sources
14 | # Only compile against the classpath explicitly listed here:
15 | build.sysclasspath=ignore
16 | build.test.classes.dir=${build.dir}/test/classes
17 | build.test.results.dir=${build.dir}/test/results
18 | # Uncomment to specify the preferred debugger connection transport:
19 | #debug.transport=dt_socket
20 | debug.classpath=\
21 | ${run.classpath}
22 | debug.test.classpath=\
23 | ${run.test.classpath}
24 | # Files in build.classes.dir which should be excluded from distribution jar
25 | dist.archive.excludes=
26 | # This directory is removed when the project is cleaned:
27 | dist.dir=dist
28 | dist.jar=${dist.dir}/ForUML.jar
29 | dist.javadoc.dir=${dist.dir}/javadoc
30 | endorsed.classpath=
31 | excludes=
32 | file.reference.AnimatonClass.jar=C:\\Users\\t2time\\OneDrive\\Fortran\\Animation\\AnimatonClass.jar
33 | includes=**
34 | jar.compress=false
35 | javac.classpath=\
36 | ${libs.LibForUML.classpath}:\
37 | ${libs.swing-layout.classpath}:\
38 | ${libs.absolutelayout.classpath}:\
39 | ${file.reference.AnimatonClass.jar}
40 | # Space-separated list of extra javac options
41 | javac.compilerargs=
42 | javac.deprecation=false
43 | javac.external.vm=true
44 | javac.processorpath=\
45 | ${javac.classpath}
46 | javac.source=1.7
47 | javac.target=1.7
48 | javac.test.classpath=\
49 | ${javac.classpath}:\
50 | ${build.classes.dir}
51 | javac.test.processorpath=\
52 | ${javac.test.classpath}
53 | javadoc.additionalparam=
54 | javadoc.author=false
55 | javadoc.encoding=${source.encoding}
56 | javadoc.noindex=false
57 | javadoc.nonavbar=false
58 | javadoc.notree=false
59 | javadoc.private=false
60 | javadoc.splitindex=true
61 | javadoc.use=true
62 | javadoc.version=false
63 | javadoc.windowtitle=
64 | main.class=edu.ua.front.FrontUI
65 | manifest.file=manifest.mf
66 | meta.inf.dir=${src.dir}/META-INF
67 | mkdist.disabled=false
68 | platform.active=default_platform
69 | run.classpath=\
70 | ${javac.classpath}:\
71 | ${build.classes.dir}
72 | # Space-separated list of JVM arguments used when running the project.
73 | # You may also define separate properties like run-sys-prop.name=value instead of -Dname=value.
74 | # To set system properties for unit tests define test-sys-prop.name=value:
75 | run.jvmargs=
76 | run.test.classpath=\
77 | ${javac.test.classpath}:\
78 | ${build.test.classes.dir}
79 | source.encoding=UTF-8
80 | src.dir=src
81 | test.src.dir=test
82 |
--------------------------------------------------------------------------------
/nbproject/project.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | org.netbeans.modules.java.j2seproject
4 |
5 |
6 | ForUML
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/src/edu/ua/front/1380762678_001_01.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/t2time/ForUML/bb00f19dd33bf4dd9e3629054926d3e623dcc080/src/edu/ua/front/1380762678_001_01.png
--------------------------------------------------------------------------------
/src/edu/ua/front/1380762803_001_05.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/t2time/ForUML/bb00f19dd33bf4dd9e3629054926d3e623dcc080/src/edu/ua/front/1380762803_001_05.png
--------------------------------------------------------------------------------
/src/edu/ua/front/1380762935_001_39.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/t2time/ForUML/bb00f19dd33bf4dd9e3629054926d3e623dcc080/src/edu/ua/front/1380762935_001_39.png
--------------------------------------------------------------------------------
/src/edu/ua/front/1380763165_001_52.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/t2time/ForUML/bb00f19dd33bf4dd9e3629054926d3e623dcc080/src/edu/ua/front/1380763165_001_52.gif
--------------------------------------------------------------------------------
/src/edu/ua/front/1380763299_001_37.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/t2time/ForUML/bb00f19dd33bf4dd9e3629054926d3e623dcc080/src/edu/ua/front/1380763299_001_37.gif
--------------------------------------------------------------------------------
/src/edu/ua/front/1hqic.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/t2time/ForUML/bb00f19dd33bf4dd9e3629054926d3e623dcc080/src/edu/ua/front/1hqic.png
--------------------------------------------------------------------------------
/src/edu/ua/front/About.form:
--------------------------------------------------------------------------------
1 |
2 |
3 |
156 |
--------------------------------------------------------------------------------
/src/edu/ua/front/About.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2016, Aziz Nanthaamornphong and Anawat Leathongkum
3 |
4 | Redistribution and use in source and binary forms, with or without modification, are
5 | permitted provided that the following conditions are met:
6 |
7 | 1. Redistributions of source code must retain the above copyright notice, this list of
8 | conditions and the following disclaimer.
9 |
10 | 2. Redistributions in binary form must reproduce the above copyright notice, this list of
11 | conditions and the following disclaimer in the documentation and/or other materials
12 | provided with the distribution.
13 |
14 | 3. Neither the names of the copyright holders nor the names of its contributors may be
15 | used to endorse or promote products derived from this software without specific prior
16 | written permission.
17 |
18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
19 | EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
20 | OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
21 | IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
22 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
24 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
26 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
27 | EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 | */
29 |
30 | package edu.ua.front;
31 |
32 | import javax.swing.JFrame;
33 |
34 | public class About extends javax.swing.JFrame {
35 |
36 | /**
37 | * Creates new form About
38 | */
39 | public About() {
40 | initComponents();
41 | this.setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE);
42 | }
43 |
44 | /**
45 | * This method is called from within the constructor to initialize the form.
46 | * WARNING: Do NOT modify this code. The content of this method is always
47 | * regenerated by the Form Editor.
48 | */
49 | @SuppressWarnings("unchecked")
50 | // //GEN-BEGIN:initComponents
51 | private void initComponents() {
52 |
53 | jPanel1 = new javax.swing.JPanel();
54 | jButton1 = new javax.swing.JButton();
55 | jPanel2 = new javax.swing.JPanel();
56 | jLabel2 = new javax.swing.JLabel();
57 | jLabel3 = new javax.swing.JLabel();
58 | jLabel4 = new javax.swing.JLabel();
59 |
60 | setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
61 |
62 | jPanel1.setBackground(new java.awt.Color(204, 204, 204));
63 |
64 | jButton1.setBackground(java.awt.SystemColor.controlShadow);
65 | jButton1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/edu/ua/front/gear-logo 2.png"))); // NOI18N
66 | jButton1.setBorder(null);
67 |
68 | org.jdesktop.layout.GroupLayout jPanel1Layout = new org.jdesktop.layout.GroupLayout(jPanel1);
69 | jPanel1.setLayout(jPanel1Layout);
70 | jPanel1Layout.setHorizontalGroup(
71 | jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
72 | .add(jPanel1Layout.createSequentialGroup()
73 | .addContainerGap()
74 | .add(jButton1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 445, Short.MAX_VALUE)
75 | .addContainerGap())
76 | );
77 | jPanel1Layout.setVerticalGroup(
78 | jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
79 | .add(jPanel1Layout.createSequentialGroup()
80 | .add(jButton1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 319, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
81 | .add(0, 0, Short.MAX_VALUE))
82 | );
83 |
84 | jPanel2.setBackground(new java.awt.Color(255, 255, 255));
85 |
86 | jLabel2.setFont(new java.awt.Font("Lucida Grande", 1, 13)); // NOI18N
87 | jLabel2.setForeground(new java.awt.Color(102, 0, 0));
88 | jLabel2.setText("Version: 1.0.0");
89 |
90 | jLabel3.setFont(new java.awt.Font("Lucida Grande", 1, 13)); // NOI18N
91 | jLabel3.setForeground(new java.awt.Color(153, 0, 0));
92 | jLabel3.setText("http://aziz.students.cs.ua.edu");
93 |
94 | jLabel4.setFont(new java.awt.Font("Lucida Grande", 1, 13)); // NOI18N
95 | jLabel4.setForeground(new java.awt.Color(153, 0, 0));
96 | jLabel4.setText("e-mail: aziz.nantha@gmail.com");
97 |
98 | org.jdesktop.layout.GroupLayout jPanel2Layout = new org.jdesktop.layout.GroupLayout(jPanel2);
99 | jPanel2.setLayout(jPanel2Layout);
100 | jPanel2Layout.setHorizontalGroup(
101 | jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
102 | .add(jPanel2Layout.createSequentialGroup()
103 | .addContainerGap()
104 | .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING, false)
105 | .add(jLabel2)
106 | .add(jLabel4, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
107 | .add(jLabel3, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
108 | .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
109 | );
110 | jPanel2Layout.setVerticalGroup(
111 | jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
112 | .add(jPanel2Layout.createSequentialGroup()
113 | .add(15, 15, 15)
114 | .add(jLabel2)
115 | .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
116 | .add(jLabel3)
117 | .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
118 | .add(jLabel4)
119 | .addContainerGap(15, Short.MAX_VALUE))
120 | );
121 |
122 | org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane());
123 | getContentPane().setLayout(layout);
124 | layout.setHorizontalGroup(
125 | layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
126 | .add(jPanel1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
127 | .add(org.jdesktop.layout.GroupLayout.TRAILING, jPanel2, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
128 | );
129 | layout.setVerticalGroup(
130 | layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
131 | .add(layout.createSequentialGroup()
132 | .add(jPanel1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
133 | .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
134 | .add(jPanel2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
135 | );
136 |
137 | pack();
138 | }// //GEN-END:initComponents
139 |
140 | /**
141 | * @param args the command line arguments
142 | */
143 | public static void main(String args[]) {
144 | /*
145 | * Set the Nimbus look and feel
146 | */
147 | //
148 | /*
149 | * If Nimbus (introduced in Java SE 6) is not available, stay with the
150 | * default look and feel. For details see
151 | * http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
152 | */
153 | try {
154 | for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
155 | if ("Nimbus".equals(info.getName())) {
156 | javax.swing.UIManager.setLookAndFeel(info.getClassName());
157 | break;
158 | }
159 | }
160 | } catch (ClassNotFoundException ex) {
161 | java.util.logging.Logger.getLogger(About.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
162 | } catch (InstantiationException ex) {
163 | java.util.logging.Logger.getLogger(About.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
164 | } catch (IllegalAccessException ex) {
165 | java.util.logging.Logger.getLogger(About.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
166 | } catch (javax.swing.UnsupportedLookAndFeelException ex) {
167 | java.util.logging.Logger.getLogger(About.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
168 | }
169 | //
170 |
171 | /*
172 | * Create and display the form
173 | */
174 | java.awt.EventQueue.invokeLater(new Runnable() {
175 | public void run() {
176 | new About().setVisible(true);
177 | }
178 | });
179 | }
180 | // Variables declaration - do not modify//GEN-BEGIN:variables
181 | private javax.swing.JButton jButton1;
182 | private javax.swing.JLabel jLabel2;
183 | private javax.swing.JLabel jLabel3;
184 | private javax.swing.JLabel jLabel4;
185 | private javax.swing.JPanel jPanel1;
186 | private javax.swing.JPanel jPanel2;
187 | // End of variables declaration//GEN-END:variables
188 | }
189 |
--------------------------------------------------------------------------------
/src/edu/ua/front/DragListener.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2016, Aziz Nanthaamornphong and Anawat Leathongkum
3 |
4 | Redistribution and use in source and binary forms, with or without modification, are
5 | permitted provided that the following conditions are met:
6 |
7 | 1. Redistributions of source code must retain the above copyright notice, this list of
8 | conditions and the following disclaimer.
9 |
10 | 2. Redistributions in binary form must reproduce the above copyright notice, this list of
11 | conditions and the following disclaimer in the documentation and/or other materials
12 | provided with the distribution.
13 |
14 | 3. Neither the names of the copyright holders nor the names of its contributors may be
15 | used to endorse or promote products derived from this software without specific prior
16 | written permission.
17 |
18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
19 | EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
20 | OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
21 | IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
22 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
24 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
26 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
27 | EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 | */
29 | package edu.ua.front;
30 |
31 | import java.awt.datatransfer.DataFlavor;
32 | import java.awt.datatransfer.Transferable;
33 | import java.awt.dnd.DnDConstants;
34 | import java.awt.dnd.DropTargetDragEvent;
35 | import java.awt.dnd.DropTargetDropEvent;
36 | import java.awt.dnd.DropTargetEvent;
37 | import java.awt.dnd.DropTargetListener;
38 | import java.io.BufferedReader;
39 | import java.io.File;
40 | import java.io.FileReader;
41 | import java.io.IOException;
42 | import java.io.InputStream;
43 | import java.io.InputStreamReader;
44 | import java.util.ArrayList;
45 | import java.util.List;
46 | import javax.swing.DefaultListModel;
47 | import javax.swing.JFileChooser;
48 | import javax.swing.JList;
49 | import javax.swing.JTextArea;
50 |
51 | public class DragListener implements DropTargetListener {
52 |
53 | JTextArea ta = new JTextArea();
54 | JList fl = new JList();
55 |
56 | public DragListener(JTextArea f, JList fileList) {
57 | ta = f;
58 | fl = fileList;
59 |
60 | }
61 |
62 | public void dragEnter(DropTargetDragEvent dtde) {
63 | System.out.println("Drag Enter");
64 | }
65 |
66 | public void dragExit(DropTargetEvent dte) {
67 | System.out.println("Drag Exit");
68 | }
69 |
70 | public void dragOver(DropTargetDragEvent dtde) {
71 | System.out.println("Drag Over");
72 | }
73 |
74 | public void dropActionChanged(DropTargetDragEvent dtde) {
75 | System.out.println("Drop Action Changed");
76 | }
77 |
78 | public void drop(DropTargetDropEvent dtde) {
79 | try {
80 | // Ok, get the dropped object and try to figure out what it is
81 | Transferable tr = dtde.getTransferable();
82 | DataFlavor[] flavors = tr.getTransferDataFlavors();
83 | for (int i = 0; i < flavors.length; i++) {
84 | System.out.println("Possible flavor: " + flavors[i].getMimeType());
85 | // Check for file lists specifically
86 | if (flavors[i].isFlavorJavaFileListType()) {
87 | // Great! Accept copy drops...
88 | dtde.acceptDrop(DnDConstants.ACTION_COPY_OR_MOVE);
89 | ta.setText("Successful file list drop.\n\n");
90 |
91 | DefaultListModel listModel = new DefaultListModel();
92 |
93 |
94 | // And add the list of file names to our text area
95 | java.util.List list = (java.util.List) tr.getTransferData(flavors[i]);
96 | System.out.println("Total Files::" + list.size());
97 | for (int j = 0; j < list.size(); j++) {
98 | ta.append(list.get(j) + "\n");
99 |
100 | //check file or folder
101 | if(list.get(j).toString().endsWith(".f90")){
102 | listModel.addElement(list.get(j));
103 |
104 | }else{
105 |
106 | Filewalker fw = new Filewalker();
107 |
108 | ArrayList listPathfile = fw.walk(list.get(j).toString());
109 |
110 | for (int k = 0; k < listPathfile.size(); k++) {
111 | listModel.addElement(listPathfile.get(k)+ "\n");
112 | }
113 |
114 | }
115 |
116 | }
117 |
118 | this.fl.setModel(listModel);
119 |
120 |
121 | // If we made it this far, everything worked.
122 | dtde.dropComplete(true);
123 | return;
124 | } // Ok, is it another Java object?
125 | else if (flavors[i].isFlavorSerializedObjectType()) {
126 | dtde.acceptDrop(DnDConstants.ACTION_COPY_OR_MOVE);
127 | ta.setText("Successful text drop.\n\n");
128 | Object o = tr.getTransferData(flavors[i]);
129 | ta.append("Object: " + o);
130 | dtde.dropComplete(true);
131 | return;
132 | } // How about an input stream?
133 | else if (flavors[i].isRepresentationClassInputStream()) {
134 | dtde.acceptDrop(DnDConstants.ACTION_COPY_OR_MOVE);
135 | ta.setText("Successful text drop.\n\n");
136 | ta.read(new InputStreamReader(
137 | (InputStream) tr.getTransferData(flavors[i])),
138 | "from system clipboard");
139 | dtde.dropComplete(true);
140 | return;
141 | }
142 | }
143 | // Hmm, the user must not have dropped a file list
144 | System.out.println("Drop failed: " + dtde);
145 | dtde.rejectDrop();
146 | } catch (Exception e) {
147 | e.printStackTrace();
148 | dtde.rejectDrop();
149 | }
150 | }
151 | }
152 |
--------------------------------------------------------------------------------
/src/edu/ua/front/ExtensionFileFilter.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2016, Aziz Nanthaamornphong and Anawat Leathongkum
3 |
4 | Redistribution and use in source and binary forms, with or without modification, are
5 | permitted provided that the following conditions are met:
6 |
7 | 1. Redistributions of source code must retain the above copyright notice, this list of
8 | conditions and the following disclaimer.
9 |
10 | 2. Redistributions in binary form must reproduce the above copyright notice, this list of
11 | conditions and the following disclaimer in the documentation and/or other materials
12 | provided with the distribution.
13 |
14 | 3. Neither the names of the copyright holders nor the names of its contributors may be
15 | used to endorse or promote products derived from this software without specific prior
16 | written permission.
17 |
18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
19 | EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
20 | OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
21 | IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
22 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
24 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
26 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
27 | EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 | */
29 | package edu.ua.front;
30 |
31 | import java.io.File;
32 | import javax.swing.filechooser.FileFilter;
33 |
34 | public class ExtensionFileFilter extends FileFilter {
35 |
36 | String description;
37 | String extensions[];
38 |
39 | public ExtensionFileFilter(String description, String extension) {
40 | this(description, new String[]{extension});
41 | }
42 |
43 | public ExtensionFileFilter(String description, String extensions[]) {
44 | if (description == null) {
45 | this.description = extensions[0];
46 | } else {
47 | this.description = description;
48 | }
49 | this.extensions = (String[]) extensions.clone();
50 | toLower(this.extensions);
51 | }
52 |
53 | private void toLower(String array[]) {
54 | for (int i = 0, n = array.length; i < n; i++) {
55 | array[i] = array[i].toLowerCase();
56 | }
57 | }
58 |
59 | public String getDescription() {
60 | return description;
61 | }
62 |
63 | public boolean accept(File file) {
64 | if (file.isDirectory()) {
65 | return true;
66 | } else {
67 | String path = file.getAbsolutePath().toLowerCase();
68 | for (int i = 0, n = extensions.length; i < n; i++) {
69 | String extension = extensions[i];
70 | if ((path.endsWith(extension) && (path.charAt(path.length() - extension.length() - 1)) == '.')) {
71 | return true;
72 | }
73 | }
74 | }
75 | return false;
76 | }
77 | }
78 |
--------------------------------------------------------------------------------
/src/edu/ua/front/Filewalker.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2016, Aziz Nanthaamornphong and Anawat Leathongkum
3 |
4 | Redistribution and use in source and binary forms, with or without modification, are
5 | permitted provided that the following conditions are met:
6 |
7 | 1. Redistributions of source code must retain the above copyright notice, this list of
8 | conditions and the following disclaimer.
9 |
10 | 2. Redistributions in binary form must reproduce the above copyright notice, this list of
11 | conditions and the following disclaimer in the documentation and/or other materials
12 | provided with the distribution.
13 |
14 | 3. Neither the names of the copyright holders nor the names of its contributors may be
15 | used to endorse or promote products derived from this software without specific prior
16 | written permission.
17 |
18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
19 | EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
20 | OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
21 | IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
22 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
24 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
26 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
27 | EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 | */
29 | package edu.ua.front;
30 |
31 | import java.io.File;
32 | import java.util.ArrayList;
33 |
34 | class Filewalker {
35 | // public void walk( String path ) {
36 | //
37 | // File root = new File( path );
38 | // File[] list = root.listFiles();
39 | //
40 | // if (list == null) return;
41 | //
42 | // for ( File f : list ) {
43 | // if ( f.isDirectory() ) {
44 | // walk( f.getAbsolutePath() );
45 | // System.out.println( "Dir:" + f.getAbsoluteFile() );
46 | // }
47 | // else {
48 | // System.out.println( "File:" + f.getAbsoluteFile() );
49 | // }
50 | // }
51 | // }
52 |
53 | ArrayList listPathfile = new ArrayList();
54 |
55 | public ArrayList walk(String path) {
56 |
57 | File dir = new File(path);
58 | File[] list = dir.listFiles();
59 |
60 | if (list == null) {
61 | return walk(path);
62 | }
63 | if (dir.exists()) {
64 |
65 | for (File f : list) {
66 | if (f.isDirectory()) {
67 | walk(f.getAbsolutePath());
68 | System.out.println( "Dir:" + f.getAbsoluteFile() );
69 | } else if (!f.isDirectory() && f.getName().endsWith(".f90")) {
70 | listPathfile.add(f.getAbsoluteFile().toString());
71 | System.out.println( "File:" + f.getAbsoluteFile() );
72 | }
73 | }
74 | }
75 | return listPathfile;
76 | }
77 |
78 | }
79 |
--------------------------------------------------------------------------------
/src/edu/ua/front/Gear.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/t2time/ForUML/bb00f19dd33bf4dd9e3629054926d3e623dcc080/src/edu/ua/front/Gear.png
--------------------------------------------------------------------------------
/src/edu/ua/front/Generator.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2016, Aziz Nanthaamornphong and Anawat Leathongkum
3 |
4 | Redistribution and use in source and binary forms, with or without modification, are
5 | permitted provided that the following conditions are met:
6 |
7 | 1. Redistributions of source code must retain the above copyright notice, this list of
8 | conditions and the following disclaimer.
9 |
10 | 2. Redistributions in binary form must reproduce the above copyright notice, this list of
11 | conditions and the following disclaimer in the documentation and/or other materials
12 | provided with the distribution.
13 |
14 | 3. Neither the names of the copyright holders nor the names of its contributors may be
15 | used to endorse or promote products derived from this software without specific prior
16 | written permission.
17 |
18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
19 | EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
20 | OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
21 | IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
22 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
24 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
26 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
27 | EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 | */
29 | package edu.ua.front;
30 |
31 | import edu.ua.node.UMLNode;
32 | import java.io.BufferedWriter;
33 | import java.io.FileWriter;
34 | import org.xml.sax.helpers.AttributesImpl;
35 | import edu.ua.util.DataWriter;
36 | import edu.ua.util.Fortran2XMI;
37 |
38 | public class Generator {
39 |
40 | private String outputPath = "";
41 |
42 | public void setOutput(String path) {
43 | outputPath = path;
44 | }
45 |
46 | public String getOutput() {
47 | return outputPath;
48 | }
49 |
50 | public void generate(UMLNode contentNode) {
51 | try {
52 | String fileName = outputPath;
53 | AttributesImpl attributes = new AttributesImpl();
54 | String documentName = "";
55 | BufferedWriter writer = new BufferedWriter(new FileWriter(fileName));
56 | DataWriter xmlWriter = new DataWriter(writer);
57 | xmlWriter.setIndentStep(2);
58 | xmlWriter.startDocument();
59 | Fortran2XMI fortran2xmi = new Fortran2XMI(xmlWriter);
60 | // create an XMI header
61 | attributes.clear();
62 | attributes.addAttribute("", "xmi.version", "", "", "1.1");
63 | attributes.addAttribute("", "xmlns:UML", "", "", "org.omg/standards/UML");
64 | xmlWriter.startElement("", "XMI", "", attributes);
65 | // create the XMI header in the XML file
66 | fortran2xmi.serializeHeader(documentName);
67 | //ContentNode contentNode = new ContentNode();
68 | // serialize the UML model into the XML file
69 | fortran2xmi.serialzeNode(contentNode);
70 | xmlWriter.endElement("XMI");
71 | xmlWriter.endDocument();
72 | } catch (Exception ex) {
73 | ex.printStackTrace();
74 | }
75 | }
76 | }
--------------------------------------------------------------------------------
/src/edu/ua/front/add1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/t2time/ForUML/bb00f19dd33bf4dd9e3629054926d3e623dcc080/src/edu/ua/front/add1.png
--------------------------------------------------------------------------------
/src/edu/ua/front/add2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/t2time/ForUML/bb00f19dd33bf4dd9e3629054926d3e623dcc080/src/edu/ua/front/add2.png
--------------------------------------------------------------------------------
/src/edu/ua/front/add3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/t2time/ForUML/bb00f19dd33bf4dd9e3629054926d3e623dcc080/src/edu/ua/front/add3.png
--------------------------------------------------------------------------------
/src/edu/ua/front/file.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/t2time/ForUML/bb00f19dd33bf4dd9e3629054926d3e623dcc080/src/edu/ua/front/file.png
--------------------------------------------------------------------------------
/src/edu/ua/front/frameGUI.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/t2time/ForUML/bb00f19dd33bf4dd9e3629054926d3e623dcc080/src/edu/ua/front/frameGUI.png
--------------------------------------------------------------------------------
/src/edu/ua/front/gear-logo 2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/t2time/ForUML/bb00f19dd33bf4dd9e3629054926d3e623dcc080/src/edu/ua/front/gear-logo 2.png
--------------------------------------------------------------------------------
/src/edu/ua/front/gear-logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/t2time/ForUML/bb00f19dd33bf4dd9e3629054926d3e623dcc080/src/edu/ua/front/gear-logo.png
--------------------------------------------------------------------------------
/src/edu/ua/front/generate1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/t2time/ForUML/bb00f19dd33bf4dd9e3629054926d3e623dcc080/src/edu/ua/front/generate1.png
--------------------------------------------------------------------------------
/src/edu/ua/front/generate2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/t2time/ForUML/bb00f19dd33bf4dd9e3629054926d3e623dcc080/src/edu/ua/front/generate2.png
--------------------------------------------------------------------------------
/src/edu/ua/front/generate3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/t2time/ForUML/bb00f19dd33bf4dd9e3629054926d3e623dcc080/src/edu/ua/front/generate3.png
--------------------------------------------------------------------------------
/src/edu/ua/front/remove1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/t2time/ForUML/bb00f19dd33bf4dd9e3629054926d3e623dcc080/src/edu/ua/front/remove1.png
--------------------------------------------------------------------------------
/src/edu/ua/front/remove2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/t2time/ForUML/bb00f19dd33bf4dd9e3629054926d3e623dcc080/src/edu/ua/front/remove2.png
--------------------------------------------------------------------------------
/src/edu/ua/front/remove3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/t2time/ForUML/bb00f19dd33bf4dd9e3629054926d3e623dcc080/src/edu/ua/front/remove3.png
--------------------------------------------------------------------------------
/src/edu/ua/front/reset1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/t2time/ForUML/bb00f19dd33bf4dd9e3629054926d3e623dcc080/src/edu/ua/front/reset1.png
--------------------------------------------------------------------------------
/src/edu/ua/front/reset2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/t2time/ForUML/bb00f19dd33bf4dd9e3629054926d3e623dcc080/src/edu/ua/front/reset2.png
--------------------------------------------------------------------------------
/src/edu/ua/front/reset3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/t2time/ForUML/bb00f19dd33bf4dd9e3629054926d3e623dcc080/src/edu/ua/front/reset3.png
--------------------------------------------------------------------------------
/src/edu/ua/front/save1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/t2time/ForUML/bb00f19dd33bf4dd9e3629054926d3e623dcc080/src/edu/ua/front/save1.png
--------------------------------------------------------------------------------
/src/edu/ua/front/save2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/t2time/ForUML/bb00f19dd33bf4dd9e3629054926d3e623dcc080/src/edu/ua/front/save2.png
--------------------------------------------------------------------------------
/src/edu/ua/front/save3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/t2time/ForUML/bb00f19dd33bf4dd9e3629054926d3e623dcc080/src/edu/ua/front/save3.png
--------------------------------------------------------------------------------
/src/edu/ua/front/view1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/t2time/ForUML/bb00f19dd33bf4dd9e3629054926d3e623dcc080/src/edu/ua/front/view1.png
--------------------------------------------------------------------------------
/src/edu/ua/front/view2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/t2time/ForUML/bb00f19dd33bf4dd9e3629054926d3e623dcc080/src/edu/ua/front/view2.png
--------------------------------------------------------------------------------
/src/edu/ua/front/view3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/t2time/ForUML/bb00f19dd33bf4dd9e3629054926d3e623dcc080/src/edu/ua/front/view3.png
--------------------------------------------------------------------------------
/src/edu/ua/meta/ClassMeta.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2016, Aziz Nanthaamornphong and Anawat Leathongkum
3 |
4 | Redistribution and use in source and binary forms, with or without modification, are
5 | permitted provided that the following conditions are met:
6 |
7 | 1. Redistributions of source code must retain the above copyright notice, this list of
8 | conditions and the following disclaimer.
9 |
10 | 2. Redistributions in binary form must reproduce the above copyright notice, this list of
11 | conditions and the following disclaimer in the documentation and/or other materials
12 | provided with the distribution.
13 |
14 | 3. Neither the names of the copyright holders nor the names of its contributors may be
15 | used to endorse or promote products derived from this software without specific prior
16 | written permission.
17 |
18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
19 | EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
20 | OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
21 | IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
22 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
24 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
26 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
27 | EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 | */
29 | package edu.ua.meta;
30 |
31 | import edu.ua.util.UIDGenerator;
32 | import java.util.*;
33 |
34 | public class ClassMeta {
35 |
36 | private String filename = "";
37 | private String classname = "";
38 | private ArrayList compositeNames = new ArrayList();
39 | private ArrayList functions = new ArrayList();
40 | private ArrayList subroutine = new ArrayList();
41 | private ArrayList uselists = new ArrayList();
42 | private ArrayList variables = new ArrayList();
43 | private ArrayList compositelists = new ArrayList();
44 | private ArrayList subroutine2 = new ArrayList();
45 | private ArrayList functionNames = new ArrayList();
46 | // private ArrayList tmpSubroutine = new ArrayList();
47 | private Hashtable tmpSubroutine = new Hashtable();
48 | private ArrayList tmpSubroutineName = new ArrayList();
49 | private int currentVariable = 0;
50 | private ArrayList usedClassNames = new ArrayList();
51 | private String id = Long.toString(this.hashCode());
52 |
53 | public String getId() {
54 |
55 | String uid = UIDGenerator.hashCode(classname);
56 | return uid;
57 | }
58 |
59 | public void setId(String id) {
60 | this.id = id;
61 | }
62 |
63 | public void addCompositeNames(String a) {
64 | this.compositeNames.add(a);
65 | }
66 |
67 | public ArrayList getCompositenames() {
68 | return compositeNames;
69 | }
70 |
71 | public void addVariables(VariableMeta v) {
72 | variables.add(v);
73 | }
74 |
75 | public ArrayList getVariables() {
76 | return variables;
77 | }
78 |
79 | public void addFunctions(FunctionMeta f) {
80 | functions.add(f);
81 | }
82 |
83 | public ArrayList getFunctions() {
84 | return this.functions;
85 | }
86 |
87 | public void addSubroutine2(SubroutineMeta s) {
88 | if (!functionNames.contains(s.getName())) {
89 | this.subroutine2.add(s);
90 | functionNames.add(s.getName());
91 |
92 | }
93 | }
94 |
95 | public void addSubroutine(SubroutineMeta s) {
96 | this.subroutine.add(s);
97 | }
98 |
99 | public void addTempSubroutine(SubroutineMeta s){
100 |
101 |
102 | if(!this.tmpSubroutine.containsKey(s.getName().toLowerCase())){
103 |
104 | this.tmpSubroutine.put(s.getName().toLowerCase(), s);
105 | }
106 | }
107 |
108 | public SubroutineMeta getSubroutineTempMeta(String methodName){
109 |
110 | if(this.tmpSubroutine.containsKey(methodName.toLowerCase())){
111 |
112 | return (SubroutineMeta) this.tmpSubroutine.get(methodName.toLowerCase());
113 | }else{
114 | return null;
115 | }
116 |
117 | }
118 |
119 | public void changeStereoType(String methodName, String stereoType){
120 | for(int i=0; i< this.subroutine2.size();i++){
121 | if(((SubroutineMeta)this.subroutine2.get(i)).getName().equalsIgnoreCase(methodName)){
122 | ((SubroutineMeta)this.subroutine2.get(i)).setStereoType(stereoType);
123 | break;
124 | }
125 | }
126 | }
127 |
128 | public ArrayList getSubroutine2() {
129 | return this.subroutine2;
130 |
131 | }
132 |
133 | public ArrayList getSubroutine() {
134 | return this.subroutine;
135 | }
136 |
137 | public void addComposites(ClassMeta cl) {
138 | compositelists.add(cl);
139 | }
140 |
141 | public void addUses(ClassMeta cl) {
142 | if(!usedClassNames.contains(cl.getClassname())){
143 | usedClassNames.add(cl.getClassname());
144 | uselists.add(cl);
145 | }
146 | }
147 |
148 | public ArrayList getComposites() {
149 | return this.compositelists;
150 | }
151 |
152 | public ArrayList getUses() {
153 | return this.uselists;
154 | }
155 |
156 | public String getClassname() {
157 | return classname;
158 | }
159 |
160 | public String getFilename() {
161 | return filename;
162 | }
163 |
164 | public void setClassname(String classname) {
165 | this.classname = classname;
166 | }
167 |
168 | public void setFilename(String filename) {
169 | this.filename = filename;
170 | }
171 |
172 | public VariableMeta getNextVariable() {
173 | VariableMeta var = null;
174 | if (currentVariable < variables.size()) {
175 | var = (VariableMeta) variables.get(currentVariable);
176 | currentVariable++;
177 | }
178 | return var;
179 | }
180 | }
181 |
--------------------------------------------------------------------------------
/src/edu/ua/meta/FunctionMeta.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2016, Aziz Nanthaamornphong and Anawat Leathongkum
3 |
4 | Redistribution and use in source and binary forms, with or without modification, are
5 | permitted provided that the following conditions are met:
6 |
7 | 1. Redistributions of source code must retain the above copyright notice, this list of
8 | conditions and the following disclaimer.
9 |
10 | 2. Redistributions in binary form must reproduce the above copyright notice, this list of
11 | conditions and the following disclaimer in the documentation and/or other materials
12 | provided with the distribution.
13 |
14 | 3. Neither the names of the copyright holders nor the names of its contributors may be
15 | used to endorse or promote products derived from this software without specific prior
16 | written permission.
17 |
18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
19 | EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
20 | OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
21 | IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
22 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
24 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
26 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
27 | EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 | */
29 | package edu.ua.meta;
30 |
31 | import java.util.*;
32 |
33 | public class FunctionMeta {
34 |
35 | private String name;
36 | private String returnType = "";
37 | private ArrayList parameters = new ArrayList();
38 | int currentParam = 0;
39 |
40 | public void setName(String name) {
41 | this.name = name;
42 | }
43 |
44 | public String getName() {
45 | return this.name;
46 | }
47 |
48 | public void setReturnType(String name) {
49 | this.returnType = name;
50 | }
51 |
52 | public String getReturnType() {
53 | return this.returnType;
54 | }
55 |
56 | public void addParameters(ParameterMeta param) {
57 | parameters.add(param);
58 | }
59 |
60 | public ArrayList getParameters() {
61 | return this.parameters;
62 | }
63 |
64 | public ParameterMeta getNextParameter() {
65 | ParameterMeta ret = null;
66 |
67 | if (parameters.size() > currentParam) {
68 | ret = (ParameterMeta) parameters.get(currentParam);
69 | currentParam++;
70 | }
71 | return ret;
72 | }
73 | }
74 |
--------------------------------------------------------------------------------
/src/edu/ua/meta/ParameterMeta.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2016, Aziz Nanthaamornphong and Anawat Leathongkum
3 |
4 | Redistribution and use in source and binary forms, with or without modification, are
5 | permitted provided that the following conditions are met:
6 |
7 | 1. Redistributions of source code must retain the above copyright notice, this list of
8 | conditions and the following disclaimer.
9 |
10 | 2. Redistributions in binary form must reproduce the above copyright notice, this list of
11 | conditions and the following disclaimer in the documentation and/or other materials
12 | provided with the distribution.
13 |
14 | 3. Neither the names of the copyright holders nor the names of its contributors may be
15 | used to endorse or promote products derived from this software without specific prior
16 | written permission.
17 |
18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
19 | EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
20 | OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
21 | IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
22 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
24 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
26 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
27 | EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 | */
29 | package edu.ua.meta;
30 |
31 | public class ParameterMeta {
32 |
33 | String name = "";
34 | String type = "";
35 | String direction = "";
36 |
37 | public void setName(String name) {
38 | this.name = name;
39 | }
40 |
41 | public void setType(String type) {
42 | this.type = type;
43 | }
44 |
45 | public String getName() {
46 | return name;
47 | }
48 |
49 | public String getType() {
50 | return type;
51 | }
52 |
53 | public void setDirection(int di){
54 |
55 | if(di == 602){
56 | this.direction = "inout";
57 | }else if(di == 600){
58 | this.direction = "in";
59 | }else{
60 | this.direction = "out";
61 | }
62 | }
63 |
64 | public String getDirection(){
65 | return this.direction;
66 | }
67 |
68 | }
69 |
--------------------------------------------------------------------------------
/src/edu/ua/meta/SubroutineMeta.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2016, Aziz Nanthaamornphong and Anawat Leathongkum
3 |
4 | Redistribution and use in source and binary forms, with or without modification, are
5 | permitted provided that the following conditions are met:
6 |
7 | 1. Redistributions of source code must retain the above copyright notice, this list of
8 | conditions and the following disclaimer.
9 |
10 | 2. Redistributions in binary form must reproduce the above copyright notice, this list of
11 | conditions and the following disclaimer in the documentation and/or other materials
12 | provided with the distribution.
13 |
14 | 3. Neither the names of the copyright holders nor the names of its contributors may be
15 | used to endorse or promote products derived from this software without specific prior
16 | written permission.
17 |
18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
19 | EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
20 | OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
21 | IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
22 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
24 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
26 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
27 | EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 | */
29 | package edu.ua.meta;
30 |
31 | import java.util.*;
32 |
33 | public class SubroutineMeta {
34 |
35 | private String name;
36 | private ArrayList parameters = new ArrayList();
37 | private int currentParam = 0;
38 | private String stereoType = null;
39 |
40 | public void setName(String name) {
41 | this.name = name;
42 |
43 | }
44 |
45 | public String getName() {
46 | return this.name;
47 | }
48 |
49 | public void addParameters(ParameterMeta param) {
50 | parameters.add(param);
51 |
52 | }
53 |
54 | public ArrayList getParameters() {
55 | return this.parameters;
56 | }
57 |
58 | public ParameterMeta getNextParameter() {
59 | ParameterMeta ret = null;
60 |
61 | if (parameters.size() > currentParam) {
62 | ret = (ParameterMeta) parameters.get(currentParam);
63 | currentParam++;
64 | }
65 | return ret;
66 | }
67 |
68 | public void setStereoType(String stereo){
69 | this.stereoType = stereo;
70 | }
71 |
72 | public String getStereoType(){
73 | return this.stereoType;
74 | }
75 | }
76 |
--------------------------------------------------------------------------------
/src/edu/ua/meta/VariableMeta.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2016, Aziz Nanthaamornphong and Anawat Leathongkum
3 |
4 | Redistribution and use in source and binary forms, with or without modification, are
5 | permitted provided that the following conditions are met:
6 |
7 | 1. Redistributions of source code must retain the above copyright notice, this list of
8 | conditions and the following disclaimer.
9 |
10 | 2. Redistributions in binary form must reproduce the above copyright notice, this list of
11 | conditions and the following disclaimer in the documentation and/or other materials
12 | provided with the distribution.
13 |
14 | 3. Neither the names of the copyright holders nor the names of its contributors may be
15 | used to endorse or promote products derived from this software without specific prior
16 | written permission.
17 |
18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
19 | EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
20 | OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
21 | IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
22 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
24 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
26 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
27 | EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 | */
29 | package edu.ua.meta;
30 |
31 | public class VariableMeta {
32 |
33 | private String type = "";
34 | private String name = "";
35 | private String stereotype = null;
36 |
37 | public String getName() {
38 | return name;
39 | }
40 |
41 | public String getType() {
42 | return type;
43 | }
44 |
45 | public String getStereoType()
46 | {
47 | return stereotype;
48 | }
49 |
50 | public void setName(String name) {
51 | this.name = name;
52 |
53 | }
54 |
55 | public void setType(String type) {
56 | this.type = type;
57 | }
58 |
59 | public void setStereoType(String stereo){
60 | this.stereotype = stereo;
61 | }
62 | }
63 |
--------------------------------------------------------------------------------
/src/edu/ua/meta/ViewFactory.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2016, Aziz Nanthaamornphong and Anawat Leathongkum
3 |
4 | Redistribution and use in source and binary forms, with or without modification, are
5 | permitted provided that the following conditions are met:
6 |
7 | 1. Redistributions of source code must retain the above copyright notice, this list of
8 | conditions and the following disclaimer.
9 |
10 | 2. Redistributions in binary form must reproduce the above copyright notice, this list of
11 | conditions and the following disclaimer in the documentation and/or other materials
12 | provided with the distribution.
13 |
14 | 3. Neither the names of the copyright holders nor the names of its contributors may be
15 | used to endorse or promote products derived from this software without specific prior
16 | written permission.
17 |
18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
19 | EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
20 | OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
21 | IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
22 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
24 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
26 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
27 | EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 | */
29 | package edu.ua.meta;
30 |
31 | public class ViewFactory {
32 |
33 | private static ViewMeta meta;
34 |
35 | public static ViewMeta getViewMeta() {
36 | if (meta == null) {
37 | meta = new ViewMeta();
38 | }
39 | return meta;
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/src/edu/ua/node/AbstractionNode.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2016, Aziz Nanthaamornphong and Anawat Leathongkum
3 |
4 | Redistribution and use in source and binary forms, with or without modification, are
5 | permitted provided that the following conditions are met:
6 |
7 | 1. Redistributions of source code must retain the above copyright notice, this list of
8 | conditions and the following disclaimer.
9 |
10 | 2. Redistributions in binary form must reproduce the above copyright notice, this list of
11 | conditions and the following disclaimer in the documentation and/or other materials
12 | provided with the distribution.
13 |
14 | 3. Neither the names of the copyright holders nor the names of its contributors may be
15 | used to endorse or promote products derived from this software without specific prior
16 | written permission.
17 |
18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
19 | EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
20 | OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
21 | IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
22 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
24 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
26 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
27 | EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 | */
29 | package edu.ua.node;
30 |
31 | import java.util.ArrayList;
32 | import java.util.List;
33 | import org.xml.sax.Attributes;
34 | import org.xml.sax.helpers.AttributesImpl;
35 |
36 | public class AbstractionNode extends UMLNode {
37 |
38 | private String name = "";
39 | private List nodes = new ArrayList();
40 |
41 | public void addNode(UMLNode node) {
42 | nodes.add(node);
43 | }
44 |
45 | @Override
46 | public String getName() {
47 | return "UML:Abstraction";
48 | }
49 |
50 | @Override
51 | public List getChildren() {
52 | return nodes;
53 | }
54 |
55 | @Override
56 | public int getChildCount() {
57 | return nodes.size();
58 | }
59 |
60 | @Override
61 | public Attributes getAttributes() {
62 | AttributesImpl attributes = new AttributesImpl();
63 | attributes.addAttribute("", "xmi.id", "", "", Long.toString(this.hashCode()));
64 | return attributes;
65 | }
66 | }
67 |
--------------------------------------------------------------------------------
/src/edu/ua/node/AssociationConnection.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2016, Aziz Nanthaamornphong and Anawat Leathongkum
3 |
4 | Redistribution and use in source and binary forms, with or without modification, are
5 | permitted provided that the following conditions are met:
6 |
7 | 1. Redistributions of source code must retain the above copyright notice, this list of
8 | conditions and the following disclaimer.
9 |
10 | 2. Redistributions in binary form must reproduce the above copyright notice, this list of
11 | conditions and the following disclaimer in the documentation and/or other materials
12 | provided with the distribution.
13 |
14 | 3. Neither the names of the copyright holders nor the names of its contributors may be
15 | used to endorse or promote products derived from this software without specific prior
16 | written permission.
17 |
18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
19 | EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
20 | OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
21 | IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
22 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
24 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
26 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
27 | EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 | */
29 | package edu.ua.node;
30 |
31 | import java.util.ArrayList;
32 | import java.util.List;
33 | import org.xml.sax.Attributes;
34 | import org.xml.sax.helpers.AttributesImpl;
35 |
36 | public class AssociationConnection extends UMLNode {
37 |
38 | List connections = new ArrayList();
39 |
40 | @Override
41 | public String getName() {
42 | return "UML:Association.connection";
43 | }
44 |
45 | @Override
46 | public List getChildren() {
47 | return connections;
48 | }
49 |
50 | @Override
51 | public int getChildCount() {
52 | return 2;
53 | }
54 |
55 | public void addConenection(AssociationEndNodeComposite src, AssociationEndNodeComposite des) {
56 | connections.add(src);
57 | connections.add(des);
58 |
59 | }
60 |
61 | @Override
62 | public Attributes getAttributes() {
63 | AttributesImpl attributes = new AttributesImpl();
64 | return attributes;
65 | }
66 | }
67 |
--------------------------------------------------------------------------------
/src/edu/ua/node/AssociationConnectionNode.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2016, Aziz Nanthaamornphong and Anawat Leathongkum
3 |
4 | Redistribution and use in source and binary forms, with or without modification, are
5 | permitted provided that the following conditions are met:
6 |
7 | 1. Redistributions of source code must retain the above copyright notice, this list of
8 | conditions and the following disclaimer.
9 |
10 | 2. Redistributions in binary form must reproduce the above copyright notice, this list of
11 | conditions and the following disclaimer in the documentation and/or other materials
12 | provided with the distribution.
13 |
14 | 3. Neither the names of the copyright holders nor the names of its contributors may be
15 | used to endorse or promote products derived from this software without specific prior
16 | written permission.
17 |
18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
19 | EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
20 | OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
21 | IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
22 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
24 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
26 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
27 | EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 | */
29 | package edu.ua.node;
30 |
31 | import edu.ua.util.UIDGenerator;
32 | import java.util.ArrayList;
33 | import java.util.List;
34 | import org.xml.sax.Attributes;
35 | import org.xml.sax.helpers.AttributesImpl;
36 |
37 | public class AssociationConnectionNode extends UMLNode {
38 |
39 | String name = "";
40 | List child = new ArrayList();
41 |
42 | @Override
43 | public String getName() {
44 | return "UML:Association";
45 | }
46 |
47 | public void addChildren(UMLNode node) {
48 | child.add(node);
49 | }
50 |
51 | @Override
52 | public List getChildren() {
53 | return child;
54 | }
55 |
56 | @Override
57 | public int getChildCount() {
58 | return child.size();
59 | }
60 |
61 | @Override
62 | public Attributes getAttributes() {
63 | AttributesImpl attributes = new AttributesImpl();
64 | attributes.addAttribute("", "xmi.id", "", "", "" + UIDGenerator.getRandom());
65 | attributes.addAttribute("", "name", "", "", "");
66 | attributes.addAttribute("", "isSpecification", "", "", "false");
67 | attributes.addAttribute("", "isRoot", "", "", "false");
68 | attributes.addAttribute("", "isLeaf", "", "", "false");
69 | attributes.addAttribute("", "isAbstract", "", "", "false");
70 | attributes.addAttribute("", "isNavigable", "", "", "true");
71 | return attributes;
72 | }
73 | }
74 |
--------------------------------------------------------------------------------
/src/edu/ua/node/AssociationEndNodeComposite.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2016, Aziz Nanthaamornphong and Anawat Leathongkum
3 |
4 | Redistribution and use in source and binary forms, with or without modification, are
5 | permitted provided that the following conditions are met:
6 |
7 | 1. Redistributions of source code must retain the above copyright notice, this list of
8 | conditions and the following disclaimer.
9 |
10 | 2. Redistributions in binary form must reproduce the above copyright notice, this list of
11 | conditions and the following disclaimer in the documentation and/or other materials
12 | provided with the distribution.
13 |
14 | 3. Neither the names of the copyright holders nor the names of its contributors may be
15 | used to endorse or promote products derived from this software without specific prior
16 | written permission.
17 |
18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
19 | EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
20 | OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
21 | IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
22 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
24 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
26 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
27 | EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 | */
29 | package edu.ua.node;
30 |
31 | import edu.ua.util.UIDGenerator;
32 | import java.util.ArrayList;
33 | import java.util.List;
34 | import org.xml.sax.Attributes;
35 | import org.xml.sax.helpers.AttributesImpl;
36 |
37 | public class AssociationEndNodeComposite extends UMLNode {
38 |
39 | String name = "";
40 | String aggregation = "composite";
41 | List child = new ArrayList();
42 | String id = "";
43 |
44 | @Override
45 | public String getName() {
46 | return "UML:AssociationEnd";
47 | }
48 |
49 | public void setId(String id) {
50 | this.id = id;
51 | }
52 |
53 | @Override
54 | public List getChildren() {
55 |
56 | return child;
57 | }
58 |
59 | public void addChild(UMLNode node) {
60 | child.add(node);
61 | }
62 |
63 | @Override
64 | public int getChildCount() {
65 | return child.size();
66 | }
67 |
68 | public void setAgrregation(String agrregation) {
69 | aggregation = agrregation;
70 | }
71 |
72 | @Override
73 | public Attributes getAttributes() {
74 | AttributesImpl attributes = new AttributesImpl();
75 | attributes.addAttribute("", "xmi.id", "", "", "" + UIDGenerator.getRandom());
76 | attributes.addAttribute("", "visibility", "", "", "public");
77 | attributes.addAttribute("", "isSpecification", "", "", "false");
78 | attributes.addAttribute("", "isNavigable", "", "", "true");
79 | attributes.addAttribute("", "ordering", "", "", "unordered");
80 | attributes.addAttribute("", "aggregation", "", "", aggregation);
81 | attributes.addAttribute("", "targetScope", "", "", "instance");
82 | attributes.addAttribute("", "changeability", "", "", "changeable");
83 | return attributes;
84 |
85 | }
86 | }
87 |
--------------------------------------------------------------------------------
/src/edu/ua/node/AssociationEndNodeNone.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2016, Aziz Nanthaamornphong and Anawat Leathongkum
3 |
4 | Redistribution and use in source and binary forms, with or without modification, are
5 | permitted provided that the following conditions are met:
6 |
7 | 1. Redistributions of source code must retain the above copyright notice, this list of
8 | conditions and the following disclaimer.
9 |
10 | 2. Redistributions in binary form must reproduce the above copyright notice, this list of
11 | conditions and the following disclaimer in the documentation and/or other materials
12 | provided with the distribution.
13 |
14 | 3. Neither the names of the copyright holders nor the names of its contributors may be
15 | used to endorse or promote products derived from this software without specific prior
16 | written permission.
17 |
18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
19 | EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
20 | OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
21 | IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
22 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
24 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
26 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
27 | EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 | */
29 | package edu.ua.node;
30 |
31 | import edu.ua.util.UIDGenerator;
32 | import java.util.ArrayList;
33 | import java.util.List;
34 | import org.xml.sax.Attributes;
35 | import org.xml.sax.helpers.AttributesImpl;
36 |
37 | public class AssociationEndNodeNone extends UMLNode {
38 |
39 | String name = "";
40 |
41 | @Override
42 | public String getName() {
43 | return "UML:AssociationEnd";
44 | }
45 |
46 | @Override
47 | public List getChildren() {
48 | List child = new ArrayList();
49 | return child;
50 | }
51 |
52 | @Override
53 | public int getChildCount() {
54 | return 0;
55 | }
56 |
57 | @Override
58 | public Attributes getAttributes() {
59 | AttributesImpl attributes = new AttributesImpl();
60 | attributes.addAttribute("", "xmi.id", "", "", "" + UIDGenerator.getRandom());
61 | attributes.addAttribute("", "visibility", "", "", "public");
62 | attributes.addAttribute("", "isSpecification", "", "", "false");
63 | attributes.addAttribute("", "isNavigable", "", "", "true");
64 | attributes.addAttribute("", "ordering", "", "", "unordered");
65 | attributes.addAttribute("", "aggregation", "", "", "none");
66 | attributes.addAttribute("", "targetScope", "", "", "instance");
67 | attributes.addAttribute("", "changeability", "", "", "changeable");
68 | return attributes;
69 |
70 | }
71 | }
72 |
--------------------------------------------------------------------------------
/src/edu/ua/node/AssociationEndParticipant.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2016, Aziz Nanthaamornphong and Anawat Leathongkum
3 |
4 | Redistribution and use in source and binary forms, with or without modification, are
5 | permitted provided that the following conditions are met:
6 |
7 | 1. Redistributions of source code must retain the above copyright notice, this list of
8 | conditions and the following disclaimer.
9 |
10 | 2. Redistributions in binary form must reproduce the above copyright notice, this list of
11 | conditions and the following disclaimer in the documentation and/or other materials
12 | provided with the distribution.
13 |
14 | 3. Neither the names of the copyright holders nor the names of its contributors may be
15 | used to endorse or promote products derived from this software without specific prior
16 | written permission.
17 |
18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
19 | EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
20 | OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
21 | IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
22 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
24 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
26 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
27 | EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 | */
29 | package edu.ua.node;
30 |
31 | import java.util.ArrayList;
32 | import java.util.List;
33 | import org.xml.sax.Attributes;
34 | import org.xml.sax.helpers.AttributesImpl;
35 |
36 | public class AssociationEndParticipant extends UMLNode {
37 |
38 | List child = new ArrayList();
39 |
40 | @Override
41 | public String getName() {
42 | return "UML:AssociationEnd.participant";
43 | }
44 |
45 | public void addChild(UMLNode node) {
46 | child.add(node);
47 | }
48 |
49 | @Override
50 | public List getChildren() {
51 | return child;
52 | }
53 |
54 | @Override
55 | public int getChildCount() {
56 | return child.size();
57 | }
58 |
59 | @Override
60 | public Attributes getAttributes() {
61 | AttributesImpl attributes = new AttributesImpl();
62 | return attributes;
63 | }
64 | }
65 |
--------------------------------------------------------------------------------
/src/edu/ua/node/AttributeNode.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2016, Aziz Nanthaamornphong and Anawat Leathongkum
3 |
4 | Redistribution and use in source and binary forms, with or without modification, are
5 | permitted provided that the following conditions are met:
6 |
7 | 1. Redistributions of source code must retain the above copyright notice, this list of
8 | conditions and the following disclaimer.
9 |
10 | 2. Redistributions in binary form must reproduce the above copyright notice, this list of
11 | conditions and the following disclaimer in the documentation and/or other materials
12 | provided with the distribution.
13 |
14 | 3. Neither the names of the copyright holders nor the names of its contributors may be
15 | used to endorse or promote products derived from this software without specific prior
16 | written permission.
17 |
18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
19 | EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
20 | OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
21 | IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
22 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
24 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
26 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
27 | EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 | */
29 | package edu.ua.node;
30 |
31 | import java.util.ArrayList;
32 | import java.util.List;
33 | import org.xml.sax.helpers.AttributesImpl;
34 |
35 | public class AttributeNode extends UMLNode {
36 |
37 | private String name = "";
38 | private String visibility = "public";
39 | private List nodes = new ArrayList();
40 |
41 | public void addNode(UMLNode node) {
42 | nodes.add(node);
43 | }
44 |
45 | public void setName(String name) {
46 | this.name = name;
47 | }
48 |
49 | @Override
50 | public String getName() {
51 | return "UML:Attribute";
52 | }
53 |
54 | @Override
55 | public List getChildren() {
56 | return nodes;
57 | }
58 |
59 | @Override
60 | public int getChildCount() {
61 | return nodes.size();
62 | }
63 |
64 | @Override
65 | public org.xml.sax.Attributes getAttributes() {
66 | AttributesImpl attributes = new AttributesImpl();
67 | attributes.addAttribute("", "xmi.id", "", "", Long.toString(this.hashCode()));
68 | attributes.addAttribute("", "name", "", "", name);
69 | attributes.addAttribute("", "visibility", "", "", "public");
70 | attributes.addAttribute("", "ownerScope", "", "", "instance");
71 | attributes.addAttribute("", "changeability", "", "", "changeable");
72 | attributes.addAttribute("", "targetScope", "", "", "instance");
73 | attributes.addAttribute("", "isSpecification", "", "", "false");
74 | return attributes;
75 | }
76 | }
77 |
--------------------------------------------------------------------------------
/src/edu/ua/node/BehavioralFeatureNode.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2016, Aziz Nanthaamornphong and Anawat Leathongkum
3 |
4 | Redistribution and use in source and binary forms, with or without modification, are
5 | permitted provided that the following conditions are met:
6 |
7 | 1. Redistributions of source code must retain the above copyright notice, this list of
8 | conditions and the following disclaimer.
9 |
10 | 2. Redistributions in binary form must reproduce the above copyright notice, this list of
11 | conditions and the following disclaimer in the documentation and/or other materials
12 | provided with the distribution.
13 |
14 | 3. Neither the names of the copyright holders nor the names of its contributors may be
15 | used to endorse or promote products derived from this software without specific prior
16 | written permission.
17 |
18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
19 | EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
20 | OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
21 | IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
22 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
24 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
26 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
27 | EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 | */
29 | package edu.ua.node;
30 |
31 | import java.util.ArrayList;
32 | import java.util.List;
33 |
34 | import org.xml.sax.helpers.AttributesImpl;
35 |
36 | public class BehavioralFeatureNode extends UMLNode {
37 |
38 | private List nodes = new ArrayList();
39 |
40 | public void addNode(UMLNode node) {
41 | nodes.add(node);
42 | }
43 |
44 | @Override
45 | public String getName() {
46 | return "UML:BehavioralFeature.parameter";
47 | }
48 |
49 | @Override
50 | public List getChildren() {
51 | return nodes;
52 | }
53 |
54 | @Override
55 | public int getChildCount() {
56 | return nodes.size();
57 | }
58 |
59 | @Override
60 | public org.xml.sax.Attributes getAttributes() {
61 | AttributesImpl attributes = new AttributesImpl();
62 | return attributes;
63 | }
64 | }
65 |
--------------------------------------------------------------------------------
/src/edu/ua/node/ClassNode.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2016, Aziz Nanthaamornphong and Anawat Leathongkum
3 |
4 | Redistribution and use in source and binary forms, with or without modification, are
5 | permitted provided that the following conditions are met:
6 |
7 | 1. Redistributions of source code must retain the above copyright notice, this list of
8 | conditions and the following disclaimer.
9 |
10 | 2. Redistributions in binary form must reproduce the above copyright notice, this list of
11 | conditions and the following disclaimer in the documentation and/or other materials
12 | provided with the distribution.
13 |
14 | 3. Neither the names of the copyright holders nor the names of its contributors may be
15 | used to endorse or promote products derived from this software without specific prior
16 | written permission.
17 |
18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
19 | EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
20 | OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
21 | IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
22 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
24 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
26 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
27 | EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 | */
29 | package edu.ua.node;
30 |
31 | import java.util.ArrayList;
32 | import java.util.List;
33 | import org.xml.sax.Attributes;
34 | import org.xml.sax.helpers.AttributesImpl;
35 |
36 | public class ClassNode extends UMLNode {
37 |
38 | private String name = "";
39 | private String visibility = "Public";
40 | private List child = new ArrayList();
41 | ClassifierFeatureNode featureNode = new ClassifierFeatureNode();
42 | private String id = "";
43 |
44 | public String getId() {
45 | return id;
46 | }
47 |
48 | public void setId(String id) {
49 | this.id = id;
50 | }
51 |
52 | public ClassNode() {
53 | child.add(featureNode);
54 | }
55 |
56 | public void setName(String name) {
57 | this.name = name;
58 | }
59 |
60 | public void addVariable(UMLNode node) {
61 | featureNode.addNode(node);
62 | }
63 |
64 | public void addFunction(UMLNode node) {
65 | featureNode.addNode(node);
66 | }
67 |
68 | public void addSubroutine(UMLNode node) {
69 | featureNode.addNode(node);
70 | }
71 |
72 | public void addUses(UMLNode node) {
73 | child.add(node);
74 | }
75 |
76 | public void addComposites(UMLNode node) {
77 | child.add(node);
78 | }
79 |
80 | @Override
81 | public String getName() {
82 | // return this.name;
83 | return "UML:Class";
84 | }
85 |
86 | @Override
87 | public List getChildren() {
88 | return child;
89 | }
90 |
91 | @Override
92 | public int getChildCount() {
93 | return child.size();
94 | }
95 |
96 | @Override
97 | public Attributes getAttributes() {
98 | AttributesImpl attributes = new AttributesImpl();
99 | attributes.addAttribute("", "xmi.id", "", "", id);
100 | attributes.addAttribute("", "name", "", "", this.name);
101 | attributes.addAttribute("", "visibility", "", "", this.visibility);
102 | attributes.addAttribute("", "isSpecification", "", "", "false");
103 | attributes.addAttribute("", "isRoot", "", "", "false");
104 | attributes.addAttribute("", "isLeaf", "", "", "false");
105 | attributes.addAttribute("", "isAbstract", "", "", "false");
106 | attributes.addAttribute("", "isActive", "", "", "false");
107 | return attributes;
108 | }
109 | }
110 |
--------------------------------------------------------------------------------
/src/edu/ua/node/ClassRefNode.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2016, Aziz Nanthaamornphong and Anawat Leathongkum
3 |
4 | Redistribution and use in source and binary forms, with or without modification, are
5 | permitted provided that the following conditions are met:
6 |
7 | 1. Redistributions of source code must retain the above copyright notice, this list of
8 | conditions and the following disclaimer.
9 |
10 | 2. Redistributions in binary form must reproduce the above copyright notice, this list of
11 | conditions and the following disclaimer in the documentation and/or other materials
12 | provided with the distribution.
13 |
14 | 3. Neither the names of the copyright holders nor the names of its contributors may be
15 | used to endorse or promote products derived from this software without specific prior
16 | written permission.
17 |
18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
19 | EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
20 | OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
21 | IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
22 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
24 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
26 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
27 | EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 | */
29 | package edu.ua.node;
30 |
31 | import java.util.ArrayList;
32 | import java.util.List;
33 | import org.xml.sax.helpers.AttributesImpl;
34 |
35 | public class ClassRefNode extends UMLNode {
36 |
37 | private List nodes = new ArrayList();
38 | private String id = "";
39 |
40 | public ClassRefNode() {
41 | id = Long.toString(this.hashCode());
42 | }
43 |
44 | public String getId() {
45 | return id;
46 | }
47 |
48 | public void setId(String id) {
49 | this.id = id;
50 | }
51 |
52 | public void addNode(UMLNode node) {
53 | nodes.add(node);
54 | }
55 |
56 | @Override
57 | public String getName() {
58 | return "UML:Class";
59 | }
60 |
61 | @Override
62 | public List getChildren() {
63 | return nodes;
64 | }
65 |
66 | @Override
67 | public int getChildCount() {
68 | return nodes.size();
69 | }
70 |
71 | @Override
72 | public org.xml.sax.Attributes getAttributes() {
73 | AttributesImpl attributes = new AttributesImpl();
74 | attributes.addAttribute("", "xmi.idref", "", "", id);
75 | return attributes;
76 | }
77 | }
78 |
--------------------------------------------------------------------------------
/src/edu/ua/node/ClassifierFeatureNode.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2016, Aziz Nanthaamornphong and Anawat Leathongkum
3 |
4 | Redistribution and use in source and binary forms, with or without modification, are
5 | permitted provided that the following conditions are met:
6 |
7 | 1. Redistributions of source code must retain the above copyright notice, this list of
8 | conditions and the following disclaimer.
9 |
10 | 2. Redistributions in binary form must reproduce the above copyright notice, this list of
11 | conditions and the following disclaimer in the documentation and/or other materials
12 | provided with the distribution.
13 |
14 | 3. Neither the names of the copyright holders nor the names of its contributors may be
15 | used to endorse or promote products derived from this software without specific prior
16 | written permission.
17 |
18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
19 | EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
20 | OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
21 | IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
22 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
24 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
26 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
27 | EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 | */
29 | package edu.ua.node;
30 |
31 | import java.util.ArrayList;
32 | import java.util.List;
33 | import org.xml.sax.Attributes;
34 | import org.xml.sax.helpers.AttributesImpl;
35 |
36 | public class ClassifierFeatureNode extends UMLNode {
37 |
38 | private List nodes = new ArrayList();
39 |
40 | public void addNode(UMLNode node) {
41 | nodes.add(node);
42 | }
43 |
44 | @Override
45 | public String getName() {
46 | return "UML:Classifier.feature";
47 | }
48 |
49 | @Override
50 | public List getChildren() {
51 | return nodes;
52 | }
53 |
54 | @Override
55 | public int getChildCount() {
56 | return nodes.size();
57 | }
58 |
59 | @Override
60 | public Attributes getAttributes() {
61 | AttributesImpl atb = new AttributesImpl();
62 | return atb;
63 | }
64 | }
65 |
--------------------------------------------------------------------------------
/src/edu/ua/node/ContentNode.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2016, Aziz Nanthaamornphong and Anawat Leathongkum
3 |
4 | Redistribution and use in source and binary forms, with or without modification, are
5 | permitted provided that the following conditions are met:
6 |
7 | 1. Redistributions of source code must retain the above copyright notice, this list of
8 | conditions and the following disclaimer.
9 |
10 | 2. Redistributions in binary form must reproduce the above copyright notice, this list of
11 | conditions and the following disclaimer in the documentation and/or other materials
12 | provided with the distribution.
13 |
14 | 3. Neither the names of the copyright holders nor the names of its contributors may be
15 | used to endorse or promote products derived from this software without specific prior
16 | written permission.
17 |
18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
19 | EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
20 | OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
21 | IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
22 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
24 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
26 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
27 | EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 | */
29 | package edu.ua.node;
30 |
31 | import java.util.ArrayList;
32 | import java.util.List;
33 | import org.xml.sax.Attributes;
34 | import org.xml.sax.helpers.AttributesImpl;
35 |
36 |
37 | public class ContentNode extends UMLNode {
38 |
39 | private List nodes = new ArrayList();
40 | private NamespaceNode ns = new NamespaceNode();
41 |
42 | @Override
43 | public String getName() {
44 | return "XMI.content";
45 | }
46 |
47 | @Override
48 | public List getChildren() {
49 | return nodes;
50 | }
51 |
52 | public void addNode(UMLNode node) {
53 | nodes.add(node);
54 |
55 | }
56 |
57 | @Override
58 | public int getChildCount() {
59 | return nodes.size();
60 | }
61 |
62 | @Override
63 | public Attributes getAttributes() {
64 | AttributesImpl attributes = new AttributesImpl();
65 | return attributes;
66 | }
67 | }
68 |
--------------------------------------------------------------------------------
/src/edu/ua/node/DataTypeNode.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2016, Aziz Nanthaamornphong and Anawat Leathongkum
3 |
4 | Redistribution and use in source and binary forms, with or without modification, are
5 | permitted provided that the following conditions are met:
6 |
7 | 1. Redistributions of source code must retain the above copyright notice, this list of
8 | conditions and the following disclaimer.
9 |
10 | 2. Redistributions in binary form must reproduce the above copyright notice, this list of
11 | conditions and the following disclaimer in the documentation and/or other materials
12 | provided with the distribution.
13 |
14 | 3. Neither the names of the copyright holders nor the names of its contributors may be
15 | used to endorse or promote products derived from this software without specific prior
16 | written permission.
17 |
18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
19 | EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
20 | OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
21 | IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
22 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
24 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
26 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
27 | EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 | */
29 | package edu.ua.node;
30 |
31 | import java.util.ArrayList;
32 | import java.util.List;
33 | import org.xml.sax.helpers.AttributesImpl;
34 |
35 | public class DataTypeNode extends UMLNode {
36 |
37 | private List nodes = new ArrayList();
38 | private String type = "";
39 | private String id = "";
40 | //private String hrefex = "";
41 |
42 | public String getType() {
43 | return type;
44 | }
45 |
46 | public void setType(String type) {
47 | this.type = type;
48 | //hrefex = TypeConverter.getHref(type);
49 |
50 | }
51 |
52 | public void setId(String id)
53 | {
54 | this.id = id;
55 | }
56 |
57 | public String getId(){
58 | return this.id;
59 | }
60 |
61 | public void addNode(UMLNode node) {
62 | nodes.add(node);
63 | }
64 |
65 | @Override
66 | public String getName() {
67 | return "UML:DataType";
68 | }
69 |
70 | @Override
71 | public List getChildren() {
72 | return nodes;
73 | }
74 |
75 | @Override
76 | public int getChildCount() {
77 | return nodes.size();
78 | }
79 |
80 | @Override
81 | public org.xml.sax.Attributes getAttributes() {
82 | AttributesImpl attributes = new AttributesImpl();
83 | //attributes.addAttribute("", "href", "", "", "http://argouml.org/profiles/uml14/default-uml14.xmi#-84-17--56-5-43645a83:11466542d86:-8000:000000000000087C");
84 | attributes.addAttribute("", "xmi.id", "", "", id);
85 | attributes.addAttribute("", "name", "", "", this.type);
86 | attributes.addAttribute("", "isSpecification", "", "", "false");
87 | attributes.addAttribute("", "isRoot", "", "", "false");
88 | attributes.addAttribute("", "isLeaf", "", "", "false");
89 | attributes.addAttribute("", "isAbstract", "", "", "false");
90 | return attributes;
91 | }
92 | }
93 |
--------------------------------------------------------------------------------
/src/edu/ua/node/DependencyClientNode.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2016, Aziz Nanthaamornphong and Anawat Leathongkum
3 |
4 | Redistribution and use in source and binary forms, with or without modification, are
5 | permitted provided that the following conditions are met:
6 |
7 | 1. Redistributions of source code must retain the above copyright notice, this list of
8 | conditions and the following disclaimer.
9 |
10 | 2. Redistributions in binary form must reproduce the above copyright notice, this list of
11 | conditions and the following disclaimer in the documentation and/or other materials
12 | provided with the distribution.
13 |
14 | 3. Neither the names of the copyright holders nor the names of its contributors may be
15 | used to endorse or promote products derived from this software without specific prior
16 | written permission.
17 |
18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
19 | EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
20 | OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
21 | IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
22 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
24 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
26 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
27 | EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 | */
29 | package edu.ua.node;
30 |
31 | import java.util.ArrayList;
32 | import java.util.List;
33 | import org.xml.sax.Attributes;
34 | import org.xml.sax.helpers.AttributesImpl;
35 |
36 | public class DependencyClientNode extends UMLNode {
37 |
38 | private List nodes = new ArrayList();
39 |
40 | @Override
41 | public String getName() {
42 | return "UML:Dependency.client";
43 | }
44 |
45 | public void addNode(UMLNode n) {
46 | nodes.add(n);
47 | }
48 |
49 | @Override
50 | public List getChildren() {
51 | return nodes;
52 | }
53 |
54 | @Override
55 | public int getChildCount() {
56 | return nodes.size();
57 | }
58 |
59 | @Override
60 | public Attributes getAttributes() {
61 | AttributesImpl attributes = new AttributesImpl();
62 | return attributes;
63 | }
64 | }
65 |
--------------------------------------------------------------------------------
/src/edu/ua/node/DependencySupplierNode.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2016, Aziz Nanthaamornphong and Anawat Leathongkum
3 |
4 | Redistribution and use in source and binary forms, with or without modification, are
5 | permitted provided that the following conditions are met:
6 |
7 | 1. Redistributions of source code must retain the above copyright notice, this list of
8 | conditions and the following disclaimer.
9 |
10 | 2. Redistributions in binary form must reproduce the above copyright notice, this list of
11 | conditions and the following disclaimer in the documentation and/or other materials
12 | provided with the distribution.
13 |
14 | 3. Neither the names of the copyright holders nor the names of its contributors may be
15 | used to endorse or promote products derived from this software without specific prior
16 | written permission.
17 |
18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
19 | EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
20 | OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
21 | IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
22 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
24 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
26 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
27 | EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 | */
29 | package edu.ua.node;
30 |
31 | import java.util.ArrayList;
32 | import java.util.List;
33 | import org.xml.sax.Attributes;
34 | import org.xml.sax.helpers.AttributesImpl;
35 |
36 | public class DependencySupplierNode extends UMLNode {
37 |
38 | private List nodes = new ArrayList();
39 |
40 | public void addNode(UMLNode n) {
41 | nodes.add(n);
42 | }
43 |
44 | @Override
45 | public String getName() {
46 | return "Dependency.supplier";
47 | }
48 |
49 | @Override
50 | public List getChildren() {
51 | return nodes;
52 | }
53 |
54 | @Override
55 | public int getChildCount() {
56 | return nodes.size();
57 | }
58 |
59 | @Override
60 | public Attributes getAttributes() {
61 | AttributesImpl attributes = new AttributesImpl();
62 | return attributes;
63 | }
64 | }
65 |
--------------------------------------------------------------------------------
/src/edu/ua/node/FunctionNode.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2016, Aziz Nanthaamornphong and Anawat Leathongkum
3 |
4 | Redistribution and use in source and binary forms, with or without modification, are
5 | permitted provided that the following conditions are met:
6 |
7 | 1. Redistributions of source code must retain the above copyright notice, this list of
8 | conditions and the following disclaimer.
9 |
10 | 2. Redistributions in binary form must reproduce the above copyright notice, this list of
11 | conditions and the following disclaimer in the documentation and/or other materials
12 | provided with the distribution.
13 |
14 | 3. Neither the names of the copyright holders nor the names of its contributors may be
15 | used to endorse or promote products derived from this software without specific prior
16 | written permission.
17 |
18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
19 | EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
20 | OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
21 | IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
22 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
24 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
26 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
27 | EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 | */
29 | package edu.ua.node;
30 |
31 | import java.util.ArrayList;
32 | import java.util.List;
33 | import org.xml.sax.Attributes;
34 | import org.xml.sax.helpers.AttributesImpl;
35 |
36 | public class FunctionNode extends UMLNode {
37 |
38 | private String name = "";
39 | private String visibility = "public";
40 | private String returnType = "";
41 | private List parameters = new ArrayList();
42 |
43 | public void setName(String name) {
44 | this.name = name;
45 | }
46 |
47 | public void setReturnType(String returnType) {
48 | this.returnType = returnType;
49 | }
50 |
51 | public String getReturnType() {
52 | return returnType;
53 | }
54 |
55 | public void addParameter(UMLNode node) {
56 | parameters.add(node);
57 | }
58 |
59 | @Override
60 | public String getName() {
61 | return "UML:Operation";
62 | }
63 |
64 | @Override
65 | public List getChildren() {
66 | return parameters;
67 | }
68 |
69 | @Override
70 | public int getChildCount() {
71 | return parameters.size();
72 | }
73 |
74 | @Override
75 | public Attributes getAttributes() {
76 | AttributesImpl attributes = new AttributesImpl();
77 | attributes.addAttribute("", "name", "", "", this.name);
78 | //attributes.addAttribute("", "type", "","", this.returnType);
79 | attributes.addAttribute("", "visibility", "", "", this.visibility);
80 | attributes.addAttribute("", "isSpecification", "", "", "false");
81 | attributes.addAttribute("", "ownerScoep", "", "", "instance");
82 | attributes.addAttribute("", "isQuery", "", "", "false");
83 | attributes.addAttribute("", "concurency", "", "", "sequential");
84 | attributes.addAttribute("", "isRoot", "", "", "false");
85 | attributes.addAttribute("", "isLeaf", "", "", "false");
86 | attributes.addAttribute("", "isAbstract", "", "", "false");
87 |
88 |
89 |
90 | return attributes;
91 | }
92 | }
93 |
--------------------------------------------------------------------------------
/src/edu/ua/node/GeneralizableElementNode.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2016, Aziz Nanthaamornphong and Anawat Leathongkum
3 |
4 | Redistribution and use in source and binary forms, with or without modification, are
5 | permitted provided that the following conditions are met:
6 |
7 | 1. Redistributions of source code must retain the above copyright notice, this list of
8 | conditions and the following disclaimer.
9 |
10 | 2. Redistributions in binary form must reproduce the above copyright notice, this list of
11 | conditions and the following disclaimer in the documentation and/or other materials
12 | provided with the distribution.
13 |
14 | 3. Neither the names of the copyright holders nor the names of its contributors may be
15 | used to endorse or promote products derived from this software without specific prior
16 | written permission.
17 |
18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
19 | EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
20 | OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
21 | IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
22 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
24 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
26 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
27 | EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 | */
29 | package edu.ua.node;
30 |
31 | import java.util.ArrayList;
32 | import java.util.List;
33 | import org.xml.sax.Attributes;
34 | import org.xml.sax.helpers.AttributesImpl;
35 |
36 | public class GeneralizableElementNode extends UMLNode {
37 |
38 | private List nodes = new ArrayList();
39 |
40 | public void addNode(UMLNode node) {
41 | nodes.add(node);
42 | }
43 |
44 | @Override
45 | public String getName() {
46 | return "UML:GeneralizableElement.generalization";
47 |
48 | }
49 |
50 | @Override
51 | public List getChildren() {
52 | return nodes;
53 | }
54 |
55 | @Override
56 | public int getChildCount() {
57 | return nodes.size();
58 | }
59 |
60 | @Override
61 | public org.xml.sax.Attributes getAttributes() {
62 | AttributesImpl attributes = new AttributesImpl();
63 |
64 | return attributes;
65 | }
66 | }
67 |
--------------------------------------------------------------------------------
/src/edu/ua/node/GeneralizationChildNode.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2016, Aziz Nanthaamornphong and Anawat Leathongkum
3 |
4 | Redistribution and use in source and binary forms, with or without modification, are
5 | permitted provided that the following conditions are met:
6 |
7 | 1. Redistributions of source code must retain the above copyright notice, this list of
8 | conditions and the following disclaimer.
9 |
10 | 2. Redistributions in binary form must reproduce the above copyright notice, this list of
11 | conditions and the following disclaimer in the documentation and/or other materials
12 | provided with the distribution.
13 |
14 | 3. Neither the names of the copyright holders nor the names of its contributors may be
15 | used to endorse or promote products derived from this software without specific prior
16 | written permission.
17 |
18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
19 | EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
20 | OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
21 | IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
22 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
24 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
26 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
27 | EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 | */
29 | package edu.ua.node;
30 |
31 | import java.util.ArrayList;
32 | import java.util.List;
33 | import org.xml.sax.helpers.AttributesImpl;
34 |
35 | public class GeneralizationChildNode extends UMLNode {
36 |
37 | private List nodes = new ArrayList();
38 |
39 | public void addNode(UMLNode node) {
40 | nodes.add(node);
41 | }
42 |
43 | @Override
44 | public String getName() {
45 | return "UML:Generalization.child";
46 | }
47 |
48 | @Override
49 | public List getChildren() {
50 | return nodes;
51 | }
52 |
53 | @Override
54 | public int getChildCount() {
55 | return nodes.size();
56 | }
57 |
58 | @Override
59 | public org.xml.sax.Attributes getAttributes() {
60 | AttributesImpl attributes = new AttributesImpl();
61 |
62 | return attributes;
63 | }
64 | }
65 |
--------------------------------------------------------------------------------
/src/edu/ua/node/GeneralizationEntryNode.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2016, Aziz Nanthaamornphong and Anawat Leathongkum
3 |
4 | Redistribution and use in source and binary forms, with or without modification, are
5 | permitted provided that the following conditions are met:
6 |
7 | 1. Redistributions of source code must retain the above copyright notice, this list of
8 | conditions and the following disclaimer.
9 |
10 | 2. Redistributions in binary form must reproduce the above copyright notice, this list of
11 | conditions and the following disclaimer in the documentation and/or other materials
12 | provided with the distribution.
13 |
14 | 3. Neither the names of the copyright holders nor the names of its contributors may be
15 | used to endorse or promote products derived from this software without specific prior
16 | written permission.
17 |
18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
19 | EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
20 | OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
21 | IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
22 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
24 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
26 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
27 | EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 | */
29 | package edu.ua.node;
30 |
31 | import java.util.ArrayList;
32 | import java.util.List;
33 | import org.xml.sax.helpers.AttributesImpl;
34 |
35 | public class GeneralizationEntryNode extends UMLNode {
36 |
37 | private List nodes = new ArrayList();
38 | private String id = "";
39 |
40 | public GeneralizationEntryNode() {
41 | id = Long.toString(this.hashCode());
42 | }
43 |
44 | public void addNode(UMLNode node) {
45 | nodes.add(node);
46 | }
47 |
48 | public void setId(String id) {
49 | this.id = id;
50 | }
51 |
52 | public String getId() {
53 | return Long.toString(this.hashCode());
54 | }
55 |
56 | @Override
57 | public String getName() {
58 | return "UML:Generalization";
59 | }
60 |
61 | @Override
62 | public List getChildren() {
63 | return nodes;
64 | }
65 |
66 | @Override
67 | public int getChildCount() {
68 | return nodes.size();
69 | }
70 |
71 | @Override
72 | public org.xml.sax.Attributes getAttributes() {
73 | AttributesImpl attributes = new AttributesImpl();
74 | attributes.addAttribute("", "xmi.id", "", "", id);
75 | return attributes;
76 | }
77 | }
78 |
--------------------------------------------------------------------------------
/src/edu/ua/node/GeneralizationNode.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2016, Aziz Nanthaamornphong and Anawat Leathongkum
3 |
4 | Redistribution and use in source and binary forms, with or without modification, are
5 | permitted provided that the following conditions are met:
6 |
7 | 1. Redistributions of source code must retain the above copyright notice, this list of
8 | conditions and the following disclaimer.
9 |
10 | 2. Redistributions in binary form must reproduce the above copyright notice, this list of
11 | conditions and the following disclaimer in the documentation and/or other materials
12 | provided with the distribution.
13 |
14 | 3. Neither the names of the copyright holders nor the names of its contributors may be
15 | used to endorse or promote products derived from this software without specific prior
16 | written permission.
17 |
18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
19 | EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
20 | OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
21 | IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
22 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
24 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
26 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
27 | EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 | */
29 | package edu.ua.node;
30 |
31 | import java.util.ArrayList;
32 | import java.util.List;
33 | import org.xml.sax.helpers.AttributesImpl;
34 |
35 | public class GeneralizationNode extends UMLNode{
36 |
37 | private List nodes = new ArrayList();
38 | private String id = "";
39 |
40 | private String child = "";
41 | private String parent = "";
42 |
43 |
44 | public void setChildClass(String cls){
45 | child = cls;
46 | }
47 |
48 | public String getChildClass(){
49 | return child;
50 | }
51 |
52 | public void setParentClass(String cls){
53 | parent = cls;
54 | }
55 |
56 | public String getParentClass(){
57 | return parent;
58 | }
59 |
60 | public GeneralizationNode(){
61 | id = Long.toString(this.hashCode());
62 | }
63 |
64 | public void addNode(UMLNode node){
65 | nodes.add(node);
66 | }
67 |
68 | public void setId(String id){
69 | this.id = id;
70 | }
71 |
72 | public String getId(){
73 | return Long.toString(this.hashCode());
74 | }
75 |
76 | @Override
77 | public String getName() {
78 | return "UML:Generalization";
79 | }
80 |
81 | @Override
82 | public List getChildren() {
83 | return nodes;
84 | }
85 |
86 | @Override
87 | public int getChildCount() {
88 | return nodes.size();
89 | }
90 |
91 | @Override
92 | public org.xml.sax.Attributes getAttributes() {
93 | AttributesImpl attributes = new AttributesImpl();
94 | attributes.addAttribute("", "xmi.idref", "", "", id);
95 | return attributes;
96 | }
97 |
98 | }
99 |
--------------------------------------------------------------------------------
/src/edu/ua/node/GeneralizationParentNode.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2016, Aziz Nanthaamornphong and Anawat Leathongkum
3 |
4 | Redistribution and use in source and binary forms, with or without modification, are
5 | permitted provided that the following conditions are met:
6 |
7 | 1. Redistributions of source code must retain the above copyright notice, this list of
8 | conditions and the following disclaimer.
9 |
10 | 2. Redistributions in binary form must reproduce the above copyright notice, this list of
11 | conditions and the following disclaimer in the documentation and/or other materials
12 | provided with the distribution.
13 |
14 | 3. Neither the names of the copyright holders nor the names of its contributors may be
15 | used to endorse or promote products derived from this software without specific prior
16 | written permission.
17 |
18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
19 | EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
20 | OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
21 | IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
22 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
24 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
26 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
27 | EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 | */
29 | package edu.ua.node;
30 |
31 | import java.util.ArrayList;
32 | import java.util.List;
33 | import org.xml.sax.helpers.AttributesImpl;
34 |
35 | public class GeneralizationParentNode extends UMLNode {
36 |
37 | private List nodes = new ArrayList();
38 |
39 | public void addNode(UMLNode node) {
40 | nodes.add(node);
41 | }
42 |
43 | @Override
44 | public String getName() {
45 | return "UML:Generalization.parent";
46 | }
47 |
48 | @Override
49 | public List getChildren() {
50 | return nodes;
51 | }
52 |
53 | @Override
54 | public int getChildCount() {
55 | return nodes.size();
56 | }
57 |
58 | @Override
59 | public org.xml.sax.Attributes getAttributes() {
60 | AttributesImpl attributes = new AttributesImpl();
61 |
62 | return attributes;
63 | }
64 | }
65 |
--------------------------------------------------------------------------------
/src/edu/ua/node/InterfaceNode.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2016, Aziz Nanthaamornphong and Anawat Leathongkum
3 |
4 | Redistribution and use in source and binary forms, with or without modification, are
5 | permitted provided that the following conditions are met:
6 |
7 | 1. Redistributions of source code must retain the above copyright notice, this list of
8 | conditions and the following disclaimer.
9 |
10 | 2. Redistributions in binary form must reproduce the above copyright notice, this list of
11 | conditions and the following disclaimer in the documentation and/or other materials
12 | provided with the distribution.
13 |
14 | 3. Neither the names of the copyright holders nor the names of its contributors may be
15 | used to endorse or promote products derived from this software without specific prior
16 | written permission.
17 |
18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
19 | EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
20 | OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
21 | IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
22 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
24 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
26 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
27 | EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 | */
29 | package edu.ua.node;
30 |
31 | import java.util.ArrayList;
32 | import java.util.List;
33 | import org.xml.sax.Attributes;
34 | import org.xml.sax.helpers.AttributesImpl;
35 |
36 |
37 | public class InterfaceNode extends UMLNode {
38 |
39 | private String name = "";
40 | private List node = new ArrayList();
41 | private String id = "";
42 |
43 | public String getId() {
44 | return id;
45 | }
46 |
47 | public void setId(String id) {
48 | this.id = id;
49 | }
50 |
51 | public void addNode(UMLNode n) {
52 | node.add(n);
53 | }
54 |
55 | @Override
56 | public String getName() {
57 | return "UML:Interface";
58 | }
59 |
60 | @Override
61 | public List getChildren() {
62 | return node;
63 | }
64 |
65 | @Override
66 | public int getChildCount() {
67 | return node.size();
68 | }
69 |
70 | @Override
71 | public Attributes getAttributes() {
72 | AttributesImpl attributes = new AttributesImpl();
73 | attributes.addAttribute("", "xmi.id", "", "", id);
74 | attributes.addAttribute("", "name", "", "", this.name);
75 | attributes.addAttribute("", "visibility", "", "", "public");
76 | attributes.addAttribute("", "isSpecification", "", "", "false");
77 | attributes.addAttribute("", "isRoot", "", "", "false");
78 | attributes.addAttribute("", "isLeaf", "", "", "false");
79 | attributes.addAttribute("", "isAbstract", "", "", "false");
80 | return attributes;
81 | }
82 | }
83 |
--------------------------------------------------------------------------------
/src/edu/ua/node/InterfaceRefNode.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2016, Aziz Nanthaamornphong and Anawat Leathongkum
3 |
4 | Redistribution and use in source and binary forms, with or without modification, are
5 | permitted provided that the following conditions are met:
6 |
7 | 1. Redistributions of source code must retain the above copyright notice, this list of
8 | conditions and the following disclaimer.
9 |
10 | 2. Redistributions in binary form must reproduce the above copyright notice, this list of
11 | conditions and the following disclaimer in the documentation and/or other materials
12 | provided with the distribution.
13 |
14 | 3. Neither the names of the copyright holders nor the names of its contributors may be
15 | used to endorse or promote products derived from this software without specific prior
16 | written permission.
17 |
18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
19 | EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
20 | OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
21 | IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
22 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
24 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
26 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
27 | EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 | */
29 | package edu.ua.node;
30 |
31 | import java.util.ArrayList;
32 | import java.util.List;
33 | import org.xml.sax.Attributes;
34 | import org.xml.sax.helpers.AttributesImpl;
35 |
36 | public class InterfaceRefNode extends UMLNode {
37 |
38 | private String id = "";
39 | private List node = new ArrayList();
40 |
41 | public InterfaceRefNode() {
42 | id = Long.toString(this.hashCode());
43 | }
44 |
45 | public void addNodes(UMLNode n) {
46 | node.add(n);
47 | }
48 |
49 | @Override
50 | public String getName() {
51 | return "UML:Interface";
52 | }
53 |
54 | @Override
55 | public List getChildren() {
56 | return node;
57 | }
58 |
59 | @Override
60 | public int getChildCount() {
61 | return node.size();
62 | }
63 |
64 | @Override
65 | public Attributes getAttributes() {
66 | AttributesImpl attributes = new AttributesImpl();
67 | attributes.addAttribute("", "xmi.idref", "", "", id);
68 | return attributes;
69 | }
70 | }
71 |
--------------------------------------------------------------------------------
/src/edu/ua/node/ModelNode.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2016, Aziz Nanthaamornphong and Anawat Leathongkum
3 |
4 | Redistribution and use in source and binary forms, with or without modification, are
5 | permitted provided that the following conditions are met:
6 |
7 | 1. Redistributions of source code must retain the above copyright notice, this list of
8 | conditions and the following disclaimer.
9 |
10 | 2. Redistributions in binary form must reproduce the above copyright notice, this list of
11 | conditions and the following disclaimer in the documentation and/or other materials
12 | provided with the distribution.
13 |
14 | 3. Neither the names of the copyright holders nor the names of its contributors may be
15 | used to endorse or promote products derived from this software without specific prior
16 | written permission.
17 |
18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
19 | EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
20 | OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
21 | IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
22 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
24 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
26 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
27 | EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 | */
29 | package edu.ua.node;
30 |
31 | import java.util.ArrayList;
32 | import java.util.List;
33 | import org.xml.sax.Attributes;
34 | import org.xml.sax.helpers.AttributesImpl;
35 |
36 | public class ModelNode extends UMLNode {
37 |
38 | private List nodes = new ArrayList();
39 |
40 | public void addNode(UMLNode node) {
41 | nodes.add(node);
42 | }
43 |
44 | @Override
45 | public String getName() {
46 | return "UML:Model";
47 | }
48 |
49 | @Override
50 | public List getChildren() {
51 | return nodes;
52 | }
53 |
54 | @Override
55 | public int getChildCount() {
56 | return nodes.size();
57 | }
58 |
59 | @Override
60 | public Attributes getAttributes() {
61 |
62 | AttributesImpl attributes = new AttributesImpl();
63 | attributes.addAttribute("", "xmi.id", "", "", Long.toString(this.hashCode()));
64 | attributes.addAttribute("", "isSpecification", "", "", "false");
65 | attributes.addAttribute("", "isRoot", "", "", "false");
66 | attributes.addAttribute("", "isLeaf", "", "", "false");
67 | attributes.addAttribute("", "isAbstract", "", "", "false");
68 | return attributes;
69 | }
70 | }
71 |
--------------------------------------------------------------------------------
/src/edu/ua/node/ModelStereotype.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2016, Aziz Nanthaamornphong and Anawat Leathongkum
3 |
4 | Redistribution and use in source and binary forms, with or without modification, are
5 | permitted provided that the following conditions are met:
6 |
7 | 1. Redistributions of source code must retain the above copyright notice, this list of
8 | conditions and the following disclaimer.
9 |
10 | 2. Redistributions in binary form must reproduce the above copyright notice, this list of
11 | conditions and the following disclaimer in the documentation and/or other materials
12 | provided with the distribution.
13 |
14 | 3. Neither the names of the copyright holders nor the names of its contributors may be
15 | used to endorse or promote products derived from this software without specific prior
16 | written permission.
17 |
18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
19 | EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
20 | OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
21 | IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
22 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
24 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
26 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
27 | EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 | */
29 |
30 | package edu.ua.node;
31 |
32 | import java.util.ArrayList;
33 | import java.util.List;
34 | import org.xml.sax.Attributes;
35 | import org.xml.sax.helpers.AttributesImpl;
36 |
37 |
38 | public class ModelStereotype extends UMLNode{
39 |
40 | private List nodes = new ArrayList();
41 |
42 | @Override
43 | public String getName() {
44 | return "UML:ModelElement.stereotype";
45 | }
46 |
47 | public void addNodes(UMLNode n) {
48 | nodes.add(n);
49 | }
50 |
51 | @Override
52 | public List getChildren() {
53 | return nodes;
54 | }
55 |
56 | @Override
57 | public int getChildCount() {
58 | return nodes.size();
59 | }
60 |
61 | @Override
62 | public Attributes getAttributes() {
63 | AttributesImpl attributes = new AttributesImpl();
64 | return attributes;
65 | }
66 |
67 | }
68 |
--------------------------------------------------------------------------------
/src/edu/ua/node/MultiplicityNode.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2016, Aziz Nanthaamornphong and Anawat Leathongkum
3 |
4 | Redistribution and use in source and binary forms, with or without modification, are
5 | permitted provided that the following conditions are met:
6 |
7 | 1. Redistributions of source code must retain the above copyright notice, this list of
8 | conditions and the following disclaimer.
9 |
10 | 2. Redistributions in binary form must reproduce the above copyright notice, this list of
11 | conditions and the following disclaimer in the documentation and/or other materials
12 | provided with the distribution.
13 |
14 | 3. Neither the names of the copyright holders nor the names of its contributors may be
15 | used to endorse or promote products derived from this software without specific prior
16 | written permission.
17 |
18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
19 | EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
20 | OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
21 | IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
22 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
24 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
26 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
27 | EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 | */
29 | package edu.ua.node;
30 |
31 | import java.util.ArrayList;
32 | import java.util.List;
33 | import org.xml.sax.Attributes;
34 | import org.xml.sax.helpers.AttributesImpl;
35 |
36 | public class MultiplicityNode extends UMLNode {
37 |
38 | private List nodes = new ArrayList();
39 |
40 | public void addNode(UMLNode node) {
41 | nodes.add(node);
42 | }
43 |
44 | @Override
45 | public String getName() {
46 | return "UML:Multiplicity";
47 | }
48 |
49 | @Override
50 | public List getChildren() {
51 | return nodes;
52 | }
53 |
54 | @Override
55 | public int getChildCount() {
56 | return nodes.size();
57 | }
58 |
59 | @Override
60 | public Attributes getAttributes() {
61 | AttributesImpl attributes = new AttributesImpl();
62 | attributes.addAttribute("", "xmi.id", "", "", Long.toString(this.hashCode()));
63 | return attributes;
64 | }
65 | }
66 |
--------------------------------------------------------------------------------
/src/edu/ua/node/MultiplicityRange.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2016, Aziz Nanthaamornphong and Anawat Leathongkum
3 |
4 | Redistribution and use in source and binary forms, with or without modification, are
5 | permitted provided that the following conditions are met:
6 |
7 | 1. Redistributions of source code must retain the above copyright notice, this list of
8 | conditions and the following disclaimer.
9 |
10 | 2. Redistributions in binary form must reproduce the above copyright notice, this list of
11 | conditions and the following disclaimer in the documentation and/or other materials
12 | provided with the distribution.
13 |
14 | 3. Neither the names of the copyright holders nor the names of its contributors may be
15 | used to endorse or promote products derived from this software without specific prior
16 | written permission.
17 |
18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
19 | EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
20 | OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
21 | IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
22 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
24 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
26 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
27 | EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 | */
29 | package edu.ua.node;
30 |
31 | import java.util.ArrayList;
32 | import java.util.List;
33 | import org.xml.sax.Attributes;
34 | import org.xml.sax.helpers.AttributesImpl;
35 |
36 | public class MultiplicityRange extends UMLNode {
37 |
38 | private List nodes = new ArrayList();
39 |
40 | public void addNodes(UMLNode node) {
41 | nodes.add(node);
42 | }
43 |
44 | @Override
45 | public String getName() {
46 | return "UML:MultiplicityRange";
47 | }
48 |
49 | @Override
50 | public List getChildren() {
51 | List list = new ArrayList();
52 | return list;
53 | }
54 |
55 | @Override
56 | public int getChildCount() {
57 | return nodes.size();
58 | }
59 |
60 | @Override
61 | public Attributes getAttributes() {
62 | AttributesImpl attributes = new AttributesImpl();
63 | attributes.addAttribute("", "xmi.id", "", "", Long.toString(this.hashCode()));
64 | attributes.addAttribute("", "lower", "", "", "1");
65 | attributes.addAttribute("", "upper", "", "", "1");
66 | return attributes;
67 | }
68 | }
69 |
--------------------------------------------------------------------------------
/src/edu/ua/node/MultiplicityRangeNode.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2016, Aziz Nanthaamornphong and Anawat Leathongkum
3 |
4 | Redistribution and use in source and binary forms, with or without modification, are
5 | permitted provided that the following conditions are met:
6 |
7 | 1. Redistributions of source code must retain the above copyright notice, this list of
8 | conditions and the following disclaimer.
9 |
10 | 2. Redistributions in binary form must reproduce the above copyright notice, this list of
11 | conditions and the following disclaimer in the documentation and/or other materials
12 | provided with the distribution.
13 |
14 | 3. Neither the names of the copyright holders nor the names of its contributors may be
15 | used to endorse or promote products derived from this software without specific prior
16 | written permission.
17 |
18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
19 | EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
20 | OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
21 | IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
22 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
24 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
26 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
27 | EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 | */
29 | package edu.ua.node;
30 |
31 | import java.util.ArrayList;
32 | import java.util.List;
33 | import org.xml.sax.Attributes;
34 | import org.xml.sax.helpers.AttributesImpl;
35 |
36 | public class MultiplicityRangeNode extends UMLNode {
37 |
38 | private List nodes = new ArrayList();
39 |
40 | public void addNode(UMLNode node) {
41 | nodes.add(node);
42 | }
43 |
44 | @Override
45 | public String getName() {
46 | return "UML:Multiplicity.range";
47 | }
48 |
49 | @Override
50 | public List getChildren() {
51 | return nodes;
52 | }
53 |
54 | @Override
55 | public int getChildCount() {
56 | return nodes.size();
57 | }
58 |
59 | @Override
60 | public Attributes getAttributes() {
61 | AttributesImpl attributes = new AttributesImpl();
62 | return attributes;
63 | }
64 | }
65 |
--------------------------------------------------------------------------------
/src/edu/ua/node/NamespaceNode.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2016, Aziz Nanthaamornphong and Anawat Leathongkum
3 |
4 | Redistribution and use in source and binary forms, with or without modification, are
5 | permitted provided that the following conditions are met:
6 |
7 | 1. Redistributions of source code must retain the above copyright notice, this list of
8 | conditions and the following disclaimer.
9 |
10 | 2. Redistributions in binary form must reproduce the above copyright notice, this list of
11 | conditions and the following disclaimer in the documentation and/or other materials
12 | provided with the distribution.
13 |
14 | 3. Neither the names of the copyright holders nor the names of its contributors may be
15 | used to endorse or promote products derived from this software without specific prior
16 | written permission.
17 |
18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
19 | EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
20 | OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
21 | IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
22 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
24 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
26 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
27 | EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 | */
29 | package edu.ua.node;
30 |
31 | import java.util.ArrayList;
32 | import java.util.List;
33 | import org.xml.sax.Attributes;
34 | import org.xml.sax.helpers.AttributesImpl;
35 |
36 | public class NamespaceNode extends UMLNode {
37 |
38 | private List cls = new ArrayList();
39 |
40 | public void addNode(UMLNode node) {
41 | cls.add(node);
42 | }
43 |
44 | @Override
45 | public String getName() {
46 | return "UML:Namespace.ownedElement";
47 | }
48 |
49 | @Override
50 | public List getChildren() {
51 | return cls;
52 | }
53 |
54 | @Override
55 | public int getChildCount() {
56 | return cls.size();
57 | }
58 |
59 | @Override
60 | public Attributes getAttributes() {
61 | AttributesImpl atb = new AttributesImpl();
62 | return atb;
63 | }
64 | }
65 |
--------------------------------------------------------------------------------
/src/edu/ua/node/ParameterDataTypeNode.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2016, Aziz Nanthaamornphong and Anawat Leathongkum
3 |
4 | Redistribution and use in source and binary forms, with or without modification, are
5 | permitted provided that the following conditions are met:
6 |
7 | 1. Redistributions of source code must retain the above copyright notice, this list of
8 | conditions and the following disclaimer.
9 |
10 | 2. Redistributions in binary form must reproduce the above copyright notice, this list of
11 | conditions and the following disclaimer in the documentation and/or other materials
12 | provided with the distribution.
13 |
14 | 3. Neither the names of the copyright holders nor the names of its contributors may be
15 | used to endorse or promote products derived from this software without specific prior
16 | written permission.
17 |
18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
19 | EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
20 | OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
21 | IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
22 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
24 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
26 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
27 | EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 | */
29 | package edu.ua.node;
30 |
31 | import java.util.ArrayList;
32 | import java.util.List;
33 | import org.xml.sax.Attributes;
34 | import org.xml.sax.helpers.AttributesImpl;
35 |
36 | public class ParameterDataTypeNode extends UMLNode {
37 |
38 | private List nodes = new ArrayList();
39 |
40 | public void addNode(UMLNode node) {
41 | nodes.add(node);
42 | }
43 |
44 | @Override
45 | public String getName() {
46 | return "UML:DataType";
47 | }
48 |
49 | @Override
50 | public List getChildren() {
51 | return nodes;
52 | }
53 |
54 | @Override
55 | public int getChildCount() {
56 | return nodes.size();
57 | }
58 |
59 | @Override
60 | public Attributes getAttributes() {
61 | AttributesImpl attributes = new AttributesImpl();
62 | attributes.addAttribute("", "href", "", "", Long.toString(this.hashCode()));
63 | return attributes;
64 | }
65 | }
66 |
--------------------------------------------------------------------------------
/src/edu/ua/node/ParameterNode.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2016, Aziz Nanthaamornphong and Anawat Leathongkum
3 |
4 | Redistribution and use in source and binary forms, with or without modification, are
5 | permitted provided that the following conditions are met:
6 |
7 | 1. Redistributions of source code must retain the above copyright notice, this list of
8 | conditions and the following disclaimer.
9 |
10 | 2. Redistributions in binary form must reproduce the above copyright notice, this list of
11 | conditions and the following disclaimer in the documentation and/or other materials
12 | provided with the distribution.
13 |
14 | 3. Neither the names of the copyright holders nor the names of its contributors may be
15 | used to endorse or promote products derived from this software without specific prior
16 | written permission.
17 |
18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
19 | EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
20 | OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
21 | IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
22 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
24 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
26 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
27 | EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 | */
29 | package edu.ua.node;
30 |
31 | import java.util.ArrayList;
32 | import java.util.List;
33 | import org.xml.sax.Attributes;
34 | import org.xml.sax.helpers.AttributesImpl;
35 |
36 | public class ParameterNode extends UMLNode {
37 |
38 | public String name = "";
39 | public String type = "";
40 | public String visibility = "public";
41 | public String kind = "";
42 | private List nodes = new ArrayList();
43 |
44 | public void addNode(UMLNode node) {
45 | nodes.add(node);
46 | }
47 |
48 | public String getKind() {
49 | return kind;
50 | }
51 |
52 | public void setKind(String kind) {
53 | this.kind = kind;
54 | }
55 |
56 | public void setName(String name) {
57 | this.name = name;
58 | }
59 |
60 | public void setType(String type) {
61 | this.type = type;
62 | }
63 |
64 | public String getType() {
65 | return this.type;
66 | }
67 |
68 | @Override
69 | public String getName() {
70 | return "UML:Parameter";
71 | }
72 |
73 | @Override
74 | public List getChildren() {
75 | return nodes;
76 | }
77 |
78 | @Override
79 | public int getChildCount() {
80 | return nodes.size();
81 | }
82 |
83 | @Override
84 | public Attributes getAttributes() {
85 | AttributesImpl attributes = new AttributesImpl();
86 | attributes.addAttribute("", "xmi.id", "", "", Long.toString(this.hashCode()));
87 | attributes.addAttribute("", "name", "", "", this.name);
88 | attributes.addAttribute("", "isSpecification", "", "", "false");
89 | attributes.addAttribute("", "kind", "", "", this.kind);
90 | return attributes;
91 | }
92 | }
93 |
--------------------------------------------------------------------------------
/src/edu/ua/node/ParameterTypeNode.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2016, Aziz Nanthaamornphong and Anawat Leathongkum
3 |
4 | Redistribution and use in source and binary forms, with or without modification, are
5 | permitted provided that the following conditions are met:
6 |
7 | 1. Redistributions of source code must retain the above copyright notice, this list of
8 | conditions and the following disclaimer.
9 |
10 | 2. Redistributions in binary form must reproduce the above copyright notice, this list of
11 | conditions and the following disclaimer in the documentation and/or other materials
12 | provided with the distribution.
13 |
14 | 3. Neither the names of the copyright holders nor the names of its contributors may be
15 | used to endorse or promote products derived from this software without specific prior
16 | written permission.
17 |
18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
19 | EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
20 | OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
21 | IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
22 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
24 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
26 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
27 | EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 | */
29 | package edu.ua.node;
30 |
31 | import java.util.ArrayList;
32 | import java.util.List;
33 | import org.xml.sax.Attributes;
34 | import org.xml.sax.helpers.AttributesImpl;
35 |
36 |
37 | public class ParameterTypeNode extends UMLNode {
38 |
39 | private List nodes = new ArrayList();
40 |
41 | public void addNode(UMLNode node) {
42 | nodes.add(node);
43 | }
44 |
45 | @Override
46 | public String getName() {
47 | return "UML:Parameter.type";
48 | }
49 |
50 | @Override
51 | public List getChildren() {
52 | return nodes;
53 | }
54 |
55 | @Override
56 | public int getChildCount() {
57 | return nodes.size();
58 | }
59 |
60 | @Override
61 | public Attributes getAttributes() {
62 | AttributesImpl attributes = new AttributesImpl();
63 | return attributes;
64 | }
65 | }
66 |
--------------------------------------------------------------------------------
/src/edu/ua/node/StereoBaseClassNode.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2016, Aziz Nanthaamornphong and Anawat Leathongkum
3 |
4 | Redistribution and use in source and binary forms, with or without modification, are
5 | permitted provided that the following conditions are met:
6 |
7 | 1. Redistributions of source code must retain the above copyright notice, this list of
8 | conditions and the following disclaimer.
9 |
10 | 2. Redistributions in binary form must reproduce the above copyright notice, this list of
11 | conditions and the following disclaimer in the documentation and/or other materials
12 | provided with the distribution.
13 |
14 | 3. Neither the names of the copyright holders nor the names of its contributors may be
15 | used to endorse or promote products derived from this software without specific prior
16 | written permission.
17 |
18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
19 | EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
20 | OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
21 | IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
22 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
24 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
26 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
27 | EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 | */
29 | package edu.ua.node;
30 |
31 | import java.util.ArrayList;
32 | import java.util.List;
33 | import org.xml.sax.Attributes;
34 | import org.xml.sax.helpers.AttributesImpl;
35 |
36 | public class StereoBaseClassNode extends UMLNode {
37 |
38 | private List node = new ArrayList();
39 |
40 | public void addNodes(UMLNode n) {
41 | node.add(n);
42 | }
43 |
44 | @Override
45 | public String getName() {
46 | return "UML:Stereotype.baseClass";
47 | }
48 |
49 | @Override
50 | public List getChildren() {
51 | return node;
52 | }
53 |
54 | @Override
55 | public int getChildCount() {
56 | return node.size();
57 | }
58 |
59 | public String getText(){
60 | return "Attribute";
61 | }
62 |
63 | @Override
64 | public Attributes getAttributes() {
65 | AttributesImpl attributes = new AttributesImpl();
66 |
67 | return attributes;
68 | }
69 | }
70 |
--------------------------------------------------------------------------------
/src/edu/ua/node/StereotypeNode.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2016, Aziz Nanthaamornphong and Anawat Leathongkum
3 |
4 | Redistribution and use in source and binary forms, with or without modification, are
5 | permitted provided that the following conditions are met:
6 |
7 | 1. Redistributions of source code must retain the above copyright notice, this list of
8 | conditions and the following disclaimer.
9 |
10 | 2. Redistributions in binary form must reproduce the above copyright notice, this list of
11 | conditions and the following disclaimer in the documentation and/or other materials
12 | provided with the distribution.
13 |
14 | 3. Neither the names of the copyright holders nor the names of its contributors may be
15 | used to endorse or promote products derived from this software without specific prior
16 | written permission.
17 |
18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
19 | EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
20 | OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
21 | IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
22 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
24 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
26 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
27 | EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 | */
29 | package edu.ua.node;
30 |
31 | import java.util.ArrayList;
32 | import java.util.List;
33 | import org.xml.sax.Attributes;
34 | import org.xml.sax.helpers.AttributesImpl;
35 |
36 | public class StereotypeNode extends UMLNode {
37 |
38 | private List node = new ArrayList();
39 | private String name = "";
40 | private String id = "";
41 |
42 | public String getId() {
43 | return id;
44 | }
45 |
46 | public void setId(String id) {
47 | this.id = id;
48 | }
49 |
50 | public void addNodes(UMLNode n) {
51 | node.add(n);
52 | }
53 |
54 | @Override
55 | public String getName() {
56 | return "UML:Stereotype";
57 | }
58 |
59 | public void setName(String name){
60 | this.name = name;
61 | }
62 |
63 | @Override
64 | public List getChildren() {
65 | return node;
66 | }
67 |
68 | @Override
69 | public int getChildCount() {
70 | return node.size();
71 | }
72 |
73 | @Override
74 | public Attributes getAttributes() {
75 | AttributesImpl attributes = new AttributesImpl();
76 | attributes.addAttribute("", "xmi.id", "", "", this.id);
77 | attributes.addAttribute("", "name", "", "", this.name);
78 | attributes.addAttribute("", "isSpecification", "", "", "false");
79 | attributes.addAttribute("", "isRoot", "", "", "false");
80 | attributes.addAttribute("", "isLeaf", "", "", "false");
81 | attributes.addAttribute("", "isAbstract", "", "", "false");
82 | return attributes;
83 | }
84 | }
85 |
--------------------------------------------------------------------------------
/src/edu/ua/node/StereotypeRefNode.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2016, Aziz Nanthaamornphong and Anawat Leathongkum
3 |
4 | Redistribution and use in source and binary forms, with or without modification, are
5 | permitted provided that the following conditions are met:
6 |
7 | 1. Redistributions of source code must retain the above copyright notice, this list of
8 | conditions and the following disclaimer.
9 |
10 | 2. Redistributions in binary form must reproduce the above copyright notice, this list of
11 | conditions and the following disclaimer in the documentation and/or other materials
12 | provided with the distribution.
13 |
14 | 3. Neither the names of the copyright holders nor the names of its contributors may be
15 | used to endorse or promote products derived from this software without specific prior
16 | written permission.
17 |
18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
19 | EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
20 | OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
21 | IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
22 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
24 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
26 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
27 | EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 | */
29 |
30 | package edu.ua.node;
31 |
32 | import java.util.ArrayList;
33 | import java.util.List;
34 | import org.xml.sax.Attributes;
35 | import org.xml.sax.helpers.AttributesImpl;
36 |
37 |
38 | public class StereotypeRefNode extends UMLNode{
39 |
40 |
41 | private List nodes = new ArrayList();
42 | private String id = "";
43 |
44 | public String getId() {
45 | return id;
46 | }
47 |
48 | public void setId(String id) {
49 | this.id = id;
50 | }
51 |
52 | @Override
53 | public String getName() {
54 | return "UML:Stereotype";
55 | }
56 |
57 | @Override
58 | public List getChildren() {
59 | return nodes;
60 | }
61 |
62 | @Override
63 | public int getChildCount() {
64 | return nodes.size();
65 | }
66 |
67 | @Override
68 | public Attributes getAttributes() {
69 | AttributesImpl attributes = new AttributesImpl();
70 | attributes.addAttribute("", "xmi.idref", "", "", id);
71 | return attributes;
72 | }
73 |
74 | }
75 |
--------------------------------------------------------------------------------
/src/edu/ua/node/StructuralFeatureMultiNode.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2016, Aziz Nanthaamornphong and Anawat Leathongkum
3 |
4 | Redistribution and use in source and binary forms, with or without modification, are
5 | permitted provided that the following conditions are met:
6 |
7 | 1. Redistributions of source code must retain the above copyright notice, this list of
8 | conditions and the following disclaimer.
9 |
10 | 2. Redistributions in binary form must reproduce the above copyright notice, this list of
11 | conditions and the following disclaimer in the documentation and/or other materials
12 | provided with the distribution.
13 |
14 | 3. Neither the names of the copyright holders nor the names of its contributors may be
15 | used to endorse or promote products derived from this software without specific prior
16 | written permission.
17 |
18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
19 | EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
20 | OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
21 | IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
22 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
24 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
26 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
27 | EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 | */
29 | package edu.ua.node;
30 |
31 | import java.util.ArrayList;
32 | import java.util.List;
33 | import org.xml.sax.Attributes;
34 | import org.xml.sax.helpers.AttributesImpl;
35 |
36 | public class StructuralFeatureMultiNode extends UMLNode {
37 |
38 | private List nodes = new ArrayList();
39 |
40 | public void addNode(UMLNode node) {
41 | nodes.add(node);
42 | }
43 |
44 | @Override
45 | public String getName() {
46 | return "UML:StructuralFeature.multiplicity";
47 | }
48 |
49 | @Override
50 | public List getChildren() {
51 | return nodes;
52 | }
53 |
54 | @Override
55 | public int getChildCount() {
56 | return nodes.size();
57 | }
58 |
59 | @Override
60 | public Attributes getAttributes() {
61 | AttributesImpl attributes = new AttributesImpl();
62 | return attributes;
63 | }
64 | }
65 |
--------------------------------------------------------------------------------
/src/edu/ua/node/StructuralFeatureTypeNode.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2016, Aziz Nanthaamornphong and Anawat Leathongkum
3 |
4 | Redistribution and use in source and binary forms, with or without modification, are
5 | permitted provided that the following conditions are met:
6 |
7 | 1. Redistributions of source code must retain the above copyright notice, this list of
8 | conditions and the following disclaimer.
9 |
10 | 2. Redistributions in binary form must reproduce the above copyright notice, this list of
11 | conditions and the following disclaimer in the documentation and/or other materials
12 | provided with the distribution.
13 |
14 | 3. Neither the names of the copyright holders nor the names of its contributors may be
15 | used to endorse or promote products derived from this software without specific prior
16 | written permission.
17 |
18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
19 | EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
20 | OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
21 | IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
22 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
24 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
26 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
27 | EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 | */
29 | package edu.ua.node;
30 |
31 | import java.util.ArrayList;
32 | import java.util.List;
33 | import org.xml.sax.helpers.AttributesImpl;
34 |
35 | public class StructuralFeatureTypeNode extends UMLNode {
36 |
37 | private List nodes = new ArrayList();
38 |
39 | public void addNode(UMLNode node) {
40 | nodes.add(node);
41 | }
42 |
43 | @Override
44 | public String getName() {
45 | return "UML:StructuralFeature.type";
46 | }
47 |
48 | @Override
49 | public List getChildren() {
50 | return nodes;
51 | }
52 |
53 | @Override
54 | public int getChildCount() {
55 | return nodes.size();
56 | }
57 |
58 | @Override
59 | public org.xml.sax.Attributes getAttributes() {
60 | AttributesImpl attributes = new AttributesImpl();
61 | return attributes;
62 | }
63 | }
64 |
--------------------------------------------------------------------------------
/src/edu/ua/node/SubroutineNode.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2016, Aziz Nanthaamornphong and Anawat Leathongkum
3 |
4 | Redistribution and use in source and binary forms, with or without modification, are
5 | permitted provided that the following conditions are met:
6 |
7 | 1. Redistributions of source code must retain the above copyright notice, this list of
8 | conditions and the following disclaimer.
9 |
10 | 2. Redistributions in binary form must reproduce the above copyright notice, this list of
11 | conditions and the following disclaimer in the documentation and/or other materials
12 | provided with the distribution.
13 |
14 | 3. Neither the names of the copyright holders nor the names of its contributors may be
15 | used to endorse or promote products derived from this software without specific prior
16 | written permission.
17 |
18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
19 | EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
20 | OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
21 | IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
22 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
24 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
26 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
27 | EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 | */
29 | package edu.ua.node;
30 |
31 | import java.util.ArrayList;
32 | import java.util.List;
33 | import org.xml.sax.Attributes;
34 | import org.xml.sax.helpers.AttributesImpl;
35 |
36 | public class SubroutineNode extends UMLNode {
37 |
38 | private String name = "";
39 | private String visibility = "public";
40 | private List parameters = new ArrayList();
41 |
42 | public void setName(String name) {
43 | this.name = name;
44 | }
45 |
46 | public void addParameters(UMLNode node) {
47 | parameters.add(node);
48 | }
49 |
50 | @Override
51 | public String getName() {
52 | return "UML:Operation";
53 | }
54 |
55 | @Override
56 | public List getChildren() {
57 | return parameters;
58 | }
59 |
60 | @Override
61 | public int getChildCount() {
62 | return parameters.size();
63 | }
64 |
65 | @Override
66 | public Attributes getAttributes() {
67 | AttributesImpl attributes = new AttributesImpl();
68 | attributes.addAttribute("", "name", "", "", this.name);
69 | attributes.addAttribute("", "type", "", "", "void");
70 | attributes.addAttribute("", "visibility", "", "", this.visibility);
71 | attributes.addAttribute("", "isSpecification", "", "", "false");
72 | attributes.addAttribute("", "ownerScoep", "", "", "instance");
73 | attributes.addAttribute("", "isQuery", "", "", "false");
74 | attributes.addAttribute("", "concurency", "", "", "sequential");
75 | attributes.addAttribute("", "isRoot", "", "", "false");
76 | attributes.addAttribute("", "isLeaf", "", "", "false");
77 | attributes.addAttribute("", "isAbstract", "", "", "false");
78 | return attributes;
79 | }
80 | }
81 |
--------------------------------------------------------------------------------
/src/edu/ua/node/UMLNode.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2016, Aziz Nanthaamornphong and Anawat Leathongkum
3 |
4 | Redistribution and use in source and binary forms, with or without modification, are
5 | permitted provided that the following conditions are met:
6 |
7 | 1. Redistributions of source code must retain the above copyright notice, this list of
8 | conditions and the following disclaimer.
9 |
10 | 2. Redistributions in binary form must reproduce the above copyright notice, this list of
11 | conditions and the following disclaimer in the documentation and/or other materials
12 | provided with the distribution.
13 |
14 | 3. Neither the names of the copyright holders nor the names of its contributors may be
15 | used to endorse or promote products derived from this software without specific prior
16 | written permission.
17 |
18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
19 | EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
20 | OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
21 | IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
22 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
24 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
26 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
27 | EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 | */
29 | package edu.ua.node;
30 |
31 | import java.util.List;
32 | import org.xml.sax.Attributes;
33 |
34 |
35 | public abstract class UMLNode {
36 |
37 | public abstract String getName();
38 |
39 | public abstract List getChildren();
40 |
41 | public abstract int getChildCount();
42 |
43 | public String getText() {
44 | return null;
45 | }
46 |
47 | public abstract Attributes getAttributes();
48 | }
49 |
--------------------------------------------------------------------------------
/src/edu/ua/util/DataWriter.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2016, Aziz Nanthaamornphong and Anawat Leathongkum
3 |
4 | Redistribution and use in source and binary forms, with or without modification, are
5 | permitted provided that the following conditions are met:
6 |
7 | 1. Redistributions of source code must retain the above copyright notice, this list of
8 | conditions and the following disclaimer.
9 |
10 | 2. Redistributions in binary form must reproduce the above copyright notice, this list of
11 | conditions and the following disclaimer in the documentation and/or other materials
12 | provided with the distribution.
13 |
14 | 3. Neither the names of the copyright holders nor the names of its contributors may be
15 | used to endorse or promote products derived from this software without specific prior
16 | written permission.
17 |
18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
19 | EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
20 | OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
21 | IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
22 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
24 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
26 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
27 | EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 | */
29 | package edu.ua.util;
30 |
31 | import java.io.Writer;
32 | import java.util.Stack;
33 |
34 | import org.xml.sax.Attributes;
35 | import org.xml.sax.SAXException;
36 | import org.xml.sax.XMLReader;
37 |
38 |
39 | public class DataWriter extends XMLWriter {
40 |
41 | private final static Object SEEN_NOTHING = new Object();
42 | private final static Object SEEN_ELEMENT = new Object();
43 | private final static Object SEEN_DATA = new Object();
44 |
45 | // Internal state.
46 | private Object state = SEEN_NOTHING;
47 | private Stack