Simexplorer-si-commits
Threads by month
- ----- 2026 -----
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
March 2008
- 2 participants
- 198 discussions
r1303 - in trunk/simexplorer-is: simexplorer-is-entities/src/java/fr/cemagref/simexplorer/is/entities simexplorer-is-entities/src/java/fr/cemagref/simexplorer/is/entities/attachment simexplorer-is-entities/src/java/fr/cemagref/simexplorer/is/entities/data simexplorer-is-entities/src/java/fr/cemagref/simexplorer/is/entities/metadata simexplorer-is-service/src/java/fr/cemagref/simexplorer/is/service simexplorer-is-storage/src/java/fr/cemagref/simexplorer/is/factories simexplorer-is-st
by glandais@users.labs.libre-entreprise.org 07 Mar '08
by glandais@users.labs.libre-entreprise.org 07 Mar '08
07 Mar '08
Author: glandais
Date: 2008-03-07 17:57:20 +0000 (Fri, 07 Mar 2008)
New Revision: 1303
Added:
trunk/simexplorer-is/simexplorer-is-entities/src/java/fr/cemagref/simexplorer/is/entities/Composite.java
trunk/simexplorer-is/simexplorer-is-entities/src/java/fr/cemagref/simexplorer/is/entities/Entity.java
trunk/simexplorer-is/simexplorer-is-entities/src/java/fr/cemagref/simexplorer/is/entities/EntityHelper.java
trunk/simexplorer-is/simexplorer-is-entities/src/java/fr/cemagref/simexplorer/is/entities/EntityTypeEnum.java
trunk/simexplorer-is/simexplorer-is-entities/src/java/fr/cemagref/simexplorer/is/entities/Leaf.java
trunk/simexplorer-is/simexplorer-is-entities/src/java/fr/cemagref/simexplorer/is/entities/SimpleComposite.java
trunk/simexplorer-is/simexplorer-is-storage/src/java/fr/cemagref/simexplorer/is/factories/EntityFactory.java
Removed:
trunk/simexplorer-is/simexplorer-is-entities/src/java/fr/cemagref/simexplorer/is/entities/BaseEntity.java
trunk/simexplorer-is/simexplorer-is-entities/src/java/fr/cemagref/simexplorer/is/entities/EntityHelper.java
trunk/simexplorer-is/simexplorer-is-entities/src/java/fr/cemagref/simexplorer/is/entities/EntityTypeEnum.java
trunk/simexplorer-is/simexplorer-is-entities/src/java/fr/cemagref/simexplorer/is/entities/SimpleEntityVisitor.java
trunk/simexplorer-is/simexplorer-is-entities/src/java/fr/cemagref/simexplorer/is/entities/data/DataEntity.java
trunk/simexplorer-is/simexplorer-is-storage/src/java/fr/cemagref/simexplorer/is/factories/BaseEntityFactory.java
trunk/simexplorer-is/simexplorer-is-storage/src/java/fr/cemagref/simexplorer/is/factories/MetaDataFactory.java
Modified:
trunk/simexplorer-is/simexplorer-is-entities/src/java/fr/cemagref/simexplorer/is/entities/EntityVisitable.java
trunk/simexplorer-is/simexplorer-is-entities/src/java/fr/cemagref/simexplorer/is/entities/EntityVisitor.java
trunk/simexplorer-is/simexplorer-is-entities/src/java/fr/cemagref/simexplorer/is/entities/attachment/Attachment.java
trunk/simexplorer-is/simexplorer-is-entities/src/java/fr/cemagref/simexplorer/is/entities/data/Code.java
trunk/simexplorer-is/simexplorer-is-entities/src/java/fr/cemagref/simexplorer/is/entities/data/Component.java
trunk/simexplorer-is/simexplorer-is-entities/src/java/fr/cemagref/simexplorer/is/entities/data/Constant.java
trunk/simexplorer-is/simexplorer-is-entities/src/java/fr/cemagref/simexplorer/is/entities/data/ConstantValue.java
trunk/simexplorer-is/simexplorer-is-entities/src/java/fr/cemagref/simexplorer/is/entities/data/Descriptor.java
trunk/simexplorer-is/simexplorer-is-entities/src/java/fr/cemagref/simexplorer/is/entities/data/ExplorationApplication.java
trunk/simexplorer-is/simexplorer-is-entities/src/java/fr/cemagref/simexplorer/is/entities/data/ExplorationData.java
trunk/simexplorer-is/simexplorer-is-entities/src/java/fr/cemagref/simexplorer/is/entities/data/Library.java
trunk/simexplorer-is/simexplorer-is-entities/src/java/fr/cemagref/simexplorer/is/entities/data/LoggableElement.java
trunk/simexplorer-is/simexplorer-is-entities/src/java/fr/cemagref/simexplorer/is/entities/data/Repository.java
trunk/simexplorer-is/simexplorer-is-entities/src/java/fr/cemagref/simexplorer/is/entities/data/Result.java
trunk/simexplorer-is/simexplorer-is-entities/src/java/fr/cemagref/simexplorer/is/entities/data/Structure.java
trunk/simexplorer-is/simexplorer-is-entities/src/java/fr/cemagref/simexplorer/is/entities/metadata/MetaData.java
trunk/simexplorer-is/simexplorer-is-service/src/java/fr/cemagref/simexplorer/is/service/MockDatabase.java
trunk/simexplorer-is/simexplorer-is-service/src/java/fr/cemagref/simexplorer/is/service/StorageServiceCommon.java
trunk/simexplorer-is/simexplorer-is-service/src/java/fr/cemagref/simexplorer/is/service/StorageServiceGenerator.java
trunk/simexplorer-is/simexplorer-is-storage/src/java/fr/cemagref/simexplorer/is/factories/LoggableElementFactory.java
trunk/simexplorer-is/simexplorer-is-storage/src/java/fr/cemagref/simexplorer/is/storage/ElementGenerator.java
trunk/simexplorer-is/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/ExportElementAction.java
trunk/simexplorer-is/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/model/DataEntityModel.java
trunk/simexplorer-is/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/ui/EntityTreeNodeHelper.java
trunk/simexplorer-is/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/ui/ListTabUpdater.java
trunk/simexplorer-is/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/ui/SimExplorerMainUI.java
trunk/simexplorer-is/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/ElementDetail.java
trunk/simexplorer-is/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/ElementDownload.java
Log:
Hierarchical Visitor Pattern for entities
Swing UI adapted
Deleted: trunk/simexplorer-is/simexplorer-is-entities/src/java/fr/cemagref/simexplorer/is/entities/BaseEntity.java
===================================================================
--- trunk/simexplorer-is/simexplorer-is-entities/src/java/fr/cemagref/simexplorer/is/entities/BaseEntity.java 2008-03-06 21:49:51 UTC (rev 1302)
+++ trunk/simexplorer-is/simexplorer-is-entities/src/java/fr/cemagref/simexplorer/is/entities/BaseEntity.java 2008-03-07 17:57:20 UTC (rev 1303)
@@ -1,35 +0,0 @@
-/*
-* ##% Copyright (C) 2008 Code Lutin, Gabriel Landais
-*
-* This program is free software; you can redistribute it and/or
-* modify it under the terms of the GNU General Public License
-* as published by the Free Software Foundation; either version 2
-* of the License, or (at your option) any later version.
-*
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-*
-* You should have received a copy of the GNU General Public License
-* along with this program; if not, write to the Free Software
-* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-* ##% */
-package fr.cemagref.simexplorer.is.entities;
-
-import java.io.Serializable;
-
-/**
- * The minimal Entity contract.
- * <p/>
- * This is a <code>marker</code> interface, nothing special to describe for this
- * contract.
- * <p/>
- * An Entity is serializable and visitable.
- *
- * @author glandais
- * @see Serializable
- * @see EntityVisitable
- */
-public interface BaseEntity extends Serializable, EntityVisitable {
-}
Added: trunk/simexplorer-is/simexplorer-is-entities/src/java/fr/cemagref/simexplorer/is/entities/Composite.java
===================================================================
--- trunk/simexplorer-is/simexplorer-is-entities/src/java/fr/cemagref/simexplorer/is/entities/Composite.java (rev 0)
+++ trunk/simexplorer-is/simexplorer-is-entities/src/java/fr/cemagref/simexplorer/is/entities/Composite.java 2008-03-07 17:57:20 UTC (rev 1303)
@@ -0,0 +1,64 @@
+/*
+* ##% Copyright (C) 2008 Code Lutin, Gabriel Landais
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+* ##% */
+package fr.cemagref.simexplorer.is.entities;
+
+import java.util.List;
+
+/**
+ * The Class Composite. This class aims to be a node with children
+ */
+public abstract class Composite implements Entity {
+
+ /**
+ * Visit enter.
+ *
+ * @param visitor the visitor
+ *
+ * @return true, if successful
+ */
+ protected boolean visitEnter(EntityVisitor visitor) {
+ visitor.enterComposite(this);
+ return true;
+ }
+
+ /**
+ * Visit leave.
+ *
+ * @param visitor the visitor
+ *
+ */
+ protected void visitLeave(EntityVisitor visitor) {
+ visitor.exitComposite(this);
+ // do nothing
+ }
+
+ /* (non-Javadoc)
+ * @see fr.cemagref.simexplorer.is.entities.EntityVisitable#accept(fr.cemagref.simexplorer.is.entities.EntityVisitor)
+ */
+ @Override
+ public void accept(EntityVisitor visitor) {
+ if (visitEnter(visitor)) {
+ List<Entity> children = getChildren();
+ for (Entity entity : children) {
+ entity.accept(visitor);
+ }
+ visitLeave(visitor);
+ }
+ }
+
+}
Added: trunk/simexplorer-is/simexplorer-is-entities/src/java/fr/cemagref/simexplorer/is/entities/Entity.java
===================================================================
--- trunk/simexplorer-is/simexplorer-is-entities/src/java/fr/cemagref/simexplorer/is/entities/Entity.java (rev 0)
+++ trunk/simexplorer-is/simexplorer-is-entities/src/java/fr/cemagref/simexplorer/is/entities/Entity.java 2008-03-07 17:57:20 UTC (rev 1303)
@@ -0,0 +1,40 @@
+/*
+* ##% Copyright (C) 2008 Code Lutin, Gabriel Landais
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+* ##% */
+package fr.cemagref.simexplorer.is.entities;
+
+import java.io.Serializable;
+import java.util.List;
+
+/**
+ * The minimal Entity contract.
+ * <p/>
+ * This is a <code>marker</code> interface, nothing special to describe for this
+ * contract.
+ * <p/>
+ * An Entity is serializable and visitable.
+ */
+public interface Entity extends Serializable, EntityVisitable {
+
+ /**
+ * Gets the children.
+ *
+ * @return the children
+ */
+ public List<Entity> getChildren();
+
+}
Deleted: trunk/simexplorer-is/simexplorer-is-entities/src/java/fr/cemagref/simexplorer/is/entities/EntityHelper.java
===================================================================
--- trunk/simexplorer-is/simexplorer-is-entities/src/java/fr/cemagref/simexplorer/is/entities/EntityHelper.java 2008-03-06 21:49:51 UTC (rev 1302)
+++ trunk/simexplorer-is/simexplorer-is-entities/src/java/fr/cemagref/simexplorer/is/entities/EntityHelper.java 2008-03-07 17:57:20 UTC (rev 1303)
@@ -1,89 +0,0 @@
-/*
-* ##% Copyright (C) 2007, 2008 Code Lutin, Tony Chemit, Gabriel Landais
-*
-* This program is free software; you can redistribute it and/or
-* modify it under the terms of the GNU General Public License
-* as published by the Free Software Foundation; either version 2
-* of the License, or (at your option) any later version.
-*
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-*
-* You should have received a copy of the GNU General Public License
-* along with this program; if not, write to the Free Software
-* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-* ##% */
-package fr.cemagref.simexplorer.is.entities;
-
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-import javax.swing.tree.DefaultMutableTreeNode;
-
-import fr.cemagref.simexplorer.is.entities.data.ExplorationApplication;
-import fr.cemagref.simexplorer.is.entities.data.ExplorationData;
-import fr.cemagref.simexplorer.is.entities.data.Library;
-import fr.cemagref.simexplorer.is.entities.data.LoggableElement;
-import fr.cemagref.simexplorer.is.entities.data.Result;
-import fr.cemagref.simexplorer.is.entities.metadata.MetaData;
-
-/**
- * Une classe utilitaires pour les Entities du projet.
- *
- * @author chemit
- */
-public class EntityHelper {
- /**
- * Une énumération pour définir les types des entités du
- * projet.
- *
- * @author chemit
- */
- public static enum Action {
-
- DOWNLOAD(ExplorationApplication.class, Result.class, Library.class),
- EXPORT(ExplorationApplication.class, Result.class, Library.class),
- IMPORT(ExplorationApplication.class, Library.class),
- DELETE(ExplorationApplication.class, ExplorationData.class);
-
- private List<Class<?>> classes;
- private List<String> types;
-
- public boolean accept(DefaultMutableTreeNode node) {
- return node != null && node.getUserObject() != null &&
- accept(node.getUserObject().getClass());
- }
-
- public boolean accept(LoggableElement sNode) {
- return sNode != null && accept(sNode.getClass());
- }
-
- public boolean accept(MetaData metaData) {
- return metaData != null && accept(metaData.getElementClass());
- }
-
- private Action(Class<?>... classes) {
- this.classes = Arrays.asList(classes);
- this.types = new ArrayList<String>(classes.length);
- for (Class<?> aClass : classes) {
- this.types.add(aClass.getSimpleName());
- }
- }
-
- private boolean accept(Class<?> klass) {
- return classes.contains(klass);
- }
-
- private boolean accept(String type) {
- return types.contains(type);
- }
- }
-
- protected EntityHelper() {
- // no instance
- }
-}
Added: trunk/simexplorer-is/simexplorer-is-entities/src/java/fr/cemagref/simexplorer/is/entities/EntityHelper.java
===================================================================
--- trunk/simexplorer-is/simexplorer-is-entities/src/java/fr/cemagref/simexplorer/is/entities/EntityHelper.java (rev 0)
+++ trunk/simexplorer-is/simexplorer-is-entities/src/java/fr/cemagref/simexplorer/is/entities/EntityHelper.java 2008-03-07 17:57:20 UTC (rev 1303)
@@ -0,0 +1,89 @@
+/*
+* ##% Copyright (C) 2007, 2008 Code Lutin, Tony Chemit, Gabriel Landais
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+* ##% */
+package fr.cemagref.simexplorer.is.entities;
+
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+import javax.swing.tree.DefaultMutableTreeNode;
+
+import fr.cemagref.simexplorer.is.entities.data.ExplorationApplication;
+import fr.cemagref.simexplorer.is.entities.data.ExplorationData;
+import fr.cemagref.simexplorer.is.entities.data.Library;
+import fr.cemagref.simexplorer.is.entities.data.LoggableElement;
+import fr.cemagref.simexplorer.is.entities.data.Result;
+import fr.cemagref.simexplorer.is.entities.metadata.MetaData;
+
+/**
+ * Une classe utilitaires pour les Entities du projet.
+ *
+ * @author chemit
+ */
+public class EntityHelper {
+ /**
+ * Une énumération pour définir les types des entités du
+ * projet.
+ *
+ * @author chemit
+ */
+ public static enum Action {
+
+ DOWNLOAD(ExplorationApplication.class, Result.class, Library.class),
+ EXPORT(ExplorationApplication.class, Result.class, Library.class),
+ IMPORT(ExplorationApplication.class, Library.class),
+ DELETE(ExplorationApplication.class, ExplorationData.class);
+
+ private List<Class<?>> classes;
+ private List<String> types;
+
+ public boolean accept(DefaultMutableTreeNode node) {
+ return node != null && node.getUserObject() != null &&
+ accept(node.getUserObject().getClass());
+ }
+
+ public boolean accept(LoggableElement sNode) {
+ return sNode != null && accept(sNode.getClass());
+ }
+
+ public boolean accept(MetaData metaData) {
+ return metaData != null && accept(metaData.getElementClass());
+ }
+
+ private Action(Class<?>... classes) {
+ this.classes = Arrays.asList(classes);
+ this.types = new ArrayList<String>(classes.length);
+ for (Class<?> aClass : classes) {
+ this.types.add(aClass.getSimpleName());
+ }
+ }
+
+ private boolean accept(Class<?> klass) {
+ return classes.contains(klass);
+ }
+
+ private boolean accept(String type) {
+ return types.contains(type);
+ }
+ }
+
+ protected EntityHelper() {
+ // no instance
+ }
+}
Deleted: trunk/simexplorer-is/simexplorer-is-entities/src/java/fr/cemagref/simexplorer/is/entities/EntityTypeEnum.java
===================================================================
--- trunk/simexplorer-is/simexplorer-is-entities/src/java/fr/cemagref/simexplorer/is/entities/EntityTypeEnum.java 2008-03-06 21:49:51 UTC (rev 1302)
+++ trunk/simexplorer-is/simexplorer-is-entities/src/java/fr/cemagref/simexplorer/is/entities/EntityTypeEnum.java 2008-03-07 17:57:20 UTC (rev 1303)
@@ -1,170 +0,0 @@
-package fr.cemagref.simexplorer.is.entities;
-
-import static org.codelutin.i18n.I18n.n_;
-import static org.codelutin.i18n.I18n._;
-import fr.cemagref.simexplorer.is.entities.attachment.Attachment;
-import fr.cemagref.simexplorer.is.entities.data.Code;
-import fr.cemagref.simexplorer.is.entities.data.Component;
-import fr.cemagref.simexplorer.is.entities.data.Constant;
-import fr.cemagref.simexplorer.is.entities.data.ConstantValue;
-import fr.cemagref.simexplorer.is.entities.data.ExplorationApplication;
-import fr.cemagref.simexplorer.is.entities.data.ExplorationData;
-import fr.cemagref.simexplorer.is.entities.data.Library;
-import fr.cemagref.simexplorer.is.entities.data.Repository;
-import fr.cemagref.simexplorer.is.entities.data.Result;
-import fr.cemagref.simexplorer.is.entities.data.Structure;
-
-/**
- * Une enum pour definir les differents types d'entities rencontres dans le projet. <p/> On ajoute ici une clef i18n
- * pour pouvoir traduire plus tard ces types. <p/> Note: on n'utilise pas directement les traductions pour permettre le
- * mécanisme de changement de langue (voir module swing et web).
- *
- * @author chemit
- */
-public enum EntityTypeEnum {
-
- /** The Attachment. */
- Attachment(false, n_("simexplorer.common.attachment"), n_("simexplorer.common.attachments"), Attachment.class),
-
- /** The Code. */
- Code(false, n_("simexplorer.common.code"), n_("simexplorer.common.codes"), Code.class),
-
- /** The Component. */
- Component(true, n_("simexplorer.common.component"), n_("simexplorer.common.components"), Component.class),
-
- /** The Constant. */
- Constant(false, n_("simexplorer.common.constant"), n_("simexplorer.common.constants"), Constant.class),
-
- /** The Constant value. */
- ConstantValue(false, n_("simexplorer.common.constantvalue"), n_("simexplorer.common.constantvalues"), ConstantValue.class),
-
- /** The Exploration application. */
- ExplorationApplication(true, n_("simexplorer.common.explorationapplication"), n_("simexplorer.common.explorationapplications"), ExplorationApplication.class),
-
- /** The Exploration data. */
- ExplorationData(true, n_("simexplorer.common.explorationdata"), n_("simexplorer.common.explorationdatas"), ExplorationData.class),
-
- /** The Library. */
- Library(true, n_("simexplorer.common.library"), n_("simexplorer.common.libraries"), Library.class),
-
- /** The Repository. */
- Repository(false, n_("simexplorer.common.repository"), n_("simexplorer.common.repositories"), Repository.class),
-
- /** The Result. */
- Result(false, n_("simexplorer.common.result"), n_("simexplorer.common.results"), Result.class),
-
- /** The Structure. */
- Structure(false, n_("simexplorer.common.structure"), n_("simexplorer.common.structures"), Structure.class);
-
- /** The le. */
- private boolean le;
-
- /** The i18n key. */
- private String i18nKey;
-
- /** The i18n keys. */
- private String i18nKeys;
-
- /** The implementation. */
- private Class<?> implementation;
-
- /**
- * Gets the entity type.
- *
- * @param klass the klass
- *
- * @return the entity type
- */
- public static EntityTypeEnum getEntityType(Class<?> klass) {
- EntityTypeEnum[] values = values();
- for (EntityTypeEnum value : values) {
- if (klass.equals(value.getImplementation())) {
- return value;
- }
- }
- return null;
- }
-
- /**
- * Gets the libelle.
- *
- * @param entity the entity
- *
- * @return the libelle
- */
- public static String getLibelle(Object entity) {
- if (entity == null) {
- return "";
- }
- return getLibelle(entity instanceof Class ? (Class<?>) entity : entity.getClass());
- }
-
- /**
- * Gets the libelle.
- *
- * @param entity the entity
- *
- * @return the libelle
- */
- private static String getLibelle(Class<?> entity) {
- if (entity == null) {
- return "";
- }
- EntityTypeEnum entityType = getEntityType(entity);
- if (entityType == null) {
- return "";
- }
- return entityType.getLibelle();
- }
-
- /**
- * Gets the libelle.
- *
- * @return the libelle
- */
- public String getLibelle() {
- return _(i18nKey);
- }
-
- /**
- * Gets the libelles.
- *
- * @return the libelles
- */
- public String getLibelles() {
- return _(i18nKeys);
- }
-
- /**
- * Checks if is le.
- *
- * @return true, if is le
- */
- public boolean isLe() {
- return le;
- }
-
- /**
- * Gets the implementation.
- *
- * @return the implementation
- */
- public Class<?> getImplementation() {
- return implementation;
- }
-
- /**
- * Instantiates a new entity type enum.
- *
- * @param isLE the is le
- * @param i18nKey the i18n key
- * @param i18nKeys the i18n keys
- * @param implementation the implementation
- */
- private EntityTypeEnum(boolean isLE, String i18nKey, String i18nKeys, Class<?> implementation) {
- this.le = isLE;
- this.i18nKey = i18nKey;
- this.i18nKeys = i18nKeys;
- this.implementation = implementation;
- }
-}
\ No newline at end of file
Added: trunk/simexplorer-is/simexplorer-is-entities/src/java/fr/cemagref/simexplorer/is/entities/EntityTypeEnum.java
===================================================================
--- trunk/simexplorer-is/simexplorer-is-entities/src/java/fr/cemagref/simexplorer/is/entities/EntityTypeEnum.java (rev 0)
+++ trunk/simexplorer-is/simexplorer-is-entities/src/java/fr/cemagref/simexplorer/is/entities/EntityTypeEnum.java 2008-03-07 17:57:20 UTC (rev 1303)
@@ -0,0 +1,170 @@
+package fr.cemagref.simexplorer.is.entities;
+
+import static org.codelutin.i18n.I18n.n_;
+import static org.codelutin.i18n.I18n._;
+import fr.cemagref.simexplorer.is.entities.attachment.Attachment;
+import fr.cemagref.simexplorer.is.entities.data.Code;
+import fr.cemagref.simexplorer.is.entities.data.Component;
+import fr.cemagref.simexplorer.is.entities.data.Constant;
+import fr.cemagref.simexplorer.is.entities.data.ConstantValue;
+import fr.cemagref.simexplorer.is.entities.data.ExplorationApplication;
+import fr.cemagref.simexplorer.is.entities.data.ExplorationData;
+import fr.cemagref.simexplorer.is.entities.data.Library;
+import fr.cemagref.simexplorer.is.entities.data.Repository;
+import fr.cemagref.simexplorer.is.entities.data.Result;
+import fr.cemagref.simexplorer.is.entities.data.Structure;
+
+/**
+ * Une enum pour definir les differents types d'entities rencontres dans le projet. <p/> On ajoute ici une clef i18n
+ * pour pouvoir traduire plus tard ces types. <p/> Note: on n'utilise pas directement les traductions pour permettre le
+ * mécanisme de changement de langue (voir module swing et web).
+ *
+ * @author chemit
+ */
+public enum EntityTypeEnum {
+
+ /** The Attachment. */
+ Attachment(false, n_("simexplorer.common.attachment"), n_("simexplorer.common.attachments"), Attachment.class),
+
+ /** The Code. */
+ Code(false, n_("simexplorer.common.code"), n_("simexplorer.common.codes"), Code.class),
+
+ /** The Component. */
+ Component(true, n_("simexplorer.common.component"), n_("simexplorer.common.components"), Component.class),
+
+ /** The Constant. */
+ Constant(false, n_("simexplorer.common.constant"), n_("simexplorer.common.constants"), Constant.class),
+
+ /** The Constant value. */
+ ConstantValue(false, n_("simexplorer.common.constantvalue"), n_("simexplorer.common.constantvalues"), ConstantValue.class),
+
+ /** The Exploration application. */
+ ExplorationApplication(true, n_("simexplorer.common.explorationapplication"), n_("simexplorer.common.explorationapplications"), ExplorationApplication.class),
+
+ /** The Exploration data. */
+ ExplorationData(true, n_("simexplorer.common.explorationdata"), n_("simexplorer.common.explorationdatas"), ExplorationData.class),
+
+ /** The Library. */
+ Library(true, n_("simexplorer.common.library"), n_("simexplorer.common.libraries"), Library.class),
+
+ /** The Repository. */
+ Repository(false, n_("simexplorer.common.repository"), n_("simexplorer.common.repositories"), Repository.class),
+
+ /** The Result. */
+ Result(false, n_("simexplorer.common.result"), n_("simexplorer.common.results"), Result.class),
+
+ /** The Structure. */
+ Structure(false, n_("simexplorer.common.structure"), n_("simexplorer.common.structures"), Structure.class);
+
+ /** The le. */
+ private boolean le;
+
+ /** The i18n key. */
+ private String i18nKey;
+
+ /** The i18n keys. */
+ private String i18nKeys;
+
+ /** The implementation. */
+ private Class<?> implementation;
+
+ /**
+ * Gets the entity type.
+ *
+ * @param klass the klass
+ *
+ * @return the entity type
+ */
+ public static EntityTypeEnum getEntityType(Class<?> klass) {
+ EntityTypeEnum[] values = values();
+ for (EntityTypeEnum value : values) {
+ if (klass.equals(value.getImplementation())) {
+ return value;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Gets the libelle.
+ *
+ * @param entity the entity
+ *
+ * @return the libelle
+ */
+ public static String getLibelle(Object entity) {
+ if (entity == null) {
+ return "";
+ }
+ return getLibelle(entity instanceof Class ? (Class<?>) entity : entity.getClass());
+ }
+
+ /**
+ * Gets the libelle.
+ *
+ * @param entity the entity
+ *
+ * @return the libelle
+ */
+ private static String getLibelle(Class<?> entity) {
+ if (entity == null) {
+ return "";
+ }
+ EntityTypeEnum entityType = getEntityType(entity);
+ if (entityType == null) {
+ return "";
+ }
+ return entityType.getLibelle();
+ }
+
+ /**
+ * Gets the libelle.
+ *
+ * @return the libelle
+ */
+ public String getLibelle() {
+ return _(i18nKey);
+ }
+
+ /**
+ * Gets the libelles.
+ *
+ * @return the libelles
+ */
+ public String getLibelles() {
+ return _(i18nKeys);
+ }
+
+ /**
+ * Checks if is le.
+ *
+ * @return true, if is le
+ */
+ public boolean isLe() {
+ return le;
+ }
+
+ /**
+ * Gets the implementation.
+ *
+ * @return the implementation
+ */
+ public Class<?> getImplementation() {
+ return implementation;
+ }
+
+ /**
+ * Instantiates a new entity type enum.
+ *
+ * @param isLE the is le
+ * @param i18nKey the i18n key
+ * @param i18nKeys the i18n keys
+ * @param implementation the implementation
+ */
+ private EntityTypeEnum(boolean isLE, String i18nKey, String i18nKeys, Class<?> implementation) {
+ this.le = isLE;
+ this.i18nKey = i18nKey;
+ this.i18nKeys = i18nKeys;
+ this.implementation = implementation;
+ }
+}
\ No newline at end of file
Modified: trunk/simexplorer-is/simexplorer-is-entities/src/java/fr/cemagref/simexplorer/is/entities/EntityVisitable.java
===================================================================
--- trunk/simexplorer-is/simexplorer-is-entities/src/java/fr/cemagref/simexplorer/is/entities/EntityVisitable.java 2008-03-06 21:49:51 UTC (rev 1302)
+++ trunk/simexplorer-is/simexplorer-is-entities/src/java/fr/cemagref/simexplorer/is/entities/EntityVisitable.java 2008-03-07 17:57:20 UTC (rev 1303)
@@ -25,11 +25,13 @@
* @see EntityVisitor
*/
public interface EntityVisitable {
+
/**
- * Méthode à implanter dans chaque visitable pour indiquer ce que
- * le visiteur doit visiter.
- *
+ * Méthode à implanter dans chaque visitable pour indiquer ce que le visiteur doit visiter.
+ *
* @param visitor le visiteur
+ *
+ * @return true, if accept
*/
void accept(EntityVisitor visitor);
Modified: trunk/simexplorer-is/simexplorer-is-entities/src/java/fr/cemagref/simexplorer/is/entities/EntityVisitor.java
===================================================================
--- trunk/simexplorer-is/simexplorer-is-entities/src/java/fr/cemagref/simexplorer/is/entities/EntityVisitor.java 2008-03-06 21:49:51 UTC (rev 1302)
+++ trunk/simexplorer-is/simexplorer-is-entities/src/java/fr/cemagref/simexplorer/is/entities/EntityVisitor.java 2008-03-07 17:57:20 UTC (rev 1303)
@@ -17,24 +17,10 @@
* ##% */
package fr.cemagref.simexplorer.is.entities;
-import fr.cemagref.simexplorer.is.entities.attachment.Attachment;
-import fr.cemagref.simexplorer.is.entities.data.Code;
-import fr.cemagref.simexplorer.is.entities.data.Component;
-import fr.cemagref.simexplorer.is.entities.data.Constant;
-import fr.cemagref.simexplorer.is.entities.data.ConstantValue;
-import fr.cemagref.simexplorer.is.entities.data.ExplorationApplication;
-import fr.cemagref.simexplorer.is.entities.data.ExplorationData;
-import fr.cemagref.simexplorer.is.entities.data.Library;
-import fr.cemagref.simexplorer.is.entities.data.Repository;
-import fr.cemagref.simexplorer.is.entities.data.Result;
-import fr.cemagref.simexplorer.is.entities.data.Structure;
-import fr.cemagref.simexplorer.is.entities.metadata.MetaData;
-import java.util.Collection;
-
/**
* Le contrat à respecter pour un visiteur à visiter des {@link EntityVisitable}..
- *
+ *
* @author chemit
* @see EntityVisitable
* @see SimpleEntityVisitor
@@ -42,169 +28,41 @@
public interface EntityVisitor {
/**
- * La méthode de base pour visiter n'importe quel {@link EntityVisitable}.
- *
- * @param v le visité
+ * Visit.
+ *
+ * @param v the v
+ *
*/
void visit(EntityVisitable v);
-
+
/**
- * Pour visiter une exploration d'application
- *
- * @param v le visité
- * @see ExplorationApplication
+ * Visit.
+ *
+ * @param v the v
+ *
*/
- void visitExplorationApplication(ExplorationApplication v);
+ void visitLeaf(Leaf v);
/**
- * Pour visiter un Component
- *
- * @param v le visité
- * @see Component
+ * Visit.
+ *
+ * @param v the v
+ *
*/
- void visitComponent(Component v);
+ void visitComposite(Composite v);
/**
- * Pour visiter une ExplorationApplication
- *
- * @param v le visité
- * @see ExplorationApplication
+ * Enter composite.
+ *
+ * @param v the v
*/
- void visitExplorationData(ExplorationData v);
+ void enterComposite(Composite v);
/**
- * Pour visiter un Library
- *
- * @param v le visité
- * @see Library
+ * Exit composite.
+ *
+ * @param v the v
*/
- void visitLibrary(Library v);
-
- /**
- * Pour visiter un Metadata
- *
- * @param v le visité
- * @see MetaData
- */
- void visitMetaData(MetaData v);
-
- /**
- * Pour visiter un Result
- *
- * @param v le visité
- * @see Result
- */
- void visitResult(Result v);
-
- /**
- * Pour visiter un Constant
- *
- * @param vs le visité
- * @see Constant
- */
- void visitConstant(Constant vs);
-
- /**
- * Pour visiter un Code
- *
- * @param v le visité
- * @see Code
- */
- void visitCode(Code v);
-
- /**
- * Pour visiter un Structure
- *
- * @param v le visité
- * @see Structure
- */
- void visitStructure(Structure v);
-
- /**
- * Pour visiter un ConstantValue
- *
- * @param v le visité
- * @see ConstantValue
- */
- void visitConstantValue(ConstantValue v);
-
- /**
- * Pour visiter un Attachment
- *
- * @param v le visité
- * @see Attachment
- */
- void visitAttachment(Attachment v);
-
- /**
- * Pour visiter un Repository
- *
- * @param v le visité
- * @see Repository
- */
- void visitRepository(Repository v);
-
- /**
- * Pour visiter une collection de Component
- *
- * @param vs les visités
- * @see Component
- */
- void visitComponents(Collection<Component> vs);
-
- /**
- * Pour visiter une collection de ExplorationData
- *
- * @param vs les visités
- * @see ExplorationData
- */
- void visitExplorationDatas(Collection<ExplorationData> vs);
-
- /**
- * Pour visiter une collection de Library
- *
- * @param vs les visités
- * @see Library
- */
- void visitLibraries(Collection<Library> vs);
-
- /**
- * Pour visiter une collection de Constant
- *
- * @param vs les visités
- * @see Constant
- */
- void visitConstants(Collection<Constant> vs);
-
- /**
- * Pour visiter une collection de Code
- *
- * @param vs les visités
- * @see Code
- */
- void visitCodes(Collection<Code> vs);
-
- /**
- * Pour visiter une collection de Structure
- *
- * @param vs les visités
- * @see Structure
- */
- void visitStructures(Collection<Structure> vs);
-
- /**
- * Pour visiter une collection de ConstantValue
- *
- * @param vs les visités
- * @see ConstantValue
- */
- void visitConstantValues(Collection<ConstantValue> vs);
-
- /**
- * Pour visiter une collection de Attachment
- *
- * @param vs les visités
- * @see Attachment
- */
- void visitAttachments(Collection<Attachment> vs);
+ void exitComposite(Composite v);
+
}
Added: trunk/simexplorer-is/simexplorer-is-entities/src/java/fr/cemagref/simexplorer/is/entities/Leaf.java
===================================================================
--- trunk/simexplorer-is/simexplorer-is-entities/src/java/fr/cemagref/simexplorer/is/entities/Leaf.java (rev 0)
+++ trunk/simexplorer-is/simexplorer-is-entities/src/java/fr/cemagref/simexplorer/is/entities/Leaf.java 2008-03-07 17:57:20 UTC (rev 1303)
@@ -0,0 +1,37 @@
+/*
+* ##% Copyright (C) 2008 Code Lutin, Gabriel Landais
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+* ##% */
+package fr.cemagref.simexplorer.is.entities;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * The Class Leaf.
+ * This class represents a leaf of the tree
+ */
+public abstract class Leaf implements Entity {
+
+ /* (non-Javadoc)
+ * @see fr.cemagref.simexplorer.is.entities.pattern.Entity#getChildren()
+ */
+ @Override
+ public final List<Entity> getChildren() {
+ return new ArrayList<Entity>();
+ }
+
+}
Added: trunk/simexplorer-is/simexplorer-is-entities/src/java/fr/cemagref/simexplorer/is/entities/SimpleComposite.java
===================================================================
--- trunk/simexplorer-is/simexplorer-is-entities/src/java/fr/cemagref/simexplorer/is/entities/SimpleComposite.java (rev 0)
+++ trunk/simexplorer-is/simexplorer-is-entities/src/java/fr/cemagref/simexplorer/is/entities/SimpleComposite.java 2008-03-07 17:57:20 UTC (rev 1303)
@@ -0,0 +1,119 @@
+/*
+* ##% Copyright (C) 2008 Code Lutin, Gabriel Landais
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+* ##% */
+package fr.cemagref.simexplorer.is.entities;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * The Class SimpleComposite.
+ */
+public class SimpleComposite<E extends Entity> extends Composite {
+
+ /** The Constant serialVersionUID. */
+ private static final long serialVersionUID = -2085840703844194573L;
+
+ /** The children. */
+ private List<E> elements;
+
+ /**
+ * Cast list.
+ *
+ * @param list the list
+ *
+ * @return the simple composite< t>
+ */
+ public static <T extends Entity> SimpleComposite<T> castList(List<T> list) {
+ SimpleComposite<T> result = new SimpleComposite<T>();
+ result.setElements(list);
+ return result;
+ }
+
+ /* (non-Javadoc)
+ * @see fr.cemagref.simexplorer.is.entities.Composite#visitEnter(fr.cemagref.simexplorer.is.entities.EntityVisitor)
+ */
+ @Override
+ protected boolean visitEnter(EntityVisitor v) {
+ v.enterComposite(this);
+ return true;
+ }
+
+ /* (non-Javadoc)
+ * @see fr.cemagref.simexplorer.is.entities.Composite#visitLeave(fr.cemagref.simexplorer.is.entities.EntityVisitor)
+ */
+ @Override
+ protected void visitLeave(EntityVisitor v) {
+ v.exitComposite(this);
+ }
+
+ /* (non-Javadoc)
+ * @see fr.cemagref.simexplorer.is.entities.Entity#getChildren()
+ */
+ @Override
+ public List<Entity> getChildren() {
+ List<Entity> entities = new ArrayList<Entity>();
+ entities.addAll(elements);
+ return entities;
+ }
+
+ /**
+ * Gets the elements.
+ *
+ * @return the elements
+ */
+ public List<E> getElements() {
+ return elements;
+ }
+
+ /**
+ * Sets the elements.
+ *
+ * @param elements the new elements
+ */
+ public void setElements(List<E> elements) {
+ this.elements = elements;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((elements == null) ? 0 : elements.hashCode());
+ return result;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ final SimpleComposite other = (SimpleComposite) obj;
+ if (elements == null) {
+ if (other.elements != null)
+ return false;
+ } else if (!elements.equals(other.elements))
+ return false;
+ return true;
+ }
+
+
+
+}
Deleted: trunk/simexplorer-is/simexplorer-is-entities/src/java/fr/cemagref/simexplorer/is/entities/SimpleEntityVisitor.java
===================================================================
--- trunk/simexplorer-is/simexplorer-is-entities/src/java/fr/cemagref/simexplorer/is/entities/SimpleEntityVisitor.java 2008-03-06 21:49:51 UTC (rev 1302)
+++ trunk/simexplorer-is/simexplorer-is-entities/src/java/fr/cemagref/simexplorer/is/entities/SimpleEntityVisitor.java 2008-03-07 17:57:20 UTC (rev 1303)
@@ -1,168 +0,0 @@
-/*
-* ##% Copyright (C) 2007, 2008 Code Lutin,
-* Tony Chemit, Gabriel Landais
-*
-* This program is free software; you can redistribute it and/or
-* modify it under the terms of the GNU General Public License
-* as published by the Free Software Foundation; either version 2
-* of the License, or (at your option) any later version.
-*
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-*
-* You should have received a copy of the GNU General Public License
-* along with this program; if not, write to the Free Software
-* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-* ##% */
-package fr.cemagref.simexplorer.is.entities;
-
-import fr.cemagref.simexplorer.is.entities.attachment.Attachment;
-import fr.cemagref.simexplorer.is.entities.data.Code;
-import fr.cemagref.simexplorer.is.entities.data.Component;
-import fr.cemagref.simexplorer.is.entities.data.Constant;
-import fr.cemagref.simexplorer.is.entities.data.ConstantValue;
-import fr.cemagref.simexplorer.is.entities.data.ExplorationApplication;
-import fr.cemagref.simexplorer.is.entities.data.ExplorationData;
-import fr.cemagref.simexplorer.is.entities.data.Library;
-import fr.cemagref.simexplorer.is.entities.data.Repository;
-import fr.cemagref.simexplorer.is.entities.data.Result;
-import fr.cemagref.simexplorer.is.entities.data.Structure;
-import fr.cemagref.simexplorer.is.entities.metadata.MetaData;
-
-import java.util.Collection;
-
-/**
- * Un simple visiteur de BaseEntity.
- *
- * @author chemit
- * @see EntityVisitor
- * @see EntityVisitable
- * @see BaseEntity
- */
-public class SimpleEntityVisitor implements EntityVisitor {
-
- /**
- * La méthode générique pour visiter un {@link EntityVisitable}.
- *
- * @param v le visité
- */
- public void visit(EntityVisitable v) {
- if (v != null) {
- // on lance la visite
- v.accept(this);
- }
- }
-
- public void visitExplorationApplication(ExplorationApplication v) {
- if (v != null) {
- visitComponents(v.getComponents());
- visitExplorationDatas(v.getExplorations());
- visitMetaData(v.getMetaData());
- }
- }
-
- public void visitComponent(Component v) {
- if (v != null) {
- visitConstants(v.getConstants());
- visitCodes(v.getCodes());
- visitLibraries(v.getLibraries());
- visitMetaData(v.getMetaData());
- }
- }
-
- public void visitExplorationData(ExplorationData v) {
- if (v != null) {
- visitConstantValues(v.getConstantValues());
- visitResult(v.getResult());
- visitMetaData(v.getMetaData());
- }
- }
-
- public void visitLibrary(Library v) {
- if (v != null) {
- visitMetaData(v.getMetaData());
- }
- }
-
- public void visitMetaData(MetaData v) {
- if (v != null) {
- // FIXME !!!
- //visitAttachments(v.getAttachments());
- }
- }
-
- public void visitExplorationDatas(Collection<ExplorationData> vs) {
- visitSet(vs);
- }
-
- public void visitComponents(Collection<Component> v) {
- visitSet(v);
- }
-
- public void visitCodes(Collection<Code> v) {
- visitSet(v);
- }
-
- public void visitConstants(Collection<Constant> vs) {
- visitSet(vs);
- }
-
- public void visitConstantValues(Collection<ConstantValue> vs) {
- visitSet(vs);
- }
-
- public void visitLibraries(Collection<Library> vs) {
- visitSet(vs);
- }
-
- public void visitStructures(Collection<Structure> vs) {
- visitSet(vs);
- }
-
- public void visitAttachments(Collection<Attachment> vs) {
- visitSet(vs);
- }
-
- public void visitCode(Code v) {
- // by default, do nothing
- }
-
- public void visitConstant(Constant v) {
- // by default, do nothing
- }
-
- public void visitConstantValue(ConstantValue v) {
- // by default, do nothing
- }
-
- public void visitResult(Result v) {
- // by default, do nothing
- }
-
- public void visitRepository(Repository v) {
- // by default, do nothing
- }
-
- public void visitStructure(Structure v) {
- // by default, do nothing
- }
-
- public void visitAttachment(Attachment v) {
- // by default, do nothing
- }
-
- /**
- * Visite une collection de visitables du même type.
- *
- * @param vs l'ensemble de visitables visités
- */
- protected void visitSet(Collection<? extends EntityVisitable> vs) {
- if (vs != null) {
- for (EntityVisitable visitable : vs) {
- visitable.accept(this);
- }
- }
- }
-}
Modified: trunk/simexplorer-is/simexplorer-is-entities/src/java/fr/cemagref/simexplorer/is/entities/attachment/Attachment.java
===================================================================
--- trunk/simexplorer-is/simexplorer-is-entities/src/java/fr/cemagref/simexplorer/is/entities/attachment/Attachment.java 2008-03-06 21:49:51 UTC (rev 1302)
+++ trunk/simexplorer-is/simexplorer-is-entities/src/java/fr/cemagref/simexplorer/is/entities/attachment/Attachment.java 2008-03-07 17:57:20 UTC (rev 1303)
@@ -19,15 +19,15 @@
import org.apache.commons.lang.StringUtils;
-import fr.cemagref.simexplorer.is.entities.BaseEntity;
import fr.cemagref.simexplorer.is.entities.EntityVisitor;
+import fr.cemagref.simexplorer.is.entities.Leaf;
/**
* Represents data attached to metadata.
*
* @author glandais
*/
-public class Attachment implements BaseEntity {
+public class Attachment extends Leaf {
/** Serial version ID. */
private static final long serialVersionUID = 5467615366054227592L;
@@ -178,7 +178,7 @@
}
public void accept(EntityVisitor visitor) {
- visitor.visitAttachment(this);
+ visitor.visitLeaf(this);
}
}
Modified: trunk/simexplorer-is/simexplorer-is-entities/src/java/fr/cemagref/simexplorer/is/entities/data/Code.java
===================================================================
--- trunk/simexplorer-is/simexplorer-is-entities/src/java/fr/cemagref/simexplorer/is/entities/data/Code.java 2008-03-06 21:49:51 UTC (rev 1302)
+++ trunk/simexplorer-is/simexplorer-is-entities/src/java/fr/cemagref/simexplorer/is/entities/data/Code.java 2008-03-07 17:57:20 UTC (rev 1303)
@@ -20,11 +20,12 @@
import java.io.Serializable;
import fr.cemagref.simexplorer.is.entities.EntityVisitor;
+import fr.cemagref.simexplorer.is.entities.Leaf;
/**
* The Class Code.
*/
-public class Code extends DataEntity implements Serializable {
+public class Code extends Leaf implements Serializable {
/** The Constant serialVersionUID. */
private static final long serialVersionUID = 1232989963544650014L;
@@ -80,7 +81,7 @@
}
public void accept(EntityVisitor visitor) {
- visitor.visitCode(this);
+ visitor.visitLeaf(this);
}
@Override
Modified: trunk/simexplorer-is/simexplorer-is-entities/src/java/fr/cemagref/simexplorer/is/entities/data/Component.java
===================================================================
--- trunk/simexplorer-is/simexplorer-is-entities/src/java/fr/cemagref/simexplorer/is/entities/data/Component.java 2008-03-06 21:49:51 UTC (rev 1302)
+++ trunk/simexplorer-is/simexplorer-is-entities/src/java/fr/cemagref/simexplorer/is/entities/data/Component.java 2008-03-07 17:57:20 UTC (rev 1303)
@@ -21,12 +21,13 @@
import java.util.ArrayList;
import java.util.List;
+import fr.cemagref.simexplorer.is.entities.Entity;
import fr.cemagref.simexplorer.is.entities.EntityVisitor;
/**
* The Class Component.
*/
-public class Component extends LoggableElement implements Serializable {
+public class Component extends LoggableElement {
/** The Constant serialVersionUID. */
private static final long serialVersionUID = -1759921918565071510L;
@@ -119,16 +120,12 @@
* @see fr.cemagref.simexplorer.is.entities.data.LoggableElement#getDirectChildren()
*/
@Override
- public List<LoggableElement> getDirectChildren() {
- List<LoggableElement> directChildren = new ArrayList<LoggableElement>();
+ public List<Entity> getChildren() {
+ List<Entity> directChildren = new ArrayList<Entity>();
directChildren.addAll(libraries);
return directChildren;
}
- public void accept(EntityVisitor visitor) {
- visitor.visitComponent(this);
- }
-
@Override
public int hashCode() {
final int prime = 31;
Modified: trunk/simexplorer-is/simexplorer-is-entities/src/java/fr/cemagref/simexplorer/is/entities/data/Constant.java
===================================================================
--- trunk/simexplorer-is/simexplorer-is-entities/src/java/fr/cemagref/simexplorer/is/entities/data/Constant.java 2008-03-06 21:49:51 UTC (rev 1302)
+++ trunk/simexplorer-is/simexplorer-is-entities/src/java/fr/cemagref/simexplorer/is/entities/data/Constant.java 2008-03-07 17:57:20 UTC (rev 1303)
@@ -20,9 +20,10 @@
import java.io.Serializable;
import fr.cemagref.simexplorer.is.entities.EntityVisitor;
+import fr.cemagref.simexplorer.is.entities.Leaf;
/** The Class Constant. */
-public class Constant extends DataEntity implements Serializable {
+public class Constant extends Leaf implements Serializable {
/** The Constant serialVersionUID. */
private static final long serialVersionUID = 5473300963328292128L;
@@ -78,7 +79,7 @@
}
public void accept(EntityVisitor visitor) {
- visitor.visitConstant(this);
+ visitor.visitLeaf(this);
}
@Override
Modified: trunk/simexplorer-is/simexplorer-is-entities/src/java/fr/cemagref/simexplorer/is/entities/data/ConstantValue.java
===================================================================
--- trunk/simexplorer-is/simexplorer-is-entities/src/java/fr/cemagref/simexplorer/is/entities/data/ConstantValue.java 2008-03-06 21:49:51 UTC (rev 1302)
+++ trunk/simexplorer-is/simexplorer-is-entities/src/java/fr/cemagref/simexplorer/is/entities/data/ConstantValue.java 2008-03-07 17:57:20 UTC (rev 1303)
@@ -20,11 +20,12 @@
import java.io.Serializable;
import fr.cemagref.simexplorer.is.entities.EntityVisitor;
+import fr.cemagref.simexplorer.is.entities.Leaf;
/**
* The Class ConstantValue.
*/
-public class ConstantValue extends DataEntity implements Serializable {
+public class ConstantValue extends Leaf implements Serializable {
/** The Constant serialVersionUID. */
private static final long serialVersionUID = -5434140706898012637L;
@@ -72,7 +73,7 @@
}
public void accept(EntityVisitor visitor) {
- visitor.visitConstantValue(this);
+ visitor.visitLeaf(this);
}
@Override
Deleted: trunk/simexplorer-is/simexplorer-is-entities/src/java/fr/cemagref/simexplorer/is/entities/data/DataEntity.java
===================================================================
--- trunk/simexplorer-is/simexplorer-is-entities/src/java/fr/cemagref/simexplorer/is/entities/data/DataEntity.java 2008-03-06 21:49:51 UTC (rev 1302)
+++ trunk/simexplorer-is/simexplorer-is-entities/src/java/fr/cemagref/simexplorer/is/entities/data/DataEntity.java 2008-03-07 17:57:20 UTC (rev 1303)
@@ -1,48 +0,0 @@
-/*
-* ##% Copyright (C) 2008 Code Lutin, Gabriel Landais
-*
-* This program is free software; you can redistribute it and/or
-* modify it under the terms of the GNU General Public License
-* as published by the Free Software Foundation; either version 2
-* of the License, or (at your option) any later version.
-*
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-*
-* You should have received a copy of the GNU General Public License
-* along with this program; if not, write to the Free Software
-* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-* ##% */
-package fr.cemagref.simexplorer.is.entities.data;
-
-import fr.cemagref.simexplorer.is.entities.BaseEntity;
-
-/**
- * The Class DataEntity.
- */
-public abstract class DataEntity implements BaseEntity {
-
- /** The Constant serialVersionUID. */
- private static final long serialVersionUID = -2570073990226703994L;
-
- @Override
- public int hashCode() {
- final int prime = 31;
- int result = 1;
- return result;
- }
-
- @Override
- public boolean equals(Object obj) {
- if (this == obj)
- return true;
- if (obj == null)
- return false;
- if (getClass() != obj.getClass())
- return false;
- return true;
- }
-
-}
Modified: trunk/simexplorer-is/simexplorer-is-entities/src/java/fr/cemagref/simexplorer/is/entities/data/Descriptor.java
===================================================================
--- trunk/simexplorer-is/simexplorer-is-entities/src/java/fr/cemagref/simexplorer/is/entities/data/Descriptor.java 2008-03-06 21:49:51 UTC (rev 1302)
+++ trunk/simexplorer-is/simexplorer-is-entities/src/java/fr/cemagref/simexplorer/is/entities/data/Descriptor.java 2008-03-07 17:57:20 UTC (rev 1303)
@@ -17,13 +17,13 @@
* ##% */
package fr.cemagref.simexplorer.is.entities.data;
-import fr.cemagref.simexplorer.is.entities.BaseEntity;
import fr.cemagref.simexplorer.is.entities.EntityVisitor;
+import fr.cemagref.simexplorer.is.entities.Leaf;
/**
* The Class Descriptor.
*/
-public class Descriptor implements BaseEntity, Comparable<Descriptor> {
+public class Descriptor extends Leaf implements Comparable<Descriptor> {
/** The Constant serialVersionUID. */
private static final long serialVersionUID = -7429465085491453048L;
Modified: trunk/simexplorer-is/simexplorer-is-entities/src/java/fr/cemagref/simexplorer/is/entities/data/ExplorationApplication.java
===================================================================
--- trunk/simexplorer-is/simexplorer-is-entities/src/java/fr/cemagref/simexplorer/is/entities/data/ExplorationApplication.java 2008-03-06 21:49:51 UTC (rev 1302)
+++ trunk/simexplorer-is/simexplorer-is-entities/src/java/fr/cemagref/simexplorer/is/entities/data/ExplorationApplication.java 2008-03-07 17:57:20 UTC (rev 1303)
@@ -21,7 +21,8 @@
import java.util.ArrayList;
import java.util.List;
-import fr.cemagref.simexplorer.is.entities.EntityVisitor;
+import fr.cemagref.simexplorer.is.entities.Entity;
+import fr.cemagref.simexplorer.is.entities.SimpleComposite;
/**
* The Class ExplorationApplication.
@@ -32,17 +33,17 @@
private static final long serialVersionUID = 122049347724394193L;
/** The explorations. */
- private List<ExplorationData> explorations;
+ private SimpleComposite<ExplorationData> explorations;
/** The components. */
- private List<Component> components;
+ private SimpleComposite<Component> components;
/**
* Gets the explorations.
*
* @return the explorations
*/
- public List<ExplorationData> getExplorations() {
+ public SimpleComposite<ExplorationData> getExplorations() {
return explorations;
}
@@ -51,7 +52,7 @@
*
* @param explorations the new explorations
*/
- public void setExplorations(List<ExplorationData> explorations) {
+ public void setExplorations(SimpleComposite<ExplorationData> explorations) {
this.explorations = explorations;
}
@@ -60,7 +61,7 @@
*
* @return the components
*/
- public List<Component> getComponents() {
+ public SimpleComposite<Component> getComponents() {
return components;
}
@@ -69,7 +70,7 @@
*
* @param components the new components
*/
- public void setComponents(List<Component> components) {
+ public void setComponents(SimpleComposite<Component> components) {
this.components = components;
}
@@ -77,17 +78,13 @@
* @see fr.cemagref.simexplorer.is.entities.data.LoggableElement#getDirectChildren()
*/
@Override
- public List<LoggableElement> getDirectChildren() {
- List<LoggableElement> directChildren = new ArrayList<LoggableElement>();
- directChildren.addAll(explorations);
- directChildren.addAll(components);
+ public List<Entity> getChildren() {
+ List<Entity> directChildren = new ArrayList<Entity>();
+ directChildren.add(explorations);
+ directChildren.add(components);
return directChildren;
}
- public void accept(EntityVisitor visitor) {
- visitor.visitExplorationApplication(this);
- }
-
@Override
public int hashCode() {
final int prime = 31;
Modified: trunk/simexplorer-is/simexplorer-is-entities/src/java/fr/cemagref/simexplorer/is/entities/data/ExplorationData.java
===================================================================
--- trunk/simexplorer-is/simexplorer-is-entities/src/java/fr/cemagref/simexplorer/is/entities/data/ExplorationData.java 2008-03-06 21:49:51 UTC (rev 1302)
+++ trunk/simexplorer-is/simexplorer-is-entities/src/java/fr/cemagref/simexplorer/is/entities/data/ExplorationData.java 2008-03-07 17:57:20 UTC (rev 1303)
@@ -18,9 +18,11 @@
package fr.cemagref.simexplorer.is.entities.data;
import java.io.Serializable;
+import java.util.ArrayList;
import java.util.List;
-import fr.cemagref.simexplorer.is.entities.EntityVisitor;
+import fr.cemagref.simexplorer.is.entities.Entity;
+import fr.cemagref.simexplorer.is.entities.SimpleComposite;
/**
* The Class ExplorationData.
@@ -31,7 +33,7 @@
private static final long serialVersionUID = -6439801837608358754L;
/** The values map. */
- private List<ConstantValue> constantValues;
+ private SimpleComposite<ConstantValue> constantValues;
/** The result. */
private Result result;
@@ -44,7 +46,7 @@
* @return the constant value
*/
private ConstantValue findConstantValue(Constant c) {
- for (ConstantValue constantValue : constantValues) {
+ for (ConstantValue constantValue : constantValues.getElements()) {
if (c.equals(constantValue.getConstant())) {
return constantValue;
}
@@ -63,7 +65,7 @@
if (constantValue == null) {
constantValue = new ConstantValue();
constantValue.setConstant(c);
- constantValues.add(constantValue);
+ constantValues.getElements().add(constantValue);
}
constantValue.setValue(value);
}
@@ -106,7 +108,7 @@
*
* @return the values map
*/
- public List<ConstantValue> getConstantValues() {
+ public SimpleComposite<ConstantValue> getConstantValues() {
return constantValues;
}
@@ -115,7 +117,7 @@
*
* @param constantValues the new values map
*/
- public void setConstantValues(List<ConstantValue> constantValues) {
+ public void setConstantValues(SimpleComposite<ConstantValue> constantValues) {
this.constantValues = constantValues;
}
@@ -123,14 +125,13 @@
* @see fr.cemagref.simexplorer.is.entities.data.LoggableElement#getDirectChildren()
*/
@Override
- public List<LoggableElement> getDirectChildren() {
- return null;
+ public List<Entity> getChildren() {
+ List<Entity> children = new ArrayList<Entity>();
+ children.add(result);
+ children.add(constantValues);
+ return children;
}
- public void accept(EntityVisitor visitor) {
- visitor.visitExplorationData(this);
- }
-
@Override
public int hashCode() {
final int prime = 31;
Modified: trunk/simexplorer-is/simexplorer-is-entities/src/java/fr/cemagref/simexplorer/is/entities/data/Library.java
===================================================================
--- trunk/simexplorer-is/simexplorer-is-entities/src/java/fr/cemagref/simexplorer/is/entities/data/Library.java 2008-03-06 21:49:51 UTC (rev 1302)
+++ trunk/simexplorer-is/simexplorer-is-entities/src/java/fr/cemagref/simexplorer/is/entities/data/Library.java 2008-03-07 17:57:20 UTC (rev 1303)
@@ -17,8 +17,10 @@
* ##% */
package fr.cemagref.simexplorer.is.entities.data;
+import java.util.ArrayList;
import java.util.List;
+import fr.cemagref.simexplorer.is.entities.Entity;
import fr.cemagref.simexplorer.is.entities.EntityVisitor;
/** The Class Library. */
@@ -27,19 +29,7 @@
/** The Constant serialVersionUID. */
private static final long serialVersionUID = -5635619075345573945L;
- /* (non-Javadoc)
- * @see fr.cemagref.simexplorer.is.entities.data.LoggableElement#getDirectChildren()
- */
@Override
- public List<LoggableElement> getDirectChildren() {
- return null;
- }
-
- public void accept(EntityVisitor visitor) {
- visitor.visitLibrary(this);
- }
-
- @Override
public int hashCode() {
final int prime = 31;
int result = super.hashCode();
@@ -65,6 +55,12 @@
// return false;
return true;
}
-
-
+
+ @Override
+ public List<Entity> getChildren() {
+ List<Entity> children = new ArrayList<Entity>();
+ children.addAll(getAttachments());
+ return children;
+ }
+
}
Modified: trunk/simexplorer-is/simexplorer-is-entities/src/java/fr/cemagref/simexplorer/is/entities/data/LoggableElement.java
===================================================================
--- trunk/simexplorer-is/simexplorer-is-entities/src/java/fr/cemagref/simexplorer/is/entities/data/LoggableElement.java 2008-03-06 21:49:51 UTC (rev 1302)
+++ trunk/simexplorer-is/simexplorer-is-entities/src/java/fr/cemagref/simexplorer/is/entities/data/LoggableElement.java 2008-03-07 17:57:20 UTC (rev 1303)
@@ -20,13 +20,16 @@
import java.util.ArrayList;
import java.util.List;
+import fr.cemagref.simexplorer.is.entities.Composite;
+import fr.cemagref.simexplorer.is.entities.Entity;
+import fr.cemagref.simexplorer.is.entities.EntityVisitor;
import fr.cemagref.simexplorer.is.entities.attachment.Attachment;
import fr.cemagref.simexplorer.is.entities.metadata.MetaData;
/**
* The Class LoggableElement.
*/
-public abstract class LoggableElement extends DataEntity {
+public abstract class LoggableElement extends Composite {
/** The name. */
private String name;
@@ -54,30 +57,33 @@
return getName();
}
+
/**
- * Gets the direct children.
+ * Gets all children of LoggableElement type.
*
- * @return the direct children
+ * @param entity the entity
+ * @param list the list
+ *
*/
- public abstract List<LoggableElement> getDirectChildren();
-
+ private void getLEChildren(Entity entity, List<LoggableElement> list) {
+ if (entity instanceof LoggableElement) {
+ list.add((LoggableElement) entity);
+ }
+ List<Entity> children = entity.getChildren();
+ for (Entity child : children) {
+ getLEChildren(child, list);
+ }
+ }
+
/**
- * Gets the children.
+ * Gets all children of LoggableElement type.
*
- * @return the children
+ * @return the lE children
*/
- public List<LoggableElement> getChildren() {
- List<LoggableElement> directChildren = getDirectChildren();
-
- List<LoggableElement> children = new ArrayList<LoggableElement>();
- if (directChildren != null) {
- for (LoggableElement element : directChildren) {
- children.add(element);
- children.addAll(element.getChildren());
- }
- }
-
- return children;
+ public List<LoggableElement> getLEChildren() {
+ ArrayList<LoggableElement> leChildren = new ArrayList<LoggableElement>();
+ getLEChildren(this, leChildren);
+ return leChildren;
}
/**
Modified: trunk/simexplorer-is/simexplorer-is-entities/src/java/fr/cemagref/simexplorer/is/entities/data/Repository.java
===================================================================
--- trunk/simexplorer-is/simexplorer-is-entities/src/java/fr/cemagref/simexplorer/is/entities/data/Repository.java 2008-03-06 21:49:51 UTC (rev 1302)
+++ trunk/simexplorer-is/simexplorer-is-entities/src/java/fr/cemagref/simexplorer/is/entities/data/Repository.java 2008-03-07 17:57:20 UTC (rev 1303)
@@ -18,19 +18,16 @@
package fr.cemagref.simexplorer.is.entities.data;
import fr.cemagref.simexplorer.is.entities.EntityVisitor;
+import fr.cemagref.simexplorer.is.entities.Leaf;
/**
* The Class Repository.
*/
-public class Repository extends DataEntity {
+public class Repository extends Leaf {
/** The Constant serialVersionUID. */
private static final long serialVersionUID = 1232065724338066924L;
- public void accept(EntityVisitor visitor) {
- visitor.visitRepository(this);
- }
-
@Override
public int hashCode() {
final int prime = 31;
@@ -58,4 +55,9 @@
return true;
}
+ @Override
+ public void accept(EntityVisitor visitor) {
+ // nothing yet
+ }
+
}
Modified: trunk/simexplorer-is/simexplorer-is-entities/src/java/fr/cemagref/simexplorer/is/entities/data/Result.java
===================================================================
--- trunk/simexplorer-is/simexplorer-is-entities/src/java/fr/cemagref/simexplorer/is/entities/data/Result.java 2008-03-06 21:49:51 UTC (rev 1302)
+++ trunk/simexplorer-is/simexplorer-is-entities/src/java/fr/cemagref/simexplorer/is/entities/data/Result.java 2008-03-07 17:57:20 UTC (rev 1303)
@@ -18,9 +18,10 @@
package fr.cemagref.simexplorer.is.entities.data;
import fr.cemagref.simexplorer.is.entities.EntityVisitor;
+import fr.cemagref.simexplorer.is.entities.Leaf;
/** The Class Result. */
-public class Result extends DataEntity {
+public class Result extends Leaf {
/** The Constant serialVersionUID. */
private static final long serialVersionUID = 2111484866027162494L;
@@ -31,7 +32,7 @@
}
public void accept(EntityVisitor visitor) {
- visitor.visitResult(this);
+ visitor.visitLeaf(this);
}
@Override
Modified: trunk/simexplorer-is/simexplorer-is-entities/src/java/fr/cemagref/simexplorer/is/entities/data/Structure.java
===================================================================
--- trunk/simexplorer-is/simexplorer-is-entities/src/java/fr/cemagref/simexplorer/is/entities/data/Structure.java 2008-03-06 21:49:51 UTC (rev 1302)
+++ trunk/simexplorer-is/simexplorer-is-entities/src/java/fr/cemagref/simexplorer/is/entities/data/Structure.java 2008-03-07 17:57:20 UTC (rev 1303)
@@ -18,17 +18,18 @@
package fr.cemagref.simexplorer.is.entities.data;
import fr.cemagref.simexplorer.is.entities.EntityVisitor;
+import fr.cemagref.simexplorer.is.entities.Leaf;
/**
* The Class Structure.
*/
-public abstract class Structure extends DataEntity {
+public abstract class Structure extends Leaf {
/** The Constant serialVersionUID. */
private static final long serialVersionUID = 2594331198459134006L;
public void accept(EntityVisitor visitor) {
- visitor.visitStructure(this);
+ visitor.visitLeaf(this);
}
@Override
Modified: trunk/simexplorer-is/simexplorer-is-entities/src/java/fr/cemagref/simexplorer/is/entities/metadata/MetaData.java
===================================================================
--- trunk/simexplorer-is/simexplorer-is-entities/src/java/fr/cemagref/simexplorer/is/entities/metadata/MetaData.java 2008-03-06 21:49:51 UTC (rev 1302)
+++ trunk/simexplorer-is/simexplorer-is-entities/src/java/fr/cemagref/simexplorer/is/entities/metadata/MetaData.java 2008-03-07 17:57:20 UTC (rev 1303)
@@ -19,15 +19,15 @@
import java.util.Date;
-import fr.cemagref.simexplorer.is.entities.BaseEntity;
import fr.cemagref.simexplorer.is.entities.EntityTypeEnum;
import fr.cemagref.simexplorer.is.entities.EntityVisitor;
+import fr.cemagref.simexplorer.is.entities.Leaf;
/**
* The Class MetaData. Used by IS to store relative data of a LoggableElement. SimExplorer should not set properties of
* this class.
*/
-public class MetaData implements BaseEntity {
+public class MetaData extends Leaf {
/** The Constant serialVersionUID. */
private static final long serialVersionUID = -7916932464982315229L;
Modified: trunk/simexplorer-is/simexplorer-is-service/src/java/fr/cemagref/simexplorer/is/service/MockDatabase.java
===================================================================
--- trunk/simexplorer-is/simexplorer-is-service/src/java/fr/cemagref/simexplorer/is/service/MockDatabase.java 2008-03-06 21:49:51 UTC (rev 1302)
+++ trunk/simexplorer-is/simexplorer-is-service/src/java/fr/cemagref/simexplorer/is/service/MockDatabase.java 2008-03-07 17:57:20 UTC (rev 1303)
@@ -130,13 +130,13 @@
this.eas.put(uuid, eas);
registerLoggableElement(uuid, eas);
for (ExplorationApplication ea : eas) {
- for (Component component : ea.getComponents()) {
+ for (Component component : ea.getComponents().getElements()) {
registerLoggableElement(component.getMetaData().getUuid(), component);
for (Library library : component.getLibraries()) {
registerLoggableElement(library.getMetaData().getUuid(), library);
}
}
- for (ExplorationData explorationData : ea.getExplorations()) {
+ for (ExplorationData explorationData : ea.getExplorations().getElements()) {
registerLoggableElement(explorationData.getMetaData().getUuid(), explorationData);
}
}
Modified: trunk/simexplorer-is/simexplorer-is-service/src/java/fr/cemagref/simexplorer/is/service/StorageServiceCommon.java
===================================================================
--- trunk/simexplorer-is/simexplorer-is-service/src/java/fr/cemagref/simexplorer/is/service/StorageServiceCommon.java 2008-03-06 21:49:51 UTC (rev 1302)
+++ trunk/simexplorer-is/simexplorer-is-service/src/java/fr/cemagref/simexplorer/is/service/StorageServiceCommon.java 2008-03-07 17:57:20 UTC (rev 1303)
@@ -43,9 +43,9 @@
import com.healthmarketscience.rmiio.SerializableInputStream;
+import fr.cemagref.simexplorer.is.entities.Entity;
import fr.cemagref.simexplorer.is.entities.EntityTypeEnum;
import fr.cemagref.simexplorer.is.entities.attachment.Attachment;
-import fr.cemagref.simexplorer.is.entities.data.ExplorationApplication;
import fr.cemagref.simexplorer.is.entities.data.LoggableElement;
import fr.cemagref.simexplorer.is.entities.metadata.MetaData;
import fr.cemagref.simexplorer.is.entities.metadata.Version;
@@ -402,7 +402,7 @@
files.put(FILE_XML, getStorageEngine().retrieveData(token, loggableElement.getMetaData(), getXMLAttachment()));
- List<LoggableElement> children = loggableElement.getChildren();
+ List<LoggableElement> children = loggableElement.getLEChildren();
for (Attachment attachment : loggableElement.getAttachments()) {
files.put(FILE_DATA_PREFIX + FOLDER_SEPARATOR + attachment.getUniqueId(), getStorageEngine().retrieveData(
token, loggableElement.getMetaData(), attachment));
@@ -760,6 +760,31 @@
// Compute element hash
metaData.setHash(Long.toString(loggableElement.hashCode()));
}
+
+ /**
+ * Save all LE under element
+ * Only first level LE are saved
+ *
+ * @param token the token
+ * @param element the element
+ * @param idsattachment the idsattachment
+ *
+ * @throws SimExplorerException the sim explorer exception
+ */
+ private void recursiveSaveElement(String token, Entity element, Map<Attachment, String> idsattachment)
+ throws SimExplorerException {
+ List<Entity> children = element.getChildren();
+ for (Entity child : children) {
+ if (child instanceof LoggableElement) {
+ LoggableElement leChild = (LoggableElement) child;
+ LoggableElement childElement = saveElement(token, leChild, idsattachment);
+ // TODO check
+ getStorageEngine().saveElementHierarchy(token, leChild.getMetaData(), childElement.getMetaData());
+ } else {
+ recursiveSaveElement(token, child, idsattachment);
+ }
+ }
+ }
/**
* Real implementation of saveElement.
@@ -791,12 +816,7 @@
// Process version rules
processVersionRules(token, metaData, element);
- List<LoggableElement> children = element.getChildren();
- LoggableElement childElement;
- for (LoggableElement child : children) {
- childElement = saveElement(token, child, idsattachment);
- getStorageEngine().saveElementHierarchy(token, metaData, childElement.getMetaData());
- }
+ recursiveSaveElement(token, element, idsattachment);
// Prepare saving
Map<Attachment, InputStream> attachments = new HashMap<Attachment, InputStream>();
Modified: trunk/simexplorer-is/simexplorer-is-service/src/java/fr/cemagref/simexplorer/is/service/StorageServiceGenerator.java
===================================================================
--- trunk/simexplorer-is/simexplorer-is-service/src/java/fr/cemagref/simexplorer/is/service/StorageServiceGenerator.java 2008-03-06 21:49:51 UTC (rev 1302)
+++ trunk/simexplorer-is/simexplorer-is-service/src/java/fr/cemagref/simexplorer/is/service/StorageServiceGenerator.java 2008-03-07 17:57:20 UTC (rev 1303)
@@ -53,7 +53,7 @@
List<Attachment> attachmentsKeys = new ArrayList<Attachment>();
attachmentsKeys.addAll(ea.getAttachments());
- List<LoggableElement> children = ea.getChildren();
+ List<LoggableElement> children = ea.getLEChildren();
for (LoggableElement child : children) {
attachmentsKeys.addAll(child.getAttachments());
}
@@ -123,7 +123,7 @@
ea.getMetaData().setVersion(secondVersion);
if (different) {
- Component component = ea.getComponents().iterator().next();
+ Component component = ea.getComponents().getElements().iterator().next();
Code code = new Code();
code.setCode("regreg");
code.setLanguage("regreg");
Deleted: trunk/simexplorer-is/simexplorer-is-storage/src/java/fr/cemagref/simexplorer/is/factories/BaseEntityFactory.java
===================================================================
--- trunk/simexplorer-is/simexplorer-is-storage/src/java/fr/cemagref/simexplorer/is/factories/BaseEntityFactory.java 2008-03-06 21:49:51 UTC (rev 1302)
+++ trunk/simexplorer-is/simexplorer-is-storage/src/java/fr/cemagref/simexplorer/is/factories/BaseEntityFactory.java 2008-03-07 17:57:20 UTC (rev 1303)
@@ -1,37 +0,0 @@
-/*
-* ##% Copyright (C) 2008 Code Lutin, Gabriel Landais
-*
-* This program is free software; you can redistribute it and/or
-* modify it under the terms of the GNU General Public License
-* as published by the Free Software Foundation; either version 2
-* of the License, or (at your option) any later version.
-*
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-*
-* You should have received a copy of the GNU General Public License
-* along with this program; if not, write to the Free Software
-* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-* ##% */
-package fr.cemagref.simexplorer.is.factories;
-
-import com.thoughtworks.xstream.XStream;
-
-import fr.cemagref.simexplorer.is.entities.BaseEntity;
-
-/**
- * A factory for creating BaseEntity objects.
- *
- * @param <E> Entity type
- */
-public abstract class BaseEntityFactory<E extends BaseEntity> {
-
- private static XStream xstream = new XStream();
-
- public static XStream getXstream() {
- return xstream;
- }
-
-}
Copied: trunk/simexplorer-is/simexplorer-is-storage/src/java/fr/cemagref/simexplorer/is/factories/EntityFactory.java (from rev 1302, trunk/simexplorer-is/simexplorer-is-storage/src/java/fr/cemagref/simexplorer/is/factories/BaseEntityFactory.java)
===================================================================
--- trunk/simexplorer-is/simexplorer-is-storage/src/java/fr/cemagref/simexplorer/is/factories/EntityFactory.java (rev 0)
+++ trunk/simexplorer-is/simexplorer-is-storage/src/java/fr/cemagref/simexplorer/is/factories/EntityFactory.java 2008-03-07 17:57:20 UTC (rev 1303)
@@ -0,0 +1,37 @@
+/*
+* ##% Copyright (C) 2008 Code Lutin, Gabriel Landais
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+* ##% */
+package fr.cemagref.simexplorer.is.factories;
+
+import com.thoughtworks.xstream.XStream;
+
+import fr.cemagref.simexplorer.is.entities.Entity;
+
+/**
+ * A factory for creating BaseEntity objects.
+ *
+ * @param <E> Entity type
+ */
+public abstract class EntityFactory<E extends Entity> {
+
+ private static XStream xstream = new XStream();
+
+ public static XStream getXstream() {
+ return xstream;
+ }
+
+}
Modified: trunk/simexplorer-is/simexplorer-is-storage/src/java/fr/cemagref/simexplorer/is/factories/LoggableElementFactory.java
===================================================================
--- trunk/simexplorer-is/simexplorer-is-storage/src/java/fr/cemagref/simexplorer/is/factories/LoggableElementFactory.java 2008-03-06 21:49:51 UTC (rev 1302)
+++ trunk/simexplorer-is/simexplorer-is-storage/src/java/fr/cemagref/simexplorer/is/factories/LoggableElementFactory.java 2008-03-07 17:57:20 UTC (rev 1303)
@@ -32,7 +32,7 @@
* LoggableElement subtype
*/
public abstract class LoggableElementFactory<E extends LoggableElement> extends
- BaseEntityFactory<E> {
+ EntityFactory<E> {
/**
* Parses the stream.
Deleted: trunk/simexplorer-is/simexplorer-is-storage/src/java/fr/cemagref/simexplorer/is/factories/MetaDataFactory.java
===================================================================
--- trunk/simexplorer-is/simexplorer-is-storage/src/java/fr/cemagref/simexplorer/is/factories/MetaDataFactory.java 2008-03-06 21:49:51 UTC (rev 1302)
+++ trunk/simexplorer-is/simexplorer-is-storage/src/java/fr/cemagref/simexplorer/is/factories/MetaDataFactory.java 2008-03-07 17:57:20 UTC (rev 1303)
@@ -1,362 +0,0 @@
-/*
-* ##% Copyright (C) 2008 Code Lutin, Gabriel Landais
-*
-* This program is free software; you can redistribute it and/or
-* modify it under the terms of the GNU General Public License
-* as published by the Free Software Foundation; either version 2
-* of the License, or (at your option) any later version.
-*
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-*
-* You should have received a copy of the GNU General Public License
-* along with this program; if not, write to the Free Software
-* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-* ##% */
-package fr.cemagref.simexplorer.is.factories;
-
-import java.io.InputStream;
-import java.io.PipedInputStream;
-import java.io.PipedOutputStream;
-import java.text.ParseException;
-import java.text.SimpleDateFormat;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import javax.xml.transform.dom.DOMSource;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.codelutin.util.DigestGenerator;
-import org.codelutin.util.MD5;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-
-import fr.cemagref.simexplorer.is.entities.attachment.Attachment;
-import fr.cemagref.simexplorer.is.entities.attachment.ContentType;
-import fr.cemagref.simexplorer.is.entities.metadata.MetaData;
-import fr.cemagref.simexplorer.is.exceptions.SimExplorerException;
-import fr.cemagref.simexplorer.is.exceptions.SimExplorerTechnicalException;
-
-/**
- * A factory for creating MetaData objects.
- *
- * @param <E> MetaData
- */
-public class MetaDataFactory<E extends MetaData> extends BaseEntityFactory<MetaData> {
-
- private static final Log log = LogFactory.getLog(MetaDataFactory.class);
-
- /** The Constant sdf. */
- private static final SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss");
-
-// /* (non-Javadoc)
-// * @see fr.cemagref.simexplorer.is.factories.BaseEntityFactory#createInstance()
-// */
-// @Override
-// public MetaData createInstance() {
-// return new MetaData();
-// }
-//
-// /**
-// * Gets the factory.
-// *
-// * @param <E> Metadata
-// *
-// * @param entityClass the entity class
-// *
-// * @return the factory
-// *
-// * @throws SimExplorerException the exception
-// */
-// @SuppressWarnings( { "unchecked" })
-// public static <E extends MetaData> MetaDataFactory<E> getFactory(Class<E> entityClass) throws SimExplorerException {
-// return (MetaDataFactory) BaseEntityFactory.getFactory(entityClass);
-// }
-//
-// /*
-// * (non-Javadoc)
-// *
-// * @see fr.cemagref.simexplorer.is.storage.factories.BaseEntityFactory#loadXMLElement(org.w3c.dom.Element)
-// */
-//
-// @Override
-// public MetaData loadElement(Element xmlElement) throws SimExplorerException {
-// MetaData entity = super.loadElement(xmlElement);
-// entity.setUuid(getXMLProperty(xmlElement, KEY_METADATA_UUID));
-// entity.setName(getXMLProperty(xmlElement, KEY_METADATA_NAME));
-// entity.setType(getXMLProperty(xmlElement, KEY_METADATA_TYPE));
-// entity.setDescription(getXMLProperty(xmlElement, KEY_METADATA_DESCRIPTION));
-// entity.setVersion(getXMLProperty(xmlElement, KEY_METADATA_VERSION));
-//
-// String latestVersion = getXMLProperty(xmlElement, KEY_METADATA_LATESTVERSION);
-// if (latestVersion != null && "1".equals(latestVersion)) {
-// entity.setLatest(true);
-// } else {
-// entity.setLatest(false);
-// }
-//
-// String creationDate = getXMLProperty(xmlElement, KEY_METADATA_CREATIONDATE);
-// if (creationDate != null) {
-// Date date;
-// try {
-// date = sdf.parse(creationDate);
-// } catch (ParseException e) {
-// throw new SimExplorerTechnicalException(e);
-// }
-// entity.setCreationDate(date);
-// }
-//
-// entity.setHash(getXMLProperty(xmlElement, KEY_METADATA_HASH));
-// entity.setParentVersionUuid(getXMLProperty(xmlElement, KEY_METADATA_PARENTVERSION_UUID));
-// entity.setParentVersionVersion(getXMLProperty(xmlElement, KEY_METADATA_PARENTVERSION_VERSION));
-//
-// Map<String, String> descriptors = new HashMap<String, String>();
-//
-// Element descriptorsElement = getXMLElementByTagName(xmlElement, KEY_METADATA_DESCRIPTORS);
-// if (descriptorsElement != null) {
-// List<Element> descriptorElements = getXMLElementsByTagName(descriptorsElement, KEY_METADATA_DESCRIPTOR);
-// for (Element descriptorElement : descriptorElements) {
-// String name = getXMLProperty(descriptorElement, KEY_METADATA_DESCRIPTOR_NAME);
-// String value = getXMLProperty(descriptorElement, KEY_METADATA_DESCRIPTOR_VALUE);
-// descriptors.put(name, value);
-// }
-// }
-// entity.setDescriptors(descriptors);
-//
-// List<Attachment> attachments = new ArrayList<Attachment>();
-//
-// Element attachmentsElement = getXMLElementByTagName(xmlElement, KEY_METADATA_ATTACHMENTS);
-// if (attachmentsElement != null) {
-// List<Element> attachmentElements = getXMLElementsByTagName(attachmentsElement, KEY_METADATA_ATTACHMENT);
-// for (Element attachmentElement : attachmentElements) {
-// Attachment attachment = new Attachment();
-//
-// String name = getXMLProperty(attachmentElement, KEY_METADATA_ATTACHMENT_NAME);
-// attachment.setFileName(name);
-//
-// String type = getXMLProperty(attachmentElement, KEY_METADATA_ATTACHMENT_TYPE);
-// ContentType contentType = ContentTypeFactory.getContentTypeInstance(type);
-// attachment.setContentType(contentType);
-//
-// String dataHash = getXMLProperty(attachmentElement, KEY_METADATA_ATTACHMENT_HASH);
-// attachment.setDataHash(dataHash);
-//
-// attachments.add(attachment);
-// }
-// }
-//
-// entity.setAttachments(attachments);
-//
-// return entity;
-// }
-//
-// /* (non-Javadoc)
-// * @see fr.cemagref.simexplorer.is.factories.BaseEntityFactory#saveElement(org.w3c.dom.Document, org.w3c.dom.Element, fr.cemagref.simexplorer.is.entities.BaseEntity)
-// */
-// @Override
-// public void saveElement(Document document, Element xmlElement, MetaData element) throws SimExplorerException {
-//
-// setXMLProperty(document, xmlElement, KEY_METADATA_UUID, element.getUuid());
-// setXMLProperty(document, xmlElement, KEY_METADATA_NAME, element.getName());
-// setXMLProperty(document, xmlElement, KEY_METADATA_TYPE, element.getType());
-// setXMLProperty(document, xmlElement, KEY_METADATA_DESCRIPTION, element.getDescription());
-// setXMLProperty(document, xmlElement, KEY_METADATA_VERSION, element.getVersion().toString());
-//
-// if (element.isLatest()) {
-// setXMLProperty(document, xmlElement, KEY_METADATA_LATESTVERSION, "1");
-// } else {
-// setXMLProperty(document, xmlElement, KEY_METADATA_LATESTVERSION, "0");
-// }
-//
-// if (element.getCreationDate() != null) {
-// setXMLProperty(document, xmlElement, KEY_METADATA_CREATIONDATE, sdf.format(element.getCreationDate()));
-// }
-//
-// setXMLProperty(document, xmlElement, KEY_METADATA_HASH, element.getHash());
-// setXMLProperty(document, xmlElement, KEY_METADATA_PARENTVERSION_UUID, element.getParentVersionUuid());
-// setXMLProperty(document, xmlElement, KEY_METADATA_PARENTVERSION_VERSION, element.getParentVersionVersion());
-//
-// Map<String, String> descriptors = element.getDescriptors();
-//
-// Element descriptorsElement = document.createElement(KEY_METADATA_DESCRIPTORS);
-//
-// for (Map.Entry<String, String> kv : descriptors.entrySet()) {
-// Element descriptorElement = document.createElement(KEY_METADATA_DESCRIPTOR);
-// setXMLProperty(document, descriptorElement, KEY_METADATA_DESCRIPTOR_NAME, kv.getKey());
-// setXMLProperty(document, descriptorElement, KEY_METADATA_DESCRIPTOR_VALUE, kv.getValue());
-// descriptorsElement.appendChild(descriptorElement);
-// }
-//
-// xmlElement.appendChild(descriptorsElement);
-//
-// List<Attachment> attachments = element.getAttachments();
-//
-// if (attachments != null) {
-//
-// Element attachmentsElement = document.createElement(KEY_METADATA_ATTACHMENTS);
-//
-// for (Attachment attachment : attachments) {
-// Element attachmentElement = document.createElement(KEY_METADATA_ATTACHMENT);
-//
-// setXMLProperty(document, attachmentElement, KEY_METADATA_ATTACHMENT_NAME, attachment.getFileName());
-// setXMLProperty(document, attachmentElement, KEY_METADATA_ATTACHMENT_TYPE, attachment.getContentType()
-// .getClass().getSimpleName());
-// setXMLProperty(document, attachmentElement, KEY_METADATA_ATTACHMENT_HASH, attachment.getDataHash());
-//
-// attachmentsElement.appendChild(attachmentElement);
-// }
-// xmlElement.appendChild(attachmentsElement);
-//
-// }
-//
-// }
-//
-// /**
-// * As metadata is stored inside an entity, this method loads metadata with parsing stream and retrieve metadata
-// * node.
-// *
-// * @param node the node
-// *
-// * @return the meta data
-// *
-// * @throws SimExplorerException the exception
-// */
-// public MetaData loadElementFromParentXML(Element node) throws SimExplorerException {
-// Element mdeElement = getXMLElementByTagName(node, KEY_METADATA);
-// MetaData mde;
-// try {
-// mde = loadElement(mdeElement);
-// } catch (SimExplorerException e) {
-// throw new SimExplorerTechnicalException(e);
-// }
-// return mde;
-// }
-//
-// /**
-// * Replace element in parent xml.
-// *
-// * @param xmlStream the xml stream
-// * @param newMetadata the new metadata
-// *
-// * @return the input stream
-// *
-// * @throws SimExplorerException the exception
-// */
-// public InputStream modifyMedataElementStream(InputStream xmlStream, MetaData newMetadata)
-// throws SimExplorerException {
-// Document document;
-// Element rootElement;
-// Element newElement;
-// try {
-// document = getXMLBuilder().parse(xmlStream);
-// rootElement = (Element) document.getFirstChild();
-// newElement = document.createElement(KEY_METADATA);
-// } catch (Exception e) {
-// throw new SimExplorerTechnicalException(e);
-// }
-// this.saveElement(document, newElement, newMetadata);
-// Element oldElement = getXMLElementByTagName(rootElement, KEY_METADATA);
-// rootElement.replaceChild(newElement, oldElement);
-//
-// DOMSource domSource = new DOMSource(document);
-//
-// try {
-// PipedOutputStream os = new PipedOutputStream();
-// PipedInputStream is = new PipedInputStream(os);
-//
-// XMLStreamEncoder xse = new XMLStreamEncoder(domSource, os);
-// xse.start();
-//
-// return is;
-// } catch (Exception e) {
-// throw new SimExplorerTechnicalException(e);
-// }
-// }
-//
-// /**
-// * Replace element in parent xml.
-// *
-// * @param newMetadata the new metadata
-// * @param document the document
-// * @param xmlNode the xml node
-// *
-// * @throws SimExplorerException the exception
-// */
-// public void replaceMetadataInXML(Document document, Element xmlNode, MetaData newMetadata)
-// throws SimExplorerException {
-// Element newElement = document.createElement(KEY_METADATA);
-// this.saveElement(document, newElement, newMetadata);
-//
-// Element oldElement = getXMLElementByTagName(xmlNode, KEY_METADATA);
-// xmlNode.replaceChild(newElement, oldElement);
-// }
-//
-// /**
-// * Compute hash.
-// *
-// * @param node the xml stream
-// *
-// * @return the string
-// *
-// * @throws SimExplorerException the exception
-// */
-// public String computeHash(Element node) throws SimExplorerException {
-// try {
-// Document document = getXMLBuilder().newDocument();
-// document.appendChild(document.importNode(node, true));
-//
-// removeMetadatas(document);
-//
-// DigestGenerator digestGenerator = new DigestGenerator();
-// byte[] digest = digestGenerator.getDigest(document, DigestGenerator.sha1DigestAlgorithm);
-//
-// return MD5.asHex(digest);
-// } catch (Exception e) {
-// throw new SimExplorerTechnicalException(e);
-// }
-// }
-//
-// /**
-// * Removes the metadatas.
-// *
-// * @param node the node
-// *
-// * @return the int
-// */
-// private int removeMetadatas(Node node) {
-// int tot = 0;
-// NodeList childNodes = node.getChildNodes();
-// List<Node> toRemove = new ArrayList<Node>();
-//
-// for (int i = 0; i < childNodes.getLength(); i++) {
-// Node child = childNodes.item(i);
-// if (child instanceof Element && KEY_METADATA.equals(((Element) child).getTagName())) {
-// toRemove.add(child);
-// }
-// }
-//
-// for (Node metadata : toRemove) {
-// node.removeChild(metadata);
-// tot++;
-// }
-//
-// if (tot == 0) {
-// childNodes = node.getChildNodes();
-// for (int i = 0; i < childNodes.getLength(); i++) {
-// Node child = childNodes.item(i);
-// tot = tot + removeMetadatas(child);
-// }
-// }
-//
-// return tot;
-// }
-
-}
Modified: trunk/simexplorer-is/simexplorer-is-storage/src/java/fr/cemagref/simexplorer/is/storage/ElementGenerator.java
===================================================================
--- trunk/simexplorer-is/simexplorer-is-storage/src/java/fr/cemagref/simexplorer/is/storage/ElementGenerator.java 2008-03-06 21:49:51 UTC (rev 1302)
+++ trunk/simexplorer-is/simexplorer-is-storage/src/java/fr/cemagref/simexplorer/is/storage/ElementGenerator.java 2008-03-07 17:57:20 UTC (rev 1303)
@@ -28,12 +28,13 @@
import org.apache.commons.lang.RandomStringUtils;
import org.codelutin.util.MD5;
+import fr.cemagref.simexplorer.is.entities.Entity;
+import fr.cemagref.simexplorer.is.entities.SimpleComposite;
import fr.cemagref.simexplorer.is.entities.attachment.Attachment;
import fr.cemagref.simexplorer.is.entities.data.Code;
import fr.cemagref.simexplorer.is.entities.data.Component;
import fr.cemagref.simexplorer.is.entities.data.Constant;
import fr.cemagref.simexplorer.is.entities.data.ConstantValue;
-import fr.cemagref.simexplorer.is.entities.data.DataEntity;
import fr.cemagref.simexplorer.is.entities.data.Descriptor;
import fr.cemagref.simexplorer.is.entities.data.ExplorationApplication;
import fr.cemagref.simexplorer.is.entities.data.ExplorationData;
@@ -43,7 +44,6 @@
import fr.cemagref.simexplorer.is.entities.data.Structure;
import fr.cemagref.simexplorer.is.entities.metadata.MetaData;
import fr.cemagref.simexplorer.is.entities.metadata.Version;
-import fr.cemagref.simexplorer.is.factories.BaseEntityFactory;
import fr.cemagref.simexplorer.is.factories.ContentTypeFactory;
/**
@@ -213,7 +213,7 @@
*
* @throws Exception the exception
*/
- public <T extends DataEntity> List<T> generateArray(Class<T> clazz) throws Exception {
+ public <T extends Entity> List<T> generateArray(Class<T> clazz) throws Exception {
List<T> elements = new ArrayList<T>();
int i = 3 + r.nextInt(2);
for (int j = 0; j < i; j++) {
@@ -240,12 +240,12 @@
for (ExplorationData object : datas) {
processExplorationData(object);
}
- ea.setExplorations(datas);
+ ea.setExplorations(SimpleComposite.castList(datas));
List<Component> components = generateArray(Component.class);
for (Component object : components) {
processComponent(object);
}
- ea.setComponents(components);
+ ea.setComponents(SimpleComposite.castList(components));
return ea;
}
@@ -341,7 +341,7 @@
for (ConstantValue constantValue : constantValues) {
processConstantValue(constantValue);
}
- explorationData.setConstantValues(constantValues);
+ explorationData.setConstantValues(SimpleComposite.castList(constantValues));
}
Modified: trunk/simexplorer-is/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/ExportElementAction.java
===================================================================
--- trunk/simexplorer-is/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/ExportElementAction.java 2008-03-06 21:49:51 UTC (rev 1302)
+++ trunk/simexplorer-is/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/ExportElementAction.java 2008-03-07 17:57:20 UTC (rev 1303)
@@ -18,6 +18,14 @@
* ##% */
package fr.cemagref.simexplorer.is.ui.swing.actions;
+import static org.codelutin.i18n.I18n.n_;
+
+import java.awt.event.ActionEvent;
+
+import javax.swing.Action;
+
+import jaxx.runtime.UIHelper;
+import jaxx.runtime.builder.TabModel;
import fr.cemagref.simexplorer.is.entities.EntityHelper;
import fr.cemagref.simexplorer.is.entities.data.LoggableElement;
import fr.cemagref.simexplorer.is.service.StorageService;
@@ -29,13 +37,7 @@
import fr.cemagref.simexplorer.is.ui.swing.model.tab.SimExplorerAbstractTabModel;
import fr.cemagref.simexplorer.is.ui.swing.model.tab.SynchronizeTabModel;
import fr.cemagref.simexplorer.is.ui.swing.ui.SimExplorerTab;
-import jaxx.runtime.UIHelper;
-import jaxx.runtime.builder.TabModel;
-import static org.codelutin.i18n.I18n.n_;
-import javax.swing.Action;
-import java.awt.event.ActionEvent;
-
/**
* Action pour exporter un élément
*
Modified: trunk/simexplorer-is/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/model/DataEntityModel.java
===================================================================
--- trunk/simexplorer-is/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/model/DataEntityModel.java 2008-03-06 21:49:51 UTC (rev 1302)
+++ trunk/simexplorer-is/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/model/DataEntityModel.java 2008-03-07 17:57:20 UTC (rev 1303)
@@ -17,8 +17,8 @@
* ##% */
package fr.cemagref.simexplorer.is.ui.swing.model;
+import fr.cemagref.simexplorer.is.entities.Entity;
import fr.cemagref.simexplorer.is.entities.EntityTypeEnum;
-import fr.cemagref.simexplorer.is.entities.data.DataEntity;
import fr.cemagref.simexplorer.is.entities.data.ExplorationData;
import fr.cemagref.simexplorer.is.entities.data.LoggableElement;
import fr.cemagref.simexplorer.is.entities.metadata.MetaData;
@@ -53,7 +53,7 @@
protected transient LoggableElement le;
/** l'objet selectionne */
- protected transient DataEntity data;
+ protected transient Entity data;
/** les meta du le selectionne */
protected transient MetaData meta;
@@ -109,7 +109,7 @@
* @param context the application context
* @return the object selected
*/
- public DataEntity get(SimExplorerContext context) {
+ public Entity get(SimExplorerContext context) {
// acquire loggableElement
le = getLe(context);
@@ -143,7 +143,7 @@
LoggableElement selectedElement = parent.getLoggableElement();
synch(node.isRemote(), selectedElement);
setType(EntityTypeEnum.Result);
- setData((DataEntity) node.get());
+ setData((Entity) node.get());
} else {
synch(node.isRemote(), node.getLoggableElement());
}
@@ -182,7 +182,7 @@
this.le = le;
}
- public void setData(DataEntity data) {
+ public void setData(Entity data) {
this.data = data;
}
Modified: trunk/simexplorer-is/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/ui/EntityTreeNodeHelper.java
===================================================================
--- trunk/simexplorer-is/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/ui/EntityTreeNodeHelper.java 2008-03-06 21:49:51 UTC (rev 1302)
+++ trunk/simexplorer-is/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/ui/EntityTreeNodeHelper.java 2008-03-07 17:57:20 UTC (rev 1303)
@@ -18,66 +18,49 @@
* ##% */
package fr.cemagref.simexplorer.is.ui.swing.ui;
-import static fr.cemagref.simexplorer.is.entities.EntityTypeEnum.Code;
-import static fr.cemagref.simexplorer.is.entities.EntityTypeEnum.Component;
-import static fr.cemagref.simexplorer.is.entities.EntityTypeEnum.Constant;
-import static fr.cemagref.simexplorer.is.entities.EntityTypeEnum.ConstantValue;
-import static fr.cemagref.simexplorer.is.entities.EntityTypeEnum.ExplorationData;
-import static fr.cemagref.simexplorer.is.entities.EntityTypeEnum.Library;
-import static fr.cemagref.simexplorer.is.entities.EntityTypeEnum.Structure;
-import fr.cemagref.simexplorer.is.entities.EntityVisitable;
-import fr.cemagref.simexplorer.is.entities.SimpleEntityVisitor;
-import fr.cemagref.simexplorer.is.entities.data.Code;
-import fr.cemagref.simexplorer.is.entities.data.Component;
-import fr.cemagref.simexplorer.is.entities.data.Constant;
-import fr.cemagref.simexplorer.is.entities.data.ConstantValue;
-import fr.cemagref.simexplorer.is.entities.data.ExplorationApplication;
-import fr.cemagref.simexplorer.is.entities.data.ExplorationData;
-import fr.cemagref.simexplorer.is.entities.data.Library;
-import fr.cemagref.simexplorer.is.entities.data.LoggableElement;
-import fr.cemagref.simexplorer.is.entities.data.Result;
-import fr.cemagref.simexplorer.is.entities.data.Structure;
-import fr.cemagref.simexplorer.is.entities.metadata.MetaData;
-import fr.cemagref.simexplorer.is.ui.swing.model.EntityTreeNode;
+import java.util.ArrayDeque;
+import java.util.Deque;
import javax.swing.AbstractButton;
import javax.swing.JTree;
import javax.swing.event.TreeSelectionEvent;
import javax.swing.tree.TreePath;
-import java.util.Collection;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import fr.cemagref.simexplorer.is.entities.Composite;
+import fr.cemagref.simexplorer.is.entities.Entity;
+import fr.cemagref.simexplorer.is.entities.EntityVisitable;
+import fr.cemagref.simexplorer.is.entities.EntityVisitor;
+import fr.cemagref.simexplorer.is.entities.Leaf;
+import fr.cemagref.simexplorer.is.entities.data.LoggableElement;
+import fr.cemagref.simexplorer.is.ui.swing.model.EntityTreeNode;
+
/**
- * La classe responsable de la création des arbres de {@link fr.cemagref.simexplorer.is.ui.swing.model.EntityTreeNode}
- * à partir de {@link LoggableElement} .
- * <p/>
- * La classe possède une instance cachée par thread qui délègue la construction
- * del'arbre de navigation à un visiteur de {@link LoggableElement}.
- * <p/>
- *
+ * La classe responsable de la création des arbres de {@link fr.cemagref.simexplorer.is.ui.swing.model.EntityTreeNode} à
+ * partir de {@link LoggableElement} . <p/> La classe possède une instance cachée par thread qui délègue la construction
+ * del'arbre de navigation à un visiteur de {@link LoggableElement}. <p/>
+ *
* @author chemit
*/
public class EntityTreeNodeHelper {
protected static Log log = LogFactory.getLog(EntityTreeNodeHelper.class);
-
+
/** L'instance cachée de builder par Thread. */
- protected static final ThreadLocal<EntityVisitorBuilder> builder =
- new ThreadLocal<EntityVisitorBuilder>() {
- @Override
- protected EntityVisitorBuilder initialValue() {
- return new EntityVisitorBuilder();
- }
- };
+ protected static final ThreadLocal<EntityVisitorBuilder> builder = new ThreadLocal<EntityVisitorBuilder>() {
+ @Override
+ protected EntityVisitorBuilder initialValue() {
+ return new EntityVisitorBuilder();
+ }
+ };
/**
* Construit un arbre de navigation à partir d'un {@link LoggableElement}.
- *
- * @param v la donnée à visiter
- * @param remote flag pour indiquer si on travaille sur des données locales
- * ou en remote.
+ *
+ * @param v la donnée à visiter
+ * @param remote flag pour indiquer si on travaille sur des données locales ou en remote.
* @return le noeud parent de l'arbre de nivation construit.
*/
public static EntityTreeNode build(LoggableElement v, boolean remote) {
@@ -86,7 +69,7 @@
EntityTreeNode result;
// walk
result = instance.visit(v, remote);
- log.info(v+" ("+remote+") ");
+ log.info(v + " (" + remote + ") ");
return result;
}
}
@@ -100,9 +83,9 @@
node = (EntityTreeNode) o;
}
}
- return node==null?null:node.getLoggableElement();
+ return node == null ? null : node.getLoggableElement();
}
-
+
public static EntityTreeNode getSelectedNode(TreeSelectionEvent e) {
TreePath path = e.getNewLeadSelectionPath();
EntityTreeNode node = null;
@@ -147,7 +130,8 @@
return node;
}
- public static void refreshTreeActions(AbstractButton collapseButton, AbstractButton expandButton, EntityTreeNode node) {
+ public static void refreshTreeActions(AbstractButton collapseButton, AbstractButton expandButton,
+ EntityTreeNode node) {
boolean enabled = node != null && !node.isLeaf() && node.getChildCount() > 0;
Object o = enabled ? node.getUserObject() : null;
SimExplorerMainUI.UpdateButton(collapseButton, enabled, o);
@@ -159,48 +143,40 @@
}
/**
- * Implantation de {@link SimpleEntityVisitor} pour construire l'arbre
- * de navigation d'un {@link LoggableElement}.
- * <p/>
- * Cette classe est stateless, tous ces états internes doivent être nettoyé
- * après une visite, en utilisant la méthode {@link #reset()}.
- * <p/>
+ * Implantation de {@link SimpleEntityVisitor} pour construire l'arbre de navigation d'un {@link LoggableElement}.
+ * <p/> Cette classe est stateless, tous ces états internes doivent être nettoyé après une visite, en utilisant la
+ * méthode {@link #reset()}. <p/>
*/
- public static class EntityVisitorBuilder extends SimpleEntityVisitor {
+ public static class EntityVisitorBuilder implements EntityVisitor {
/**
- * le noeud parent de tous les autres.
- * <p/>
- * Ce noeud est positionné par la méthode
+ * le noeud parent de tous les autres. <p/> Ce noeud est positionné par la méthode
* {@link #markRootNode(EntityTreeNode)}.
*/
protected EntityTreeNode rootNode;
+
+ /** The node stack. */
+ protected Deque<EntityTreeNode> nodeStack;
/**
- * flag qui indique si on travaille sur des objet locaux ou distants.
- * <p/>
- * Cette information est conservé dans les nodes pour permettre de gérer
- * de manière transparent des objet locaux ou distants.
+ * flag qui indique si on travaille sur des objet locaux ou distants. <p/> Cette information est conservé dans
+ * les nodes pour permettre de gérer de manière transparent des objet locaux ou distants.
*/
protected Boolean remote;
- /** les nodes internes utilisés pendant la visite. */
- protected EntityTreeNode explorationApplication,
- component,
- explorationData,
- components,
- explorationDatas,
- libraries,
- constants,
- strutures,
- codes,
- constantValues;
-
+ /**
+ * Visite un element visitable.
+ *
+ * @param v the v
+ * @param remote the remote
+ *
+ * @return the entity tree node
+ */
public EntityTreeNode visit(EntityVisitable v, boolean remote) {
reset();
try {
this.remote = remote;
- super.visit(v);
+ visit(v);
EntityTreeNode result;
result = this.rootNode;
return result;
@@ -210,111 +186,53 @@
}
@Override
- public void visitMetaData(MetaData v) {
- // do not visit meta data (for the moment we dont need thoses
- // informations in navigation tree), but it could be interresting
- // for example to display attchments here ?
+ public void enterComposite(Composite v) {
+ EntityTreeNode newNode;
+ newNode = createNode(v, true);
+ nodeStack.addFirst(newNode);
+ markRootNode(newNode);
}
- @Override
- public void visitExplorationApplication(ExplorationApplication v) {
- markRootNode(explorationApplication = new EntityTreeNode(null, v, remote, true));
- super.visitExplorationApplication(v);
+ /**
+ * Creates the node.
+ *
+ * @param e the e
+ * @param allowedChildren the allowed children
+ *
+ * @return the entity tree node
+ */
+ private EntityTreeNode createNode(Entity e, boolean allowedChildren) {
+ EntityTreeNode newNode = new EntityTreeNode(nodeStack.peekFirst(), e, remote, allowedChildren);
+ return newNode;
}
@Override
- public void visitComponent(Component v) {
- markRootNode(component = new EntityTreeNode(components, v, remote, true));
- super.visitComponent(v);
+ public void exitComposite(Composite v) {
+ nodeStack.removeFirst();
}
@Override
- public void visitExplorationData(ExplorationData v) {
- markRootNode(explorationData = new EntityTreeNode(explorationDatas, v, remote, true));
- super.visitExplorationData(v);
- }
-
- @Override
- public void visitCodes(Collection<Code> vs) {
- codes = new EntityTreeNode(component, Code.getLibelles(), remote, true);
- super.visitCodes(vs);
- }
-
- @Override
- public void visitComponents(Collection<Component> vs) {
- components = new EntityTreeNode(explorationApplication, Component.getLibelles(), remote, true);
- super.visitComponents(vs);
- }
-
- @Override
- public void visitConstants(Collection<Constant> vs) {
- constants = new EntityTreeNode(component, Constant.getLibelles(), remote, true);
- super.visitConstants(vs);
- }
-
- @Override
- public void visitConstantValues(Collection<ConstantValue> vs) {
- constantValues = new EntityTreeNode(explorationData, ConstantValue.getLibelles(), remote, true);
- super.visitConstantValues(vs);
- }
-
- @Override
- public void visitExplorationDatas(Collection<ExplorationData> vs) {
- explorationDatas = new EntityTreeNode(explorationApplication, ExplorationData.getLibelles(), remote, true);
- super.visitExplorationDatas(vs);
- }
-
- @Override
- public void visitLibraries(Collection<Library> vs) {
- libraries = new EntityTreeNode(component, Library.getLibelles(), remote, true);
- super.visitLibraries(vs);
- }
-
- @Override
- public void visitStructures(Collection<Structure> vs) {
- strutures = new EntityTreeNode(component, Structure.getLibelles(), remote, true);
- super.visitStructures(vs);
- }
-
- @Override
- public void visitConstant(Constant v) {
- markRootNode(new EntityTreeNode(constants, v, remote, false));
- }
-
- @Override
- public void visitLibrary(Library v) {
- markRootNode(new EntityTreeNode(libraries, v, remote, false));
- }
-
- @Override
- public void visitResult(Result v) {
+ public void visit(EntityVisitable v) {
if (v != null) {
- markRootNode(new EntityTreeNode(explorationData, v, remote, false));
+ // on lance la visite
+ v.accept(this);
}
}
@Override
- public void visitCode(Code v) {
- new EntityTreeNode(codes, v, remote, false);
+ public void visitComposite(Composite v) {
+ createNode(v, false);
}
@Override
- public void visitConstantValue(ConstantValue v) {
- new EntityTreeNode(
- new EntityTreeNode(constantValues, v.getConstant().getName(), remote, true),
- v.getValue(), remote, false);
+ public void visitLeaf(Leaf v) {
+ createNode(v, false);
}
- @Override
- public void visitStructure(Structure v) {
- new EntityTreeNode(strutures, v, remote, false);
- }
-
/**
- * Tente de marquerle node donné comme noeud ancêtre de tous les autres.
- * <p/>
- * Le positionnement n'a lieu que si on a pas encore de rootNode.
- *
+ * Tente de marquerle node donné comme noeud ancêtre de tous les autres. <p/> Le positionnement n'a lieu que si
+ * on a pas encore de rootNode.
+ *
* @param node le node a positionner comme rootNode (si nessecaire)
*/
protected void markRootNode(EntityTreeNode node) {
@@ -324,16 +242,13 @@
}
/**
- * La méthode pour réinitialiser les états interne de la classe.
- * <p/>
- * Cette méthode doit être appeler après chaque visite, afin d'assurer
- * la propriété stateless de la classe.
+ * La méthode pour réinitialiser les états interne de la classe. <p/> Cette méthode doit être appeler après
+ * chaque visite, afin d'assurer la propriété stateless de la classe.
*/
protected void reset() {
+ nodeStack = new ArrayDeque<EntityTreeNode>();
remote = null;
- rootNode = explorationApplication = explorationDatas = explorationData
- = components = component = constants = codes = libraries
- = constantValues = null;
}
+
}
}
Modified: trunk/simexplorer-is/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/ui/ListTabUpdater.java
===================================================================
--- trunk/simexplorer-is/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/ui/ListTabUpdater.java 2008-03-06 21:49:51 UTC (rev 1302)
+++ trunk/simexplorer-is/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/ui/ListTabUpdater.java 2008-03-07 17:57:20 UTC (rev 1303)
@@ -17,17 +17,18 @@
* ##% */
package fr.cemagref.simexplorer.is.ui.swing.ui;
+import java.beans.PropertyChangeEvent;
+import java.text.SimpleDateFormat;
+
+import javax.swing.JComboBox;
+
import fr.cemagref.simexplorer.is.entities.EntityHelper;
import fr.cemagref.simexplorer.is.entities.metadata.MetaData;
import fr.cemagref.simexplorer.is.ui.swing.SimExplorerContext;
import fr.cemagref.simexplorer.is.ui.swing.model.DataEntityModel;
+import fr.cemagref.simexplorer.is.ui.swing.model.ListTableModel;
import fr.cemagref.simexplorer.is.ui.swing.model.tab.ListTabModel;
-import fr.cemagref.simexplorer.is.ui.swing.model.ListTableModel;
-import javax.swing.JComboBox;
-import java.beans.PropertyChangeEvent;
-import java.text.SimpleDateFormat;
-
/**
* La classe responsable du rafrachissement des ui de l'onglet de liste.
*
Modified: trunk/simexplorer-is/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/ui/SimExplorerMainUI.java
===================================================================
--- trunk/simexplorer-is/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/ui/SimExplorerMainUI.java 2008-03-06 21:49:51 UTC (rev 1302)
+++ trunk/simexplorer-is/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/ui/SimExplorerMainUI.java 2008-03-07 17:57:20 UTC (rev 1303)
@@ -18,6 +18,20 @@
* ##% */
package fr.cemagref.simexplorer.is.ui.swing.ui;
+import static org.codelutin.i18n.I18n._;
+
+import java.awt.event.InputEvent;
+import java.awt.event.KeyEvent;
+import java.util.regex.Matcher;
+
+import javax.swing.AbstractButton;
+import javax.swing.JComboBox;
+import javax.swing.JComponent;
+import javax.swing.KeyStroke;
+import javax.swing.SwingUtilities;
+
+import org.codelutin.i18n.LocaleEnum;
+
import fr.cemagref.simexplorer.is.entities.EntityHelper;
import fr.cemagref.simexplorer.is.entities.data.LoggableElement;
import fr.cemagref.simexplorer.is.entities.metadata.MetaData;
@@ -27,18 +41,7 @@
import fr.cemagref.simexplorer.is.ui.swing.actions.ExportElementAction;
import fr.cemagref.simexplorer.is.ui.swing.actions.util.ChangeLocaleAction;
import fr.cemagref.simexplorer.is.ui.swing.actions.util.SimExplorerAbstractAction;
-import static org.codelutin.i18n.I18n._;
-import org.codelutin.i18n.LocaleEnum;
-import javax.swing.AbstractButton;
-import javax.swing.JComboBox;
-import javax.swing.JComponent;
-import javax.swing.KeyStroke;
-import javax.swing.SwingUtilities;
-import java.awt.event.InputEvent;
-import java.awt.event.KeyEvent;
-import java.util.regex.Matcher;
-
/**
* L'ui principale de l'application
*
Modified: trunk/simexplorer-is/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/ElementDetail.java
===================================================================
--- trunk/simexplorer-is/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/ElementDetail.java 2008-03-06 21:49:51 UTC (rev 1302)
+++ trunk/simexplorer-is/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/ElementDetail.java 2008-03-07 17:57:20 UTC (rev 1303)
@@ -65,6 +65,7 @@
*/
public List<TreeNode> getNodes() {
List<TreeNode> nodes = new ArrayList<TreeNode>();
+ // FIXME use visitors
nodes.add(generateElement());
return nodes;
}
@@ -148,7 +149,7 @@
*/
private List<TreeNode> generateExplorations(ExplorationApplication explorationApplication) {
List<TreeNode> res = new ArrayList<TreeNode>();
- for (ExplorationData data : explorationApplication.getExplorations()) {
+ for (ExplorationData data : explorationApplication.getExplorations().getElements()) {
res.add(generateExplorationData(data));
}
return res;
@@ -193,7 +194,7 @@
* @return the list< tree node>
*/
private List<TreeNode> generateValues(ExplorationData explorationData) {
- List<ConstantValue> values = explorationData.getConstantValues();
+ List<ConstantValue> values = explorationData.getConstantValues().getElements();
List<TreeNode> res = new ArrayList<TreeNode>();
for (ConstantValue value : values) {
TreeNode node = new TreeNode();
@@ -230,7 +231,7 @@
* @return the list< tree node>
*/
private List<TreeNode> generateComponents(ExplorationApplication explorationApplication) {
- List<Component> components = explorationApplication.getComponents();
+ List<Component> components = explorationApplication.getComponents().getElements();
List<TreeNode> res = new ArrayList<TreeNode>();
for (Component component : components) {
Modified: trunk/simexplorer-is/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/ElementDownload.java
===================================================================
--- trunk/simexplorer-is/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/ElementDownload.java 2008-03-06 21:49:51 UTC (rev 1302)
+++ trunk/simexplorer-is/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/ElementDownload.java 2008-03-07 17:57:20 UTC (rev 1303)
@@ -104,7 +104,8 @@
String version = st.nextToken();
String attachmentUniqueId = st.nextToken();
- LoggableElement loggableElement = RemoteStorageService.getStorageService().getLoggableElement(getToken(), uuid, version);
+ LoggableElement loggableElement = RemoteStorageService.getStorageService().getLoggableElement(getToken(), uuid,
+ version);
List<Attachment> attachments = loggableElement.getAttachments();
for (Attachment attachment : attachments) {
if (attachment.getUniqueId().equals(attachmentUniqueId)) {
@@ -140,6 +141,7 @@
*/
public List<TreeNode> getNodes() {
List<TreeNode> nodes = new ArrayList<TreeNode>();
+ // FIXME use visitors
nodes.add(generateNodes());
return nodes;
}
@@ -205,7 +207,7 @@
*/
private List<TreeNode> generateExplorations(ExplorationApplication explorationApplication) {
List<TreeNode> res = new ArrayList<TreeNode>();
- for (ExplorationData explorationData : explorationApplication.getExplorations()) {
+ for (ExplorationData explorationData : explorationApplication.getExplorations().getElements()) {
res.add(generateExplorationData(explorationData));
}
return res;
@@ -245,7 +247,7 @@
* @return the list< tree node>
*/
private List<TreeNode> generateComponents(ExplorationApplication explorationApplication) {
- List<Component> components = explorationApplication.getComponents();
+ List<Component> components = explorationApplication.getComponents().getElements();
List<TreeNode> res = new ArrayList<TreeNode>();
for (Component component : components) {
1
0
Author: glandais
Date: 2008-03-06 21:49:51 +0000 (Thu, 06 Mar 2008)
New Revision: 1302
Removed:
tags/glandais_20080306/tree.txt
Log:
Deleted: tags/glandais_20080306/tree.txt
===================================================================
--- tags/glandais_20080306/tree.txt 2008-03-06 21:49:35 UTC (rev 1301)
+++ tags/glandais_20080306/tree.txt 2008-03-06 21:49:51 UTC (rev 1302)
@@ -1,297 +0,0 @@
-profiler: off
-remote: off
-port: 15599
-thread-depth: compact
-thread.compact.threshold.ms: 1
-max-method-count: compact
-method.compact.threshold.ms: 1
-file: /tmp/profile.txt
-track.object.alloc: off
-output: text
-debug: off
-profiler-class: com.mentorgen.tools.profile.runtime.Profile
-output-method-signatures: no
-clock-resolution: ms
-output-summary-only: no
-exclude:null
-Accept ClassLoader: sun.misc.Launcher$AppClassLoader
-ClassLoaderFilter.1: com.mentorgen.tools.profile.instrument.clfilter.StandardClassLoaderFilter
-------------------
-[INFO]
-NOTE: Maven is executing in offline mode. Any artifacts not already in your local
-repository will be inaccessible.
-
-[INFO] Scanning for projects...
-[INFO] Reactor build order:
-[INFO] Common
-[INFO] Entities
-[INFO] Security
-[INFO] Storage
-[INFO] Service
-[INFO] Web
-[INFO] Swing-jaxx
-[INFO] Swing
-[INFO] EAR service
-[INFO] Searching repository for plugin with prefix: 'dependency'.
-[INFO] ------------------------------------------------------------------------
-[INFO] Building Common
-[INFO] task-segment: [dependency:tree]
-[INFO] ------------------------------------------------------------------------
-[INFO] [dependency:tree]
-[INFO] simexplorer-is:simexplorer-is:pom:0.1-SNAPSHOT
-[INFO] +- lutinlib:lutinutil:jar:0.29-SNAPSHOT:compile
-[INFO] | +- commons-logging:commons-logging:jar:1.1.1:compile
-[INFO] | +- log4j:log4j:jar:1.2.14:compile
-[INFO] | +- commons-primitives:commons-primitives:jar:1.0:compile
-[INFO] | +- commons-collections:commons-collections:jar:3.2:compile
-[INFO] | \- commons-beanutils:commons-beanutils:jar:1.7.0:compile
-[INFO] \- junit:junit:jar:3.8.1:test
-[INFO] ------------------------------------------------------------------------
-[INFO] Building Entities
-[INFO] task-segment: [dependency:tree]
-[INFO] ------------------------------------------------------------------------
-[INFO] [dependency:tree]
-[INFO] simexplorer-is:simexplorer-is-entities:jar:0.1-SNAPSHOT
-[INFO] +- lutinlib:lutinutil:jar:0.29-SNAPSHOT:compile
-[INFO] | +- commons-logging:commons-logging:jar:1.1.1:compile
-[INFO] | +- log4j:log4j:jar:1.2.14:compile
-[INFO] | +- commons-primitives:commons-primitives:jar:1.0:compile
-[INFO] | +- commons-collections:commons-collections:jar:3.2:compile
-[INFO] | \- commons-beanutils:commons-beanutils:jar:1.7.0:compile
-[INFO] +- junit:junit:jar:3.8.1:test
-[INFO] \- commons-lang:commons-lang:jar:2.3:compile
-[INFO] ------------------------------------------------------------------------
-[INFO] Building Security
-[INFO] task-segment: [dependency:tree]
-[INFO] ------------------------------------------------------------------------
-[INFO] [dependency:tree]
-[INFO] simexplorer-is:simexplorer-is-security:ejb:0.1-SNAPSHOT
-[INFO] +- lutinlib:lutinutil:jar:0.29-SNAPSHOT:compile
-[INFO] | +- commons-logging:commons-logging:jar:1.1.1:compile
-[INFO] | +- log4j:log4j:jar:1.2.14:compile
-[INFO] | +- commons-primitives:commons-primitives:jar:1.0:compile
-[INFO] | +- commons-collections:commons-collections:jar:3.2:compile
-[INFO] | \- commons-beanutils:commons-beanutils:jar:1.7.0:compile
-[INFO] +- junit:junit:jar:3.8.1:test
-[INFO] +- javax.persistence:persistence-api:jar:1.0:provided
-[INFO] +- jboss:jboss-ejb3x:jar:4.2.2.GA:provided
-[INFO] +- jboss:jboss-annotations-ejb3:jar:4.2.2.GA:provided
-[INFO] \- com.h2database:h2:jar:1.0.64:compile
-[INFO] ------------------------------------------------------------------------
-[INFO] Building Storage
-[INFO] task-segment: [dependency:tree]
-[INFO] ------------------------------------------------------------------------
-[INFO] [dependency:tree]
-[INFO] simexplorer-is:simexplorer-is-storage:jar:0.1-SNAPSHOT
-[INFO] +- lutinlib:lutinutil:jar:0.29-SNAPSHOT:compile
-[INFO] | +- log4j:log4j:jar:1.2.14:compile
-[INFO] | +- commons-primitives:commons-primitives:jar:1.0:compile
-[INFO] | +- commons-collections:commons-collections:jar:3.2:compile
-[INFO] | \- commons-beanutils:commons-beanutils:jar:1.7.0:compile
-[INFO] +- junit:junit:jar:3.8.1:test
-[INFO] +- jboss:jboss-ejb3x:jar:4.2.2.GA:provided
-[INFO] +- com.thoughtworks.xstream:xstream:jar:1.2.2:compile
-[INFO] | \- xpp3:xpp3_min:jar:1.1.3.4.O:compile
-[INFO] +- org.apache.lucene:lucene-core:jar:2.3.1:compile
-[INFO] +- commons-logging:commons-logging:jar:1.1:compile
-[INFO] | +- logkit:logkit:jar:1.0.1:compile
-[INFO] | +- avalon-framework:avalon-framework:jar:4.1.3:compile
-[INFO] | \- javax.servlet:servlet-api:jar:2.3:compile
-[INFO] \- simexplorer-is:simexplorer-is-entities:jar:0.1-SNAPSHOT:compile
-[INFO] \- commons-lang:commons-lang:jar:2.3:compile
-[INFO] ------------------------------------------------------------------------
-[INFO] Building Service
-[INFO] task-segment: [dependency:tree]
-[INFO] ------------------------------------------------------------------------
-[INFO] [dependency:tree]
-[INFO] simexplorer-is:simexplorer-is-service:ejb:0.1-SNAPSHOT
-[INFO] +- lutinlib:lutinutil:jar:0.29-SNAPSHOT:compile
-[INFO] | +- commons-logging:commons-logging:jar:1.1.1:compile
-[INFO] | +- log4j:log4j:jar:1.2.14:compile
-[INFO] | +- commons-primitives:commons-primitives:jar:1.0:compile
-[INFO] | +- commons-collections:commons-collections:jar:3.2:compile
-[INFO] | \- commons-beanutils:commons-beanutils:jar:1.7.0:compile
-[INFO] +- junit:junit:jar:3.8.1:test
-[INFO] +- simexplorer-is:simexplorer-is-storage:jar:0.1-SNAPSHOT:compile
-[INFO] | +- com.thoughtworks.xstream:xstream:jar:1.2.2:compile
-[INFO] | | \- xpp3:xpp3_min:jar:1.1.3.4.O:compile
-[INFO] | +- org.apache.lucene:lucene-core:jar:2.3.1:compile
-[INFO] | \- simexplorer-is:simexplorer-is-entities:jar:0.1-SNAPSHOT:compile
-[INFO] | \- commons-lang:commons-lang:jar:2.3:compile
-[INFO] +- simexplorer-is:simexplorer-is-security:jar:0.1-SNAPSHOT:compile
-[INFO] | \- com.h2database:h2:jar:1.0.64:compile
-[INFO] +- com.healthmarketscience.rmiio:rmiio:jar:2.0.1:compile
-[INFO] +- jboss:jboss-ejb3x:jar:4.2.2.GA:provided
-[INFO] +- jboss:jboss-annotations-ejb3:jar:4.2.2.GA:provided
-[INFO] +- jboss:jbossall-client:jar:4.2.2.GA:provided
-[INFO] \- javax.mail:mail:jar:1.4:compile
-[INFO] \- javax.activation:activation:jar:1.1:compile
-[INFO] ------------------------------------------------------------------------
-[INFO] Building Web
-[INFO] task-segment: [dependency:tree]
-[INFO] ------------------------------------------------------------------------
-[INFO] [dependency:tree]
-[INFO] simexplorer-is:simexplorer-is-web:war:0.1-SNAPSHOT
-[INFO] +- lutinlib:lutinutil:jar:0.29-SNAPSHOT:compile
-[INFO] | +- commons-logging:commons-logging:jar:1.1.1:compile
-[INFO] | +- log4j:log4j:jar:1.2.14:compile
-[INFO] | +- commons-primitives:commons-primitives:jar:1.0:compile
-[INFO] | +- commons-collections:commons-collections:jar:3.2:compile
-[INFO] | \- commons-beanutils:commons-beanutils:jar:1.7.0:compile
-[INFO] +- junit:junit:jar:3.8.1:test
-[INFO] +- simexplorer-is:simexplorer-is-service:jar:0.1-SNAPSHOT:compile
-[INFO] | +- simexplorer-is:simexplorer-is-storage:jar:0.1-SNAPSHOT:compile
-[INFO] | | +- com.thoughtworks.xstream:xstream:jar:1.2.2:compile
-[INFO] | | | \- xpp3:xpp3_min:jar:1.1.3.4.O:compile
-[INFO] | | +- org.apache.lucene:lucene-core:jar:2.3.1:compile
-[INFO] | | \- simexplorer-is:simexplorer-is-entities:jar:0.1-SNAPSHOT:compile
-[INFO] | | \- commons-lang:commons-lang:jar:2.3:compile
-[INFO] | +- simexplorer-is:simexplorer-is-security:jar:0.1-SNAPSHOT:compile
-[INFO] | | \- com.h2database:h2:jar:1.0.64:compile
-[INFO] | +- com.healthmarketscience.rmiio:rmiio:jar:2.0.1:compile
-[INFO] | \- javax.mail:mail:jar:1.4:compile
-[INFO] | \- javax.activation:activation:jar:1.1:compile
-[INFO] +- tapestry5-treegrid:tapestry5-treegrid:jar:5.0.10.1:compile
-[INFO] +- org.apache.tapestry:tapestry-upload:jar:5.0.10:compile
-[INFO] | +- commons-fileupload:commons-fileupload:jar:1.2:compile
-[INFO] | \- commons-io:commons-io:jar:1.3:compile
-[INFO] +- org.apache.tapestry:tapestry-core:jar:5.0.10:compile
-[INFO] | +- org.apache.tapestry:tapestry-annotations:jar:5.0.10:compile
-[INFO] | \- commons-codec:commons-codec:jar:1.3:compile
-[INFO] +- org.apache.tapestry:tapestry-ioc:jar:5.0.10:compile
-[INFO] | +- jboss:javassist:jar:3.6.ga:compile
-[INFO] | +- org.slf4j:slf4j-api:jar:1.4.3:compile
-[INFO] | \- org.slf4j:slf4j-log4j12:jar:1.4.3:compile
-[INFO] +- de.hsofttec.t5components:t5components:jar:0.5.6:compile
-[INFO] | +- org.freemarker:freemarker:jar:2.3.10:compile
-[INFO] | +- com.sdicons.jsontools:jsontools-core:jar:1.5:compile
-[INFO] | | \- antlr:antlr:jar:2.7.6:compile
-[INFO] | +- net.sf.opencsv:opencsv:jar:1.7:compile
-[INFO] | +- commons-httpclient:commons-httpclient:jar:3.1:compile
-[INFO] | \- ognl:ognl:jar:2.6.9:compile
-[INFO] +- jboss:jbossall-client:jar:4.2.2.GA:provided
-[INFO] \- org.testng:testng:jar:jdk15:5.1:test
-[INFO] ------------------------------------------------------------------------
-[INFO] Building Swing-jaxx
-[INFO] task-segment: [dependency:tree]
-[INFO] ------------------------------------------------------------------------
-[INFO] [dependency:tree]
-[INFO] simexplorer-is:simexplorer-is-swing-jaxx:jar:0.1-SNAPSHOT
-[INFO] +- lutinlib:lutinutil:jar:0.29-SNAPSHOT:compile
-[INFO] | +- commons-logging:commons-logging:jar:1.1.1:compile
-[INFO] | +- log4j:log4j:jar:1.2.14:compile
-[INFO] | +- commons-primitives:commons-primitives:jar:1.0:compile
-[INFO] | +- commons-collections:commons-collections:jar:3.2:compile
-[INFO] | \- commons-beanutils:commons-beanutils:jar:1.7.0:compile
-[INFO] +- junit:junit:jar:3.8.1:test
-[INFO] +- lutinlib:jaxx:jar:1.0.4-SNAPSHOT:compile
-[INFO] | +- com.sun:dt:jar:1.6.0:system
-[INFO] | \- javax.help:javahelp:jar:2.0.02:compile
-[INFO] \- lutinlib:lutinwidget:jar:0.10-SNAPSHOT:compile
-[INFO] +- javax.mail:mail:jar:1.3.3:compile
-[INFO] | \- javax.activation:activation:jar:1.0.2:compile
-[INFO] +- jgoodies:looks:jar:1.2.2:compile
-[INFO] +- externallib:l2fprod-common:jar:0.1:compile
-[INFO] \- sdoc:sdoc:jar:0.5.0-beta:compile
-[INFO] ------------------------------------------------------------------------
-[INFO] Building Swing
-[INFO] task-segment: [dependency:tree]
-[INFO] ------------------------------------------------------------------------
-[INFO] [dependency:tree]
-[INFO] simexplorer-is:simexplorer-is-swing:jar:0.1-SNAPSHOT
-[INFO] +- lutinlib:lutinutil:jar:0.29-SNAPSHOT:compile
-[INFO] | +- commons-logging:commons-logging:jar:1.1.1:compile
-[INFO] | +- log4j:log4j:jar:1.2.14:compile
-[INFO] | +- commons-primitives:commons-primitives:jar:1.0:compile
-[INFO] | +- commons-collections:commons-collections:jar:3.2:compile
-[INFO] | \- commons-beanutils:commons-beanutils:jar:1.7.0:compile
-[INFO] +- junit:junit:jar:3.8.1:test
-[INFO] +- simexplorer-is:simexplorer-is-swing-jaxx:jar:0.1-SNAPSHOT:compile
-[INFO] | +- lutinlib:jaxx:jar:1.0.4-SNAPSHOT:compile
-[INFO] | | +- com.sun:dt:jar:1.6.0:system
-[INFO] | | \- javax.help:javahelp:jar:2.0.02:compile
-[INFO] | \- lutinlib:lutinwidget:jar:0.10-SNAPSHOT:compile
-[INFO] | +- jgoodies:looks:jar:1.2.2:compile
-[INFO] | +- externallib:l2fprod-common:jar:0.1:compile
-[INFO] | \- sdoc:sdoc:jar:0.5.0-beta:compile
-[INFO] +- lutinlib:lutincommandline:jar:0.1-SNAPSHOT:compile
-[INFO] +- jboss:jbossall-client:jar:4.2.2.GA:provided
-[INFO] \- simexplorer-is:simexplorer-is-service:jar:0.1-SNAPSHOT:compile
-[INFO] +- simexplorer-is:simexplorer-is-storage:jar:0.1-SNAPSHOT:compile
-[INFO] | +- com.thoughtworks.xstream:xstream:jar:1.2.2:compile
-[INFO] | | \- xpp3:xpp3_min:jar:1.1.3.4.O:compile
-[INFO] | +- org.apache.lucene:lucene-core:jar:2.3.1:compile
-[INFO] | \- simexplorer-is:simexplorer-is-entities:jar:0.1-SNAPSHOT:compile
-[INFO] | \- commons-lang:commons-lang:jar:2.3:compile
-[INFO] +- simexplorer-is:simexplorer-is-security:jar:0.1-SNAPSHOT:compile
-[INFO] | \- com.h2database:h2:jar:1.0.64:compile
-[INFO] +- com.healthmarketscience.rmiio:rmiio:jar:2.0.1:compile
-[INFO] \- javax.mail:mail:jar:1.4:compile
-[INFO] \- javax.activation:activation:jar:1.1:compile
-[INFO] ------------------------------------------------------------------------
-[INFO] Building EAR service
-[INFO] task-segment: [dependency:tree]
-[INFO] ------------------------------------------------------------------------
-[INFO] [dependency:tree]
-[INFO] simexplorer-is:simexplorer-is-ear:ear:0.1-SNAPSHOT
-[INFO] +- lutinlib:lutinutil:jar:0.29-SNAPSHOT:compile
-[INFO] | +- commons-logging:commons-logging:jar:1.1.1:compile
-[INFO] | +- log4j:log4j:jar:1.2.14:compile
-[INFO] | +- commons-primitives:commons-primitives:jar:1.0:compile
-[INFO] | +- commons-collections:commons-collections:jar:3.2:compile
-[INFO] | \- commons-beanutils:commons-beanutils:jar:1.7.0:compile
-[INFO] +- junit:junit:jar:3.8.1:test
-[INFO] +- tapestry5-treegrid:tapestry5-treegrid:jar:5.0.10.1:compile
-[INFO] +- org.apache.tapestry:tapestry-upload:jar:5.0.10:compile
-[INFO] | +- commons-fileupload:commons-fileupload:jar:1.2:compile
-[INFO] | \- commons-io:commons-io:jar:1.3:compile
-[INFO] +- org.apache.tapestry:tapestry-core:jar:5.0.10:compile
-[INFO] | +- org.apache.tapestry:tapestry-annotations:jar:5.0.10:compile
-[INFO] | \- commons-codec:commons-codec:jar:1.3:compile
-[INFO] +- org.apache.tapestry:tapestry-ioc:jar:5.0.10:compile
-[INFO] | +- jboss:javassist:jar:3.6.ga:compile
-[INFO] | +- org.slf4j:slf4j-api:jar:1.4.3:compile
-[INFO] | \- org.slf4j:slf4j-log4j12:jar:1.4.3:compile
-[INFO] +- de.hsofttec.t5components:t5components:jar:0.5.6:compile
-[INFO] | +- org.freemarker:freemarker:jar:2.3.10:compile
-[INFO] | +- com.sdicons.jsontools:jsontools-core:jar:1.5:compile
-[INFO] | | \- antlr:antlr:jar:2.7.6:compile
-[INFO] | +- net.sf.opencsv:opencsv:jar:1.7:compile
-[INFO] | +- commons-httpclient:commons-httpclient:jar:3.1:compile
-[INFO] | \- ognl:ognl:jar:2.6.9:compile
-[INFO] +- simexplorer-is:simexplorer-is-service:ejb:0.1-SNAPSHOT:compile
-[INFO] | +- simexplorer-is:simexplorer-is-storage:jar:0.1-SNAPSHOT:compile
-[INFO] | | +- com.thoughtworks.xstream:xstream:jar:1.2.2:compile
-[INFO] | | | \- xpp3:xpp3_min:jar:1.1.3.4.O:compile
-[INFO] | | +- org.apache.lucene:lucene-core:jar:2.3.1:compile
-[INFO] | | \- simexplorer-is:simexplorer-is-entities:jar:0.1-SNAPSHOT:compile
-[INFO] | | \- commons-lang:commons-lang:jar:2.3:compile
-[INFO] | +- simexplorer-is:simexplorer-is-security:jar:0.1-SNAPSHOT:compile
-[INFO] | +- com.healthmarketscience.rmiio:rmiio:jar:2.0.1:compile
-[INFO] | \- javax.mail:mail:jar:1.4:compile
-[INFO] | \- javax.activation:activation:jar:1.1:compile
-[INFO] +- simexplorer-is:simexplorer-is-security:ejb:0.1-SNAPSHOT:compile
-[INFO] | \- com.h2database:h2:jar:1.0.64:compile
-[INFO] \- simexplorer-is:simexplorer-is-web:war:0.1-SNAPSHOT:compile
-[INFO]
-[INFO]
-[INFO] ------------------------------------------------------------------------
-[INFO] Reactor Summary:
-[INFO] ------------------------------------------------------------------------
-[INFO] Common ................................................ SUCCESS [2.497s]
-[INFO] Entities .............................................. SUCCESS [0.022s]
-[INFO] Security .............................................. SUCCESS [0.028s]
-[INFO] Storage ............................................... SUCCESS [0.058s]
-[INFO] Service ............................................... SUCCESS [0.053s]
-[INFO] Web ................................................... SUCCESS [0.225s]
-[INFO] Swing-jaxx ............................................ SUCCESS [0.088s]
-[INFO] Swing ................................................. SUCCESS [0.387s]
-[INFO] EAR service ........................................... SUCCESS [0.045s]
-[INFO] ------------------------------------------------------------------------
-[INFO] ------------------------------------------------------------------------
-[INFO] BUILD SUCCESSFUL
-[INFO] ------------------------------------------------------------------------
-[INFO] Total time: 3 seconds
-[INFO] Finished at: Thu Mar 06 18:28:31 CET 2008
-[INFO] Final Memory: 13M/80M
-[INFO] ------------------------------------------------------------------------
1
0
r1301 - in tags/glandais_20080306: . simexplorer-is-swing simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/commandline/actions simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/commandline/configs simexplorer-is-swing-common simexplorer-is-swing-common/src simexplorer-is-swing-common/src/java simexplorer-is-swing-common/src/java/fr simexplorer-is-swing-common/src/java/fr/cemagref simex
by glandais@users.labs.libre-entreprise.org 06 Mar '08
by glandais@users.labs.libre-entreprise.org 06 Mar '08
06 Mar '08
Author: glandais
Date: 2008-03-06 21:49:35 +0000 (Thu, 06 Mar 2008)
New Revision: 1301
Added:
tags/glandais_20080306/simexplorer-is-swing-common/
tags/glandais_20080306/simexplorer-is-swing-common/pom.xml
tags/glandais_20080306/simexplorer-is-swing-common/src/
tags/glandais_20080306/simexplorer-is-swing-common/src/java/
tags/glandais_20080306/simexplorer-is-swing-common/src/java/fr/
tags/glandais_20080306/simexplorer-is-swing-common/src/java/fr/cemagref/
tags/glandais_20080306/simexplorer-is-swing-common/src/java/fr/cemagref/simexplorer/
tags/glandais_20080306/simexplorer-is-swing-common/src/java/fr/cemagref/simexplorer/is/
tags/glandais_20080306/simexplorer-is-swing-common/src/java/fr/cemagref/simexplorer/is/ui/
tags/glandais_20080306/simexplorer-is-swing-common/src/java/fr/cemagref/simexplorer/is/ui/swing/
tags/glandais_20080306/simexplorer-is-swing-common/src/java/fr/cemagref/simexplorer/is/ui/swing/common/
tags/glandais_20080306/simexplorer-is-swing-common/src/java/fr/cemagref/simexplorer/is/ui/swing/common/SimExplorerAbstractOptionAction.java
tags/glandais_20080306/simexplorer-is-swing-common/src/java/fr/cemagref/simexplorer/is/ui/swing/common/SimExplorerConfig.java
tags/glandais_20080306/simexplorer-is-swing-jaxx/src/resources/commandline.properties
tags/glandais_20080306/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/commandline/configs/SimExplorerConfigImpl.java
tags/glandais_20080306/tree.txt
Removed:
tags/glandais_20080306/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/commandline/actions/SimExplorerAbstractOptionAction.java
tags/glandais_20080306/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/commandline/configs/SimExplorerConfig.java
Modified:
tags/glandais_20080306/.classpath
tags/glandais_20080306/pom.xml
tags/glandais_20080306/simexplorer-is-swing-jaxx/pom.xml
tags/glandais_20080306/simexplorer-is-swing-jaxx/src/resources/i18n/simexplorer-is-swing-jaxx-en_GB.properties
tags/glandais_20080306/simexplorer-is-swing-jaxx/src/resources/i18n/simexplorer-is-swing-jaxx-fr_FR.properties
tags/glandais_20080306/simexplorer-is-swing/pom.xml
tags/glandais_20080306/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/SimExplorer.java
tags/glandais_20080306/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/SimExplorerContext.java
tags/glandais_20080306/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/commandline/actions/SimExplorerCommonActions.java
tags/glandais_20080306/simexplorer-is-web/pom.xml
Log:
swing split
Modified: tags/glandais_20080306/.classpath
===================================================================
--- tags/glandais_20080306/.classpath 2008-03-06 21:44:14 UTC (rev 1300)
+++ tags/glandais_20080306/.classpath 2008-03-06 21:49:35 UTC (rev 1301)
@@ -1,26 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="src" path="simexplorer-is-swing/src/test"/>
- <classpathentry kind="src" path="simexplorer-is-swing-jaxx/src/resources"/>
- <classpathentry kind="src" path="simexplorer-is-swing-jaxx/src/java"/>
- <classpathentry kind="src" path="simexplorer-is-entities/src/resources"/>
<classpathentry kind="src" path="simexplorer-is-entities/src/java"/>
- <classpathentry kind="src" path="simexplorer-is-ear/src/java"/>
- <classpathentry kind="src" path="simexplorer-is-swing/src/resources"/>
- <classpathentry kind="src" path="simexplorer-is-swing/target/gen/java"/>
- <classpathentry kind="src" path="simexplorer-is-swing/src/java"/>
- <classpathentry kind="src" path="simexplorer-is-web/src/resources"/>
- <classpathentry kind="src" path="simexplorer-is-web/src/java"/>
- <classpathentry kind="src" path="simexplorer-is-service/src/resources"/>
- <classpathentry kind="src" path="simexplorer-is-service/src/java"/>
- <classpathentry kind="src" path="simexplorer-is-service/src/test"/>
+ <classpathentry excluding="**" kind="src" output="simexplorer-is-entities/src/resources" path="simexplorer-is-entities/src/resources"/>
+ <classpathentry kind="src" path="simexplorer-is-security/src/java"/>
<classpathentry kind="src" path="simexplorer-is-security/src/test"/>
- <classpathentry kind="src" path="simexplorer-is-security/src/java"/>
- <classpathentry kind="src" path="simexplorer-is-security/src/resources"/>
+ <classpathentry excluding="**" kind="src" output="simexplorer-is-security/src/resources" path="simexplorer-is-security/src/resources"/>
<classpathentry kind="src" path="simexplorer-is-storage/src/java"/>
<classpathentry kind="src" path="simexplorer-is-storage/src/test"/>
- <classpathentry kind="src" path="simexplorer-is-storage/src/resources"/>
+ <classpathentry excluding="**" kind="src" output="simexplorer-is-storage/src/resources" path="simexplorer-is-storage/src/resources"/>
+ <classpathentry kind="src" path="simexplorer-is-service/src/java"/>
+ <classpathentry kind="src" path="simexplorer-is-service/src/test"/>
+ <classpathentry excluding="**" kind="src" output="simexplorer-is-service/src/resources" path="simexplorer-is-service/src/resources"/>
+ <classpathentry kind="src" path="simexplorer-is-web/src/java"/>
+ <classpathentry excluding="**" kind="src" output="simexplorer-is-web/src/resources" path="simexplorer-is-web/src/resources"/>
+ <classpathentry kind="src" path="simexplorer-is-swing-common/src/java"/>
+ <classpathentry excluding="**" kind="src" output="simexplorer-is-swing-common/src/resources" path="simexplorer-is-swing-common/src/resources"/>
+ <classpathentry kind="src" path="simexplorer-is-swing-jaxx/src/java"/>
+ <classpathentry excluding="**" kind="src" output="simexplorer-is-swing-jaxx/src/resources" path="simexplorer-is-swing-jaxx/src/resources"/>
+ <classpathentry excluding="**" kind="src" output="simexplorer-is-swing-jaxx/src/uimodel" path="simexplorer-is-swing-jaxx/src/uimodel"/>
+ <classpathentry kind="src" path="simexplorer-is-swing/src/java"/>
+ <classpathentry kind="src" path="simexplorer-is-swing/src/test"/>
+ <classpathentry excluding="**" kind="src" output="simexplorer-is-swing/src/resources" path="simexplorer-is-swing/src/resources"/>
+ <classpathentry kind="src" path="simexplorer-is-ear/src/java"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER/modules/noworkspace"/>
- <classpathentry kind="output" path="bin"/>
+ <classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER/modules"/>
+ <classpathentry kind="output" path="target/classes"/>
</classpath>
Modified: tags/glandais_20080306/pom.xml
===================================================================
--- tags/glandais_20080306/pom.xml 2008-03-06 21:44:14 UTC (rev 1300)
+++ tags/glandais_20080306/pom.xml 2008-03-06 21:49:35 UTC (rev 1301)
@@ -3,39 +3,272 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <!--The version of maven's project object model-->
- <modelVersion>4.0.0</modelVersion>
-
- <!--lutinproject.xml-->
- <parent>
+ <!--lutinproject.xml
+ <parent>
<groupId>lutinlib</groupId>
<artifactId>lutinproject</artifactId>
<version>2.2</version>
- </parent>
+ </parent>
+ -->
+ <!--The version of maven's project object model-->
+ <modelVersion>4.0.0</modelVersion>
+
<!--A unique name for this project-->
<groupId>simexplorer-is</groupId>
<artifactId>simexplorer-is</artifactId>
- <name>Common</name>
<!-- This project is made of modules -->
<packaging>pom</packaging>
+ <name>Common</name>
+
<!--Version-->
<version>0.1-SNAPSHOT</version>
<!--Description-->
- <description>simexplorer is</description>
+ <description>SimExplorer Information System</description>
+
+ <!--The project home page-->
+ <url>http://simexplorer-si.libre-entreprise.org/</url>
+
+ <prerequisites>
+ <maven>2.0.8</maven>
+ </prerequisites>
+
+ <!--Tracking-->
+ <issueManagement>
+ <system>gforge</system>
+ <url>
+ https://labs.libre-entreprise.org/tracker/?group_id=130
+ </url>
+ </issueManagement>
+
<inceptionYear>2008</inceptionYear>
- <!--
- Note : On ecrit directement le profile du projet ici, au lieu
- d'utiliser le fichier profiles.xml, pour permettre l'utilisation de
- ces proprietes lors d'un lancement de maven sur un module sans passer
- par ce module.
- Sinon, le fichier profiles.xml n'est pas pris en compte et on est oblige
- de dupliquer ces proprietes dans tous les modules.
- -->
+ <!--Any mailing lists for the project-->
+ <mailingLists>
+ <mailingList>
+ <name>simexplorer-si-commits</name>
+ <subscribe>${labs.lists}-commits</subscribe>
+ <unsubscribe>${labs.lists}-commits</unsubscribe>
+ <archive>${labs.lists}-commits</archive>
+ </mailingList>
+
+ <mailingList>
+ <name>simexplorer-si-devel</name>
+ <subscribe>${labs.lists}-devel</subscribe>
+ <unsubscribe>${labs.lists}-devel</unsubscribe>
+ <archive>${labs.lists}-devel</archive>
+ </mailingList>
+
+ <mailingList>
+ <name>simexplorer-si-user</name>
+ <subscribe>${labs.lists}-user</subscribe>
+ <unsubscribe>${labs.lists}-user</unsubscribe>
+ <archive>${labs.lists}-user</archive>
+ </mailingList>
+ </mailingLists>
+
+ <!--who the developers are for the project-->
+ <developers>
+ <developer>
+ <id>glandais</id>
+ <name>Gabriel Landais</name>
+ <email>landais at codelutin.com</email>
+ <organization>Code Lutin</organization>
+ <organizationUrl>http://www.codelutin.com</organizationUrl>
+ <timezone>+2</timezone>
+ <roles>
+ <role>Développeur</role>
+ </roles>
+ </developer>
+ <developer>
+ <id>tchemit</id>
+ <name>Tony Chemit</name>
+ <email>chemit at codelutin.com</email>
+ <organization>Code Lutin</organization>
+ <organizationUrl>http://www.codelutin.com</organizationUrl>
+ <timezone>+2</timezone>
+ <roles>
+ <role>Développeur</role>
+ </roles>
+ </developer>
+ </developers>
+
+ <licenses>
+ <license>
+ <name>GPL</name>
+ <url>http://www.gnu.org/copyleft/gpl.html</url>
+ <distribution>repo</distribution>
+ </license>
+ </licenses>
+
+ <!--Source control management-->
+ <scm>
+ <connection>
+ scm:svn:svn://labs.libre-entreprise.org/svnroot/simexplorer-si
+ </connection>
+ <developerConnection>
+ scm:svn:svn+ssh://${username}@labs.libre-entreprise.org/svnroot/simexplorer-si
+ </developerConnection>
+ <url>
+ https://labs.libre-entreprise.org/plugins/scmsvn/viewcvs.php/?root=simexplo…
+ </url>
+ </scm>
+
+ <organization>
+ <name>Cemagref</name>
+ <url>http://www.cemagref.fr/</url>
+ </organization>
+
+ <build>
+ <!--Sources-->
+ <sourceDirectory>${maven.src.dir}/java</sourceDirectory>
+ <testSourceDirectory>${maven.src.dir}/test</testSourceDirectory>
+
+
+ <!--Ressources-->
+ <resources>
+ <resource>
+ <directory>${maven.src.dir}/java</directory>
+ <includes>
+ <include>**/*.properties</include>
+ <include>**/*.xml</include>
+ <include>**/*.jdo</include>
+ </includes>
+ </resource>
+
+ <resource>
+ <directory>${maven.src.dir}/resources</directory>
+ <includes>
+ <include>**/*</include>
+ </includes>
+ <excludes>
+ <exclude>**/*~</exclude>
+ </excludes>
+ </resource>
+
+ <resource>
+ <directory>${maven.src.dir}/uimodel</directory>
+ <includes>
+ <include>**/*.xml</include>
+ <include>**/*.xgl</include>
+ <include>**/*.bsh</include>
+ </includes>
+ </resource>
+
+ <resource>
+ <directory>${maven.src.dir}/xsl</directory>
+ <includes>
+ <include>**/*.xsl</include>
+ </includes>
+ </resource>
+ </resources>
+
+ <testResources>
+ <testResource>
+ <directory>${maven.src.dir}/test</directory>
+ <excludes>
+ <exclude>**/*.java</exclude>
+ </excludes>
+ </testResource>
+ </testResources>
+
+ <plugins>
+
+ <!-- build -->
+
+ <plugin>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <source>${maven.compile.source}</source>
+ <target>${maven.compile.target}</target>
+ <encoding>${maven.compile.encoding}</encoding>
+ </configuration>
+ </plugin>
+ <plugin>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <skip>${maven.test.skip}</skip>
+ <excludes>
+ <exclude>**/*MassTestCase.java</exclude>
+ </excludes>
+ </configuration>
+ </plugin>
+
+ <!-- packaging -->
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-ejb-plugin</artifactId>
+ <configuration>
+ <ejbVersion>3.0</ejbVersion>
+ </configuration>
+ </plugin>
+
+ <!-- reporting -->
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <configuration>
+ <aggregate>true</aggregate>
+ <encoding>${maven.compile.encoding}</encoding>
+ </configuration>
+ </plugin>
+
+ <!-- site -->
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-site-plugin</artifactId>
+ <configuration>
+ <outputEncoding>
+ ${maven.compile.encoding}
+ </outputEncoding>
+ <locales>fr</locales>
+ <siteDirectory>src/site</siteDirectory>
+ <generateReports>
+ ${maven.reports.generate}
+ </generateReports>
+ <xdocDirectory>
+ ${basedir}/target/generated-site/xdoc/fr/rst
+ </xdocDirectory>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>lutinplugin</groupId>
+ <artifactId>maven-jrst-plugin</artifactId>
+ <version>0.8.1-SNAPSHOT</version>
+ <executions>
+ <execution>
+ <phase>pre-site</phase>
+ <goals>
+ <goal>jrst</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <inputEncoding>
+ ${maven.compile.encoding}
+ </inputEncoding>
+ <outputEncoding>
+ ${maven.compile.encoding}
+ </outputEncoding>
+ <directoryIn>${basedir}/src/site</directoryIn>
+ <directoryOut>
+ ${basedir}/target/generated-site/xdoc
+ </directoryOut>
+ <verbose>${maven.verbose}</verbose>
+ <overwrite>true</overwrite>
+ </configuration>
+ </plugin>
+
+ </plugins>
+ </build>
+
+ <!-- profiles -->
<profiles>
<profile>
<id>project</id>
@@ -43,27 +276,47 @@
<activeByDefault>true</activeByDefault>
</activation>
<properties>
- <!-- id du projet du labs (simexplorer) -->
- <labs.id>130</labs.id>
- <!-- par defaut, mode non verbeux -->
- <maven.verbose>false</maven.verbose>
- <!-- source base dir (ne respecte pas la convention maven2) -->
- <maven.src.dir>${basedir}/src</maven.src.dir>
<!-- test (par defaut, on ne les execute pas) -->
<maven.test.skip>true</maven.test.skip>
- <!-- compile with ? -->
- <maven.compile.source>1.6</maven.compile.source>
- <maven.compile.target>1.6</maven.compile.target>
- <!-- compilation encondig -->
- <maven.compile.encoding>
- ISO-8859-15
- </maven.compile.encoding>
- <!-- Tapestry version -->
- <tapestry.version>5.0.10</tapestry.version>
+ <maven.reports.generate>false</maven.reports.generate>
</properties>
</profile>
+ <profile>
+ <id>tests</id>
+ <activation>
+ <activeByDefault>false</activeByDefault>
+ </activation>
+ <properties>
+ <!-- test (par defaut, on ne les execute pas) -->
+ <maven.test.skip>false</maven.test.skip>
+ <maven.reports.generate>false</maven.reports.generate>
+ </properties>
+ </profile>
+ <profile>
+ <id>site</id>
+ <activation>
+ <activeByDefault>false</activeByDefault>
+ </activation>
+ <properties>
+ <!-- test (par defaut, on ne les execute pas) -->
+ <maven.test.skip>false</maven.test.skip>
+ <maven.reports.generate>true</maven.reports.generate>
+ </properties>
+ </profile>
</profiles>
+ <modules>
+ <module>simexplorer-is-entities</module>
+ <module>simexplorer-is-security</module>
+ <module>simexplorer-is-storage</module>
+ <module>simexplorer-is-service</module>
+ <module>simexplorer-is-web</module>
+ <module>simexplorer-is-swing-common</module>
+ <module>simexplorer-is-swing-jaxx</module>
+ <module>simexplorer-is-swing</module>
+ <module>simexplorer-is-ear</module>
+ </modules>
+
<repositories>
<repository>
<id>SEIS-java.net</id>
@@ -95,157 +348,136 @@
http://lutinbuilder.labs.libre-entreprise.org/maven2
</url>
</pluginRepository>
- <pluginRepository>
- <id>evolvis-release-repository</id>
- <name>evolvis.org release repository</name>
- <url>http://maven-repo.evolvis.org/releases</url>
- <snapshots>
- <enabled>false</enabled>
- </snapshots>
- </pluginRepository>
+ <pluginRepository>
+ <id>evolvis-release-repository</id>
+ <name>evolvis.org release repository</name>
+ <url>http://maven-repo.evolvis.org/releases</url>
+ <snapshots>
+ <enabled>false</enabled>
+ </snapshots>
+ </pluginRepository>
</pluginRepositories>
- <!--Tracking-->
- <issueManagement>
- <url>
- http://labs.libre-entreprise.org/tracker/?group_id=${labs.id}
- </url>
- </issueManagement>
+ <dependencies>
+ <!--JUnit-->
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>3.8.1</version>
+ <scope>test</scope>
+ </dependency>
+ <!-- lutinutil -->
+ <dependency>
+ <groupId>lutinlib</groupId>
+ <artifactId>lutinutil</artifactId>
+ <version>0.29-SNAPSHOT</version>
+ <scope>compile</scope>
+ </dependency>
+ </dependencies>
- <licenses>
- <license>
- <name>GPL</name>
- <url>http://www.gnu.org/copyleft/gpl.html</url>
- <distribution>repo</distribution>
- </license>
- </licenses>
-
- <distributionManagement>
- <site>
- <id>labs</id>
- <url>
- scp://labs.libre-entreprise.org/home/groups/simexplorer-si/htdocs/
- </url>
- </site>
- </distributionManagement>
-
- <build>
+ <reporting>
<plugins>
+ <!--Site report's plugin-->
<plugin>
- <groupId>lutinplugin</groupId>
- <artifactId>maven-jrst-plugin</artifactId>
- <version>0.8.1-SNAPSHOT</version>
- <executions>
- <execution>
- <!-- test works better than pre:site -->
- <phase>test</phase>
- <goals>
- <goal>jrst</goal>
- </goals>
- </execution>
- </executions>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-plugin-plugin</artifactId>
<configuration>
- <inputEncoding>
- ${maven.compile.encoding}
- </inputEncoding>
- <outputEncoding>
- ${maven.compile.encoding}
- </outputEncoding>
- <directoryIn>${basedir}/src/site</directoryIn>
- <directoryOut>
- ${basedir}/target/generated-site/xdoc
- </directoryOut>
- <verbose>${maven.verbose}</verbose>
- <overwrite>true</overwrite>
+ <outputDirectory>
+ target/site-build/xdoc
+ </outputDirectory>
</configuration>
</plugin>
- <plugin>
+
+ <!--All site-->
+ <plugin><!--License-->
<groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-site-plugin</artifactId>
- <configuration>
- <outputEncoding>
- ${maven.compile.encoding}
- </outputEncoding>
- <locales>fr</locales>
- <siteDirectory>src/site</siteDirectory>
- <generateReports>false</generateReports>
- <xdocDirectory>
- ${basedir}/target/generated-site/xdoc/fr/rst
- </xdocDirectory>
- </configuration>
+ <artifactId>
+ maven-project-info-reports-plugin
+ </artifactId>
</plugin>
+
<plugin>
<groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-ejb-plugin</artifactId>
- <configuration>
- <ejbVersion>3.0</ejbVersion>
- </configuration>
+ <artifactId>maven-javadoc-plugin</artifactId>
</plugin>
+
+ <!--cvslib-3.6.jar = lib-3.6.jar-->
+ <plugin><!--Includes dev and file activity-->
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>changelog-maven-plugin</artifactId>
+ </plugin>
+
<plugin>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <skip>${maven.test.skip}</skip>
- <excludes>
- <exclude>**/*MassTestCase.java</exclude>
- </excludes>
- </configuration>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>changes-maven-plugin</artifactId>
</plugin>
+
<plugin>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <source>${maven.compile.source}</source>
- <target>${maven.compile.target}</target>
- <encoding>${maven.compile.encoding}</encoding>
- </configuration>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>jdepend-maven-plugin</artifactId>
</plugin>
+
<plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-eclipse-plugin</artifactId>
- <configuration>
- <useProjectReferences>true</useProjectReferences>
- </configuration>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>jxr-maven-plugin</artifactId>
</plugin>
+
<plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-javadoc-plugin</artifactId>
- <configuration>
- <aggregate>true</aggregate>
- <encoding>${maven.compile.encoding}</encoding>
- </configuration>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>surefire-report-maven-plugin</artifactId>
</plugin>
+
<plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-source-plugin</artifactId>
- <executions>
- <execution>
- <phase>verify</phase>
- <goals>
- <goal>jar</goal>
- </goals>
- </execution>
- </executions>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>taglist-maven-plugin</artifactId>
</plugin>
+ <!--Other-->
+ <plugin>
+ <groupId>statcvs</groupId>
+ <artifactId>maven-statcvs-plugin</artifactId>
+ </plugin>
</plugins>
- </build>
+ </reporting>
- <dependencies>
- <dependency>
- <groupId>lutinlib</groupId>
- <artifactId>lutinutil</artifactId>
- <version>0.29-SNAPSHOT</version>
- <scope>compile</scope>
- </dependency>
- </dependencies>
+ <dependencyManagement>
+ <dependencies></dependencies>
+ </dependencyManagement>
- <modules>
- <module>simexplorer-is-entities</module>
- <module>simexplorer-is-security</module>
- <module>simexplorer-is-storage</module>
- <module>simexplorer-is-service</module>
- <module>simexplorer-is-web</module>
- <module>simexplorer-is-swing-jaxx</module>
- <module>simexplorer-is-swing</module>
- <module>simexplorer-is-ear</module>
- </modules>
-</project>
+ <distributionManagement>
+ <repository>
+ <id>labs</id>
+ <url>
+ scp://labs.libre-entreprise.org/home/groups/lutinbuilder/htdocs/maven2
+ </url>
+ </repository>
+ <site>
+ <id>labs</id>
+ <url>
+ scp://labs.libre-entreprise.org/home/groups/simexplorer-si/htdocs/
+ </url>
+ </site>
+ </distributionManagement>
+
+ <properties>
+ <!-- id du projet du labs (simexplorer) -->
+ <labs.id>130</labs.id>
+ <!-- par defaut, mode non verbeux -->
+ <maven.verbose>false</maven.verbose>
+ <!-- source base dir (ne respecte pas la convention maven2) -->
+ <maven.src.dir>${basedir}/src</maven.src.dir>
+ <!-- compile with ? -->
+ <maven.compile.source>1.6</maven.compile.source>
+ <maven.compile.target>1.6</maven.compile.target>
+ <!-- compilation encondig -->
+ <maven.compile.encoding>ISO-8859-15</maven.compile.encoding>
+ <!-- Tapestry version -->
+ <tapestry.version>5.0.10</tapestry.version>
+ <!-- Lists URL -->
+ <labs.lists>
+ http://lists.labs.libre-entreprise.org/mailman/listinfo/simexplorer-si-
+ </labs.lists>
+ </properties>
+
+
+</project>
\ No newline at end of file
Modified: tags/glandais_20080306/simexplorer-is-swing/pom.xml
===================================================================
--- tags/glandais_20080306/simexplorer-is-swing/pom.xml 2008-03-06 21:44:14 UTC (rev 1300)
+++ tags/glandais_20080306/simexplorer-is-swing/pom.xml 2008-03-06 21:49:35 UTC (rev 1301)
@@ -28,10 +28,6 @@
<maven.verbose>false</maven.verbose>
<!-- Vcs base dir-->
<maven.vcs.src.dir>${basedir}/src</maven.vcs.src.dir>
- <!--Source base dir-->
- <maven.src.dir>${basedir}/target/src-build</maven.src.dir>
- <!--Generate base dir-->
- <maven.gen.dir>${basedir}/target/gen</maven.gen.dir>
<!--Main class in JAR -->
<maven.jar.main.class>fr.cemagref.simexplorer.is.ui.swing.SimExplorer</maven.jar.main.class>
</properties>
@@ -40,59 +36,6 @@
<build>
<plugins>
- <!-- Generate phase -->
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <configuration>
- <!-- recopie des fichiers java sources et generes vers src-build/java -->
- <tasks>
- <copy todir="${maven.src.dir}/java" verbose="${maven.verbose}" overwrite="true">
- <fileset dir="${maven.gen.dir}/java"/>
- </copy>
- <copy todir="${maven.src.dir}/java" verbose="${maven.verbose}" overwrite="true">
- <fileset dir="${maven.vcs.src.dir}/java"/>
- </copy>
- </tasks>
- </configuration>
- <executions>
- <execution>
- <phase>generate-sources</phase>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>lutinplugin</groupId>
- <artifactId>maven-commandline-plugin</artifactId>
- <version>0.2-SNAPSHOT</version>
- <configuration>
- <prefix>SimExplorer</prefix>
- <i18nPrefix>simexplorer</i18nPrefix>
- <source>${maven.vcs.src.dir}/resources/commandline.properties</source>
- <parserPackageName>fr.cemagref.simexplorer.is.ui.swing.commandline</parserPackageName>
- <actionSuperClass>fr.cemagref.simexplorer.is.ui.swing.commandline.actions.SimExplorerAbstractOptionAction</actionSuperClass>
- <configSuperClass>fr.cemagref.simexplorer.is.ui.swing.commandline.configs.SimExplorerConfig</configSuperClass>
- <concreteConfig>true</concreteConfig>
- <actionImplementations>
- <value>fr.cemagref.simexplorer.is.ui.swing.commandline.actions.SimExplorerCommonActions</value>
- </actionImplementations>
- <configImplementations>
- <value>fr.cemagref.simexplorer.is.ui.swing.commandline.configs.SimExplorerAbstractConfigMain</value>
- <value>fr.cemagref.simexplorer.is.ui.swing.commandline.configs.SimExplorerAbstractConfigLocal</value>
- <value>fr.cemagref.simexplorer.is.ui.swing.commandline.configs.SimExplorerAbstractConfigRemote</value>
- </configImplementations>
- </configuration>
- <executions>
- <execution>
- <goals>
- <goal>java</goal>
- </goals>
- </execution>
- </executions>
-
- </plugin>
<!-- Compile phase -->
<plugin>
<groupId>lutinplugin</groupId>
@@ -132,26 +75,6 @@
</entries>
</configuration>
</execution>
- <execution>
- <phase>compile</phase>
- <id>java</id>
- <goals>
- <goal>parserJava</goal>
- <goal>gen</goal>
- </goals>
- <configuration>
- <entries>
- <entry>
- <specificGoal>parserJava</specificGoal>
- <basedir>${maven.gen.dir}/java/fr/cemagref/simexplorer/is/ui/swing/commandline</basedir>
- <includes>
- <param>**\/*Option*.java</param>
- <param>**\/*Config*.java</param>
- </includes>
- </entry>
- </entries>
- </configuration>
- </execution>
</executions>
</plugin>
<!-- Package phase -->
@@ -196,19 +119,17 @@
<groupId>simexplorer-is</groupId>
<artifactId>simexplorer-is-service</artifactId>
<version>0.1-SNAPSHOT</version>
- </dependency>
+ </dependency>
<dependency>
<groupId>simexplorer-is</groupId>
<artifactId>simexplorer-is-swing-jaxx</artifactId>
<version>0.1-SNAPSHOT</version>
</dependency>
- <!-- librairie commandline -->
<dependency>
- <groupId>lutinlib</groupId>
- <artifactId>lutincommandline</artifactId>
+ <groupId>simexplorer-is</groupId>
+ <artifactId>simexplorer-is-swing-commandline</artifactId>
<version>0.1-SNAPSHOT</version>
- <scope>compile</scope>
- </dependency>
+ </dependency>
<!-- pour avoir les ejb jboss -->
<dependency>
<groupId>jboss</groupId>
Modified: tags/glandais_20080306/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/SimExplorer.java
===================================================================
--- tags/glandais_20080306/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/SimExplorer.java 2008-03-06 21:44:14 UTC (rev 1300)
+++ tags/glandais_20080306/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/SimExplorer.java 2008-03-06 21:49:35 UTC (rev 1301)
@@ -18,16 +18,20 @@
* ##% */
package fr.cemagref.simexplorer.is.ui.swing;
+import java.awt.event.ActionEvent;
+
+import org.codelutin.i18n.I18n;
+
import fr.cemagref.simexplorer.is.exceptions.SimExplorerRuntimeException;
import fr.cemagref.simexplorer.is.ui.swing.actions.util.SimExplorerAbstractAction;
import fr.cemagref.simexplorer.is.ui.swing.commandline.configs.SimExplorerAbstractConfigMain;
+import fr.cemagref.simexplorer.is.ui.swing.commandline.configs.SimExplorerConfigImpl;
+import fr.cemagref.simexplorer.is.ui.swing.common.SimExplorerAbstractOptionAction;
+import fr.cemagref.simexplorer.is.ui.swing.common.SimExplorerConfig;
import fr.cemagref.simexplorer.is.ui.swing.ui.SimExplorerMainUI;
import fr.cemagref.simexplorer.is.ui.swing.ui.SimExplorerTab;
import fr.cemagref.simexplorer.is.ui.swing.ui.util.ErrorDialog;
-import org.codelutin.i18n.I18n;
-import java.awt.event.ActionEvent;
-
/**
* L'application principale
*
@@ -57,6 +61,10 @@
// init context
context = new SimExplorerContext();
+ // init common
+ SimExplorerConfig.setSimExplorerConfigImpl(new SimExplorerConfigImpl("", ""));
+ SimExplorerAbstractOptionAction.setOptionParser(context.getParser());
+
// init context
context.initContext(args);
Modified: tags/glandais_20080306/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/SimExplorerContext.java
===================================================================
--- tags/glandais_20080306/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/SimExplorerContext.java 2008-03-06 21:44:14 UTC (rev 1300)
+++ tags/glandais_20080306/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/SimExplorerContext.java 2008-03-06 21:49:35 UTC (rev 1301)
@@ -18,6 +18,11 @@
* ##% */
package fr.cemagref.simexplorer.is.ui.swing;
+import java.io.IOException;
+
+import org.codelutin.i18n.I18n;
+import org.codelutin.option.ParserException;
+
import fr.cemagref.simexplorer.is.entities.EntityTypeEnum;
import fr.cemagref.simexplorer.is.entities.data.LoggableElement;
import fr.cemagref.simexplorer.is.entities.metadata.MetaData;
Deleted: tags/glandais_20080306/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/commandline/actions/SimExplorerAbstractOptionAction.java
===================================================================
--- tags/glandais_20080306/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/commandline/actions/SimExplorerAbstractOptionAction.java 2008-03-06 21:44:14 UTC (rev 1300)
+++ tags/glandais_20080306/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/commandline/actions/SimExplorerAbstractOptionAction.java 2008-03-06 21:49:35 UTC (rev 1301)
@@ -1,47 +0,0 @@
-/*
-* ##% Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007,2008 Code Lutin.
-*
-* This program is free software; you can redistribute it and/or
-* modify it under the terms of the GNU General Public License
-* as published by the Free Software Foundation; either version 2
-* of the License, or (at your option) any later version.
-*
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-*
-* You should have received a copy of the GNU General Public License
-* along with this program; if not, write to the Free Software
-* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-* ##% */
-
-package fr.cemagref.simexplorer.is.ui.swing.commandline.actions;
-
-import fr.cemagref.simexplorer.is.ui.swing.SimExplorer;
-import fr.cemagref.simexplorer.is.ui.swing.SimExplorerContext;
-import fr.cemagref.simexplorer.is.ui.swing.commandline.SimExplorerOptionParser;
-import org.codelutin.option.Option;
-import org.codelutin.option.OptionAction;
-
-/**
- * Implantation de base des actions spécifiques au parseur <b><code>SimExplorerOptionParser</code></b>.
- *
- * @author chemit
- * @see OptionAction
- */
-public abstract class SimExplorerAbstractOptionAction<O extends Option> extends org.codelutin.option.OptionAction<O, SimExplorerOptionParser> {
-
- protected SimExplorerContext context;
-
- public SimExplorerAbstractOptionAction() {
- super(SimExplorer.getContext().getParser());
- }
-
- public SimExplorerContext getContext() {
- if (context == null) {
- context = SimExplorer.getContext();
- }
- return context;
- }
-}
Modified: tags/glandais_20080306/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/commandline/actions/SimExplorerCommonActions.java
===================================================================
--- tags/glandais_20080306/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/commandline/actions/SimExplorerCommonActions.java 2008-03-06 21:44:14 UTC (rev 1300)
+++ tags/glandais_20080306/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/commandline/actions/SimExplorerCommonActions.java 2008-03-06 21:49:35 UTC (rev 1301)
@@ -19,18 +19,23 @@
* ##% */
package fr.cemagref.simexplorer.is.ui.swing.commandline.actions;
-import fr.cemagref.simexplorer.is.ui.swing.commandline.configs.SimExplorerAbstractConfigMain;
-import fr.cemagref.simexplorer.is.ui.swing.commandline.options.SimExplorerOptionEditConfig;
-import fr.cemagref.simexplorer.is.ui.swing.commandline.options.SimExplorerOptionShowConfig;
-import fr.cemagref.simexplorer.is.ui.swing.SimExplorerActionManager;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
import static org.codelutin.i18n.I18n._;
-import org.codelutin.option.Config;
import java.io.IOException;
import java.io.StringWriter;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.codelutin.option.Config;
+
+import fr.cemagref.simexplorer.is.ui.swing.SimExplorer;
+import fr.cemagref.simexplorer.is.ui.swing.SimExplorerActionManager;
+import fr.cemagref.simexplorer.is.ui.swing.SimExplorerContext;
+import fr.cemagref.simexplorer.is.ui.swing.commandline.SimExplorerOptionParser;
+import fr.cemagref.simexplorer.is.ui.swing.commandline.configs.SimExplorerAbstractConfigMain;
+import fr.cemagref.simexplorer.is.ui.swing.commandline.options.SimExplorerOptionEditConfig;
+import fr.cemagref.simexplorer.is.ui.swing.commandline.options.SimExplorerOptionShowConfig;
+
/**
* The class to define all common actions that IsisFish can launch at init time.
*
@@ -45,13 +50,21 @@
writer.flush();
}
+ static SimExplorerContext getContext() {
+ return SimExplorer.getContext();
+ }
+
+ static SimExplorerOptionParser getRealParser() {
+ return SimExplorer.getContext().getParser();
+ }
+
public static class HelpAction extends SimExplorerAbstractOptionActionHelp {
protected void run() throws Exception {
log.info("required help action");
StringWriter writer = new StringWriter();
- getParser().printUsage(writer, "SimExplorer SI v " + getContext().getConfig().getVersion());
- printConfig(writer, getParser().getMainConfig());
+ getRealParser().printUsage(writer, "SimExplorer SI v " + getContext().getConfig().getVersion());
+ printConfig(writer, getRealParser().getMainConfig());
writer.append('\n');
log.info(writer);
getContext().setQuit(true);
@@ -74,7 +87,7 @@
public void run() throws Exception {
SimExplorerAbstractConfigMain conf;
- conf = getParser().getMainConfig();
+ conf = getRealParser().getMainConfig();
String category = option.getConstantArgumentValue(0);
if (conf == null) {
Deleted: tags/glandais_20080306/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/commandline/configs/SimExplorerConfig.java
===================================================================
--- tags/glandais_20080306/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/commandline/configs/SimExplorerConfig.java 2008-03-06 21:44:14 UTC (rev 1300)
+++ tags/glandais_20080306/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/commandline/configs/SimExplorerConfig.java 2008-03-06 21:49:35 UTC (rev 1301)
@@ -1,63 +0,0 @@
-/*
-* ##% Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 Code Lutin,
-* Tony Chemit, Gabriel Landais
-*
-* This program is free software; you can redistribute it and/or
-* modify it under the terms of the GNU General Public License
-* as published by the Free Software Foundation; either version 2
-* of the License, or (at your option) any later version.
-*
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-*
-* You should have received a copy of the GNU General Public License
-* along with this program; if not, write to the Free Software
-* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-* ##% */
-package fr.cemagref.simexplorer.is.ui.swing.commandline.configs;
-
-import fr.cemagref.simexplorer.is.ui.swing.SimExplorer;
-import fr.cemagref.simexplorer.is.ui.swing.commandline.SimExplorerOptionKey;
-import fr.cemagref.simexplorer.is.ui.swing.commandline.SimExplorerOptionParser;
-import org.codelutin.option.ConfigPropertyKey;
-import org.codelutin.option.SimpleConfigImpl;
-
-import java.io.File;
-import java.io.IOException;
-
-/**
- * L'implantation de base des configuration de l'application.
- *
- * @author chemit
- */
-public class SimExplorerConfig extends SimpleConfigImpl<SimExplorerOptionParser, SimExplorerOptionKey<?, ?>> {
-
- public SimExplorerConfig(String category, String description) {
- super(category, description);
- }
-
- protected SimExplorerOptionParser getParser() {
- return SimExplorer.getContext().getParser();
- }
-
- protected SimExplorerOptionKey<?, ?> getConfigOptionKey() {
- return SimExplorerOptionParser.CONFIG_OPTION_KEY;
- }
-
- protected SimExplorerOptionKey<?, ?> getConfigFileOptionKey() {
- return SimExplorerOptionParser.CONFIG_FILE_OPTION_KEY;
- }
-
- protected ConfigPropertyKey<File> getFileNameConfigKey() {
- return SimExplorerAbstractConfigMain.CONFIG_FILE_NAME_PROPERTY_KEY;
- }
-
- @Override
- protected void loadFromSource() throws IOException {
- super.loadFromSource();
- // we do not deal with inter config properties
- clearUnsafeData();
- }
-}
\ No newline at end of file
Added: tags/glandais_20080306/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/commandline/configs/SimExplorerConfigImpl.java
===================================================================
--- tags/glandais_20080306/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/commandline/configs/SimExplorerConfigImpl.java (rev 0)
+++ tags/glandais_20080306/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/commandline/configs/SimExplorerConfigImpl.java 2008-03-06 21:49:35 UTC (rev 1301)
@@ -0,0 +1,64 @@
+/*
+ * ##% Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 Code Lutin,
+ * Tony Chemit, Gabriel Landais
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ * ##% */
+package fr.cemagref.simexplorer.is.ui.swing.commandline.configs;
+
+import java.io.File;
+import java.io.IOException;
+
+import org.codelutin.option.ConfigPropertyKey;
+
+import fr.cemagref.simexplorer.is.ui.swing.SimExplorer;
+import fr.cemagref.simexplorer.is.ui.swing.commandline.SimExplorerOptionKey;
+import fr.cemagref.simexplorer.is.ui.swing.commandline.SimExplorerOptionParser;
+import fr.cemagref.simexplorer.is.ui.swing.common.SimExplorerConfig;
+
+/**
+ * L'implantation de base des configuration de l'application.
+ *
+ * @author chemit
+ */
+public class SimExplorerConfigImpl extends SimExplorerConfig {
+
+ public SimExplorerConfigImpl(String category, String description) {
+ super(category, description);
+ }
+
+ protected SimExplorerOptionParser getParser() {
+ return SimExplorer.getContext().getParser();
+ }
+
+ protected SimExplorerOptionKey<?, ?> getConfigOptionKey() {
+ return SimExplorerOptionParser.CONFIG_OPTION_KEY;
+ }
+
+ protected SimExplorerOptionKey<?, ?> getConfigFileOptionKey() {
+ return SimExplorerOptionParser.CONFIG_FILE_OPTION_KEY;
+ }
+
+ protected ConfigPropertyKey<File> getFileNameConfigKey() {
+ return SimExplorerAbstractConfigMain.CONFIG_FILE_NAME_PROPERTY_KEY;
+ }
+
+ @Override
+ protected void loadFromSource() throws IOException {
+ super.loadFromSource(); // we do not deal with inter config properties
+ clearUnsafeData();
+ }
+
+}
\ No newline at end of file
Added: tags/glandais_20080306/simexplorer-is-swing-common/pom.xml
===================================================================
--- tags/glandais_20080306/simexplorer-is-swing-common/pom.xml (rev 0)
+++ tags/glandais_20080306/simexplorer-is-swing-common/pom.xml 2008-03-06 21:49:35 UTC (rev 1301)
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <!--groupId>simexplorer-is</groupId-->
+ <artifactId>simexplorer-is-swing-common</artifactId>
+ <name>Swing actions</name>
+
+ <version>0.1-SNAPSHOT</version>
+ <description>simexplorer-is swing common module</description>
+ <packaging>jar</packaging>
+
+ <parent>
+ <groupId>simexplorer-is</groupId>
+ <artifactId>simexplorer-is</artifactId>
+ <version>0.1-SNAPSHOT</version>
+ </parent>
+
+ <dependencies>
+ <!-- librairie commandline -->
+ <dependency>
+ <groupId>lutinlib</groupId>
+ <artifactId>lutincommandline</artifactId>
+ <version>0.1-SNAPSHOT</version>
+ <scope>compile</scope>
+ </dependency>
+ </dependencies>
+</project>
Added: tags/glandais_20080306/simexplorer-is-swing-common/src/java/fr/cemagref/simexplorer/is/ui/swing/common/SimExplorerAbstractOptionAction.java
===================================================================
--- tags/glandais_20080306/simexplorer-is-swing-common/src/java/fr/cemagref/simexplorer/is/ui/swing/common/SimExplorerAbstractOptionAction.java (rev 0)
+++ tags/glandais_20080306/simexplorer-is-swing-common/src/java/fr/cemagref/simexplorer/is/ui/swing/common/SimExplorerAbstractOptionAction.java 2008-03-06 21:49:35 UTC (rev 1301)
@@ -0,0 +1,56 @@
+/*
+ * ##% Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007,2008 Code Lutin.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ * ##% */
+
+package fr.cemagref.simexplorer.is.ui.swing.common;
+
+import org.codelutin.option.Option;
+import org.codelutin.option.OptionAction;
+import org.codelutin.option.OptionParser;
+
+
+/**
+ * Implantation de base des actions sp?cifiques au parseur <b><code>SimExplorerOptionParser</code></b>.
+ *
+ * @author chemit
+ * @param
+ * <P>
+ * @see OptionAction
+ */
+public abstract class SimExplorerAbstractOptionAction<O extends Option>
+ extends org.codelutin.option.OptionAction<O, OptionParser> {
+
+ private static OptionParser optionParserImpl = null;
+
+ public static void setOptionParser(OptionParser realOptionParser) {
+ optionParserImpl = realOptionParser;
+ }
+
+ @Override
+ protected OptionParser getParser() {
+ return optionParserImpl;
+ }
+
+ public SimExplorerAbstractOptionAction() {
+ super(optionParserImpl);
+ }
+
+ public SimExplorerAbstractOptionAction(OptionParser parser) {
+ super(optionParserImpl);
+ }
+
+}
Added: tags/glandais_20080306/simexplorer-is-swing-common/src/java/fr/cemagref/simexplorer/is/ui/swing/common/SimExplorerConfig.java
===================================================================
--- tags/glandais_20080306/simexplorer-is-swing-common/src/java/fr/cemagref/simexplorer/is/ui/swing/common/SimExplorerConfig.java (rev 0)
+++ tags/glandais_20080306/simexplorer-is-swing-common/src/java/fr/cemagref/simexplorer/is/ui/swing/common/SimExplorerConfig.java 2008-03-06 21:49:35 UTC (rev 1301)
@@ -0,0 +1,71 @@
+/*
+ * ##% Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 Code Lutin,
+ * Tony Chemit, Gabriel Landais
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ * ##% */
+package fr.cemagref.simexplorer.is.ui.swing.common;
+
+import java.io.IOException;
+
+import org.codelutin.option.ConfigPropertyKey;
+import org.codelutin.option.OptionKey;
+import org.codelutin.option.OptionParser;
+import org.codelutin.option.SimpleConfigImpl;
+
+/**
+ * L'implantation de base des configuration de l'application.
+ *
+ * @author chemit
+ */
+public class SimExplorerConfig extends SimpleConfigImpl {
+
+ private static SimExplorerConfig simExplorerConfigImpl = null;
+
+ public static void setSimExplorerConfigImpl(SimExplorerConfig simExplorerConfig) {
+ simExplorerConfigImpl = simExplorerConfig;
+ }
+
+ public SimExplorerConfig(String category, String description) {
+ super(category, description);
+ }
+
+ protected OptionParser getParser() {
+ return simExplorerConfigImpl.getParser();
+ }
+
+ @Override
+ protected void loadFromSource() throws IOException {
+ super.loadFromSource();
+ // we do not deal with inter config properties
+ clearUnsafeData();
+ }
+
+ @Override
+ protected OptionKey getConfigFileOptionKey() {
+ return simExplorerConfigImpl.getConfigFileOptionKey();
+ }
+
+ @Override
+ protected OptionKey getConfigOptionKey() {
+ return simExplorerConfigImpl.getConfigOptionKey();
+ }
+
+ @Override
+ protected ConfigPropertyKey getFileNameConfigKey() {
+ return simExplorerConfigImpl.getFileNameConfigKey();
+ }
+
+}
\ No newline at end of file
Modified: tags/glandais_20080306/simexplorer-is-swing-jaxx/pom.xml
===================================================================
--- tags/glandais_20080306/simexplorer-is-swing-jaxx/pom.xml 2008-03-06 21:44:14 UTC (rev 1300)
+++ tags/glandais_20080306/simexplorer-is-swing-jaxx/pom.xml 2008-03-06 21:49:35 UTC (rev 1301)
@@ -26,6 +26,9 @@
</activation>
<properties>
<maven.verbose>false</maven.verbose>
+ <maven.test.skip>false</maven.test.skip>
+ <maven.gen.dir>${maven.src.dir}/java</maven.gen.dir>
+ <commandline.out>${maven.src.dir}/java</commandline.out>
</properties>
</profile>
</profiles>
@@ -44,6 +47,39 @@
-->
<plugin>
<groupId>lutinplugin</groupId>
+ <artifactId>maven-commandline-plugin</artifactId>
+ <version>0.2-SNAPSHOT</version>
+ <configuration>
+ <prefix>SimExplorer</prefix>
+ <i18nPrefix>simexplorer</i18nPrefix>
+ <source>${maven.src.dir}/resources/commandline.properties</source>
+ <parserPackageName>fr.cemagref.simexplorer.is.ui.swing.commandline</parserPackageName>
+ <actionSuperClass>fr.cemagref.simexplorer.is.ui.swing.common.SimExplorerAbstractOptionAction</actionSuperClass>
+ <configSuperClass>fr.cemagref.simexplorer.is.ui.swing.common.SimExplorerConfig</configSuperClass>
+ <concreteConfig>true</concreteConfig>
+ <actionImplementations>
+ <value>fr.cemagref.simexplorer.is.ui.swing.commandline.actions.SimExplorerCommonActions</value>
+ </actionImplementations>
+ <configImplementations>
+ <value>fr.cemagref.simexplorer.is.ui.swing.commandline.configs.SimExplorerAbstractConfigMain</value>
+ <value>fr.cemagref.simexplorer.is.ui.swing.commandline.configs.SimExplorerAbstractConfigLocal</value>
+ <value>fr.cemagref.simexplorer.is.ui.swing.commandline.configs.SimExplorerAbstractConfigRemote</value>
+ </configImplementations>
+
+ <commandline.out>${maven.src.dir}/java</commandline.out>
+ </configuration>
+ <executions>
+ <execution>
+ <goals>
+ <goal>java</goal>
+ </goals>
+ </execution>
+ </executions>
+
+ </plugin>
+
+ <plugin>
+ <groupId>lutinplugin</groupId>
<artifactId>maven-jaxx-plugin</artifactId>
<version>0.2-SNAPSHOT</version>
<configuration>
@@ -80,6 +116,7 @@
<phase>compile</phase>
<!--id>java</id-->
<goals>
+ <goal>parserJava</goal>
<goal>parserJaxx</goal>
<goal>gen</goal>
</goals>
@@ -90,6 +127,11 @@
</build>
<dependencies>
+ <dependency>
+ <groupId>simexplorer-is</groupId>
+ <artifactId>simexplorer-is-swing-common</artifactId>
+ <version>0.1-SNAPSHOT</version>
+ </dependency>
<!-- librairie des widgets lutin -->
<dependency>
<groupId>lutinlib</groupId>
Added: tags/glandais_20080306/simexplorer-is-swing-jaxx/src/resources/commandline.properties
===================================================================
--- tags/glandais_20080306/simexplorer-is-swing-jaxx/src/resources/commandline.properties (rev 0)
+++ tags/glandais_20080306/simexplorer-is-swing-jaxx/src/resources/commandline.properties 2008-03-06 21:49:35 UTC (rev 1301)
@@ -0,0 +1,112 @@
+###############################################################################
+### Option definitions ########################################################
+###############################################################################
+
+###
+### common options (TODO should be in commandline project)
+###
+showConfig.option.definition=--show-config {0,1} <main|local|remote> [all|tec]
+editConfig.option.definition=--edit-config
+configFile.option.definition=--config-file <configFile:File>
+config.option.definition=--config * [main|local|remote] <key:String> <value:String>
+help.option.definition=--help|-h
+resetConfig.option.definition=--resetConfig
+ui.option.definition=--ui <value:Boolean>
+
+###
+### others options TODO
+###
+
+###############################################################################
+### Local configuration definition ############################################
+###############################################################################
+
+local.config.definition.db=java.io.File:/var/local/simexplorer/local-db
+local.config.modifiers.db=mandatory
+
+local.config.definition.optimizePeriod=java.lang.Integer:3600
+local.config.modifiers.optimizePeriod=mandatory
+
+local.config.definition.data=java.io.File:/var/local/simexplorer/local-data
+local.config.modifiers.data=mandatory
+
+###############################################################################
+### Remote configuration definition ###########################################
+###############################################################################
+
+remote.config.definition.login=java.lang.String
+remote.config.modifiers.login=mandatory
+
+remote.config.definition.password=java.lang.String
+remote.config.modifiers.password=
+
+remote.config.definition.URI=java.net.URI:jnp://localhost:1099
+remote.config.modifiers.URI=static,mandatory
+
+remote.config.definition.useProxy=java.lang.Boolean:False
+remote.config.modifiers.useProxy=
+
+remote.config.definition.useAuthenticationProxy=java.lang.Boolean:False
+remote.config.modifiers.useAuthenticationProxy=
+
+remote.config.definition.proxyLogin=java.lang.String
+remote.config.modifiers.proxyLogin=
+
+remote.config.definition.proxyPassword=java.lang.String
+remote.config.modifiers.proxyPassword=
+
+###############################################################################
+### Main configuration definition #############################################
+###############################################################################
+
+###
+### Application global properties
+###
+main.config.definition.configFileName=java.io.File:.simexplorer-si-1
+main.config.modifiers.configFileName=final,mandatory,transient
+
+main.config.definition.debugMode=java.lang.Boolean:false
+main.config.modifiers.debugMode=mandatory
+
+main.config.definition.version=org.codelutin.util.VersionNumber:0.0.1
+main.config.modifiers.version=final,static,mandatory
+
+main.config.definition.siteURL=java.net.URL:http://simexplorer-si.labs.libre-entreprise.org
+main.config.modifiers.siteURL=final,static,mandatory
+
+#main.config.definition.smtpServer=java.lang.String:smtp
+#main.config.modifiers.smtpServer=mandatory
+
+###
+### Application preferences
+###
+main.config.definition.localSizor=jaxx.util.SimplePaginationEnum:_5
+main.config.modifiers.localSizor=
+
+main.config.definition.remoteSizor=jaxx.util.SimplePaginationEnum:_20
+main.config.modifiers.remoteSizor=
+
+main.config.definition.showLocalTab=java.lang.Boolean:True
+main.config.modifiers.showLocalTab=
+
+main.config.definition.showRemoteTab=java.lang.Boolean:False
+main.config.modifiers.showRemoteTab=
+
+main.config.definition.autoConnect=java.lang.Boolean:False
+main.config.modifiers.autoConnect=
+
+###
+### user properties
+###
+
+main.config.definition.userFirstName=java.lang.String
+main.config.modifiers.userFirstName=mandatory
+
+main.config.definition.userLocale=org.codelutin.i18n.LocaleEnum:fr
+main.config.modifiers.userLocale=mandatory
+
+main.config.definition.userLastName=java.lang.String
+main.config.modifiers.userLastName=mandatory
+
+main.config.definition.userMail=java.lang.String
+main.config.modifiers.userMail=mandatory
Modified: tags/glandais_20080306/simexplorer-is-swing-jaxx/src/resources/i18n/simexplorer-is-swing-jaxx-en_GB.properties
===================================================================
--- tags/glandais_20080306/simexplorer-is-swing-jaxx/src/resources/i18n/simexplorer-is-swing-jaxx-en_GB.properties 2008-03-06 21:44:14 UTC (rev 1300)
+++ tags/glandais_20080306/simexplorer-is-swing-jaxx/src/resources/i18n/simexplorer-is-swing-jaxx-en_GB.properties 2008-03-06 21:49:35 UTC (rev 1301)
@@ -12,7 +12,33 @@
simexplorer.common.passphrase=Password
simexplorer.common.type=type
simexplorer.config.i18n.menu=Language
+simexplorer.config.local.data.description=
+simexplorer.config.local.db.description=
+simexplorer.config.local.description=
+simexplorer.config.local.optimizePeriod.description=
+simexplorer.config.main.autoConnect.description=
+simexplorer.config.main.configFileName.description=
+simexplorer.config.main.debugMode.description=
+simexplorer.config.main.description=
+simexplorer.config.main.localSizor.description=
+simexplorer.config.main.remoteSizor.description=
+simexplorer.config.main.showLocalTab.description=
+simexplorer.config.main.showRemoteTab.description=
+simexplorer.config.main.siteURL.description=
+simexplorer.config.main.userFirstName.description=
+simexplorer.config.main.userLastName.description=
+simexplorer.config.main.userLocale.description=
+simexplorer.config.main.userMail.description=
+simexplorer.config.main.version.description=
simexplorer.config.menu=Configuration
+simexplorer.config.remote.URI.description=
+simexplorer.config.remote.description=
+simexplorer.config.remote.login.description=
+simexplorer.config.remote.password.description=
+simexplorer.config.remote.proxyLogin.description=
+simexplorer.config.remote.proxyPassword.description=
+simexplorer.config.remote.useAuthenticationProxy.description=
+simexplorer.config.remote.useProxy.description=
simexplorer.debug.menu=Debug
simexplorer.entities.applicationExploration=Exploration Application
simexplorer.entities.library=Library
@@ -24,3 +50,10 @@
simexplorer.main.ui.title=SimExplorer SI v 0.1
simexplorer.node.navigation.local=Local element
simexplorer.node.navigation.remote=Remote element
+simexplorer.option.description.config=
+simexplorer.option.description.configFile=
+simexplorer.option.description.editConfig=
+simexplorer.option.description.help=
+simexplorer.option.description.resetConfig=
+simexplorer.option.description.showConfig=
+simexplorer.option.description.ui=
Modified: tags/glandais_20080306/simexplorer-is-swing-jaxx/src/resources/i18n/simexplorer-is-swing-jaxx-fr_FR.properties
===================================================================
--- tags/glandais_20080306/simexplorer-is-swing-jaxx/src/resources/i18n/simexplorer-is-swing-jaxx-fr_FR.properties 2008-03-06 21:44:14 UTC (rev 1300)
+++ tags/glandais_20080306/simexplorer-is-swing-jaxx/src/resources/i18n/simexplorer-is-swing-jaxx-fr_FR.properties 2008-03-06 21:49:35 UTC (rev 1301)
@@ -12,7 +12,33 @@
simexplorer.common.passphrase=Mot de passe
simexplorer.common.type=type
simexplorer.config.i18n.menu=Langue
+simexplorer.config.local.data.description=
+simexplorer.config.local.db.description=
+simexplorer.config.local.description=
+simexplorer.config.local.optimizePeriod.description=
+simexplorer.config.main.autoConnect.description=
+simexplorer.config.main.configFileName.description=
+simexplorer.config.main.debugMode.description=
+simexplorer.config.main.description=
+simexplorer.config.main.localSizor.description=
+simexplorer.config.main.remoteSizor.description=
+simexplorer.config.main.showLocalTab.description=
+simexplorer.config.main.showRemoteTab.description=
+simexplorer.config.main.siteURL.description=
+simexplorer.config.main.userFirstName.description=
+simexplorer.config.main.userLastName.description=
+simexplorer.config.main.userLocale.description=
+simexplorer.config.main.userMail.description=
+simexplorer.config.main.version.description=
simexplorer.config.menu=Configuration
+simexplorer.config.remote.URI.description=
+simexplorer.config.remote.description=
+simexplorer.config.remote.login.description=
+simexplorer.config.remote.password.description=
+simexplorer.config.remote.proxyLogin.description=
+simexplorer.config.remote.proxyPassword.description=
+simexplorer.config.remote.useAuthenticationProxy.description=
+simexplorer.config.remote.useProxy.description=
simexplorer.debug.menu=Debug
simexplorer.entities.applicationExploration=Exploration d'application
simexplorer.entities.library=Librairie
@@ -24,3 +50,10 @@
simexplorer.main.ui.title=SimExplorer SI v 0.1
simexplorer.node.navigation.local=\u00E9l\u00E9ment local
simexplorer.node.navigation.remote=\u00E9l\u00E9ment distant
+simexplorer.option.description.config=
+simexplorer.option.description.configFile=
+simexplorer.option.description.editConfig=
+simexplorer.option.description.help=
+simexplorer.option.description.resetConfig=
+simexplorer.option.description.showConfig=
+simexplorer.option.description.ui=
Modified: tags/glandais_20080306/simexplorer-is-web/pom.xml
===================================================================
--- tags/glandais_20080306/simexplorer-is-web/pom.xml 2008-03-06 21:44:14 UTC (rev 1300)
+++ tags/glandais_20080306/simexplorer-is-web/pom.xml 2008-03-06 21:49:35 UTC (rev 1301)
@@ -39,51 +39,6 @@
</archive>
</configuration>
</plugin>
-
- <!-- Run the application using "mvn jetty:run" -->
- <plugin>
- <groupId>org.mortbay.jetty</groupId>
- <artifactId>maven-jetty-plugin</artifactId>
- <configuration>
- <!-- Log to the console. -->
- <requestLog
- implementation="org.mortbay.jetty.NCSARequestLog">
- <!-- This doesn't do anything for Jetty, but is a workaround for a Maven bug
- that prevents the requestLog from being set. -->
- <append>true</append>
- </requestLog>
- <connectors>
- <connector
- implementation="org.mortbay.jetty.nio.SelectChannelConnector">
- <port>9090</port>
- <maxIdleTime>60000</maxIdleTime>
- </connector>
- </connectors>
- </configuration>
- </plugin>
-
- <!--plugin>
- <groupId>lutinplugin</groupId>
- <artifactId>maven-i18n-plugin</artifactId>
- <version>0.2-SNAPSHOT</version>
- <configuration>
- <bundles>
- <param>fr_FR</param>
- <param>en_GB</param>
- </bundles>
- </configuration>
- <executions>
- <execution>
- <phase>compile</phase>
- <id>java</id>
- <goals>
- <goal>parserJava</goal>
- <goal>gen</goal>
- </goals>
- </execution>
- </executions>
- </plugin-->
-
</plugins>
</build>
@@ -94,6 +49,12 @@
<version>0.1-SNAPSHOT</version>
</dependency>
<dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ <version>2.3</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
<groupId>tapestry5-treegrid</groupId>
<artifactId>tapestry5-treegrid</artifactId>
<version>${tapestry.version}.1</version>
Added: tags/glandais_20080306/tree.txt
===================================================================
--- tags/glandais_20080306/tree.txt (rev 0)
+++ tags/glandais_20080306/tree.txt 2008-03-06 21:49:35 UTC (rev 1301)
@@ -0,0 +1,297 @@
+profiler: off
+remote: off
+port: 15599
+thread-depth: compact
+thread.compact.threshold.ms: 1
+max-method-count: compact
+method.compact.threshold.ms: 1
+file: /tmp/profile.txt
+track.object.alloc: off
+output: text
+debug: off
+profiler-class: com.mentorgen.tools.profile.runtime.Profile
+output-method-signatures: no
+clock-resolution: ms
+output-summary-only: no
+exclude:null
+Accept ClassLoader: sun.misc.Launcher$AppClassLoader
+ClassLoaderFilter.1: com.mentorgen.tools.profile.instrument.clfilter.StandardClassLoaderFilter
+------------------
+[INFO]
+NOTE: Maven is executing in offline mode. Any artifacts not already in your local
+repository will be inaccessible.
+
+[INFO] Scanning for projects...
+[INFO] Reactor build order:
+[INFO] Common
+[INFO] Entities
+[INFO] Security
+[INFO] Storage
+[INFO] Service
+[INFO] Web
+[INFO] Swing-jaxx
+[INFO] Swing
+[INFO] EAR service
+[INFO] Searching repository for plugin with prefix: 'dependency'.
+[INFO] ------------------------------------------------------------------------
+[INFO] Building Common
+[INFO] task-segment: [dependency:tree]
+[INFO] ------------------------------------------------------------------------
+[INFO] [dependency:tree]
+[INFO] simexplorer-is:simexplorer-is:pom:0.1-SNAPSHOT
+[INFO] +- lutinlib:lutinutil:jar:0.29-SNAPSHOT:compile
+[INFO] | +- commons-logging:commons-logging:jar:1.1.1:compile
+[INFO] | +- log4j:log4j:jar:1.2.14:compile
+[INFO] | +- commons-primitives:commons-primitives:jar:1.0:compile
+[INFO] | +- commons-collections:commons-collections:jar:3.2:compile
+[INFO] | \- commons-beanutils:commons-beanutils:jar:1.7.0:compile
+[INFO] \- junit:junit:jar:3.8.1:test
+[INFO] ------------------------------------------------------------------------
+[INFO] Building Entities
+[INFO] task-segment: [dependency:tree]
+[INFO] ------------------------------------------------------------------------
+[INFO] [dependency:tree]
+[INFO] simexplorer-is:simexplorer-is-entities:jar:0.1-SNAPSHOT
+[INFO] +- lutinlib:lutinutil:jar:0.29-SNAPSHOT:compile
+[INFO] | +- commons-logging:commons-logging:jar:1.1.1:compile
+[INFO] | +- log4j:log4j:jar:1.2.14:compile
+[INFO] | +- commons-primitives:commons-primitives:jar:1.0:compile
+[INFO] | +- commons-collections:commons-collections:jar:3.2:compile
+[INFO] | \- commons-beanutils:commons-beanutils:jar:1.7.0:compile
+[INFO] +- junit:junit:jar:3.8.1:test
+[INFO] \- commons-lang:commons-lang:jar:2.3:compile
+[INFO] ------------------------------------------------------------------------
+[INFO] Building Security
+[INFO] task-segment: [dependency:tree]
+[INFO] ------------------------------------------------------------------------
+[INFO] [dependency:tree]
+[INFO] simexplorer-is:simexplorer-is-security:ejb:0.1-SNAPSHOT
+[INFO] +- lutinlib:lutinutil:jar:0.29-SNAPSHOT:compile
+[INFO] | +- commons-logging:commons-logging:jar:1.1.1:compile
+[INFO] | +- log4j:log4j:jar:1.2.14:compile
+[INFO] | +- commons-primitives:commons-primitives:jar:1.0:compile
+[INFO] | +- commons-collections:commons-collections:jar:3.2:compile
+[INFO] | \- commons-beanutils:commons-beanutils:jar:1.7.0:compile
+[INFO] +- junit:junit:jar:3.8.1:test
+[INFO] +- javax.persistence:persistence-api:jar:1.0:provided
+[INFO] +- jboss:jboss-ejb3x:jar:4.2.2.GA:provided
+[INFO] +- jboss:jboss-annotations-ejb3:jar:4.2.2.GA:provided
+[INFO] \- com.h2database:h2:jar:1.0.64:compile
+[INFO] ------------------------------------------------------------------------
+[INFO] Building Storage
+[INFO] task-segment: [dependency:tree]
+[INFO] ------------------------------------------------------------------------
+[INFO] [dependency:tree]
+[INFO] simexplorer-is:simexplorer-is-storage:jar:0.1-SNAPSHOT
+[INFO] +- lutinlib:lutinutil:jar:0.29-SNAPSHOT:compile
+[INFO] | +- log4j:log4j:jar:1.2.14:compile
+[INFO] | +- commons-primitives:commons-primitives:jar:1.0:compile
+[INFO] | +- commons-collections:commons-collections:jar:3.2:compile
+[INFO] | \- commons-beanutils:commons-beanutils:jar:1.7.0:compile
+[INFO] +- junit:junit:jar:3.8.1:test
+[INFO] +- jboss:jboss-ejb3x:jar:4.2.2.GA:provided
+[INFO] +- com.thoughtworks.xstream:xstream:jar:1.2.2:compile
+[INFO] | \- xpp3:xpp3_min:jar:1.1.3.4.O:compile
+[INFO] +- org.apache.lucene:lucene-core:jar:2.3.1:compile
+[INFO] +- commons-logging:commons-logging:jar:1.1:compile
+[INFO] | +- logkit:logkit:jar:1.0.1:compile
+[INFO] | +- avalon-framework:avalon-framework:jar:4.1.3:compile
+[INFO] | \- javax.servlet:servlet-api:jar:2.3:compile
+[INFO] \- simexplorer-is:simexplorer-is-entities:jar:0.1-SNAPSHOT:compile
+[INFO] \- commons-lang:commons-lang:jar:2.3:compile
+[INFO] ------------------------------------------------------------------------
+[INFO] Building Service
+[INFO] task-segment: [dependency:tree]
+[INFO] ------------------------------------------------------------------------
+[INFO] [dependency:tree]
+[INFO] simexplorer-is:simexplorer-is-service:ejb:0.1-SNAPSHOT
+[INFO] +- lutinlib:lutinutil:jar:0.29-SNAPSHOT:compile
+[INFO] | +- commons-logging:commons-logging:jar:1.1.1:compile
+[INFO] | +- log4j:log4j:jar:1.2.14:compile
+[INFO] | +- commons-primitives:commons-primitives:jar:1.0:compile
+[INFO] | +- commons-collections:commons-collections:jar:3.2:compile
+[INFO] | \- commons-beanutils:commons-beanutils:jar:1.7.0:compile
+[INFO] +- junit:junit:jar:3.8.1:test
+[INFO] +- simexplorer-is:simexplorer-is-storage:jar:0.1-SNAPSHOT:compile
+[INFO] | +- com.thoughtworks.xstream:xstream:jar:1.2.2:compile
+[INFO] | | \- xpp3:xpp3_min:jar:1.1.3.4.O:compile
+[INFO] | +- org.apache.lucene:lucene-core:jar:2.3.1:compile
+[INFO] | \- simexplorer-is:simexplorer-is-entities:jar:0.1-SNAPSHOT:compile
+[INFO] | \- commons-lang:commons-lang:jar:2.3:compile
+[INFO] +- simexplorer-is:simexplorer-is-security:jar:0.1-SNAPSHOT:compile
+[INFO] | \- com.h2database:h2:jar:1.0.64:compile
+[INFO] +- com.healthmarketscience.rmiio:rmiio:jar:2.0.1:compile
+[INFO] +- jboss:jboss-ejb3x:jar:4.2.2.GA:provided
+[INFO] +- jboss:jboss-annotations-ejb3:jar:4.2.2.GA:provided
+[INFO] +- jboss:jbossall-client:jar:4.2.2.GA:provided
+[INFO] \- javax.mail:mail:jar:1.4:compile
+[INFO] \- javax.activation:activation:jar:1.1:compile
+[INFO] ------------------------------------------------------------------------
+[INFO] Building Web
+[INFO] task-segment: [dependency:tree]
+[INFO] ------------------------------------------------------------------------
+[INFO] [dependency:tree]
+[INFO] simexplorer-is:simexplorer-is-web:war:0.1-SNAPSHOT
+[INFO] +- lutinlib:lutinutil:jar:0.29-SNAPSHOT:compile
+[INFO] | +- commons-logging:commons-logging:jar:1.1.1:compile
+[INFO] | +- log4j:log4j:jar:1.2.14:compile
+[INFO] | +- commons-primitives:commons-primitives:jar:1.0:compile
+[INFO] | +- commons-collections:commons-collections:jar:3.2:compile
+[INFO] | \- commons-beanutils:commons-beanutils:jar:1.7.0:compile
+[INFO] +- junit:junit:jar:3.8.1:test
+[INFO] +- simexplorer-is:simexplorer-is-service:jar:0.1-SNAPSHOT:compile
+[INFO] | +- simexplorer-is:simexplorer-is-storage:jar:0.1-SNAPSHOT:compile
+[INFO] | | +- com.thoughtworks.xstream:xstream:jar:1.2.2:compile
+[INFO] | | | \- xpp3:xpp3_min:jar:1.1.3.4.O:compile
+[INFO] | | +- org.apache.lucene:lucene-core:jar:2.3.1:compile
+[INFO] | | \- simexplorer-is:simexplorer-is-entities:jar:0.1-SNAPSHOT:compile
+[INFO] | | \- commons-lang:commons-lang:jar:2.3:compile
+[INFO] | +- simexplorer-is:simexplorer-is-security:jar:0.1-SNAPSHOT:compile
+[INFO] | | \- com.h2database:h2:jar:1.0.64:compile
+[INFO] | +- com.healthmarketscience.rmiio:rmiio:jar:2.0.1:compile
+[INFO] | \- javax.mail:mail:jar:1.4:compile
+[INFO] | \- javax.activation:activation:jar:1.1:compile
+[INFO] +- tapestry5-treegrid:tapestry5-treegrid:jar:5.0.10.1:compile
+[INFO] +- org.apache.tapestry:tapestry-upload:jar:5.0.10:compile
+[INFO] | +- commons-fileupload:commons-fileupload:jar:1.2:compile
+[INFO] | \- commons-io:commons-io:jar:1.3:compile
+[INFO] +- org.apache.tapestry:tapestry-core:jar:5.0.10:compile
+[INFO] | +- org.apache.tapestry:tapestry-annotations:jar:5.0.10:compile
+[INFO] | \- commons-codec:commons-codec:jar:1.3:compile
+[INFO] +- org.apache.tapestry:tapestry-ioc:jar:5.0.10:compile
+[INFO] | +- jboss:javassist:jar:3.6.ga:compile
+[INFO] | +- org.slf4j:slf4j-api:jar:1.4.3:compile
+[INFO] | \- org.slf4j:slf4j-log4j12:jar:1.4.3:compile
+[INFO] +- de.hsofttec.t5components:t5components:jar:0.5.6:compile
+[INFO] | +- org.freemarker:freemarker:jar:2.3.10:compile
+[INFO] | +- com.sdicons.jsontools:jsontools-core:jar:1.5:compile
+[INFO] | | \- antlr:antlr:jar:2.7.6:compile
+[INFO] | +- net.sf.opencsv:opencsv:jar:1.7:compile
+[INFO] | +- commons-httpclient:commons-httpclient:jar:3.1:compile
+[INFO] | \- ognl:ognl:jar:2.6.9:compile
+[INFO] +- jboss:jbossall-client:jar:4.2.2.GA:provided
+[INFO] \- org.testng:testng:jar:jdk15:5.1:test
+[INFO] ------------------------------------------------------------------------
+[INFO] Building Swing-jaxx
+[INFO] task-segment: [dependency:tree]
+[INFO] ------------------------------------------------------------------------
+[INFO] [dependency:tree]
+[INFO] simexplorer-is:simexplorer-is-swing-jaxx:jar:0.1-SNAPSHOT
+[INFO] +- lutinlib:lutinutil:jar:0.29-SNAPSHOT:compile
+[INFO] | +- commons-logging:commons-logging:jar:1.1.1:compile
+[INFO] | +- log4j:log4j:jar:1.2.14:compile
+[INFO] | +- commons-primitives:commons-primitives:jar:1.0:compile
+[INFO] | +- commons-collections:commons-collections:jar:3.2:compile
+[INFO] | \- commons-beanutils:commons-beanutils:jar:1.7.0:compile
+[INFO] +- junit:junit:jar:3.8.1:test
+[INFO] +- lutinlib:jaxx:jar:1.0.4-SNAPSHOT:compile
+[INFO] | +- com.sun:dt:jar:1.6.0:system
+[INFO] | \- javax.help:javahelp:jar:2.0.02:compile
+[INFO] \- lutinlib:lutinwidget:jar:0.10-SNAPSHOT:compile
+[INFO] +- javax.mail:mail:jar:1.3.3:compile
+[INFO] | \- javax.activation:activation:jar:1.0.2:compile
+[INFO] +- jgoodies:looks:jar:1.2.2:compile
+[INFO] +- externallib:l2fprod-common:jar:0.1:compile
+[INFO] \- sdoc:sdoc:jar:0.5.0-beta:compile
+[INFO] ------------------------------------------------------------------------
+[INFO] Building Swing
+[INFO] task-segment: [dependency:tree]
+[INFO] ------------------------------------------------------------------------
+[INFO] [dependency:tree]
+[INFO] simexplorer-is:simexplorer-is-swing:jar:0.1-SNAPSHOT
+[INFO] +- lutinlib:lutinutil:jar:0.29-SNAPSHOT:compile
+[INFO] | +- commons-logging:commons-logging:jar:1.1.1:compile
+[INFO] | +- log4j:log4j:jar:1.2.14:compile
+[INFO] | +- commons-primitives:commons-primitives:jar:1.0:compile
+[INFO] | +- commons-collections:commons-collections:jar:3.2:compile
+[INFO] | \- commons-beanutils:commons-beanutils:jar:1.7.0:compile
+[INFO] +- junit:junit:jar:3.8.1:test
+[INFO] +- simexplorer-is:simexplorer-is-swing-jaxx:jar:0.1-SNAPSHOT:compile
+[INFO] | +- lutinlib:jaxx:jar:1.0.4-SNAPSHOT:compile
+[INFO] | | +- com.sun:dt:jar:1.6.0:system
+[INFO] | | \- javax.help:javahelp:jar:2.0.02:compile
+[INFO] | \- lutinlib:lutinwidget:jar:0.10-SNAPSHOT:compile
+[INFO] | +- jgoodies:looks:jar:1.2.2:compile
+[INFO] | +- externallib:l2fprod-common:jar:0.1:compile
+[INFO] | \- sdoc:sdoc:jar:0.5.0-beta:compile
+[INFO] +- lutinlib:lutincommandline:jar:0.1-SNAPSHOT:compile
+[INFO] +- jboss:jbossall-client:jar:4.2.2.GA:provided
+[INFO] \- simexplorer-is:simexplorer-is-service:jar:0.1-SNAPSHOT:compile
+[INFO] +- simexplorer-is:simexplorer-is-storage:jar:0.1-SNAPSHOT:compile
+[INFO] | +- com.thoughtworks.xstream:xstream:jar:1.2.2:compile
+[INFO] | | \- xpp3:xpp3_min:jar:1.1.3.4.O:compile
+[INFO] | +- org.apache.lucene:lucene-core:jar:2.3.1:compile
+[INFO] | \- simexplorer-is:simexplorer-is-entities:jar:0.1-SNAPSHOT:compile
+[INFO] | \- commons-lang:commons-lang:jar:2.3:compile
+[INFO] +- simexplorer-is:simexplorer-is-security:jar:0.1-SNAPSHOT:compile
+[INFO] | \- com.h2database:h2:jar:1.0.64:compile
+[INFO] +- com.healthmarketscience.rmiio:rmiio:jar:2.0.1:compile
+[INFO] \- javax.mail:mail:jar:1.4:compile
+[INFO] \- javax.activation:activation:jar:1.1:compile
+[INFO] ------------------------------------------------------------------------
+[INFO] Building EAR service
+[INFO] task-segment: [dependency:tree]
+[INFO] ------------------------------------------------------------------------
+[INFO] [dependency:tree]
+[INFO] simexplorer-is:simexplorer-is-ear:ear:0.1-SNAPSHOT
+[INFO] +- lutinlib:lutinutil:jar:0.29-SNAPSHOT:compile
+[INFO] | +- commons-logging:commons-logging:jar:1.1.1:compile
+[INFO] | +- log4j:log4j:jar:1.2.14:compile
+[INFO] | +- commons-primitives:commons-primitives:jar:1.0:compile
+[INFO] | +- commons-collections:commons-collections:jar:3.2:compile
+[INFO] | \- commons-beanutils:commons-beanutils:jar:1.7.0:compile
+[INFO] +- junit:junit:jar:3.8.1:test
+[INFO] +- tapestry5-treegrid:tapestry5-treegrid:jar:5.0.10.1:compile
+[INFO] +- org.apache.tapestry:tapestry-upload:jar:5.0.10:compile
+[INFO] | +- commons-fileupload:commons-fileupload:jar:1.2:compile
+[INFO] | \- commons-io:commons-io:jar:1.3:compile
+[INFO] +- org.apache.tapestry:tapestry-core:jar:5.0.10:compile
+[INFO] | +- org.apache.tapestry:tapestry-annotations:jar:5.0.10:compile
+[INFO] | \- commons-codec:commons-codec:jar:1.3:compile
+[INFO] +- org.apache.tapestry:tapestry-ioc:jar:5.0.10:compile
+[INFO] | +- jboss:javassist:jar:3.6.ga:compile
+[INFO] | +- org.slf4j:slf4j-api:jar:1.4.3:compile
+[INFO] | \- org.slf4j:slf4j-log4j12:jar:1.4.3:compile
+[INFO] +- de.hsofttec.t5components:t5components:jar:0.5.6:compile
+[INFO] | +- org.freemarker:freemarker:jar:2.3.10:compile
+[INFO] | +- com.sdicons.jsontools:jsontools-core:jar:1.5:compile
+[INFO] | | \- antlr:antlr:jar:2.7.6:compile
+[INFO] | +- net.sf.opencsv:opencsv:jar:1.7:compile
+[INFO] | +- commons-httpclient:commons-httpclient:jar:3.1:compile
+[INFO] | \- ognl:ognl:jar:2.6.9:compile
+[INFO] +- simexplorer-is:simexplorer-is-service:ejb:0.1-SNAPSHOT:compile
+[INFO] | +- simexplorer-is:simexplorer-is-storage:jar:0.1-SNAPSHOT:compile
+[INFO] | | +- com.thoughtworks.xstream:xstream:jar:1.2.2:compile
+[INFO] | | | \- xpp3:xpp3_min:jar:1.1.3.4.O:compile
+[INFO] | | +- org.apache.lucene:lucene-core:jar:2.3.1:compile
+[INFO] | | \- simexplorer-is:simexplorer-is-entities:jar:0.1-SNAPSHOT:compile
+[INFO] | | \- commons-lang:commons-lang:jar:2.3:compile
+[INFO] | +- simexplorer-is:simexplorer-is-security:jar:0.1-SNAPSHOT:compile
+[INFO] | +- com.healthmarketscience.rmiio:rmiio:jar:2.0.1:compile
+[INFO] | \- javax.mail:mail:jar:1.4:compile
+[INFO] | \- javax.activation:activation:jar:1.1:compile
+[INFO] +- simexplorer-is:simexplorer-is-security:ejb:0.1-SNAPSHOT:compile
+[INFO] | \- com.h2database:h2:jar:1.0.64:compile
+[INFO] \- simexplorer-is:simexplorer-is-web:war:0.1-SNAPSHOT:compile
+[INFO]
+[INFO]
+[INFO] ------------------------------------------------------------------------
+[INFO] Reactor Summary:
+[INFO] ------------------------------------------------------------------------
+[INFO] Common ................................................ SUCCESS [2.497s]
+[INFO] Entities .............................................. SUCCESS [0.022s]
+[INFO] Security .............................................. SUCCESS [0.028s]
+[INFO] Storage ............................................... SUCCESS [0.058s]
+[INFO] Service ............................................... SUCCESS [0.053s]
+[INFO] Web ................................................... SUCCESS [0.225s]
+[INFO] Swing-jaxx ............................................ SUCCESS [0.088s]
+[INFO] Swing ................................................. SUCCESS [0.387s]
+[INFO] EAR service ........................................... SUCCESS [0.045s]
+[INFO] ------------------------------------------------------------------------
+[INFO] ------------------------------------------------------------------------
+[INFO] BUILD SUCCESSFUL
+[INFO] ------------------------------------------------------------------------
+[INFO] Total time: 3 seconds
+[INFO] Finished at: Thu Mar 06 18:28:31 CET 2008
+[INFO] Final Memory: 13M/80M
+[INFO] ------------------------------------------------------------------------
1
0
Author: glandais
Date: 2008-03-06 21:44:14 +0000 (Thu, 06 Mar 2008)
New Revision: 1300
Added:
tags/glandais_20080306/
Log:
Copied: tags/glandais_20080306 (from rev 1299, trunk/simexplorer-is)
1
0
Author: glandais
Date: 2008-03-06 21:43:42 +0000 (Thu, 06 Mar 2008)
New Revision: 1299
Removed:
tags/glandais_20080306/
Log:
1
0
Author: glandais
Date: 2008-03-06 21:34:22 +0000 (Thu, 06 Mar 2008)
New Revision: 1298
Added:
tags/glandais_20080306/
Log:
1
0
r1297 - in trunk/simexplorer-is: simexplorer-is-service/src/java/fr/cemagref/simexplorer/is/service simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages
by glandais@users.labs.libre-entreprise.org 06 Mar '08
by glandais@users.labs.libre-entreprise.org 06 Mar '08
06 Mar '08
Author: glandais
Date: 2008-03-06 16:28:13 +0000 (Thu, 06 Mar 2008)
New Revision: 1297
Modified:
trunk/simexplorer-is/simexplorer-is-service/src/java/fr/cemagref/simexplorer/is/service/MockStorageServiceImpl.java
trunk/simexplorer-is/simexplorer-is-service/src/java/fr/cemagref/simexplorer/is/service/StorageService.java
trunk/simexplorer-is/simexplorer-is-service/src/java/fr/cemagref/simexplorer/is/service/StorageServiceCommon.java
trunk/simexplorer-is/simexplorer-is-service/src/java/fr/cemagref/simexplorer/is/service/StorageServiceGenerator.java
trunk/simexplorer-is/simexplorer-is-service/src/java/fr/cemagref/simexplorer/is/service/StorageServiceHelper.java
trunk/simexplorer-is/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/StorageServiceHelper.java
trunk/simexplorer-is/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/ImportElementAction.java
trunk/simexplorer-is/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/ElementImport.java
Log:
Recursivness of export, until elements are same on both sides
Changed signature of save methods, returns LE instead of just metadata
Modified: trunk/simexplorer-is/simexplorer-is-service/src/java/fr/cemagref/simexplorer/is/service/MockStorageServiceImpl.java
===================================================================
--- trunk/simexplorer-is/simexplorer-is-service/src/java/fr/cemagref/simexplorer/is/service/MockStorageServiceImpl.java 2008-03-06 13:25:50 UTC (rev 1296)
+++ trunk/simexplorer-is/simexplorer-is-service/src/java/fr/cemagref/simexplorer/is/service/MockStorageServiceImpl.java 2008-03-06 16:28:13 UTC (rev 1297)
@@ -55,13 +55,13 @@
throw new IllegalStateException("not implemented");
}
- public MetaData saveElement(String token, SerializableInputStream zipRemoteStream) throws SimExplorerException {
- return (MetaData) checkImplemented();
+ public LoggableElement saveElement(String token, SerializableInputStream zipRemoteStream) throws SimExplorerException {
+ return (LoggableElement) checkImplemented();
}
- public MetaData saveElement(String token, SerializableInputStream xmlRemoteStream,
+ public LoggableElement saveElement(String token, SerializableInputStream xmlRemoteStream,
Map<Attachment, SerializableInputStream> attachmentsRemoteStream) throws SimExplorerException {
- return (MetaData) checkImplemented();
+ return (LoggableElement) checkImplemented();
}
public MetaData getMetadata(String token, String uuid) throws SimExplorerException {
Modified: trunk/simexplorer-is/simexplorer-is-service/src/java/fr/cemagref/simexplorer/is/service/StorageService.java
===================================================================
--- trunk/simexplorer-is/simexplorer-is-service/src/java/fr/cemagref/simexplorer/is/service/StorageService.java 2008-03-06 13:25:50 UTC (rev 1296)
+++ trunk/simexplorer-is/simexplorer-is-service/src/java/fr/cemagref/simexplorer/is/service/StorageService.java 2008-03-06 16:28:13 UTC (rev 1297)
@@ -60,7 +60,7 @@
*
* @throws SimExplorerException the sim explorer service exception
*/
- MetaData saveElement(String token, SerializableInputStream zipStream) throws SimExplorerException;
+ LoggableElement saveElement(String token, SerializableInputStream zipStream) throws SimExplorerException;
/**
* Save an element.
@@ -73,7 +73,7 @@
*
* @throws SimExplorerException the sim explorer service exception
*/
- MetaData saveElement(String token, SerializableInputStream xmlStream,
+ LoggableElement saveElement(String token, SerializableInputStream xmlStream,
Map<Attachment, SerializableInputStream> attachmentsStream) throws SimExplorerException;
/**
Modified: trunk/simexplorer-is/simexplorer-is-service/src/java/fr/cemagref/simexplorer/is/service/StorageServiceCommon.java
===================================================================
--- trunk/simexplorer-is/simexplorer-is-service/src/java/fr/cemagref/simexplorer/is/service/StorageServiceCommon.java 2008-03-06 13:25:50 UTC (rev 1296)
+++ trunk/simexplorer-is/simexplorer-is-service/src/java/fr/cemagref/simexplorer/is/service/StorageServiceCommon.java 2008-03-06 16:28:13 UTC (rev 1297)
@@ -246,7 +246,7 @@
*
* @throws SimExplorerException the sim explorer service exception
*/
- public MetaData saveElement(String token, SerializableInputStream zipStream) throws SimExplorerException {
+ public LoggableElement saveElement(String token, SerializableInputStream zipStream) throws SimExplorerException {
String xmlFile = null;
Map<Attachment, String> attachments = new HashMap<Attachment, String>();
@@ -297,7 +297,7 @@
InputStream xmlData = getStorageEngine().retrieveTempData(xmlFile);
LoggableElement loggableElement = LoggableElementFactory.parseStream(xmlData);
- MetaData elementSaved = saveElement(token, loggableElement, attachments);
+ LoggableElement elementSaved = saveElement(token, loggableElement, attachments);
getStorageEngine().deleteTempData(xmlFile);
for (Map.Entry<Attachment, String> tmpId : attachments.entrySet()) {
getStorageEngine().deleteTempData(tmpId.getValue());
@@ -316,7 +316,7 @@
*
* @throws SimExplorerException the exception
*/
- public MetaData saveElement(String token, SerializableInputStream xmlFile,
+ public LoggableElement saveElement(String token, SerializableInputStream xmlFile,
Map<Attachment, SerializableInputStream> attachments) throws SimExplorerException {
// Store temporary data
String idxml = getStorageEngine().storeTempData(xmlFile);
@@ -327,7 +327,7 @@
}
InputStream xmlData = getStorageEngine().retrieveTempData(idxml);
LoggableElement loggableElement = LoggableElementFactory.parseStream(xmlData);
- MetaData elementSaved = saveElement(token, loggableElement, idsattachment);
+ LoggableElement elementSaved = saveElement(token, loggableElement, idsattachment);
getStorageEngine().deleteTempData(idxml);
for (Map.Entry<Attachment, String> tmpId : idsattachment.entrySet()) {
getStorageEngine().deleteTempData(tmpId.getValue());
@@ -772,7 +772,7 @@
*
* @throws SimExplorerException the exception
*/
- private MetaData saveElement(String token, LoggableElement element, Map<Attachment, String> idsattachment)
+ private LoggableElement saveElement(String token, LoggableElement element, Map<Attachment, String> idsattachment)
throws SimExplorerException {
MetaData metaData = element.getMetaData();
if (metaData == null) {
@@ -792,10 +792,10 @@
processVersionRules(token, metaData, element);
List<LoggableElement> children = element.getChildren();
- MetaData childMetaData;
+ LoggableElement childElement;
for (LoggableElement child : children) {
- childMetaData = saveElement(token, child, idsattachment);
- getStorageEngine().saveElementHierarchy(token, metaData, childMetaData);
+ childElement = saveElement(token, child, idsattachment);
+ getStorageEngine().saveElementHierarchy(token, metaData, childElement.getMetaData());
}
// Prepare saving
@@ -820,7 +820,7 @@
}
- return metaData;
+ return element;
}
}
Modified: trunk/simexplorer-is/simexplorer-is-service/src/java/fr/cemagref/simexplorer/is/service/StorageServiceGenerator.java
===================================================================
--- trunk/simexplorer-is/simexplorer-is-service/src/java/fr/cemagref/simexplorer/is/service/StorageServiceGenerator.java 2008-03-06 13:25:50 UTC (rev 1296)
+++ trunk/simexplorer-is/simexplorer-is-service/src/java/fr/cemagref/simexplorer/is/service/StorageServiceGenerator.java 2008-03-06 16:28:13 UTC (rev 1297)
@@ -46,7 +46,7 @@
* @throws Exception
* the exception
*/
- private MetaData saveEa(StorageService storageService, String token, ExplorationApplication ea,
+ private LoggableElement saveEa(StorageService storageService, String token, ExplorationApplication ea,
boolean computeAttachments, Map<Attachment, ElementGenerator.RandomStream> attachments) throws Exception {
if (computeAttachments) {
@@ -118,7 +118,7 @@
ea.getMetaData().setVersion(firstVersion);
log.info("Saving " + firstVersion + "A");
- MetaData mde1 = saveEa(storageService, token, ea, true, attachments);
+ LoggableElement le1 = saveEa(storageService, token, ea, true, attachments);
ea.getMetaData().setVersion(secondVersion);
@@ -135,11 +135,11 @@
} else {
log.info("Saving " + secondVersion + "A");
}
- MetaData mde2 = saveEa(storageService, token, ea, false, attachments);
+ LoggableElement le2 = saveEa(storageService, token, ea, false, attachments);
- log.info("A : " + mde1.getHash());
+ log.info("A : " + le1.getMetaData().getHash());
if (different) {
- log.info("B : " + mde2.getHash());
+ log.info("B : " + le2.getMetaData().getHash());
}
return ea.getMetaData().getUuid();
Modified: trunk/simexplorer-is/simexplorer-is-service/src/java/fr/cemagref/simexplorer/is/service/StorageServiceHelper.java
===================================================================
--- trunk/simexplorer-is/simexplorer-is-service/src/java/fr/cemagref/simexplorer/is/service/StorageServiceHelper.java 2008-03-06 13:25:50 UTC (rev 1296)
+++ trunk/simexplorer-is/simexplorer-is-service/src/java/fr/cemagref/simexplorer/is/service/StorageServiceHelper.java 2008-03-06 16:28:13 UTC (rev 1297)
@@ -22,6 +22,7 @@
import com.healthmarketscience.rmiio.SerializableInputStream;
+import fr.cemagref.simexplorer.is.entities.data.LoggableElement;
import fr.cemagref.simexplorer.is.entities.metadata.MetaData;
import fr.cemagref.simexplorer.is.entities.metadata.Version;
import fr.cemagref.simexplorer.is.exceptions.SimExplorerException;
@@ -44,35 +45,65 @@
*/
public static MetaData exportElementTo(String token, StorageService fromService, StorageService toService,
String uuid, String version) throws SimExplorerException {
- // Extract element from source service
- InputStream fromElement = fromService.retrieveElementFull(token, uuid, version);
- // Store element in remote service
- MetaData toElement;
- try {
- if (fromElement instanceof SerializableInputStream) {
- toElement = toService.saveElement(token,
- (SerializableInputStream) fromElement);
- } else {
- toElement = toService.saveElement(token,
- new SerializableInputStream(fromElement));
- }
- } catch (IOException e) {
- throw new SimExplorerTechnicalException(e);
- }
+
+ String currentUuid = uuid;
+ String currentVersion = version;
+
+ boolean sameElements;
- // fromElement has to be updated
- if (!toElement.getUuid().equals(uuid) || !toElement.getVersion().equals(Version.valueOf(version))) {
- MetaData previousVersion = fromService.getMetadata(token, uuid, version);
- fromService.update(token, previousVersion.getUuid(), previousVersion.getVersion(), null, true);
+ // Remote element
+ LoggableElement toElement;
- // Update element in source service, from what remote service returns on export
- toElement.setLatest(true);
- toElement.setParentUuid(uuid);
- toElement.setParentVersion(version);
- fromService.update(token, uuid, Version.valueOf(version), toElement, false);
- }
+
+ do {
+ // Extract element from source service
+ LoggableElement fromElement = fromService.getLoggableElement(token, currentUuid, currentVersion);
+ InputStream fromElementStream = fromService.retrieveElementFull(token, currentUuid, currentVersion);
+ // Store element in remote service
+ try {
+ if (fromElementStream instanceof SerializableInputStream) {
+ toElement = toService.saveElement(token,
+ (SerializableInputStream) fromElementStream);
+ } else {
+ toElement = toService.saveElement(token,
+ new SerializableInputStream(fromElementStream));
+ }
+ } catch (IOException e) {
+ throw new SimExplorerTechnicalException(e);
+ }
+
+ // Check if remote element is equal to local element
+ sameElements = fromElement.equals(toElement);
+
+ // If not
+ if (!sameElements) {
+ // Resave localy remote element
+
+ // Get new remote element
+ InputStream toElementStream = toService.retrieveElementFull(
+ token, toElement.getMetaData().getUuid(), toElement
+ .getMetaData().getVersion().toString());
+
+ // Save new remote element
+ try {
+ if (toElementStream instanceof SerializableInputStream) {
+ fromElement = fromService.saveElement(token,
+ (SerializableInputStream) toElementStream);
+ } else {
+ fromElement = fromService.saveElement(token,
+ new SerializableInputStream(toElementStream));
+ }
+ } catch (IOException e) {
+ throw new SimExplorerTechnicalException(e);
+ }
+
+ currentUuid = fromElement.getMetaData().getUuid();
+ currentVersion = fromElement.getMetaData().getVersion().toString();
+ }
+
+ } while (!sameElements);
- return toElement;
+ return toElement.getMetaData();
}
protected StorageServiceHelper() {
Modified: trunk/simexplorer-is/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/StorageServiceHelper.java
===================================================================
--- trunk/simexplorer-is/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/StorageServiceHelper.java 2008-03-06 13:25:50 UTC (rev 1296)
+++ trunk/simexplorer-is/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/StorageServiceHelper.java 2008-03-06 16:28:13 UTC (rev 1297)
@@ -164,7 +164,7 @@
SerializableInputStream zipStream;
zipStream = new SerializableInputStream(new FileInputStream(file));
MetaData result;
- result = getService(context, remote).saveElement(context.getToken(), zipStream);
+ result = getService(context, remote).saveElement(context.getToken(), zipStream).getMetaData();
return result;
} catch (Exception e) {
throw new SimExplorerRuntimeException(e);
Modified: trunk/simexplorer-is/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/ImportElementAction.java
===================================================================
--- trunk/simexplorer-is/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/ImportElementAction.java 2008-03-06 13:25:50 UTC (rev 1296)
+++ trunk/simexplorer-is/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/ImportElementAction.java 2008-03-06 16:28:13 UTC (rev 1297)
@@ -146,7 +146,7 @@
SerializableInputStream zipStream;
zipStream = new SerializableInputStream(new FileInputStream(file));
MetaData result;
- result = getContext().getStorageService(remote).saveElement(getContext().getToken(), zipStream);
+ result = getContext().getStorageService(remote).saveElement(getContext().getToken(), zipStream).getMetaData();
return result;
} catch (Exception e) {
throw new SimExplorerRuntimeException(e);
Modified: trunk/simexplorer-is/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/ElementImport.java
===================================================================
--- trunk/simexplorer-is/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/ElementImport.java 2008-03-06 13:25:50 UTC (rev 1296)
+++ trunk/simexplorer-is/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/ElementImport.java 2008-03-06 16:28:13 UTC (rev 1297)
@@ -23,7 +23,7 @@
import com.healthmarketscience.rmiio.SerializableInputStream;
import de.hsofttec.t5components.annotations.SetterGetter;
-import fr.cemagref.simexplorer.is.entities.metadata.MetaData;
+import fr.cemagref.simexplorer.is.entities.data.LoggableElement;
import fr.cemagref.simexplorer.is.exceptions.SimExplorerException;
import fr.cemagref.simexplorer.is.exceptions.SimExplorerTechnicalException;
import fr.cemagref.simexplorer.is.service.remote.RemoteStorageService;
@@ -54,7 +54,7 @@
* @throws Exception the exception
*/
public Object onSuccess() throws SimExplorerException {
- MetaData mde = null;
+ LoggableElement le = null;
if (_fileEA != null) {
SerializableInputStream zipStream;
try {
@@ -62,7 +62,7 @@
} catch (Exception e) {
throw new SimExplorerTechnicalException(e);
}
- mde = RemoteStorageService.getStorageService().saveElement(getToken(), zipStream);
+ le = RemoteStorageService.getStorageService().saveElement(getToken(), zipStream);
} else {
if (_fileLib != null) {
SerializableInputStream zipStream;
@@ -71,11 +71,11 @@
} catch (Exception e) {
throw new SimExplorerTechnicalException(e);
}
- mde = RemoteStorageService.getStorageService().saveElement(getToken(), zipStream);
+ le = RemoteStorageService.getStorageService().saveElement(getToken(), zipStream);
}
}
- if (mde != null) {
- elementDetail.setup(mde.getUuid(), mde.getVersion().toString());
+ if (le != null) {
+ elementDetail.setup(le.getMetaData().getUuid(), le.getMetaData().getVersion().toString());
return elementDetail;
}
return this;
1
0
r1296 - in trunk/simexplorer-is: simexplorer-is-ear src/site/fr/rst
by glandais@users.labs.libre-entreprise.org 06 Mar '08
by glandais@users.labs.libre-entreprise.org 06 Mar '08
06 Mar '08
Author: glandais
Date: 2008-03-06 13:25:50 +0000 (Thu, 06 Mar 2008)
New Revision: 1296
Modified:
trunk/simexplorer-is/simexplorer-is-ear/pom.xml
trunk/simexplorer-is/src/site/fr/rst/install.rst
Log:
Doc install update
/ as context path
Modified: trunk/simexplorer-is/simexplorer-is-ear/pom.xml
===================================================================
--- trunk/simexplorer-is/simexplorer-is-ear/pom.xml 2008-03-06 13:25:33 UTC (rev 1295)
+++ trunk/simexplorer-is/simexplorer-is-ear/pom.xml 2008-03-06 13:25:50 UTC (rev 1296)
@@ -32,6 +32,15 @@
<artifactId>maven-ear-plugin</artifactId>
<configuration>
<defaultLibBundleDir>lib</defaultLibBundleDir>
+ <modules>
+ <webModule>
+ <groupId>simexplorer-is</groupId>
+ <artifactId>simexplorer-is-web</artifactId>
+ <contextRoot>
+ /
+ </contextRoot>
+ </webModule>
+ </modules>
</configuration>
</plugin>
</plugins>
@@ -60,9 +69,9 @@
<version>${tapestry.version}</version>
</dependency>
<dependency>
- <groupId>de.hsofttec.t5components</groupId>
- <artifactId>t5components</artifactId>
- <version>0.5.6</version>
+ <groupId>de.hsofttec.t5components</groupId>
+ <artifactId>t5components</artifactId>
+ <version>0.5.6</version>
</dependency>
<dependency>
Modified: trunk/simexplorer-is/src/site/fr/rst/install.rst
===================================================================
--- trunk/simexplorer-is/src/site/fr/rst/install.rst 2008-03-06 13:25:33 UTC (rev 1295)
+++ trunk/simexplorer-is/src/site/fr/rst/install.rst 2008-03-06 13:25:50 UTC (rev 1296)
@@ -42,6 +42,12 @@
Configuration
-------------
+TODO Suppression des application déployés automatiquement par JBoss
+
+L'application étant déployée sur la racine du serveur, il est nécessaire de désactiver l'application déjà
+présente à cette place. Pour cela, renommer le dossier /opt/java/jboss-4.2.2.GA/server/simexplorer/deploy/jboss-web.deployer/ROOT.war
+en /opt/java/jboss-4.2.2.GA/server/simexplorer/deploy/jboss-web.deployer/deployer.war
+
L'application utilise le pool de mail intégré à JBoss. Ainsi, il est nécessaire de modifier les propriétés
mail.smtp.host et mail.from dans le fichier /opt/java/jboss-4.2.2.GA/server/simexplorer/deploy/mail-service.xml
1
0
r1295 - trunk/simexplorer-is/simexplorer-is-service/src/java/fr/cemagref/simexplorer/is/service
by glandais@users.labs.libre-entreprise.org 06 Mar '08
by glandais@users.labs.libre-entreprise.org 06 Mar '08
06 Mar '08
Author: glandais
Date: 2008-03-06 13:25:33 +0000 (Thu, 06 Mar 2008)
New Revision: 1295
Modified:
trunk/simexplorer-is/simexplorer-is-service/src/java/fr/cemagref/simexplorer/is/service/StorageServiceHelper.java
Log:
Useless reserialization
Modified: trunk/simexplorer-is/simexplorer-is-service/src/java/fr/cemagref/simexplorer/is/service/StorageServiceHelper.java
===================================================================
--- trunk/simexplorer-is/simexplorer-is-service/src/java/fr/cemagref/simexplorer/is/service/StorageServiceHelper.java 2008-03-06 12:41:40 UTC (rev 1294)
+++ trunk/simexplorer-is/simexplorer-is-service/src/java/fr/cemagref/simexplorer/is/service/StorageServiceHelper.java 2008-03-06 13:25:33 UTC (rev 1295)
@@ -49,7 +49,13 @@
// Store element in remote service
MetaData toElement;
try {
- toElement = toService.saveElement(token, new SerializableInputStream(fromElement));
+ if (fromElement instanceof SerializableInputStream) {
+ toElement = toService.saveElement(token,
+ (SerializableInputStream) fromElement);
+ } else {
+ toElement = toService.saveElement(token,
+ new SerializableInputStream(fromElement));
+ }
} catch (IOException e) {
throw new SimExplorerTechnicalException(e);
}
1
0
06 Mar '08
Author: glandais
Date: 2008-03-06 12:41:40 +0000 (Thu, 06 Mar 2008)
New Revision: 1294
Modified:
trunk/simexplorer-is/src/site/fr/rst/install.rst
Log:
Doc install update
Modified: trunk/simexplorer-is/src/site/fr/rst/install.rst
===================================================================
--- trunk/simexplorer-is/src/site/fr/rst/install.rst 2008-03-06 12:20:04 UTC (rev 1293)
+++ trunk/simexplorer-is/src/site/fr/rst/install.rst 2008-03-06 12:41:40 UTC (rev 1294)
@@ -52,10 +52,8 @@
::
- bin/run.sh -b ADRESSE_SERVEUR -c simexplorer
-
-ADRESSE_SERVEUR doit contenir soit l'IP du serveur, soit son adresse pouvant être retrouvée par le DNS.
-
+ bin/run.sh -b 0.0.0.0 -c simexplorer
+
Première connexion
==================
@@ -99,5 +97,5 @@
sudo chown USER simexplorer
cd
cd jboss-4.2.2.GA/bin
- ./run.sh -b ADRESSE_SERVEUR -c simexplorer
+ ./run.sh -b 0.0.0.0 -c simexplorer
\ No newline at end of file
1
0