From 62cea6ec3c5899b3f6018144c9298bb3385e5eb2 Mon Sep 17 00:00:00 2001 From: rkv Date: Mon, 1 Oct 2012 12:01:51 +0000 Subject: [PATCH] Refactoring: configuration files are moved into Siman web project. --- Workspace/Siman-Common/src/hibernate.cfg.xml | 55 ---------------- .../src/org/splat/kernel/GenericEnumType.java | 4 +- .../src/org/splat/kernel/Text.hbm.xml | 22 ------- .../src/org/splat/kernel/Text.java | 43 ------------ .../src/org/splat/kernel/TextAttribute.java | 6 -- .../src/org/splat/som/CommentAttribute.java | 1 - .../org/splat/som/DescriptionAttribute.java | 1 - Workspace/Siman-Common/src/som.properties | 64 ------------------ Workspace/Siman-Common/src/som_en.properties | 65 ------------------- Workspace/Siman/.classpath | 2 +- Workspace/Siman/WebContent/conf/som.xml | 2 +- Workspace/Siman/conf/debug.properties | 6 +- .../Siman/conf/generated/release/.cvsignore | 3 +- Workspace/Siman/conf/release.properties | 6 ++ .../Siman/conf/templates/hibernate.cfg.xml | 6 +- .../Siman/conf/templates/siman.properties | 12 ++++ .../src/cast3m.som.xml | 0 .../src/log4j.properties | 0 Workspace/{Siman-Common => Siman}/src/som.xml | 2 +- .../{Siman-Common => Siman}/src/study.xml | 0 .../{Siman-Common => Siman}/src/users.xml | 0 21 files changed, 34 insertions(+), 266 deletions(-) delete mode 100644 Workspace/Siman-Common/src/hibernate.cfg.xml delete mode 100644 Workspace/Siman-Common/src/org/splat/kernel/Text.hbm.xml delete mode 100644 Workspace/Siman-Common/src/org/splat/kernel/Text.java delete mode 100644 Workspace/Siman-Common/src/som.properties delete mode 100644 Workspace/Siman-Common/src/som_en.properties create mode 100644 Workspace/Siman/conf/templates/siman.properties rename Workspace/{Siman-Common => Siman}/src/cast3m.som.xml (100%) rename Workspace/{Siman-Common => Siman}/src/log4j.properties (100%) rename Workspace/{Siman-Common => Siman}/src/som.xml (99%) rename Workspace/{Siman-Common => Siman}/src/study.xml (100%) rename Workspace/{Siman-Common => Siman}/src/users.xml (100%) diff --git a/Workspace/Siman-Common/src/hibernate.cfg.xml b/Workspace/Siman-Common/src/hibernate.cfg.xml deleted file mode 100644 index b873f56..0000000 --- a/Workspace/Siman-Common/src/hibernate.cfg.xml +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - - - com.mysql.jdbc.Driver - jdbc:mysql://localhost/simer - simer - admin - - - 1 - org.hibernate.transaction.JDBCTransactionFactory - - - org.hibernate.dialect.MySQLDialect - - - thread - - - false - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Workspace/Siman-Common/src/org/splat/kernel/GenericEnumType.java b/Workspace/Siman-Common/src/org/splat/kernel/GenericEnumType.java index 1c02adb..365a39d 100644 --- a/Workspace/Siman-Common/src/org/splat/kernel/GenericEnumType.java +++ b/Workspace/Siman-Common/src/org/splat/kernel/GenericEnumType.java @@ -76,7 +76,7 @@ public class GenericEnumType implements EnhancedUserType, ParameterizedType { public void nullSafeSet (PreparedStatement st, Object value, int index) throws HibernateException, SQLException { // ----------------------------------------------------------------------- if (value==null) { - st.setNull(index, Types.CHAR); + st.setNull(index, Types.VARCHAR); } else { st.setString( index, ( (Enum) value ).name() ); @@ -96,7 +96,7 @@ public class GenericEnumType implements EnhancedUserType, ParameterizedType { public int[] sqlTypes () { // ------------------------ - return new int[] { Types.CHAR }; + return new int[] { Types.VARCHAR }; } @SuppressWarnings("unchecked") diff --git a/Workspace/Siman-Common/src/org/splat/kernel/Text.hbm.xml b/Workspace/Siman-Common/src/org/splat/kernel/Text.hbm.xml deleted file mode 100644 index b0b405b..0000000 --- a/Workspace/Siman-Common/src/org/splat/kernel/Text.hbm.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Workspace/Siman-Common/src/org/splat/kernel/Text.java b/Workspace/Siman-Common/src/org/splat/kernel/Text.java deleted file mode 100644 index 5410ac0..0000000 --- a/Workspace/Siman-Common/src/org/splat/kernel/Text.java +++ /dev/null @@ -1,43 +0,0 @@ -package org.splat.kernel; -/** - * Class implementing Hibernate-based persistent Java String. - * - * @author Daniel Brunier-Coulin - * @copyright OPEN CASCADE 2012 - */ - -import org.splat.som.Database; - - -public class Text extends Persistent { - - private String value; - -// ============================================================================================================================== -// Constructors -// ============================================================================================================================== - -// Database fetch constructor. - protected Text () { - } -// Initialization constructor - public Text (String value) { -// -------------------------- - this.value = value; - } - -// ============================================================================================================================== -// Public member functions -// ============================================================================================================================== - - public String getValue () { -// ------------------------- - return value; - } - - public void setValue (String value) { -// ----------------------------------- - this.value = value; -//RKV if (this.isSaved()) Database.getSession().update(this); - } -} \ No newline at end of file diff --git a/Workspace/Siman-Common/src/org/splat/kernel/TextAttribute.java b/Workspace/Siman-Common/src/org/splat/kernel/TextAttribute.java index 5de4bf9..fb8d677 100644 --- a/Workspace/Siman-Common/src/org/splat/kernel/TextAttribute.java +++ b/Workspace/Siman-Common/src/org/splat/kernel/TextAttribute.java @@ -18,12 +18,6 @@ public abstract class TextAttribute extends Attribute { // Database fetch constructor. protected TextAttribute () { } -// Initialization constructor - protected TextAttribute (Any from, Text value) { -// ---------------------------------------------- - super(from); -// mytext = value; - } // Initialization constructor protected TextAttribute (Any from, String value) { diff --git a/Workspace/Siman-Common/src/org/splat/som/CommentAttribute.java b/Workspace/Siman-Common/src/org/splat/som/CommentAttribute.java index 942c721..5dcc580 100644 --- a/Workspace/Siman-Common/src/org/splat/som/CommentAttribute.java +++ b/Workspace/Siman-Common/src/org/splat/som/CommentAttribute.java @@ -7,7 +7,6 @@ package org.splat.som; * @copyright OPEN CASCADE 2012 */ -import org.splat.kernel.Text; import org.splat.kernel.TextAttribute; diff --git a/Workspace/Siman-Common/src/org/splat/som/DescriptionAttribute.java b/Workspace/Siman-Common/src/org/splat/som/DescriptionAttribute.java index 9ca56d9..9369f2c 100644 --- a/Workspace/Siman-Common/src/org/splat/som/DescriptionAttribute.java +++ b/Workspace/Siman-Common/src/org/splat/som/DescriptionAttribute.java @@ -7,7 +7,6 @@ package org.splat.som; * @copyright OPEN CASCADE 2012 */ -import org.splat.kernel.Text; import org.splat.kernel.TextAttribute; diff --git a/Workspace/Siman-Common/src/som.properties b/Workspace/Siman-Common/src/som.properties deleted file mode 100644 index 11e83af..0000000 --- a/Workspace/Siman-Common/src/som.properties +++ /dev/null @@ -1,64 +0,0 @@ -name.module = Centre d''études - -size.format = #,##0 Ko -date.format = dd/MM/yyyy -dd/MM/yyyy = jj/mm/aaaa - -menu.step.1 = Spécifier l''étude -menu.step.2 = Concevoir le scénario -menu.step.3 = Créer la géométrie -menu.step.4 = Générer le modèle d''analyse -menu.step.5 = Entrer les conditions de calcul -menu.step.6 = Effectuer le calcul -menu.step.7 = Analyser les résultats -menu.step.8 = Capitaliser ce cas d''étude -menu.step.9 = Finaliser l''étude - -folder.step.1 = Spécification de l''étude -folder.step.2 = Description du scénario -folder.step.3 = Géométrie -folder.step.4 = Modèle d''analyse -folder.step.5 = Conditions de calcul -folder.step.6 = Schéma de calcul -folder.step.7 = Résultats -folder.step.8 = Élements de connaissances -folder.step.9 = Rapport final - -type.document.requirements = Cahier des charges -type.document.specification = Document de spécification -type.document.design = Document de conception -type.document.geometry = Géométrie -type.document.model = Modèle d''analyse -type.document.loads = Conditions de calcul -type.document.script = Script d''exécution -type.document.log = Log d''exécution -type.document.results = Résultats de calcul -type.document.report = Rapport final -type.document.memorandum = Note technique -type.document.minutes = Compte rendu - -type.context.customer = Client -type.context.product = Produit -type.context.phase = Phase du produit -type.context.need = Besoin client -type.context.purpose = Finalité de l''étude -type.context.physic = Type de physique -type.context.object = Objet étudié -type.context.part = Objet modélisé -type.context.geometry = Type de géométrie -type.context.model = Type de modèle -type.context.element = Type d''éléments -type.context.shape = Géométrie des éléments -type.context.order = Degré des éléments -type.context.analysis = Type d''analyse -type.context.platform = Plate-forme logicielle -type.context.module = Module de calcul -type.context.component = Brique technologique - -type.knowledge.bestpractice = Bonne pratique -type.knowledge.limitation = Limitation -type.knowledge.inconsistency = Incohérence -type.knowledge.metrics = Métrique -type.knowledge.improvement = Amélioration - -history.creation = Document créé par \ No newline at end of file diff --git a/Workspace/Siman-Common/src/som_en.properties b/Workspace/Siman-Common/src/som_en.properties deleted file mode 100644 index 8a16f83..0000000 --- a/Workspace/Siman-Common/src/som_en.properties +++ /dev/null @@ -1,65 +0,0 @@ -name.module = Study Manager - -size.format = #,##0 Kb -date.format = MM.dd.yyyy -MM.dd.yyyy = mm.dd.yyyy - -menu.step.1 = Specify the study -menu.step.2 = Design the scenario -menu.step.3 = Create the geometry -menu.step.4 = Generate the analysis model -menu.step.5 = Enter the boundary conditions -menu.step.6 = Execute the calculation -menu.step.7 = Analyze the results -menu.step.8 = Capitalize this use-case -menu.step.9 = Finalize the study - -folder.step.1 = Specification of the study -folder.step.2 = Description of the scenario -folder.step.3 = Geometry -folder.step.4 = Analysis model -folder.step.5 = Boundary conditions -folder.step.6 = Calculation scheme -folder.step.7 = Calculation results -folder.step.8 = Knowledge elements -folder.step.9 = Final report - -type.document.requirements = Customer requirements -type.document.specification = Specification document -type.document.design = Design document -type.document.geometry = Geometry -type.document.model = Analysis model -type.document.loads = Boundary conditions -type.document.script = Execution script -type.document.log = Execution log -type.document.results = Calculation results -type.document.report = Final report -type.document.memorandum = Technical report -type.document.minutes = Minute meeting - -type.context.customer = Customer -type.context.product = Product -type.context.phase = Product phase -type.context.need = Customer needs -type.context.purpose = Purpose of study -type.context.physic = Physics -type.context.object = Studied object - -type.context.part = Modeled object -type.context.geometry = Geometry type -type.context.model = Type of analysis model -type.context.element = Element type -type.context.shape = Geometry of elements -type.context.order = Order of elements -type.context.analysis = Analysis type -type.context.platform = Software platform -type.context.module = Solver -type.context.component = Software component - -type.knowledge.bestpractice = Best practice -type.knowledge.limitation = Limitation -type.knowledge.inconsistency = Inconsistency -type.knowledge.metrics = Metrics -type.knowledge.improvement = Improvement - -history.creation = Document created by \ No newline at end of file diff --git a/Workspace/Siman/.classpath b/Workspace/Siman/.classpath index 2f99218..1c4a2bf 100644 --- a/Workspace/Siman/.classpath +++ b/Workspace/Siman/.classpath @@ -12,6 +12,6 @@ - + diff --git a/Workspace/Siman/WebContent/conf/som.xml b/Workspace/Siman/WebContent/conf/som.xml index dc649cb..732e049 100644 --- a/Workspace/Siman/WebContent/conf/som.xml +++ b/Workspace/Siman/WebContent/conf/som.xml @@ -6,7 +6,7 @@ - + diff --git a/Workspace/Siman/conf/debug.properties b/Workspace/Siman/conf/debug.properties index 67cb930..d6e03a8 100644 --- a/Workspace/Siman/conf/debug.properties +++ b/Workspace/Siman/conf/debug.properties @@ -3,6 +3,10 @@ connection.url=jdbc:mysql://localhost/simer connection.username=simer connection.password=admin +# Hibernate config +hbm2ddl.auto=update +hibernate.dialect=org.hibernate.dialect.MySQLInnoDBDialect + # Log properties hibernate.show_sql=true root.logger.appender= @@ -17,7 +21,7 @@ log4j.logger.org.hibernate.logger.level=DEBUG # Generated file header file.header=Don't edit manually. See the source in @config.src.dir@. - +wapp.root=D:/users/rkv/SIMAN/SIMAN_SRC/Workspace/Siman/WebContent/ diff --git a/Workspace/Siman/conf/generated/release/.cvsignore b/Workspace/Siman/conf/generated/release/.cvsignore index b81c795..57884c5 100644 --- a/Workspace/Siman/conf/generated/release/.cvsignore +++ b/Workspace/Siman/conf/generated/release/.cvsignore @@ -1 +1,2 @@ -*.xml \ No newline at end of file +*.xml +*.properties diff --git a/Workspace/Siman/conf/release.properties b/Workspace/Siman/conf/release.properties index f90fb32..3bf7eb0 100644 --- a/Workspace/Siman/conf/release.properties +++ b/Workspace/Siman/conf/release.properties @@ -3,6 +3,10 @@ connection.url=jdbc:mysql://localhost/simer connection.username=simer connection.password=admin +# Hibernate config +hbm2ddl.auto=validate +hibernate.dialect=org.hibernate.dialect.MySQLDialect + # Log properties hibernate.show_sql=false root.logger.appender= @@ -16,3 +20,5 @@ log4j.logger.org.hibernate.logger.level=INFO # Generated file header file.header================================= + +wapp.root=D:/users/rkv/SIMAN/SIMAN_SRC/Workspace/Siman/WebContent/ diff --git a/Workspace/Siman/conf/templates/hibernate.cfg.xml b/Workspace/Siman/conf/templates/hibernate.cfg.xml index 53788fd..297cc7e 100644 --- a/Workspace/Siman/conf/templates/hibernate.cfg.xml +++ b/Workspace/Siman/conf/templates/hibernate.cfg.xml @@ -20,7 +20,7 @@ org.hibernate.transaction.JDBCTransactionFactory - org.hibernate.dialect.MySQLDialect + @hibernate.dialect@ thread @@ -28,6 +28,9 @@ @hibernate.show_sql@ + + @hbm2ddl.auto@ + @@ -36,7 +39,6 @@ - diff --git a/Workspace/Siman/conf/templates/siman.properties b/Workspace/Siman/conf/templates/siman.properties new file mode 100644 index 0000000..6b057d6 --- /dev/null +++ b/Workspace/Siman/conf/templates/siman.properties @@ -0,0 +1,12 @@ +schema.version = D-0.3 + +wapp.version = D-0.5 +wapp.root = @wapp.root@ +wapp.login = conf/login.conf +wapp.configuration = conf/som.xml +wapp.customization = conf/my.xml +wapp.website = http://www.salome-platform.org +wapp.onlinehelp = http://docs.salome-platform.org/salome_6_3_1/gui/GUI_index.html +wapp.context = repository + +locale.supported = fr,en \ No newline at end of file diff --git a/Workspace/Siman-Common/src/cast3m.som.xml b/Workspace/Siman/src/cast3m.som.xml similarity index 100% rename from Workspace/Siman-Common/src/cast3m.som.xml rename to Workspace/Siman/src/cast3m.som.xml diff --git a/Workspace/Siman-Common/src/log4j.properties b/Workspace/Siman/src/log4j.properties similarity index 100% rename from Workspace/Siman-Common/src/log4j.properties rename to Workspace/Siman/src/log4j.properties diff --git a/Workspace/Siman-Common/src/som.xml b/Workspace/Siman/src/som.xml similarity index 99% rename from Workspace/Siman-Common/src/som.xml rename to Workspace/Siman/src/som.xml index 438643c..62f68b7 100644 --- a/Workspace/Siman-Common/src/som.xml +++ b/Workspace/Siman/src/som.xml @@ -10,7 +10,7 @@ This directory must be visible from the server application (Tomcat). --> - + diff --git a/Workspace/Siman-Common/src/study.xml b/Workspace/Siman/src/study.xml similarity index 100% rename from Workspace/Siman-Common/src/study.xml rename to Workspace/Siman/src/study.xml diff --git a/Workspace/Siman-Common/src/users.xml b/Workspace/Siman/src/users.xml similarity index 100% rename from Workspace/Siman-Common/src/users.xml rename to Workspace/Siman/src/users.xml -- 2.39.2