ontomde-demo-struts 1.0.6

Sign up to get free protection for your applications and to get access to all the features.
data/History.txt ADDED
@@ -0,0 +1,2 @@
1
+ # 2008
2
+ initial publication
data/Manifest.txt ADDED
@@ -0,0 +1,33 @@
1
+ bin/ontomde-demo-struts-install
2
+ demo/1-unpack.bat
3
+ demo/1-unpack.sh
4
+ demo/2-generate.bat
5
+ demo/2-generate.sh
6
+ demo/3-start-webapp.bat
7
+ demo/3-start-webapp.sh
8
+ demo/domain/pom.xml
9
+ demo/mda/clean-generated.sh
10
+ demo/mda/pom.xml
11
+ demo/mda/src/main/mda/customDataTypes.rb
12
+ demo/mda/src/main/mda/dbDiscriminatorCache.rb
13
+ demo/mda/src/main/mda/javaMapping.rb-notused
14
+ demo/mda/src/main/mda/mda.rb
15
+ demo/mda/src/main/model/.project
16
+ demo/mda/src/main/model/model.emx
17
+ demo/mda/src/main/model/model.emx.nt
18
+ demo/mda/src/main/model/model.emx.nt_kb.pprj
19
+ demo/mda/src/main/model/model.emx.nt_kb.rdf
20
+ demo/mda/src/main/model/model.emx.nt_kb.rdfs
21
+ demo/mda/src/main/model-oe6/Big_Furniture_Shop.ofp
22
+ demo/mda/src/main/model-oe6/model.emx.nt
23
+ demo/mda/src/main/model-oe6/README.txt
24
+ demo/mda/src/main/profil-uml/.project
25
+ demo/mda/src/main/profil-uml/OntoMDE-profil.epx
26
+ demo/mda/src/main/resources/formatter.properties
27
+ demo/pom.xml
28
+ demo/webapp/pom.xml
29
+ History.txt
30
+ lib/ontomde-demo-struts.rb
31
+ Manifest.txt
32
+ Rakefile
33
+ README.txt
data/README.txt ADDED
@@ -0,0 +1,79 @@
1
+ ontomde-demo-acegi
2
+ by stephane (pierre) Carrie
3
+ http://ontomde.rubyforge.org/
4
+
5
+ == DESCRIPTION:
6
+
7
+ This is a demonstration project for our acegi integration
8
+
9
+ == FEATURES:
10
+
11
+ Generates a webapp with built in security:
12
+ * Authentification
13
+ * Access rights based on declared groups and roles.
14
+ * Access rights based on runtime rules.
15
+
16
+ Security provided by this demonstration is fully customisable.
17
+
18
+ == SYNOPSIS:
19
+ === INSTALLATION:
20
+ 1) download and install a ruby distribution (>=1.8.6)
21
+ ( http://rubyforge.org/frs/?group_id=167&release_id=17128 )
22
+ 2) update ruby plateform
23
+ $ set HTTP_PROXY=http://yourproxy:yourport (in case you need one)
24
+ $ gem update --system
25
+ 3) install ontomde
26
+ $ set HTTP_PROXY=http://yourproxy:yourport (in case you need one)
27
+ $ gem install ontomde
28
+
29
+ === RUN DEMONSTRATION:
30
+
31
+ unpack webapp ressources:
32
+ $ 1-unpack.bat (or .sh under cygwin or linux)
33
+
34
+ generate source code from UML model in mda/src/main/model
35
+ $ 2-generate.bat
36
+
37
+ Start webapp with security disabled (to setup an admin users)
38
+ $ 3-start-webapp-nosecurity.bat
39
+
40
+ Start webapp with security enabled
41
+ $ 4-start-webapp.bat
42
+
43
+ === Create your own uml model
44
+ This is modeler dependent. Please refer to the section that applies:
45
+
46
+ ====CREATE YOUR OWN UML MODEL (Objecteering users)
47
+ 1) download and install export plugin for objecteering on ontomde.rubyforge.org
48
+ 2) create a ontomde workproduct at the root of your project
49
+ 3) select src/main/model/model.emx.nt as target for your workproduct.
50
+ 4) run generate on your workproduct.
51
+ (this will update model.emx.nt file)
52
+ 5) generate & compile project using initial method.
53
+
54
+ ====CREATE YOUR OWN UML MODEL (Sparx system, XMI)
55
+ --> This featured is planned for Q2-2008
56
+ 1) export your project as self-containted XMI export file
57
+
58
+ == LICENSE:
59
+
60
+ Copyright (C) 2008 Orange-labs
61
+ 38 rue General Leclerc
62
+ 92130 ISSY LES MOULINEAUX, France
63
+
64
+ This program is free software: you can redistribute it and/or modify
65
+ it under the terms of the GNU Affero General Public License as
66
+ published by the Free Software Foundation, either version 3 of the
67
+ License, or (at your option) any later version.
68
+
69
+ This program is distributed in the hope that it will be useful,
70
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
71
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
72
+ GNU Affero General Public License for more details.
73
+
74
+ You should have received a copy of the GNU Affero General Public License
75
+ along with this program. If not, see http://www.gnu.org/licenses/.
76
+
77
+
78
+
79
+
data/Rakefile ADDED
@@ -0,0 +1,22 @@
1
+ # -*- ruby -*-
2
+
3
+ require 'rubygems'
4
+ require 'ontomde-hoe'
5
+ require '../ontomde-core/lib/ontomde-core/version.rb'
6
+
7
+
8
+ OntomdeHoe.new('ontomde-demo-struts', Ontomde::Core::VERSION) do |p|
9
+ p.need_zip=true
10
+ p.rubyforge_name = 'ontomde'
11
+ p.author = 'Stephane (Pierre) Carrie'
12
+ p.email = 'stephanepierre.carrie@orange-ftgroup.com'
13
+ p.summary = 'Ontomde demonstration for struts module'
14
+ p.description = p.paragraphs_of('README.txt', 2..5).join("\n\n")
15
+ p.url="http://ontomde.rubyforge.org"
16
+ p.changes = p.paragraphs_of('History.txt', 0..1).join("\n\n")
17
+ p.spec_extras[:required_ruby_version] = '>= 1.8.4'
18
+ p.extra_deps=[ ['ontomde-redland-win','= 1.0.3'] ]
19
+ p.spec_extras={ :required_ruby_version => '>=1.8.6',:required_rubygems_version => '>=1.0.0' }
20
+ end
21
+
22
+ # vim: syntax=Ruby
@@ -0,0 +1,11 @@
1
+ #!/usr/bin/env ruby
2
+
3
+
4
+ require 'ontomde-core/demoInstaller.rb'
5
+ include DemoInstaller
6
+
7
+ # install demo by infering demo name
8
+ # and demo location from script name and location.
9
+ installDefaultDemo(__FILE__)
10
+
11
+
data/demo/1-unpack.bat ADDED
@@ -0,0 +1,6 @@
1
+ @echo off
2
+
3
+
4
+ cd webapp
5
+ call mvn dependency:unpack
6
+ cd ..
data/demo/1-unpack.sh ADDED
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env bash
2
+
3
+ cd webapp
4
+ mvn dependency:unpack
5
+
@@ -0,0 +1,4 @@
1
+ REM generate and compile application
2
+ @echo off
3
+ mvn clean install
4
+
@@ -0,0 +1,5 @@
1
+ #!/bin/bash
2
+ # generate and compile application
3
+
4
+ mvn clean install
5
+
@@ -0,0 +1,7 @@
1
+ @echo off
2
+
3
+ REM setup variable if your model contains graphviz graphs
4
+ REM set GRAPHVIZ_HOME='C:\opt\Graphviz'
5
+
6
+ cd webapp
7
+ mvn jetty:run-exploded
@@ -0,0 +1,4 @@
1
+ #!/bin/bash
2
+
3
+ cd webapp
4
+ mvn jetty:run-exploded
@@ -0,0 +1,61 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project xmlns="http://maven.apache.org/POM/4.0.0"
3
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
5
+ <parent>
6
+ <artifactId>projectbase</artifactId>
7
+ <groupId>ontomde.sample</groupId>
8
+ <version>1.0-SNAPSHOT</version>
9
+ </parent>
10
+ <modelVersion>4.0.0</modelVersion>
11
+ <artifactId>domain</artifactId>
12
+ <packaging>jar</packaging>
13
+ <name>domain</name>
14
+ <build>
15
+ <defaultGoal>package</defaultGoal>
16
+ <finalName>${pom.artifactId}</finalName>
17
+
18
+ <plugins>
19
+ <plugin>
20
+ <artifactId>maven-jar-plugin</artifactId>
21
+ <configuration>
22
+ <archive>
23
+ <addMavenDescriptor>false</addMavenDescriptor>
24
+ <manifest>
25
+ <addClasspath>true</addClasspath>
26
+ </manifest>
27
+ </archive>
28
+ </configuration>
29
+ </plugin>
30
+
31
+ </plugins>
32
+ </build>
33
+ <dependencies>
34
+
35
+ <dependency>
36
+ <groupId>net.sourceforge.ontomde</groupId>
37
+ <artifactId>ontomde-jpa</artifactId>
38
+ <version>${ontomde.lib.version}</version>
39
+ </dependency>
40
+
41
+ <dependency>
42
+ <groupId>net.sourceforge.ontomde</groupId>
43
+ <artifactId>ontomde-bpm-client</artifactId>
44
+ <version>${ontomde.lib.version}</version>
45
+ </dependency>
46
+
47
+ <dependency>
48
+ <groupId>javax.persistence</groupId>
49
+ <artifactId>persistence-api</artifactId>
50
+ <version>1.0</version>
51
+ </dependency>
52
+
53
+ <dependency>
54
+ <groupId>log4j</groupId>
55
+ <artifactId>log4j</artifactId>
56
+ <version>1.2.12</version>
57
+ </dependency>
58
+
59
+ </dependencies>
60
+ </project>
61
+
@@ -0,0 +1,24 @@
1
+ #!/bin/bash
2
+
3
+ cd `dirname $0`
4
+
5
+ D="`date +%Y-%m-%d-%H-%M`"
6
+ Z="deleted-$D.zip"
7
+ T="$D.timestamp"
8
+ L="$D.TOBEDELETED"
9
+
10
+ find ../domain/src -path '*/.svn/*' -prune \
11
+ -or \( -type d -not -path '*/.svn/*' -empty -delete \) \
12
+ -or -name "*.java" -exec grep --silent XMDA_BEGIN_reverse {} \; \( -exec grep --silent XMDA_BEGIN_reverse=\"yes\" {} \; -exec echo KEEP : {} \; \
13
+ -or -exec echo DELETE: {} \; \) | tee $L | grep -v DELETE
14
+
15
+ find ../webapp/src -path '*/.svn/*' -prune \
16
+ -or \( -type d -not -path '*/.svn/*' -empty -delete \) \
17
+ -or -name "*.java" -exec grep --silent XMDA_BEGIN_reverse {} \; \( -exec grep --silent XMDA_BEGIN_reverse=\"yes\" {} \; -exec echo KEEP : {} \; \
18
+ -or -exec echo DELETE: {} \; \) | tee $L | grep -v DELETE
19
+
20
+ #empty directory are removed by zip
21
+ cat $L | sed 's/^DELETE: *//g' | zip -m $Z -@
22
+ rm $L
23
+
24
+ echo "deleted file have been moved to $Z"
data/demo/mda/pom.xml ADDED
@@ -0,0 +1,178 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project xmlns="http://maven.apache.org/POM/4.0.0"
3
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
5
+ <parent>
6
+ <artifactId>projectbase</artifactId>
7
+ <groupId>ontomde.sample</groupId>
8
+ <version>1.0-SNAPSHOT</version>
9
+ </parent>
10
+ <modelVersion>4.0.0</modelVersion>
11
+ <artifactId>mda</artifactId>
12
+ <packaging>pom</packaging>
13
+ <name>Model</name>
14
+
15
+ <build>
16
+ <defaultGoal>process-sources</defaultGoal>
17
+ <plugins>
18
+ <plugin>
19
+ <artifactId>maven-antrun-plugin</artifactId>
20
+ <executions>
21
+ <execution>
22
+ <id>generate-sources</id>
23
+ <phase>generate-sources</phase>
24
+ <goals>
25
+ <goal>run</goal>
26
+ </goals>
27
+ <configuration>
28
+ <tasks>
29
+ <echo>
30
+ -------- Ontomde Library
31
+ Version lib=${ontomde.lib.version} --------
32
+ </echo>
33
+ <echo>
34
+ - Generate Protege Data Files -
35
+ </echo>
36
+
37
+ <exec
38
+ executable="ontomde-umlToProtege${ontomde.extension}"
39
+ failonerror="true">
40
+ <arg value="${ontomde.generator.version.underscore}" />
41
+ <arg value="--nt" />
42
+ <arg
43
+ value="${basedir}/src/main/model/model.emx.nt" />
44
+ </exec>
45
+ <exec
46
+ executable="ontomde-java${ontomde.extension}"
47
+ failonerror="true">
48
+ <arg value="${ontomde.generator.version.underscore}" />
49
+ <arg value="--no-verbose" />
50
+ <arg value="-m" />
51
+ <arg value="jpa" />
52
+ <arg value="--ddl_mode" />
53
+ <!-- database will be created every time -->
54
+ <arg value="create" />
55
+ <!-- update -->
56
+ <!-- unzip is not available (manual unzip required) -->
57
+ <arg value="--useUnzip" />
58
+ <!-- a default implementation will be generate for every method when possible -->
59
+ <arg
60
+ value="--simulateNotImplementedMethods" />
61
+ <arg
62
+ value="--withAutoImplementProperty" />
63
+ <arg
64
+ value="--withAutoImplementOperation" />
65
+ <!-- deactivate enum as string -->
66
+ <arg value="--no-withEnumAsString" />
67
+ <!-- use uml datatype to java type mapping -->
68
+ <arg value="--load" />
69
+ <arg value="src/main/mda/mda.rb" />
70
+ <!-- run generator internal checks -->
71
+ <arg value="--message-check" />
72
+ <!-- use uml model source -->
73
+ <arg value="--nt" />
74
+ <arg
75
+ value="src/main/model/model.emx.nt" />
76
+ <!-- generate application in target directory -->
77
+ <arg value="--targetDir" />
78
+ <arg
79
+ value="${basedir}${file.separator}..${file.separator}" />
80
+ <arg
81
+ value="--webContentRelativeDir" />
82
+ <arg value="webapp/src/main/webapp" />
83
+ <arg value="--javaRelativeDir" />
84
+ <arg value="domain/src/main/java/" />
85
+ <arg value="--jpaConfigDir" />
86
+ <arg
87
+ value="domain/src/main/resources" />
88
+ <arg value="--webResourcesDir" />
89
+ <arg
90
+ value="webapp/src/main/resources/" />
91
+ <arg value="--javaFilePathRegexp" />
92
+ <arg
93
+ value="\-disabled-.methods\.@webapp/src/main/java/" />
94
+ <arg value="--javaFilePathRegexp" />
95
+ <arg
96
+ value="\.struts\.@webapp/src/main/java/" />
97
+
98
+ <arg value="--no-logFileWrite" />
99
+ <arg value="--dbTypeDiscriminator" />
100
+ <arg value="int" />
101
+ <arg value="--load" />
102
+ <arg
103
+ value="src/main/mda/dbDiscriminatorCache.rb" />
104
+ <arg value="--load"/>
105
+ <arg value="src/main/mda/customDataTypes.rb"/>
106
+ <arg
107
+ value="--dbDiscriminatorCacheRelFile" />
108
+ <arg
109
+ value="src/main/mda/dbDiscriminatorCache.rb" />
110
+ <arg
111
+ value="--no-generateAntBuildFile" />
112
+ <arg value="--struts" />
113
+ <arg
114
+ value="--no-generateXMLStrutsForm" />
115
+ <arg value="--backTrace" />
116
+ <arg value="--testDataRDF" />
117
+ <arg value="src/main/model/model.emx.nt_kb.rdf" />
118
+ <!-- url should be changed url as desired -->
119
+ <arg value="--rsm6WebDocURI"/> <arg value="../umldoc/"/>
120
+ </exec>
121
+
122
+ <!--
123
+ <copy
124
+ todir="../webapp/src/main/webapp">
125
+ <fileset
126
+ dir="../${ontomde.home}/shared/JavaProject-WebContent" />
127
+ </copy>
128
+ <copy
129
+ todir="../webapp/src/main/webapp/WEB-INF">
130
+ <fileset
131
+ dir="../${ontomde.home}/shared/JavaProject-WEB-INF" />
132
+ </copy>
133
+ <copy
134
+ file="../${ontomde.home}/shared/JavaProject-java/displayTag.properties"
135
+ todir="../webapp/src/main/resources">
136
+ </copy>
137
+ <copy
138
+ file="../${ontomde.home}/shared/JavaProject-java/contextConfigDerby.properties-sample"
139
+ tofile="../webapp/src/main/resources/contextConfigDerby.properties" />
140
+ -->
141
+ </tasks>
142
+ </configuration>
143
+ </execution>
144
+
145
+ </executions>
146
+ </plugin>
147
+ <!--
148
+ <plugin>
149
+ <groupId>ontomde</groupId>
150
+ <artifactId>formatter-maven-plugin</artifactId>
151
+ <configuration>
152
+ <formatterConfigFile>${basedir}\src\main\resources\formatter.properties</formatterConfigFile>
153
+ <javaDirs>
154
+ <javaDir>${basedir}\..\domain\src\main\java</javaDir>
155
+ <javaDir>${basedir}\..\webapp\src\main\java</javaDir>
156
+ </javaDirs>
157
+ </configuration>
158
+ <executions>
159
+ <execution>
160
+ <id>format-sources</id>
161
+ <phase>process-sources</phase>
162
+ <goals>
163
+ <goal>formatter</goal>
164
+ </goals>
165
+ </execution>
166
+
167
+ </executions>
168
+ </plugin>
169
+ -->
170
+
171
+ </plugins>
172
+ </build>
173
+
174
+ <properties>
175
+
176
+ </properties>
177
+ </project>
178
+